diff --git a/target/linux/ath79/dts/ar9344_nec_wr9500n.dts b/target/linux/ath79/dts/ar9344_nec_wr9500n.dts new file mode 100644 index 00000000000000..1eaaade4cf03ba --- /dev/null +++ b/target/linux/ath79/dts/ar9344_nec_wr9500n.dts @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include + +#include "ar9344_nec_aterm.dtsi" + +/ { + compatible = "nec,wr9500n", "qca,ar9344"; + model = "NEC Aterm WR9500N"; +}; + +&keys { + switch-converter { + label = "cnv"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; +}; + +&ath9k_leds { + led-10 { + gpios = <&ath9k 14 GPIO_ACTIVE_LOW>; + color = ; + function = "converter"; + }; + + led-11 { + gpios = <&ath9k 15 GPIO_ACTIVE_LOW>; + color = ; + function = "converter"; + }; +}; + +&partitions { + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xfc0000>; + }; +}; diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c index 65dcf6bede8fa3..a802d15f312f9a 100644 --- a/target/linux/ath79/image/lzma-loader/src/board.c +++ b/target/linux/ath79/image/lzma-loader/src/board.c @@ -207,7 +207,8 @@ static inline void ap5030dn_init(void) static inline void ap5030dn_init(void) { } #endif -#ifdef CONFIG_BOARD_NEC_WR8750N +#if defined(CONFIG_BOARD_NEC_WR8750N) || \ + defined(CONFIG_BOARD_NEC_WR9500N) #define AR934X_PLL_SWITCH_CLK_CTRL_REG 0x24 #define AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL BIT(0) diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 09d00ddd6db74e..b1d0f49088ef38 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -131,6 +131,16 @@ define Device/nec_wr8750n endef TARGET_DEVICES += nec_wr8750n +define Device/nec_wr9500n + $(Device/nec-netbsd-aterm) + SOC := ar9344 + DEVICE_MODEL := Aterm WR9500N + BLOCKSIZE := 4k + IMAGE_SIZE := 16128k + NEC_FW_TYPE := H033 +endef +TARGET_DEVICES += nec_wr9500n + define Device/pqi_air-pen SOC := ar9330 DEVICE_VENDOR := PQI diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index 6f0f988309c9e2..e11c37453e7341 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -70,6 +70,7 @@ ath79_setup_interfaces() "0@eth1" "4:lan:1" ;; nec,wr8750n|\ + nec,wr9500n|\ tplink,tl-wr941n-v7-cn) ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" @@ -153,7 +154,8 @@ ath79_setup_macs() ubnt,picostation-m) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; - nec,wr8750n) + nec,wr8750n|\ + nec,wr9500n) wan_mac=$(mtd_get_mac_binary config 0xc) label_mac=$wan_mac ;; diff --git a/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh b/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh index 6b0ffd4046ad7a..19ddd29a1d4d40 100644 --- a/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh @@ -12,7 +12,8 @@ platform_check_image() { local board=$(board_name) case "$board" in - nec,wr8750n) + nec,wr8750n|\ + nec,wr9500n) local uboot_mtd=$(find_mtd_part "bootloader") # check "U-Boot ." string in the "bootloader" partition