diff --git a/target/linux/mediatek/dts/mt7981b-kebidumei-ax3000-u22.dts b/target/linux/mediatek/dts/mt7981b-kebidumei-ax3000-u22.dts new file mode 100644 index 0000000000..63a87bb0b7 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-kebidumei-ax3000-u22.dts @@ -0,0 +1,192 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include "mt7981b.dtsi" + +/ { + model = "Kebidumei AX3000-U22"; + compatible = "kebidumei,ax3000-u22", "mediatek,mt7981b"; + + aliases { + label-mac-device = &gmac1; + + led-boot = &led_status_green; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_green; + + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x10000000>; + device_type = "memory"; + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&pio 6 GPIO_ACTIVE_LOW>; + }; + + led_status_red: led-1 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + led-2 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&pio 35 GPIO_ACTIVE_LOW>; + }; + + led_status_green: led-3 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&pio 34 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + status = "okay"; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + nvmem-cells = <&macaddr_factory_e000 0>; + nvmem-cell-names = "mac-address"; + }; +}; + +&spi2 { + pinctrl-names = "default"; + pinctrl-0 = <&spi2_flash_pins>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "factory"; + reg = <0x50000 0xb0000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; + reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; + }; + + }; + }; + + partition@100000 { + label = "fip"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + compatible = "denx,fit"; + label = "firmware"; + reg = <0x180000 0xe80000>; + }; + }; + }; +}; + +&pio { + spi2_flash_pins: spi2-pins { + mux { + function = "spi"; + groups = "spi2", "spi2_wp_hold"; + }; + + conf-pu { + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; + drive-strength = ; + bias-pull-up = ; + }; + + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; +}; + +&wifi { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index e40e4166cb..a117c8ba7c 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -58,6 +58,7 @@ bananapi,bpi-r4-lite) ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx" ;; cudy,re3000-v1|\ +kebidumei,ax3000-u22|\ wavlink,wl-wn573hx3) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" "link tx rx" ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 70a4d51588..70ac202855 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -107,6 +107,7 @@ mediatek_setup_interfaces() cudy,ap3000outdoor-v1|\ cudy,ap3000-v1|\ cudy,re3000-v1|\ + kebidumei,ax3000-u22|\ netgear,eax17|\ netgear,wax220|\ openfi,6c|\ diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index e4c60ce0d4..a320c67987 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -157,6 +157,7 @@ platform_do_upgrade() { ;; cudy,re3000-v1|\ cudy,wr3000-v1|\ + kebidumei,ax3000-u22|\ totolink,x6000r|\ wavlink,wl-wn573hx3|\ widelantech,wap430x|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index f42514e6c3..fc4839bea1 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1616,6 +1616,21 @@ define Device/jdcloud_re-cp-03 endef TARGET_DEVICES += jdcloud_re-cp-03 +define Device/kebidumei_ax3000-u22 + DEVICE_VENDOR := Kebidumei + DEVICE_MODEL := AX3000-U22 + DEVICE_DTS := mt7981b-kebidumei-ax3000-u22 + DEVICE_DTS_DIR := ../dts + DEVICE_DTS_LOADADDR := 0x43f00000 + IMAGE_SIZE := 14848k + KERNEL_LOADADDR := 0x44000000 + KERNEL := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware + SUPPORTED_DEVICES += mediatek,mt7981-spim-nor-rfb +endef +TARGET_DEVICES += kebidumei_ax3000-u22 + define Device/keenetic_kn-1812-common DEVICE_DTS_DIR := ../dts DEVICE_PACKAGES := kmod-mt7992-firmware kmod-usb3 \