<div style='font: 15px/1.5 "Segoe UI", "Microsoft YaHei UI"; color: rgb(73, 105, 142); font-size-adjust: none; font-stretch: normal;'>HiWiFi HC5661 (Ji 1s) support.</div><div style='font: 15px/1.5 "Segoe UI", "Microsoft YaHei UI"; color: rgb(73, 105, 142); font-size-adjust: none; font-stretch: normal;'><div> </div><div>Signed-off-by: B Tian < tianyh2000@163.com></div><div>---</div><div> </div><div>diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds<br>index 56ba3b7..292859d 100755<br>--- a/target/linux/ramips/base-files/etc/board.d/01_leds<br>+++ b/target/linux/ramips/base-files/etc/board.d/01_leds<br>@@ -237,6 +237,11 @@ case $board in<br>   set_usb_led "lenovo:blue:usb"<br>   set_wifi_led "lenovo:blue:wifi"<br>   ;;<br>+ hc5661)<br>+  ucidef_set_led_default "power" "power" "hiwifi:blue:power" "1"<br>+  set_wifi_led "hiwifi:blue:wifi"<br>+  ucidef_set_led_interface "br-lan" "hiwifi:blue:network"<br>+  ;; <br>  zte-q7)<br>   set_wifi_led "zte:blue:status"<br>   ;;<br>diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network<br>index 24e1ba8..505f7d9 100755<br>--- a/target/linux/ramips/base-files/etc/board.d/02_network<br>+++ b/target/linux/ramips/base-files/etc/board.d/02_network<br>@@ -229,6 +229,14 @@ ramips_setup_interfaces()<br>   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t"<br>   ucidef_add_switch_vlan "switch0" "2" "0 6t"<br>   ;;<br>+<br>+ hc5661)<br>+  ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"<br>+  ucidef_add_switch "switch0" "1" "1"<br>+  ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"<br>+  ucidef_add_switch_vlan "switch0" "2" "0 6t"<br>+  ;;<br>+<br>  d105 | \<br>  na930 | \<br>  omni-emb-hpm|\<br>@@ -310,6 +318,7 @@ ramips_setup_macs()<br>  dir-320-b1 | \<br>  psr-680w |\<br>  sl-r7205 |\<br>+ hc5661 |\<br>  y1 |\<br>  y1s)<br>   lan_mac=$(cat /sys/class/net/eth0/address)<br>diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh<br>index 5301593..02b3ee0 100644<br>--- a/target/linux/ramips/base-files/etc/diag.sh<br>+++ b/target/linux/ramips/base-files/etc/diag.sh<br>@@ -224,6 +224,9 @@ get_status_led() {<br>  y1s)<br>   status_led="lenovo:blue:power"<br>   ;;<br>+ hc5661)<br>+  status_led="hiwifi:blue:power"<br>+  ;;<br>  zte-q7)<br>   status_led="zte:red:status"<br>   ;;<br>diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh<br>index 616f4a1..8311a5f 100755<br>--- a/target/linux/ramips/base-files/lib/ramips.sh<br>+++ b/target/linux/ramips/base-files/lib/ramips.sh<br>@@ -391,6 +391,9 @@ ramips_board_detect() {<br>  *"Lenovo Y1S")<br>   name="y1s"<br>   ;;<br>+ *"HiWiFi HC5661")<br>+  name="hc5661"<br>+  ;;<br>  *"Mediatek MT7621 evaluation board")<br>   name="mt7621"<br>   ;;<br>diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>index 17b456b..a913c41 100755<br>--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh<br>@@ -115,6 +115,7 @@ platform_check_image() {<br>  xiaomi-miwifi-mini |\<br>  y1 |\<br>  y1s |\<br>+ hc5661 |\<br>  zte-q7 |\<br>  zbt-wa05)<br>   [ "$magic" != "27051956" ] && {<br>diff --git a/target/linux/ramips/dts/HC5661.dts b/target/linux/ramips/dts/HC5661.dts<br>new file mode 100644<br>index 0000000..873b83c<br>--- /dev/null<br>+++ b/target/linux/ramips/dts/HC5661.dts<br>@@ -0,0 +1,137 @@<br>+/dts-v1/;<br>+<br>+/include/ "mt7620a.dtsi"<br>+<br>+/ {<br>+ compatible = "hiwifi,HC5661", "ralink,mt7620a-soc";<br>+ model = "HiWiFi HC5661";<br>+<br>+ chosen {<br>+  bootargs = "console=ttyS0,115200";<br>+ };<br>+ <br>+ <a href="mailto:palmbus@10000000">palmbus@10000000</a> {<br>+  <a href="mailto:sysc@0">sysc@0</a> {<br>+   ralink,gpiomux = "i2c", "jtag";<br>+   ralink,uartmux = "gpio";<br>+   ralink,wdtmux = <1>;<br>+  };<br>+<br>+  gpio0: <a href="mailto:gpio@600">gpio@600</a> {<br>+   status = "okay";<br>+  };<br>+<br>+  gpio2: <a href="mailto:gpio@660">gpio@660</a> {<br>+   status = "okay";<br>+  };<br>+<br>+  gpio3: <a href="mailto:gpio@688">gpio@688</a> {<br>+   status = "okay";<br>+  };<br>+<br>+<br>+  <a href="mailto:spi@b00">spi@b00</a> {<br>+   status = "okay";<br>+<br>+   <a href="mailto:m25p80@0">m25p80@0</a> {<br>+    #address-cells = <1>;<br>+    #size-cells = <1>;<br>+    compatible = "w25q128";<br>+    reg = <0 0>;<br>+    linux,modalias = "m25p80", "w25q128";<br>+    spi-max-frequency = <10000000>;<br>+<br>+    <a href="mailto:partition@0">partition@0</a> {<br>+     label = "u-boot";<br>+     reg = <0x0 0x30000>;<br>+     read-only;<br>+    };<br>+<br>+    <a href="mailto:partition@30000">partition@30000</a> {<br>+     label = "u-boot-env";<br>+     reg = <0x30000 0x10000>;<br>+     read-only;<br>+    };<br>+<br>+    factory: <a href="mailto:partition@40000">partition@40000</a> {<br>+     label = "factory";<br>+     reg = <0x40000 0x10000>;<br>+     read-only;<br>+    };<br>+<br>+    <a href="mailto:partition@50000">partition@50000</a> {<br>+     label = "firmware";<br>+     reg = <0x50000 0xfb0000>;<br>+    };<br>+   };<br>+  };<br>+ };<br>+<br>+ <a href="mailto:ehci@101c0000">ehci@101c0000</a> {<br>+  status = "okay";<br>+ };<br>+<br>+ <a href="mailto:ohci@101c1000">ohci@101c1000</a> {<br>+  status = "okay";<br>+ };<br>+ <br>+ <a href="mailto:sdhci@10130000">sdhci@10130000</a> {<br>+  status = "okay";<br>+ };<br>+ <br>+ <a href="mailto:pcie@10140000">pcie@10140000</a> {<br>+  status = "okay";<br>+ };<br>+ <br>+ <a href="mailto:wmac@10180000">wmac@10180000</a> {<br>+  ralink,mtd-eeprom = <&factory 0>;<br>+ };<br>+<br>+ <a href="mailto:ethernet@10100000">ethernet@10100000</a> {<br>+  pinctrl-names = "default";<br>+  pinctrl-0 = <&ephy_pins>;<br>+  mtd-mac-address = <&factory 0x4>;<br>+  ralink,port-map = "wllll";<br>+ };<br>+<br>+ pinctrl {<br>+  state_default: pinctrl0 {<br>+   gpio {<br>+    ralink,group = "uartf", "wled", "nd_sd";<br>+    ralink,function = "gpio";<br>+   };<br>+   pa {<br>+    ralink,group = "pa";<br>+    ralink,function = "pa";<br>+   };<br>+  };<br>+ };<br>+<br>+ gpio-keys-polled {<br>+  compatible = "gpio-keys-polled";<br>+  #address-cells = <1>;<br>+  #size-cells = <0>;<br>+  poll-interval = <20>;<br>+  reset {<br>+   label = "reset";<br>+   gpios = <&gpio0 12 1>;<br>+   linux,code = <0x198>;<br>+  };<br>+ };<br>+<br>+ gpio-leds {<br>+  compatible = "gpio-leds";<br>+  power1 {<br>+   label = "hiwifi:blue:power";<br>+   gpios = <&gpio0 9 1>;<br>+  };<br>+  wlan1 {<br>+   label = "hiwifi:blue:wifi";<br>+   gpios = <&gpio3 0 1>;<br>+  };<br>+  internet {<br>+   label = "hiwifi:blue:network";<br>+   gpios = <&gpio0 11 1>;<br>+  };<br>+ };<br>+};<br>diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile<br>index e6b5112..b537dd4 100644<br>--- a/target/linux/ramips/image/Makefile<br>+++ b/target/linux/ramips/image/Makefile<br>@@ -853,6 +853,7 @@ na930_mtd_size=20971520<br> Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size))<br> Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP)<br> Image/Build/Profile/Y1=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1,Y1)<br>+Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),HiWiFi-hc5661,HC5661)<br> Image/Build/Profile/Y1S=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1s,Y1S)<br> Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)<br> Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2)<br>@@ -885,6 +886,7 @@ define Image/Build/Profile/Default<br>  $(call Image/Build/Profile/MZK-750DHP,$(1))<br>  $(call Image/Build/Profile/NA930,$(1))<br>  $(call Image/Build/Profile/Y1,$(1))<br>+ $(call Image/Build/Profile/HC5661,$(1))<br>  $(call Image/Build/Profile/Y1S,$(1))<br>  $(call Image/Build/Profile/MLW221,$(1))<br>  $(call Image/Build/Profile/MLWG2,$(1))</div></div>