diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 341687625c8..0b17a0c47e2 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -19,6 +19,7 @@ alfa-network,r36m-e4g|\ alfa-network,tube-e4g|\ engenius,epg600|\ engenius,esr600h|\ +hongdian,h8922-v30|\ linksys,re7000|\ meig,slt866|\ sitecom,wlr-4100-v1-002|\ diff --git a/target/linux/ramips/dts/mt7620a_hongdian_h8922-v30.dts b/target/linux/ramips/dts/mt7620a_hongdian_h8922-v30.dts new file mode 100644 index 00000000000..d983f5f854c --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_hongdian_h8922-v30.dts @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a.dtsi" + +#include +#include +#include + +/ { + compatible = "hongdian,h8922-v30", "ralink,mt7620a-soc"; + model = "Hongdian H8922 v30"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led-wps { + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WPS; + }; + + led-rf-2 { + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + color = ; + function = "rf"; + function-enumerator = <2>; + }; + + led_sys: led-sys { + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_POWER; + default-state = "on"; + }; + + led-net-1 { + gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_MOBILE; + function-enumerator = <1>; + }; + + led-rf-1 { + gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; + color = ; + function = "rf"; + function-enumerator = <1>; + }; + + led-net-2 { + gpios = <&gpio2 31 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_MOBILE; + function-enumerator = <2>; + }; + + led-wlan { + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + + gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <600>; + always-running; + }; +}; + +&watchdog { + status = "disabled"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x2f000>; + read-only; + }; + + partition@2f000 { + label = "u-boot-env"; + reg = <0x2f000 0x1000>; + read-only; + }; + + partition@30000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x30000 0xffd000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "wled", "rgmii1", "rgmii2"; + function = "gpio"; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + + mediatek,portmap = "llllw"; +}; + +&pcie { + status = "okay"; +}; + +&wmac { + ralink,eeprom-data = <0x20760501 0x000c4376 0x2058ffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0x000c4376 0x2077000c 0x43762066 0x220c0000 0xffffb701 0x5577a8aa + 0x8c88ffff 0x0a000000 0x00000000 0x0000ffff 0xffff0a0a 0x0a0a0808 0x08080808 0x08080808 + 0x0e0e0e0e 0x0e0e0e0e 0x0e0e0e0e 0x0e0e80ff 0xffff80ff 0xffff0000 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x20ffffff 0xffffffff 0xffffffff 0xffff0606 + 0x06060402 0x06060400 0x06060400 0x07070400 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff + 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 6cf65ad1194..310cff692e2 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -604,6 +604,18 @@ define Device/hnet_c108 endef TARGET_DEVICES += hnet_c108 +define Device/hongdian_h8922-v30 + SOC := mt7620a + IMAGE_SIZE := 15808k + DEVICE_VENDOR := Hongdian + DEVICE_MODEL := H8922 + DEVICE_VARIANT := v30 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi uboot-envtools + IMAGES += rootfs.bin + IMAGE/rootfs.bin := append-rootfs | check-size 10560k +endef +TARGET_DEVICES += hongdian_h8922-v30 + define Device/humax_e2 SOC := mt7620a IMAGE_SIZE := 7744k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 577f77cb933..f07ce73e82b 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -15,6 +15,7 @@ ramips_setup_interfaces() dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ dovado,tiny-ac|\ + hongdian,h8922-v30|\ ohyeah,oy-0001|\ phicomm,psg1208|\ planex,db-wrt01|\