LED name for WLAN changed from hiwifi:blue:wlan2p4 to hiwifi:blue:wlan,
to align with other boards

Signed-off-by: Yousong Zhou <[email protected]>
---
 .../ath79/base-files/etc/board.d/01_leds      |   4 +
 .../linux/ath79/dts/ar9331_hiwifi_hc6361.dts  | 141 ++++++++++++++++++
 target/linux/ath79/image/generic.mk           |  12 ++
 3 files changed, 157 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 626842b072..fdca6e9457 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -88,6 +88,10 @@ glinet,gl-ar300m-lite)
 glinet,gl-x750)
        ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
        ;;
+hiwifi,hc6361)
+       ucidef_set_led_netdev "inet" "INET" "hiwifi:blue:internet" "eth1"
+       ucidef_set_led_wlan "wlan" "WLAN" "hiwifi:blue:wlan" "phy0tpt"
+       ;;
 netgear,wnr612-v2|\
 on,n150r)
        ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
diff --git a/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts 
b/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
new file mode 100644
index 0000000000..227dafe741
--- /dev/null
+++ b/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar9331.dtsi"
+
+/ {
+       model = "HiWiFi HC6361";
+       compatible = "hiwifi,hc6361", "qca,ar9331";
+
+       aliases {
+               serial0 = &uart;
+               led-boot = &system;
+               led-failsafe = &system;
+               led-running = &system;
+               led-upgrade = &system;
+       };
+
+       keys {
+               compatible = "gpio-keys-polled";
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               wlan: wlan {
+                       label = "hiwifi:blue:wlan";
+                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+               };
+               system: system {
+                       label = "hiwifi:blue:system";
+                       gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+               internet: internet {
+                       label = "hiwifi:blue:internet";
+                       gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       reg_usb_vbus: regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               gpio = <&gpio 20 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&spi {
+       status = "okay";
+       num-cs = <1>;
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       uboot: partition@0 {
+                               reg = <0x0 0x10000>;
+                               label = "u-boot";
+                               read-only;
+                       };
+
+                       bdinfo: partition@10000 {
+                               reg = <0x10000 0x10000>;
+                               label = "bdinfo";
+                               read-only;
+                       };
+
+                       firmware: partition@20000 {
+                               compatible = "denx,uimage";
+                               reg = <0x20000 0xfc0000>;
+                               label = "firmware";
+                       };
+
+                       backup: partition@fe0000 {
+                               reg = <0xfe0000 0x10000>;
+                               label = "backup";
+                               read-only;
+                       };
+
+                       art: partition@ff0000 {
+                               reg = <0xff0000 0x10000>;
+                               label = "art";
+                               read-only;
+                       };
+               };
+       };
+};
+
+&gpio {
+       status = "okay";
+};
+
+&uart {
+       status = "okay";
+};
+
+&eth0 {
+       status = "okay";
+       mtd-mac-address-ascii = <&bdinfo 0x18a>;
+       mtd-mac-address-increment = <1>;
+};
+
+&eth1 {
+       status = "okay";
+       mtd-mac-address-ascii = <&bdinfo 0x18a>;
+};
+
+&usb {
+       status = "okay";
+       dr_mode = "host";
+       vbus-supply = <&reg_usb_vbus>;
+};
+
+&usb_phy {
+       status = "okay";
+};
+
+&wmac {
+       status = "okay";
+       mtd-cal-data = <&art 0x1000>;
+       mtd-mac-address-ascii = <&bdinfo 0x18a>;
+};
diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index d5f67b88a6..d04ada88ab 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -406,6 +406,18 @@ define Device/glinet_gl-x750
 endef
 TARGET_DEVICES += glinet_gl-x750
 
+define Device/hiwifi_hc6361
+  ATH_SOC := ar9331
+  DEVICE_TITLE := HiWiFi HC6361
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2 
kmod-usb-storage \
+       kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
+  BOARDNAME := HiWiFi-HC6361
+  IMAGE_SIZE := 16128k
+  # ih_name must start with "tw150v1"
+  UIMAGE_NAME := tw150v1 OpenWrt Linux-$(LINUX_VERSION)
+endef
+TARGET_DEVICES += hiwifi_hc6361
+
 define Device/iodata_etg3-r
   ATH_SOC := ar9342
   DEVICE_TITLE := I-O DATA ETG3-R

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to