diff --git a/ath79-16m.config b/ath79-16m.config index 590a80c70f..2b2136ac11 100644 --- a/ath79-16m.config +++ b/ath79-16m.config @@ -16,6 +16,7 @@ CONFIG_PACKAGE_luci-app-watchcat=y CONFIG_PACKAGE_luci-app-wifischedule=y CONFIG_PACKAGE_luci-app-wol=y CONFIG_PACKAGE_luci-theme-material=y +CONFIG_PACKAGE_luci-theme-openwrt-2020=y CONFIG_PACKAGE_luci-app-aria2=y CONFIG_PACKAGE_luci-app-samba=y CONFIG_PACKAGE_luci-app-ddns=y diff --git a/ath79.config b/ath79.config index 59971e07a3..f646c24354 100644 --- a/ath79.config +++ b/ath79.config @@ -23,10 +23,11 @@ CONFIG_PACKAGE_luci-app-watchcat=y CONFIG_PACKAGE_luci-app-wifischedule=y CONFIG_PACKAGE_luci-app-wol=y CONFIG_PACKAGE_luci-theme-material=y +CONFIG_PACKAGE_luci-theme-openwrt-2020=y CONFIG_PACKAGE_luci-app-ddns=y CONFIG_PACKAGE_luci-app-easymesh=y CONFIG_PACKAGE_ddns-scripts=y CONFIG_PACKAGE_ddns-scripts_aliyun=y CONFIG_PACKAGE_ddns-scripts_dnspod=y CONFIG_PACKAGE_wget-ssl=y -CONFIG_PACKAGE_ipv6helper=y \ No newline at end of file +CONFIG_PACKAGE_ipv6helper=y diff --git a/files/patch/openwrt/v23.05.2/0001-add-ath79-dts.patch b/files/patch/openwrt/v23.05.2/0001-add-ath79-dts.patch new file mode 100644 index 0000000000..e57091064d --- /dev/null +++ b/files/patch/openwrt/v23.05.2/0001-add-ath79-dts.patch @@ -0,0 +1,1005 @@ +From 78d64b781fb4ca34d0ddf1280c2cec58f38b982a Mon Sep 17 00:00:00 2001 +From: a520a +Date: Wed, 22 Nov 2023 21:06:18 +0800 +Subject: [PATCH] add ath79 dts + +--- + .../dts/ar7240_tplink_tl-wr941n-v5-cn.dts | 172 ++++++++++++++++++ + .../ath79/dts/ar9331_mercury_mw150r-v10.dts | 160 ++++++++++++++++ + .../ath79/dts/qca9533_tplink_tl-wr845n-v3.dts | 147 +++++++++++++++ + .../ath79/dts/qca9558_netgear_jnr3300-v1.dts | 172 ++++++++++++++++++ + .../ath79/dts/tp9343_tplink_tl-wr886n-v2.dts | 136 ++++++++++++++ + .../generic/base-files/etc/board.d/01_leds | 22 ++- + .../generic/base-files/etc/board.d/02_network | 22 ++- + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 + + target/linux/ath79/image/generic-tp-link.mk | 52 ++++++ + 9 files changed, 884 insertions(+), 2 deletions(-) + create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wr941n-v5-cn.dts + create mode 100644 target/linux/ath79/dts/ar9331_mercury_mw150r-v10.dts + create mode 100644 target/linux/ath79/dts/qca9533_tplink_tl-wr845n-v3.dts + create mode 100644 target/linux/ath79/dts/qca9558_netgear_jnr3300-v1.dts + create mode 100644 target/linux/ath79/dts/tp9343_tplink_tl-wr886n-v2.dts + +diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr941n-v5-cn.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr941n-v5-cn.dts +new file mode 100644 +index 00000000..2886aa4b +--- /dev/null ++++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr941n-v5-cn.dts +@@ -0,0 +1,172 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "ar7240.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "TP-Link TL-WR941N v5 (CN)"; ++ compatible = "tplink,tl-wr941n-v5-cn", "qca,ar7240"; ++ ++ aliases { ++ led-boot = &led_system; ++ led-failsafe = &led_system; ++ led-running = &led_system; ++ led-upgrade = &led_system; ++ label-mac-device = &ath9k; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ }; ++ ++ leds: leds { ++ compatible = "gpio-leds"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinmux_switch_led_pins>; ++ ++ led_system: system { ++ label = "green:system"; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ qss { ++ label = "green:qss"; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan1 { ++ label = "green:lan1"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan2 { ++ label = "green:lan2"; ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan3 { ++ label = "green:lan3"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan4 { ++ label = "green:lan4"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan { ++ label = "green:wan"; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ ath9k-leds { ++ compatible = "gpio-leds"; ++ ++ wlan { ++ label = "green:wlan"; ++ gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ 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 0x20000>; ++ label = "u-boot"; ++ read-only; ++ }; ++ ++ partition@20000 { ++ compatible = "tplink,firmware"; ++ reg = <0x20000 0x7d0000>; ++ label = "firmware"; ++ }; ++ ++ art: partition@7f0000 { ++ reg = <0x7f0000 0x10000>; ++ label = "art"; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <(-1)>; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++}; ++ ++&pcie { ++ status = "okay"; ++ ++ ath9k: wifi@0,0 { ++ reg = <0x0000 0 0 0 0>; ++ qca,no-eeprom; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ #gpio-cells = <2>; ++ gpio-controller; ++ }; ++}; ++ ++&ath9k { ++ compatible = "pci168c,002b"; ++}; ++ ++&pinmux { ++ pinmux_switch_led_pins: switch_led_pins { ++ pinctrl-single,bits = <0x0 0x0 0xf8>; ++ }; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; +diff --git a/target/linux/ath79/dts/ar9331_mercury_mw150r-v10.dts b/target/linux/ath79/dts/ar9331_mercury_mw150r-v10.dts +new file mode 100644 +index 00000000..6eada333 +--- /dev/null ++++ b/target/linux/ath79/dts/ar9331_mercury_mw150r-v10.dts +@@ -0,0 +1,160 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "ar9331.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Mercury MW150R v10"; ++ compatible = "mercury,mw150r-v10", "qca,ar9331"; ++ ++ aliases { ++ led-boot = &led_system; ++ led-failsafe = &led_system; ++ led-running = &led_system; ++ led-upgrade = &led_system; ++ label-mac-device = &wmac; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; ++ debounce-interval = <60>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; ++ debounce-interval = <60>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&switch_led_disable_pins>; ++ ++ lan1 { ++ label = "green:lan1"; ++ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ lan2 { ++ label = "green:lan2"; ++ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ lan3 { ++ label = "green:lan3"; ++ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ lan4 { ++ label = "green:lan4"; ++ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ qss { ++ label = "green:qss"; ++ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led_system: system { ++ label = "green:system"; ++ gpios = <&gpio 27 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan { ++ label = "green:wan"; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wlan { ++ label = "green:wlan"; ++ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ 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 0x20000>; ++ label = "u-boot"; ++ read-only; ++ }; ++ ++ firmware: partition@20000 { ++ compatible = "tplink,firmware"; ++ reg = <0x20000 0x7d0000>; ++ label = "firmware"; ++ }; ++ ++ art: partition@7f0000 { ++ reg = <0x7f0000 0x10000>; ++ label = "art"; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++ ++ gmac-config { ++ device = <&gmac>; ++ ++ switch-phy-addr-swap = <0>; ++ switch-phy-swap = <0>; ++ }; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <(-1)>; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; +diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr845n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr845n-v3.dts +new file mode 100644 +index 00000000..df003b8a +--- /dev/null ++++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr845n-v3.dts +@@ -0,0 +1,147 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca953x.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "tplink,tl-wr845n-v3", "qca,qca9533"; ++ model = "TP-Link TL-WR845N v3"; ++ ++ aliases { ++ led-boot = &led_qss; ++ led-failsafe = &led_qss; ++ led-running = &led_qss; ++ led-upgrade = &led_qss; ++ label-mac-device = &wmac; ++ }; ++ ++ leds: leds { ++ compatible = "gpio-leds"; ++ ++ wifi { ++ label = "green:wlan"; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ led_qss: qss { ++ label = "green:qss"; ++ gpios = <&gpio 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan { ++ label = "green:wan"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan1 { ++ label = "green:lan1"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan2 { ++ label = "green:lan2"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan3 { ++ label = "green:lan3"; ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan4 { ++ label = "green:lan4"; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "Reset button"; ++ linux,code = ; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ ++ rfkill { ++ label = "RFKILL button"; ++ linux,code = ; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ 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 { ++ label = "u-boot"; ++ reg = <0x000000 0x020000>; ++ read-only; ++ }; ++ ++ partition@20000 { ++ compatible = "tplink,firmware"; ++ label = "firmware"; ++ reg = <0x020000 0x7d0000>; ++ }; ++ ++ art: partition@7f0000 { ++ label = "art"; ++ reg = <0x7f0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++//wan ports ++ð0 { ++ status = "okay"; ++ ++ phy-handle = <&swphy4>; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++}; ++ ++//lan ports ++ð1 { ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++//wifi radio ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; +diff --git a/target/linux/ath79/dts/qca9558_netgear_jnr3300-v1.dts b/target/linux/ath79/dts/qca9558_netgear_jnr3300-v1.dts +new file mode 100644 +index 00000000..fa904c46 +--- /dev/null ++++ b/target/linux/ath79/dts/qca9558_netgear_jnr3300-v1.dts +@@ -0,0 +1,172 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca955x.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "netgear,jnr3300-v1", "qca,qca9558"; ++ model = "Netgear JNR3300 v1"; ++ ++ aliases { ++ led-boot = &led_system; ++ led-failsafe = &led_system; ++ led-running = &led_system; ++ led-upgrade = &led_system; ++ label-mac-device = ð0; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_system: system { ++ label = "green:system"; ++ gpios = <&gpio 25 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ power_amber { ++ label = "amber:power"; ++ gpios = <&gpio 26 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan_green { ++ label = "green:wan"; ++ gpios = <&gpio 22 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan_amber { ++ label = "amber:wan"; ++ gpios = <&gpio 23 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan1_amber { ++ label = "amber:lan1"; ++ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan2_amber { ++ label = "amber:lan2"; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan3_amber { ++ label = "amber:lan3"; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan4_amber { ++ label = "amber:lan4"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wlan { ++ label = "green:wlan"; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ wps { ++ label = "green:wps"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ ++ wps { ++ label = "qss"; ++ linux,code = ; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ ++ rfkill { ++ label = "rfkill"; ++ linux,code = ; ++ gpios = <&gpio 21 GPIO_ACTIVE_LOW>; ++ debounce-interval = <60>; ++ }; ++ }; ++}; ++ ++ ++&spi { ++ status = "okay"; ++ ++ 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 { ++ label = "u-boot"; ++ reg = <0x000000 0x020000>; ++ read-only; ++ }; ++ ++ partition@20000 { ++ compatible = "tplink,firmware"; ++ label = "firmware"; ++ reg = <0x020000 0x7d0000>; ++ }; ++ ++ art: partition@7f0000 { ++ label = "art"; ++ reg = <0x7f0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++&mdio0 { ++ status = "okay"; ++ ++ switch0@1f { ++ compatible = "qca,ar8236"; ++ reg = <0x1f>; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ phy-mode = "mii"; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ fixed-link { ++ speed = <100>; ++ full-duplex; ++ }; ++}; ++ ++&wmac { ++ status = "okay"; ++ mtd-cal-data = <&art 0x1000>; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; +diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr886n-v2.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr886n-v2.dts +new file mode 100644 +index 00000000..6964eba5 +--- /dev/null ++++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr886n-v2.dts +@@ -0,0 +1,136 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca956x.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "tplink,tl-wr886n-v2", "qca,tp9343"; ++ model = "TP-Link TL-WR886N v2"; ++ ++ aliases { ++ led-boot = &led_system; ++ led-failsafe = &led_system; ++ led-running = &led_system; ++ led-upgrade = &led_system; ++ label-mac-device = &wmac; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_system: system { ++ label = "white:status"; ++ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan { ++ label = "green:wan"; ++ gpios = <&gpio 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan1 { ++ label = "green:lan1"; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan2 { ++ label = "green:lan2"; ++ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan3 { ++ label = "green:lan3"; ++ gpios = <&gpio 6 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan4 { ++ label = "green:lan4"; ++ gpios = <&gpio 7 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "Reset button"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ 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 { ++ label = "u-boot"; ++ reg = <0x000000 0x020000>; ++ read-only; ++ }; ++ ++ partition@20000 { ++ compatible = "tplink,firmware"; ++ label = "firmware"; ++ reg = <0x020000 0x7d0000>; ++ }; ++ ++ art: partition@7f0000 { ++ label = "art"; ++ reg = <0x7f0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++//wan ports ++ð0 { ++ status = "okay"; ++ ++ phy-mode = "mii"; ++ phy-handle = <&swphy4>; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <1>; ++}; ++ ++//lan ports ++ð1 { ++ status = "okay"; ++ ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++ mac-address-increment = <(-1)>; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ nvmem-cells = <&macaddr_uboot_1fc00>; ++ nvmem-cell-names = "mac-address"; ++}; ++ ++&uboot { ++ compatible = "nvmem-cells"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_uboot_1fc00: macaddr@1fc00 { ++ reg = <0x1fc00 0x6>; ++ }; ++}; +diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds +index b5cc4abf..ed2205e6 100644 +--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds ++++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds +@@ -6,6 +6,24 @@ board_config_update + board=$(board_name) + + case "$board" in ++mercury,mw150r-v10) ++ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ++ ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" ++ ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" ++ ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" ++ ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ++ ;; ++netgear,jnr3300-v1) ++ ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" ++ ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20" ++ ;; ++tplink,tl-wr941n-v5-cn) ++ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" ++ ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" ++ ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" ++ ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" ++ ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ++ ;; + 8dev,carambola2) + ucidef_set_led_netdev "lan" "LAN" "orange:eth0" "eth0" + ucidef_set_led_switch "wan" "WAN" "orange:eth1" "switch0" "0x04" +@@ -393,7 +411,9 @@ tplink,archer-c6-v2-us) + ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02" + ;; + tplink,archer-c25-v1|\ +-tplink,tl-wr842n-v3) ++tplink,tl-wr842n-v3|\ ++tplink,tl-wr845n-v3|\ ++tplink,tl-wr886n-v2) + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08" +diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network +index 0d7396a0..023472db 100644 +--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network ++++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network +@@ -8,6 +8,20 @@ ath79_setup_interfaces() + local board="$1" + + case "$board" in ++ netgear,jnr3300-v1) ++ ucidef_add_switch "switch0" \ ++ "0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "5:wan" ++ ;; ++ mercury,mw150r-v10) ++ ucidef_set_interface_wan "eth1" ++ ucidef_add_switch "switch0" \ ++ "0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" ++ ;; ++ tplink,tl-wr941n-v5-cn) ++ ucidef_set_interface_wan "eth0" ++ ucidef_add_switch "switch0" \ ++ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" ++ ;; + adtran,bsap1800-v2|\ + adtran,bsap1840|\ + allnet,all-wap02860ac|\ +@@ -197,7 +211,9 @@ ath79_setup_interfaces() + tplink,archer-c60-v3|\ + tplink,tl-wdr3500-v1|\ + tplink,tl-wr842n-v1|\ +- tplink,tl-wr842n-v3) ++ tplink,tl-wr842n-v3|\ ++ tplink,tl-wr845n-v3|\ ++ tplink,tl-wr886n-v2) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" +@@ -574,6 +590,10 @@ ath79_setup_macs() + local board="$1" + + case "$board" in ++ netgear,jnr3300-v1) ++ base_mac=$(mtd_get_mac_binary u-boot 0x1fc00) ++ wan_mac=$(macaddr_add "$base_mac" 1) ++ ;; + adtran,bsap1800-v2|\ + adtran,bsap1840) + lan_mac=$(mtd_get_mac_binary "Board data" 2) +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +index f4c2b26d..da848c51 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +@@ -104,6 +104,9 @@ case "$FIRMWARE" in + meraki,mr12) + caldata_extract "art" 0x11000 0xeb8 + ;; ++ tplink,tl-wr941n-v5-cn) ++ caldata_extract "art" 0x1000 0xeb8 ++ ;; + netgear,wnr2200-8m|\ + netgear,wnr2200-16m|\ + tplink,tl-wr842n-v1) +diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk +index cfabc89b..d53441ad 100644 +--- a/target/linux/ath79/image/generic-tp-link.mk ++++ b/target/linux/ath79/image/generic-tp-link.mk +@@ -1,5 +1,57 @@ + include ./common-tp-link.mk + ++define Device/mercury_mw150r-v10 ++ $(Device/tplink-8mlzma) ++ SOC := ar9331 ++ DEVICE_VENDOR := Mercury ++ DEVICE_MODEL := MW150R ++ DEVICE_VARIANT := v10 ++ TPLINK_HWID := 0x01500010 ++ SUPPORTED_DEVICES += mw150r-v10 ++endef ++TARGET_DEVICES += mercury_mw150r-v10 ++ ++define Device/netgear_jnr3300-v1 ++ $(Device/tplink-8mlzma) ++ SOC := qca9558 ++ DEVICE_VENDOR := Netgear ++ DEVICE_MODEL := JNR3300 ++ DEVICE_VARIANT := v1 ++ TPLINK_HWID := 0x33000001 ++ SUPPORTED_DEVICES += jnr3300-v1 ++endef ++TARGET_DEVICES += netgear_jnr3300-v1 ++ ++define Device/tplink_tl-wr845n-v3 ++ $(Device/tplink-8mlzma) ++ SOC := qca9533 ++ DEVICE_MODEL := TL-WR845N ++ DEVICE_VARIANT := v3 ++ TPLINK_HWID := 0x08450003 ++ SUPPORTED_DEVICES += tl-wr845n-v3 ++endef ++TARGET_DEVICES += tplink_tl-wr845n-v3 ++ ++define Device/tplink_tl-wr886n-v2 ++ $(Device/tplink-8mlzma) ++ SOC := tp9343 ++ DEVICE_MODEL := TL-WR886N ++ DEVICE_VARIANT := v2 ++ TPLINK_HWID := 0x08860002 ++ SUPPORTED_DEVICES += tl-wr886n-v2 ++endef ++TARGET_DEVICES += tplink_tl-wr886n-v2 ++ ++define Device/tplink_tl-wr941n-v5-cn ++ $(Device/tplink-8m) ++ SOC := ar7240 ++ DEVICE_MODEL := TL-WR941N ++ DEVICE_VARIANT := v5 (CN) ++ TPLINK_HWID := 0x09410005 ++ SUPPORTED_DEVICES += tl-wr941-v4 ++endef ++TARGET_DEVICES += tplink_tl-wr941n-v5-cn ++ + define Device/tplink_archer-a7-v5 + $(Device/tplink-safeloader-uimage) + SOC := qca9563 +-- +2.34.1 + diff --git a/files/patch/openwrt/v23.05.2/0002-mod-wdr4310-spi-16m.patch b/files/patch/openwrt/v23.05.2/0002-mod-wdr4310-spi-16m.patch new file mode 100644 index 0000000000..9030ac96e3 --- /dev/null +++ b/files/patch/openwrt/v23.05.2/0002-mod-wdr4310-spi-16m.patch @@ -0,0 +1,45 @@ +From 61c05b2907f69f20c9f7ff91b7d7133ff9fdfc73 Mon Sep 17 00:00:00 2001 +From: a520a +Date: Wed, 4 Jan 2023 11:27:50 +0800 +Subject: [PATCH] mod wdr4310 spi 16m + +--- + target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi | 4 ++-- + target/linux/ath79/image/generic-tp-link.mk | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi +index a3f4dc0..329564f 100644 +--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi ++++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi +@@ -88,12 +88,12 @@ + partition@20000 { + compatible = "tplink,firmware"; + label = "firmware"; +- reg = <0x020000 0x7d0000>; ++ reg = <0x020000 0xfd0000>; + }; + + art: partition@7f0000 { + label = "art"; +- reg = <0x7f0000 0x010000>; ++ reg = <0xff0000 0x010000>; + read-only; + }; + }; +diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk +index ce6583a..d9a28c7 100644 +--- a/target/linux/ath79/image/generic-tp-link.mk ++++ b/target/linux/ath79/image/generic-tp-link.mk +@@ -660,7 +660,7 @@ endef + TARGET_DEVICES += tplink_tl-wdr4300-v1-il + + define Device/tplink_tl-wdr4310-v1 +- $(Device/tplink-8mlzma) ++ $(Device/tplink-16mlzma) + SOC := ar9344 + DEVICE_MODEL := TL-WDR4310 + DEVICE_VARIANT := v1 +-- +2.34.1 +