summaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh1
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
-rw-r--r--target/linux/ramips/dts/HC5661A.dts123
-rw-r--r--target/linux/ramips/image/mt7628.mk7
7 files changed, 140 insertions, 2 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 4e6eeb2..be3306d 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -181,7 +181,8 @@ gl-mt300n|\
gl-mt750)
set_wifi_led "$board:wlan"
;;
-hc5661)
+hc5661|\
+hc5661a)
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
set_wifi_led "$board:blue:wlan2g"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index e8d360e..507eb8a 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -79,6 +79,7 @@ ramips_setup_interfaces()
dir-610-a1|\
dir-615-h1|\
firewrt|\
+ hc5661a|\
hlk-rm04|\
mac1200rv2|\
miwifi-mini|\
@@ -343,7 +344,8 @@ ramips_setup_macs()
e1700)
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
;;
- hc5*61)
+ hc5*61|\
+ hc5661a)
lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 744ff3c..a1297e2 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -140,6 +140,7 @@ get_status_led() {
status_led="$board:orange:status"
;;
hc5*61|\
+ hc5661a|\
jhr-n805r|\
jhr-n926r|\
mlw221|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 3072531..5800aac 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -217,6 +217,9 @@ ramips_board_detect() {
*"HC5661")
name="hc5661"
;;
+ *"HC5661A")
+ name="hc5661a"
+ ;;
*"HC5761")
name="hc5761"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index acdfdaf..06931c8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -62,6 +62,7 @@ platform_check_image() {
gl-mt300n|\
gl-mt750|\
hc5*61|\
+ hc5661a|\
hg255d|\
hlk-rm04|\
hpm|\
diff --git a/target/linux/ramips/dts/HC5661A.dts b/target/linux/ramips/dts/HC5661A.dts
new file mode 100644
index 0000000..f462606
--- /dev/null
+++ b/target/linux/ramips/dts/HC5661A.dts
@@ -0,0 +1,123 @@
+/dts-v1/;
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "HC5661A", "mediatek,mt7628an-soc";
+ model = "HiWiFi HC5661A";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x8000000>;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ system {
+ label = "hc5661a:blue:system";
+ gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ };
+ internet {
+ label = "hc5661a:blue:internet";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+ wlan2g {
+ label = "hc5661a:blue:wlan2g";
+ gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "refclk", "wled_an";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ linux,modalias = "m25p80", "w25q128";
+ spi-max-frequency = <10000000>;
+ m25p,chunked-io = <32>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "hw_panic";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xf70000>;
+ };
+
+ partition@fc0000 {
+ label = "oem";
+ reg = <0xfc0000 0x20000>;
+ read-only;
+ };
+
+ bdinfo: partition@fe0000 {
+ label = "bdinfo";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "backup";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk
index 0304921..6292d45 100644
--- a/target/linux/ramips/image/mt7628.mk
+++ b/target/linux/ramips/image/mt7628.mk
@@ -11,6 +11,13 @@ define Device/mt7628
endef
TARGET_DEVICES += mt7628
+define Device/hc5661a
+ DTS := HC5661A
+ IMAGE_SIZE := $(ralink_default_fw_size_16M)
+ DEVICE_TITLE := HiWiFi HC5661A
+endef
+TARGET_DEVICES += hc5661a
+
define Device/miwifi-nano
DTS := MIWIFI-NANO
IMAGE_SIZE := $(ralink_default_fw_size_16M)