From: Chuanhong Guo Date: Thu, 2 Aug 2018 07:14:10 +0000 (+0800) Subject: ath79: rename dts/image using manufacturer_board scheme X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8288af1e18adfe68bc556df93521881d1e5d0eda;p=openwrt%2Fstaging%2Fstintel.git ath79: rename dts/image using manufacturer_board scheme This helps getting rid of SUPPORTED_DEVICES which can be auto-generated in image/Makefile. Signed-off-by: Chuanhong Guo --- diff --git a/target/linux/ath79/dts/ar7240_tl-wr740n-v2.dts b/target/linux/ath79/dts/ar7240_tl-wr740n-v2.dts deleted file mode 100644 index 8754537754..0000000000 --- a/target/linux/ath79/dts/ar7240_tl-wr740n-v2.dts +++ /dev/null @@ -1,158 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar7240.dtsi" - -/ { - compatible = "tplink,tl-wr740n-v2", "qca,ar7240"; - model = "TP-Link TL-WR740N v2"; - - aliases { - led-status = &led_system; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - 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>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&switch_led_pins>; - - led_system: system { - label = "tl-wr740n-v2:green:system"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - }; - - lan1 { - label = "tl-wr740n-v2:green:lan1"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - lan2 { - label = "tl-wr740n-v2:green:lan2"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - - lan3 { - label = "tl-wr740n-v2:green:lan3"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - }; - - lan4 { - label = "tl-wr740n-v2:green:lan4"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - }; - - wan { - label = "tl-wr740n-v2:green:wan"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - }; - - wlan { - label = "tl-wr740n-v2:green:wlan"; - gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - wps { - label = "tl-wr740n-v2:green:wps"; - gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - reg = <0x20000 0x3d0000>; - label = "firmware"; - }; - - art: partition@3f0000 { - reg = <0x3f0000 0x10000>; - label = "art"; - read-only; - }; - }; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; -}; - -&pcie { - status = "okay"; - - ath9k: wifi@168c,002b { - compatible = "pci168c,002b"; - reg = <0x0000 0 0 0 0>; - qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; - #gpio-cells = <2>; - gpio-controller; - }; -}; - -&pinmux { - switch_led_pins: pinmux_switch_led_pins { - pinctrl-single,bits = <0x0 0x0 0xf8>; - }; -}; - -&uart { - status = "okay"; -}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v2.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v2.dts new file mode 100644 index 0000000000..8754537754 --- /dev/null +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v2.dts @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7240.dtsi" + +/ { + compatible = "tplink,tl-wr740n-v2", "qca,ar7240"; + model = "TP-Link TL-WR740N v2"; + + aliases { + led-status = &led_system; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + 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>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&switch_led_pins>; + + led_system: system { + label = "tl-wr740n-v2:green:system"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "tl-wr740n-v2:green:lan1"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tl-wr740n-v2:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tl-wr740n-v2:green:lan3"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tl-wr740n-v2:green:lan4"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tl-wr740n-v2:green:wan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "tl-wr740n-v2:green:wlan"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + wps { + label = "tl-wr740n-v2:green:wps"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + reg = <0x20000 0x3d0000>; + label = "firmware"; + }; + + art: partition@3f0000 { + reg = <0x3f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@168c,002b { + compatible = "pci168c,002b"; + reg = <0x0000 0 0 0 0>; + qca,no-eeprom; + mtd-mac-address = <&uboot 0x1fc00>; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&pinmux { + switch_led_pins: pinmux_switch_led_pins { + pinctrl-single,bits = <0x0 0x0 0xf8>; + }; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/ar7241_tl-mr3220-v1.dts b/target/linux/ath79/dts/ar7241_tl-mr3220-v1.dts deleted file mode 100644 index c970c25446..0000000000 --- a/target/linux/ath79/dts/ar7241_tl-mr3220-v1.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7241_tl-mr3x20.dtsi" - -/ { - compatible = "tplink,tl-mr3220-v1", "qca,ar7241"; - model = "TP-Link TL-MR3220 v1"; - - ath9k-leds { - compatible = "gpio-leds"; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; -}; diff --git a/target/linux/ath79/dts/ar7241_tl-mr3420-v1.dts b/target/linux/ath79/dts/ar7241_tl-mr3420-v1.dts deleted file mode 100644 index e4c49f9a51..0000000000 --- a/target/linux/ath79/dts/ar7241_tl-mr3420-v1.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7241_tl-mr3x20.dtsi" - -/ { - compatible = "tplink,tl-mr3420-v1", "qca,ar7241"; - model = "TP-Link TL-MR3420 v1"; - - ath9k-leds { - compatible = "gpio-leds"; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; -}; diff --git a/target/linux/ath79/dts/ar7241_tl-mr3x20.dtsi b/target/linux/ath79/dts/ar7241_tl-mr3x20.dtsi deleted file mode 100644 index bd83cdb7c1..0000000000 --- a/target/linux/ath79/dts/ar7241_tl-mr3x20.dtsi +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "ar7241_tp-link.dtsi" - -/ { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_usb_power { - gpio-export,name = "tp-link:power:usb"; - gpio-export,output = <1>; - gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&gpio_leds { - led3g { - label = "tp-link:green:3g"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; -}; - -&usb { - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; diff --git a/target/linux/ath79/dts/ar7241_tl-wr841-v7.dts b/target/linux/ath79/dts/ar7241_tl-wr841-v7.dts deleted file mode 100644 index 980809f1ba..0000000000 --- a/target/linux/ath79/dts/ar7241_tl-wr841-v7.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar7241_tp-link.dtsi" - -/ { - compatible = "tplink,tl-wr841-v7", "qca,ar7241"; - model = "TP-LINK TL-WR841N/ND v7"; - - ath9k-leds { - compatible = "gpio-leds"; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; -}; diff --git a/target/linux/ath79/dts/ar7241_tp-link.dtsi b/target/linux/ath79/dts/ar7241_tp-link.dtsi deleted file mode 100644 index 6cc515b7cc..0000000000 --- a/target/linux/ath79/dts/ar7241_tp-link.dtsi +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include -#include - -#include "ar7241.dtsi" - -/ { - aliases { - led-status = &led_system; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - qss { - label = "qss"; - linux,code = ; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio_leds: gpio-leds { - compatible = "gpio-leds"; - - led_system: system { - label = "tp-link:green:system"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - }; - - qss { - label = "tp-link:green:qss"; - gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - reg = <0x20000 0x3d0000>; - label = "firmware"; - }; - - partition@3f0000 { - reg = <0x3f0000 0x10000>; - label = "art"; - read-only; - }; - }; - }; -}; - -&pcie { - status = "okay"; - - ath9k: wifi@0 { - reg = <0x0000 0 0 0 0>; - #gpio-cells = <2>; - gpio-controller; - qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; -}; - -&gpio { - status = "okay"; -}; - -&uart { - status = "okay"; -}; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi new file mode 100644 index 0000000000..6cc515b7cc --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include + +#include "ar7241.dtsi" + +/ { + aliases { + led-status = &led_system; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + qss { + label = "qss"; + linux,code = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio_leds: gpio-leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tp-link:green:system"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + reg = <0x20000 0x3d0000>; + label = "firmware"; + }; + + partition@3f0000 { + reg = <0x3f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0 { + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + qca,no-eeprom; + mtd-mac-address = <&uboot 0x1fc00>; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; +}; + +&gpio { + status = "okay"; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts new file mode 100644 index 0000000000..3445fba55b --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_tplink_tl-mr3x20.dtsi" + +/ { + compatible = "tplink,tl-mr3220-v1", "qca,ar7241"; + model = "TP-Link TL-MR3220 v1"; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts new file mode 100644 index 0000000000..06b0264e31 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_tplink_tl-mr3x20.dtsi" + +/ { + compatible = "tplink,tl-mr3420-v1", "qca,ar7241"; + model = "TP-Link TL-MR3420 v1"; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi new file mode 100644 index 0000000000..ad18945af4 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar7241_tplink.dtsi" + +/ { + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_usb_power { + gpio-export,name = "tp-link:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&gpio_leds { + led3g { + label = "tp-link:green:3g"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; +}; + +&usb { + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts new file mode 100644 index 0000000000..1aeeab7e21 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_tplink.dtsi" + +/ { + compatible = "tplink,tl-wr841-v7", "qca,ar7241"; + model = "TP-LINK TL-WR841N/ND v7"; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tl-wr2543-v1.dts deleted file mode 100644 index d7bb406ab0..0000000000 --- a/target/linux/ath79/dts/ar7242_tl-wr2543-v1.dts +++ /dev/null @@ -1,181 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar7242.dtsi" - -/ { - compatible = "tplink,tl-wr2543-v1", "qca,ar7242"; - model = "TP-LINK TL-WR2543N/ND"; - - aliases { - led-status = &system; - }; - - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - - gpio-keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - 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 { - compatible = "gpio-leds"; - - system: wps { - label = "tplink:green:wps"; - gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - usb { - label = "tplink:green:usb"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - }; - - ath9k-leds { - compatible = "gpio-leds"; - - wlan2g { - label = "tplink:green:wlan2g"; - gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - wlan5g { - label = "tplink:green:wlan5g"; - gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - }; - - rtl8367 { - compatible = "realtek,rtl8367"; - gpio-sda = <&gpio 1 GPIO_ACTIVE_HIGH>; - gpio-sck = <&gpio 6 GPIO_ACTIVE_HIGH>; - realtek,extif0 = <1 0 1 1 1 1 1 1 2>; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - }; - }; - }; -}; - -&pll { - clocks = <&extosc>; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - label = "firmware"; - reg = <0x020000 0x7d0000>; - }; - - partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x010000>; - read-only; - }; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&usb { - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&pcie { - status = "okay"; - - ath9k: wifi@0 { - reg = <0x0000 0 0 0 0>; - #gpio-cells = <2>; - gpio-controller; - qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; - }; -}; - -ð0 { - status = "okay"; - - phy-mode = "rgmii"; - mtd-mac-address = <&uboot 0x1fc00>; - - phy-handle = <&phy0>; - fixed-link { - speed = <1000>; - full-duplex; - }; -}; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts new file mode 100644 index 0000000000..d7bb406ab0 --- /dev/null +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7242.dtsi" + +/ { + compatible = "tplink,tl-wr2543-v1", "qca,ar7242"; + model = "TP-LINK TL-WR2543N/ND"; + + aliases { + led-status = &system; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + + gpio-keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + 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 { + compatible = "gpio-leds"; + + system: wps { + label = "tplink:green:wps"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + usb { + label = "tplink:green:usb"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan2g { + label = "tplink:green:wlan2g"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + wlan5g { + label = "tplink:green:wlan5g"; + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + }; + + rtl8367 { + compatible = "realtek,rtl8367"; + gpio-sda = <&gpio 1 GPIO_ACTIVE_HIGH>; + gpio-sck = <&gpio 6 GPIO_ACTIVE_HIGH>; + realtek,extif0 = <1 0 1 1 1 1 1 1 2>; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; +}; + +&pll { + clocks = <&extosc>; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + label = "firmware"; + reg = <0x020000 0x7d0000>; + }; + + partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb { + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0 { + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + qca,no-eeprom; + mtd-mac-address = <&uboot 0x1fc00>; + }; +}; + +ð0 { + status = "okay"; + + phy-mode = "rgmii"; + mtd-mac-address = <&uboot 0x1fc00>; + + phy-handle = <&phy0>; + fixed-link { + speed = <1000>; + full-duplex; + }; +}; diff --git a/target/linux/ath79/dts/ar9132_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tl-wr1043nd-v1.dts deleted file mode 100644 index d01d2cc716..0000000000 --- a/target/linux/ath79/dts/ar9132_tl-wr1043nd-v1.dts +++ /dev/null @@ -1,158 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; - -#include -#include - -#include "ar9132.dtsi" - -/ { - compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132"; - model = "TP-Link TL-WR1043ND Version 1"; - - aliases { - led-status = &system; - }; - - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <40000000>; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - button0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - button1 { - label = "qss"; - linux,code = ; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - leds { - compatible = "gpio-leds"; - usb { - label = "tp-link:green:usb"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - - system: system { - label = "tp-link:green:system"; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - linux,default-trigger = "heartbeat"; - }; - - qss { - label = "tp-link:green:qss"; - gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; - }; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; - - rtl8366rb { - compatible = "realtek,rtl8366rb"; - gpio-sda = <&gpio 18 GPIO_ACTIVE_HIGH>; - gpio-sck = <&gpio 19 GPIO_ACTIVE_HIGH>; - - resets = <&rst 8>; - reset-names = "switch"; - }; -}; - -&uart { - status = "okay"; -}; - -&pll { - clocks = <&extosc>; -}; - -&usb { - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - label = "firmware"; - reg = <0x020000 0x7D0000>; - }; - - art: partition@7F0000 { - label = "art"; - reg = <0x7F0000 0x010000>; - read-only; - }; - }; - }; -}; - -ð0 { - status = "okay"; - - phy-mode = "rgmii"; - mtd-mac-address = <&uboot 0x1fc00>; - - resets = <&rst 9>; - reset-names = "mac"; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts new file mode 100644 index 0000000000..d01d2cc716 --- /dev/null +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include + +#include "ar9132.dtsi" + +/ { + compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132"; + model = "TP-Link TL-WR1043ND Version 1"; + + aliases { + led-status = &system; + }; + + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + button1 { + label = "qss"; + linux,code = ; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + usb { + label = "tp-link:green:usb"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; + + rtl8366rb { + compatible = "realtek,rtl8366rb"; + gpio-sda = <&gpio 18 GPIO_ACTIVE_HIGH>; + gpio-sck = <&gpio 19 GPIO_ACTIVE_HIGH>; + + resets = <&rst 8>; + reset-names = "switch"; + }; +}; + +&uart { + status = "okay"; +}; + +&pll { + clocks = <&extosc>; +}; + +&usb { + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + label = "firmware"; + reg = <0x020000 0x7D0000>; + }; + + art: partition@7F0000 { + label = "art"; + reg = <0x7F0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-mode = "rgmii"; + mtd-mac-address = <&uboot 0x1fc00>; + + resets = <&rst 9>; + reset-names = "mac"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/ar9331_dpt_module.dts b/target/linux/ath79/dts/ar9331_dpt_module.dts deleted file mode 100644 index fb01ce43c6..0000000000 --- a/target/linux/ath79/dts/ar9331_dpt_module.dts +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - model = "DPTechnics DPT-Module"; - compatible = "dptechnics,dpt-module", "qca,ar9331"; - - aliases { - serial0 = &uart; - }; - - leds { - compatible = "gpio-leds"; - - system { - label = "dpt-module:green:system"; - gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <100>; - - button@0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&ref { - clock-frequency = <25000000>; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb { - dr_mode = "host"; - status = "okay"; -}; - -&usb_phy { - status = "okay"; -}; - -&spi { - num-chipselects = <1>; - status = "okay"; - - /* Winbond 25Q128FVSG SPI flash */ - spiflash: w25q128@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "winbond,w25q128", "jedec,spi-nor"; - spi-max-frequency = <104000000>; - reg = <0>; - }; -}; diff --git a/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts b/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts new file mode 100644 index 0000000000..fb01ce43c6 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + model = "DPTechnics DPT-Module"; + compatible = "dptechnics,dpt-module", "qca,ar9331"; + + aliases { + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + + system { + label = "dpt-module:green:system"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button@0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&ref { + clock-frequency = <25000000>; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + num-chipselects = <1>; + status = "okay"; + + /* Winbond 25Q128FVSG SPI flash */ + spiflash: w25q128@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "winbond,w25q128", "jedec,spi-nor"; + spi-max-frequency = <104000000>; + reg = <0>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_etactica-eg200.dts b/target/linux/ath79/dts/ar9331_etactica-eg200.dts deleted file mode 100644 index 5d6b72cd80..0000000000 --- a/target/linux/ath79/dts/ar9331_etactica-eg200.dts +++ /dev/null @@ -1,134 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - model = "eTactica EG200"; - compatible = "etactica,eg200", "rme-eg200"; - - aliases { - serial0 = &uart; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <50>; - - restore { - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - modbus { - label = "eg200:red:modbus"; - gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - default-state = "off"; - }; - - etactica { - label = "eg200:red:etactica"; - gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; - default-state = "off"; - }; - - eth0 { - label = "eg200:red:eth0"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - wlan { - label = "eg200:red:wlan"; - gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb { - dr_mode = "host"; - status = "okay"; -}; - -&usb_phy { - status = "okay"; -}; - -ð0 { - status = "okay"; - mtd-mac-address = <&art 0x0>; - - gmac-config { - device = <&gmac>; - switch-phy-addr-swap = <1>; - switch-phy-swap = <1>; - }; -}; - -ð1 { - status = "okay"; - compatible = "syscon", "simple-mfd"; -}; - -&spi { - num-chipselects = <1>; - status = "okay"; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - spi-max-frequency = <50000000>; - reg = <0>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - uboot@0 { - reg = <0x0 0x40000>; - read-only; - }; - - uboot-env@40000 { - reg = <0x40000 0x10000>; - read-only; - }; - - firmware@50000 { - reg = <0x50000 0xfa0000>; - }; - - art: art@ff0000 { - reg = <0xff0000 0x10000>; - read-only; - }; - }; - }; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x1002>; -}; diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts new file mode 100644 index 0000000000..5d6b72cd80 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + model = "eTactica EG200"; + compatible = "etactica,eg200", "rme-eg200"; + + aliases { + serial0 = &uart; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <50>; + + restore { + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + modbus { + label = "eg200:red:modbus"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + etactica { + label = "eg200:red:etactica"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + eth0 { + label = "eg200:red:eth0"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + wlan { + label = "eg200:red:wlan"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; + + gmac-config { + device = <&gmac>; + switch-phy-addr-swap = <1>; + switch-phy-swap = <1>; + }; +}; + +ð1 { + status = "okay"; + compatible = "syscon", "simple-mfd"; +}; + +&spi { + num-chipselects = <1>; + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot@0 { + reg = <0x0 0x40000>; + read-only; + }; + + uboot-env@40000 { + reg = <0x40000 0x10000>; + read-only; + }; + + firmware@50000 { + reg = <0x50000 0xfa0000>; + }; + + art: art@ff0000 { + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x1002>; +}; diff --git a/target/linux/ath79/dts/ar9331_omega.dts b/target/linux/ath79/dts/ar9331_omega.dts deleted file mode 100644 index cc47f56e84..0000000000 --- a/target/linux/ath79/dts/ar9331_omega.dts +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - model = "Onion Omega"; - compatible = "onion,omega", "qca,ar9331"; - - aliases { - serial0 = &uart; - }; - - leds { - compatible = "gpio-leds"; - - system { - label = "onion:amber:system"; - gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <100>; - - button@0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&ref { - clock-frequency = <25000000>; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb { - dr_mode = "host"; - status = "okay"; -}; - -&usb_phy { - status = "okay"; -}; - -&spi { - num-chipselects = <1>; - status = "okay"; - - /* Winbond 25Q128FVSG SPI flash */ - spiflash: w25q128@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "winbond,w25q128", "jedec,spi-nor"; - spi-max-frequency = <104000000>; - reg = <0>; - }; -}; diff --git a/target/linux/ath79/dts/ar9331_onion_omega.dts b/target/linux/ath79/dts/ar9331_onion_omega.dts new file mode 100644 index 0000000000..cc47f56e84 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_onion_omega.dts @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + model = "Onion Omega"; + compatible = "onion,omega", "qca,ar9331"; + + aliases { + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + + system { + label = "onion:amber:system"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button@0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&ref { + clock-frequency = <25000000>; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + num-chipselects = <1>; + status = "okay"; + + /* Winbond 25Q128FVSG SPI flash */ + spiflash: w25q128@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "winbond,w25q128", "jedec,spi-nor"; + spi-max-frequency = <104000000>; + reg = <0>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_tl-mr10u.dts b/target/linux/ath79/dts/ar9331_tl-mr10u.dts deleted file mode 100644 index d92b5623ba..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-mr10u.dts +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9331_tl-wr703n_tl-mr10u.dtsi" - -/ { - model = "TP-Link TL-MR10U"; - compatible = "tplink,tl-mr10u", "qca,ar9331"; -}; - -®_usb_vbus { - gpio = <&gpio 18 GPIO_ACTIVE_HIGH>; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tl-mr3020-v1.dts deleted file mode 100644 index 74db416ba6..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-mr3020-v1.dts +++ /dev/null @@ -1,180 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - model = "TP-Link TL-MR3020 V1"; - compatible = "tplink,tl-mr3020-v1", "qca,ar9331"; - - aliases { - serial0 = &uart; - led-status = &system; - }; - - leds { - compatible = "gpio-leds"; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - lan { - label = "tp-link:green:lan"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - system: wps { - label = "tp-link:green:wps"; - gpios = <&gpio 26 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - led3g { - label = "tp-link:green:3g"; - gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - button0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - debounce-interval = <60>; - }; - - button1 { - label = "sw1"; - linux,input-type = ; - linux,code = ; - gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; - debounce-interval = <60>; - }; - - button2 { - label = "sw2"; - linux,input-type = ; - linux,code = ; - gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; - debounce-interval = <60>; - }; - }; - - reg_usb_vbus: reg_usb_vbus { - compatible = "regulator-fixed"; - regulator-name = "usb_vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - -&ref { - clock-frequency = <25000000>; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb { - dr_mode = "host"; - vbus-supply = <®_usb_vbus>; - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&spi { - num-chipselects = <1>; - status = "okay"; - - /* Spansion S25FL032PIF SPI flash */ - spiflash: s25sl032p@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - spi-max-frequency = <104000000>; - reg = <0>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - uboot: partition@0 { - label = "u-boot"; - reg = <0x000000 0x020000>; - read-only; - }; - - partition@20000 { - label = "firmware"; - reg = <0x020000 0x3c0000>; - }; - - partition@3e0000 { - label = "config"; - reg = <0x3e0000 0x010000>; - read-only; - }; - - art: partition@3f0000 { - label = "art"; - reg = <0x3f0000 0x010000>; - read-only; - }; - }; - }; -}; - - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - gmac-config { - device = <&gmac>; - - switch-phy-addr-swap = <0>; - switch-phy-swap = <0>; - }; -}; - -ð1 { - status = "okay"; - compatible = "syscon", "simple-mfd"; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-wr703n.dts b/target/linux/ath79/dts/ar9331_tl-wr703n.dts deleted file mode 100644 index da02e48662..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-wr703n.dts +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9331_tl-wr703n_tl-mr10u.dtsi" - -/ { - model = "TP-Link TL-WR703N"; - compatible = "tplink,tl-wr703n", "qca,ar9331"; -}; - -®_usb_vbus { - gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tl-wr703n_tl-mr10u.dtsi deleted file mode 100644 index d23dea7d92..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-wr703n_tl-mr10u.dtsi +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - aliases { - serial0 = &uart; - led-status = &led_system; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - led_system: system { - label = "tl-wr703n:blue:system"; - gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - }; - }; - - reg_usb_vbus: reg_usb_vbus { - compatible = "regulator-fixed"; - regulator-name = "usb_vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - enable-active-high; - }; - -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - reg = <0x20000 0x3d0000>; - label = "firmware"; - }; - - art: partition@3f0000 { - reg = <0x3f0000 0x10000>; - label = "art"; - read-only; - }; - }; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - - gmac-config { - device = <&gmac>; - - switch-phy-addr-swap = <0>; - switch-phy-swap = <0>; - }; -}; - -ð1 { - status = "okay"; - compatible = "syscon", "simple-mfd"; -}; - -&gpio { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&usb { - dr_mode = "host"; - vbus-supply = <®_usb_vbus>; - status = "okay"; -}; - -&usb_phy { - status = "okay"; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-wr740nd-v4.dts b/target/linux/ath79/dts/ar9331_tl-wr740nd-v4.dts deleted file mode 100644 index 583716308d..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-wr740nd-v4.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9331_tl-wr741nd-v4.dtsi" - -/ { - model = "TP-Link TL-WR740N/ND v4"; - compatible = "tplink,tl-wr740nd-v4"; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dts b/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dts deleted file mode 100644 index ef68cc7d22..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9331_tl-wr741nd-v4.dtsi" - -/ { - model = "TP-Link TL-WR741N/ND v4"; - compatible = "tplink,tl-wr741nd-v4"; -}; diff --git a/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dtsi deleted file mode 100644 index 9d8c1a022e..0000000000 --- a/target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dtsi +++ /dev/null @@ -1,157 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "ar9331.dtsi" - -/ { - compatible = "tplink,tl-wr741n-v4", "qca,ar9331"; - model = "TP-Link TL-WR741N/ND v4"; - - aliases { - serial0 = &uart; - led-status = &led_system; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - 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>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&switch_led_pins>; - - lan1 { - label = "tp-link:green:lan1"; - gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; - }; - - lan2 { - label = "tp-link:green:lan2"; - gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; - }; - - lan3 { - label = "tp-link:green:lan3"; - gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - }; - - lan4 { - label = "tp-link:green:lan4"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - }; - - qss { - label = "tp-link:green:qss"; - gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; - }; - - led_system: system { - label = "tp-link:green:system"; - gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; - }; - - wan { - label = "tp-link:green:wan"; - gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; - }; - - wlan { - label = "tp-link:green:wlan"; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - }; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - reg = <0x20000 0x3d0000>; - label = "firmware"; - }; - - art: partition@3f0000 { - reg = <0x3f0000 0x10000>; - label = "art"; - read-only; - }; - }; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; - - gmac-config { - device = <&gmac>; - - switch-phy-addr-swap = <1>; - switch-phy-swap = <1>; - }; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; -}; - -&gpio { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr10u.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr10u.dts new file mode 100644 index 0000000000..648020f96a --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr10u.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9331_tplink_tl-wr703n_tl-mr10u.dtsi" + +/ { + model = "TP-Link TL-MR10U"; + compatible = "tplink,tl-mr10u", "qca,ar9331"; +}; + +®_usb_vbus { + gpio = <&gpio 18 GPIO_ACTIVE_HIGH>; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts new file mode 100644 index 0000000000..74db416ba6 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -0,0 +1,180 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + model = "TP-Link TL-MR3020 V1"; + compatible = "tplink,tl-mr3020-v1", "qca,ar9331"; + + aliases { + serial0 = &uart; + led-status = &system; + }; + + leds { + compatible = "gpio-leds"; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "tp-link:green:lan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + system: wps { + label = "tp-link:green:wps"; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led3g { + label = "tp-link:green:3g"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + button1 { + label = "sw1"; + linux,input-type = ; + linux,code = ; + gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + button2 { + label = "sw2"; + linux,input-type = ; + linux,code = ; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + }; + + reg_usb_vbus: reg_usb_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&ref { + clock-frequency = <25000000>; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + vbus-supply = <®_usb_vbus>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + num-chipselects = <1>; + status = "okay"; + + /* Spansion S25FL032PIF SPI flash */ + spiflash: s25sl032p@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <104000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x020000 0x3c0000>; + }; + + partition@3e0000 { + label = "config"; + reg = <0x3e0000 0x010000>; + read-only; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x010000>; + read-only; + }; + }; + }; +}; + + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +ð1 { + status = "okay"; + compatible = "syscon", "simple-mfd"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n.dts new file mode 100644 index 0000000000..21707d08f8 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9331_tplink_tl-wr703n_tl-mr10u.dtsi" + +/ { + model = "TP-Link TL-WR703N"; + compatible = "tplink,tl-wr703n", "qca,ar9331"; +}; + +®_usb_vbus { + gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi new file mode 100644 index 0000000000..d23dea7d92 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi @@ -0,0 +1,124 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + aliases { + serial0 = &uart; + led-status = &led_system; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tl-wr703n:blue:system"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + }; + + reg_usb_vbus: reg_usb_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + }; + +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + reg = <0x20000 0x3d0000>; + label = "firmware"; + }; + + art: partition@3f0000 { + reg = <0x3f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +ð1 { + status = "okay"; + compatible = "syscon", "simple-mfd"; +}; + +&gpio { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&usb { + dr_mode = "host"; + vbus-supply = <®_usb_vbus>; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts new file mode 100644 index 0000000000..f3683f858b --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9331_tplink_tl-wr741nd-v4.dtsi" + +/ { + model = "TP-Link TL-WR740N/ND v4"; + compatible = "tplink,tl-wr740nd-v4"; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts new file mode 100644 index 0000000000..46c140763a --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9331_tplink_tl-wr741nd-v4.dtsi" + +/ { + model = "TP-Link TL-WR741N/ND v4"; + compatible = "tplink,tl-wr741nd-v4"; +}; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi new file mode 100644 index 0000000000..9d8c1a022e --- /dev/null +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + compatible = "tplink,tl-wr741n-v4", "qca,ar9331"; + model = "TP-Link TL-WR741N/ND v4"; + + aliases { + serial0 = &uart; + led-status = &led_system; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + 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>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&switch_led_pins>; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + + led_system: system { + label = "tp-link:green:system"; + gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + reg = <0x20000 0x3d0000>; + label = "firmware"; + }; + + art: partition@3f0000 { + reg = <0x3f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; + + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <1>; + switch-phy-swap = <1>; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +&gpio { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/ar9344_tl-wdr3600.dts b/target/linux/ath79/dts/ar9344_tl-wdr3600.dts deleted file mode 100644 index d0886ee86b..0000000000 --- a/target/linux/ath79/dts/ar9344_tl-wdr3600.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9344_tl-wdr4300.dtsi" - -/ { - model = "TP-Link WDR3600"; - compatible = "tplink,tl-wdr3600"; -}; diff --git a/target/linux/ath79/dts/ar9344_tl-wdr4300.dts b/target/linux/ath79/dts/ar9344_tl-wdr4300.dts deleted file mode 100644 index 617da57098..0000000000 --- a/target/linux/ath79/dts/ar9344_tl-wdr4300.dts +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "ar9344_tl-wdr4300.dtsi" - -/ { - model = "TP-Link WDR4300"; - compatible = "tplink,tl-wdr4300"; -}; diff --git a/target/linux/ath79/dts/ar9344_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tl-wdr4300.dtsi deleted file mode 100644 index 558a763747..0000000000 --- a/target/linux/ath79/dts/ar9344_tl-wdr4300.dtsi +++ /dev/null @@ -1,241 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include -#include - -#include "ar9344.dtsi" - -/ { - model = "TP-Link WDR4300"; - compatible = "tplink,tl-wdr4300"; - - aliases { - led-status = &system; - }; - - leds { - compatible = "gpio-leds"; - - usb1 { - label = "tp-link:green:usb1"; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port1>; - linux,default-trigger = "usbport"; - }; - - usb2 { - label = "tp-link:green:usb2"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port2>; - linux,default-trigger = "usbport"; - }; - - wlan2g { - label = "tp-link:green:wlan2g"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - system: system { - label = "tp-link:green:system"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - qss { - label = "tp-link:green:qss"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - ath9k-leds { - compatible = "gpio-leds"; - - wlan5g { - label = "tp-link:green:wlan5g"; - gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy1tpt"; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - linux,code = ; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wifi { - linux,code = ; - linux,input-type = ; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_usb1_power { - gpio-export,name = "tp-link:power:usb1"; - gpio-export,output = <1>; - gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; - }; - - gpio_usb2_power { - gpio-export,name = "tp-link:power:usb2"; - gpio-export,output = <1>; - gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; - - gpio_ext_lna0 { - gpio-export,name = "tp-link:ext:lna0"; - gpio-export,output = <1>; - gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; - }; - - gpio_ext_lna1 { - gpio-export,name = "tp-link:ext:lna1"; - gpio-export,output = <1>; - gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&ref { - clock-frequency = <40000000>; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&spi { - num-cs = <1>; - - status = "okay"; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - label = "firmware"; - reg = <0x020000 0x7d0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x010000>; - read-only; - }; - }; - }; -}; - -&usb { - status = "okay"; - - port@1 { - reg = <1>; - #trigger-source-cells = <0>; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - - hub_port2: port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&pcie { - status = "okay"; - - ath9k: wifi@168c,0033 { - compatible = "pci168c,0033"; - reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&uboot 0x1fc00>; - qca,no-eeprom; - #gpio-cells = <2>; - gpio-controller; - }; -}; - -&wmac { - status = "okay"; - - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; -}; - -&mdio0 { - status = "okay"; - - phy-mask = <0>; - - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "rgmii"; - - qca,ar8327-initvals = < - 0x04 0x07600000 /* PORT0 PAD MODE CTRL */ - 0x10 0x80000080 /* POWER_ON_STRIP */ - 0x50 0xc737c737 /* LED_CTRL0 */ - 0x54 0x00000000 /* LED_CTRL1 */ - 0x58 0x00000000 /* LED_CTRL2 */ - 0x5c 0x0030c300 /* LED_CTRL3 */ - 0x7c 0x0000007e /* PORT0_STATUS */ - >; - }; -}; - -ð0 { - status = "okay"; - - /* default for ar934x, except for 1000M */ - pll-data = <0x06000000 0x00000101 0x00001616>; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-2)>; - - phy-mode = "rgmii"; - phy-handle = <&phy0>; -}; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts new file mode 100644 index 0000000000..95ee3490aa --- /dev/null +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_tplink_tl-wdr4300.dtsi" + +/ { + model = "TP-Link WDR3600"; + compatible = "tplink,tl-wdr3600"; +}; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts new file mode 100644 index 0000000000..a6359309d2 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_tplink_tl-wdr4300.dtsi" + +/ { + model = "TP-Link WDR4300"; + compatible = "tplink,tl-wdr4300"; +}; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi new file mode 100644 index 0000000000..558a763747 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include + +#include "ar9344.dtsi" + +/ { + model = "TP-Link WDR4300"; + compatible = "tplink,tl-wdr4300"; + + aliases { + led-status = &system; + }; + + leds { + compatible = "gpio-leds"; + + usb1 { + label = "tp-link:green:usb1"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port1>; + linux,default-trigger = "usbport"; + }; + + usb2 { + label = "tp-link:green:usb2"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port2>; + linux,default-trigger = "usbport"; + }; + + wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wifi { + linux,code = ; + linux,input-type = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_usb1_power { + gpio-export,name = "tp-link:power:usb1"; + gpio-export,output = <1>; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + }; + + gpio_usb2_power { + gpio-export,name = "tp-link:power:usb2"; + gpio-export,output = <1>; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + }; + + gpio_ext_lna0 { + gpio-export,name = "tp-link:ext:lna0"; + gpio-export,output = <1>; + gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; + }; + + gpio_ext_lna1 { + gpio-export,name = "tp-link:ext:lna1"; + gpio-export,output = <1>; + gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&spi { + num-cs = <1>; + + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + label = "firmware"; + reg = <0x020000 0x7d0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +&usb { + status = "okay"; + + port@1 { + reg = <1>; + #trigger-source-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + hub_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@168c,0033 { + compatible = "pci168c,0033"; + reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&uboot 0x1fc00>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + + qca,ar8327-initvals = < + 0x04 0x07600000 /* PORT0 PAD MODE CTRL */ + 0x10 0x80000080 /* POWER_ON_STRIP */ + 0x50 0xc737c737 /* LED_CTRL0 */ + 0x54 0x00000000 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x0030c300 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + /* default for ar934x, except for 1000M */ + pll-data = <0x06000000 0x00000101 0x00001616>; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-2)>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; +}; diff --git a/target/linux/ath79/dts/qca9533_tl-wr841-v9.dts b/target/linux/ath79/dts/qca9533_tl-wr841-v9.dts deleted file mode 100644 index b82fd5adf9..0000000000 --- a/target/linux/ath79/dts/qca9533_tl-wr841-v9.dts +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9533_tl-wr841.dtsi" - -/ { - compatible = "tplink,tl-wr841n-v9", "qca,qca9533"; - model = "TP-Link TL-WR841N/ND Version 9"; -}; diff --git a/target/linux/ath79/dts/qca9533_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tl-wr841.dtsi deleted file mode 100644 index 4219125300..0000000000 --- a/target/linux/ath79/dts/qca9533_tl-wr841.dtsi +++ /dev/null @@ -1,142 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9533.dtsi" - -/ { - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - aliases { - led-status = &system; - }; - - leds { - compatible = "gpio-leds"; - - wifi { - label = "tp-link:green:wlan"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - system: wifi_qss { - label = "tp-link:green:qss"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - wan { - label = "tp-link:green:wan"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan1 { - label = "tp-link:green:lan1"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan2 { - label = "tp-link:green:lan2"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan3 { - label = "tp-link:green:lan3"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan4 { - label = "tp-link:green:lan4"; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - 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>; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - label = "firmware"; - reg = <0x020000 0x3d0000>; - }; - - art: partition@3f0000 { - label = "art"; - reg = <0x3f0000 0x010000>; - read-only; - }; - }; - }; -}; - -ð1 { - mtd-mac-address = <&uboot 0x1fc00>; -}; - -ð0 { - status = "okay"; - phy-handle = <&swphy4>; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts new file mode 100644 index 0000000000..179fada001 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9533_tplink_tl-wr841.dtsi" + +/ { + compatible = "tplink,tl-wr841n-v9", "qca,qca9533"; + model = "TP-Link TL-WR841N/ND Version 9"; +}; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi new file mode 100644 index 0000000000..4219125300 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9533.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + }; + + leds { + compatible = "gpio-leds"; + + wifi { + label = "tp-link:green:wlan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + system: wifi_qss { + label = "tp-link:green:qss"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + 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>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + label = "firmware"; + reg = <0x020000 0x3d0000>; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð1 { + mtd-mac-address = <&uboot 0x1fc00>; +}; + +ð0 { + status = "okay"; + phy-handle = <&swphy4>; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/qca9558_tl-archer-c7-v2.dts b/target/linux/ath79/dts/qca9558_tl-archer-c7-v2.dts deleted file mode 100644 index fdb35a1791..0000000000 --- a/target/linux/ath79/dts/qca9558_tl-archer-c7-v2.dts +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9558_tl-archer-c7.dtsi" - -/ { - compatible = "tplink,tl-archer-c7-v2", "qca,qca9558"; - model = "TP-Link Archer C7 Version 2"; -}; - -&gpio_keys { - rfkill { - gpios = <&gpio 23 GPIO_ACTIVE_LOW>; - linux,code = ; - linux,input-type = ; - debounce-interval = <60>; - }; -}; - -&gpio_leds { - wlan5g { - label = "tp-link:green:wlan5g"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; -}; - -&mtdparts { - uboot: u-boot@0 { - reg = <0x000000 0x020000>; - read-only; - }; - - firmware@20000 { - reg = <0x020000 0xfd0000>; - }; - - art: art@ff0000 { - reg = <0xff0000 0x010000>; - read-only; - }; -}; \ No newline at end of file diff --git a/target/linux/ath79/dts/qca9558_tl-archer-c7.dtsi b/target/linux/ath79/dts/qca9558_tl-archer-c7.dtsi deleted file mode 100644 index 6fb25a9d2e..0000000000 --- a/target/linux/ath79/dts/qca9558_tl-archer-c7.dtsi +++ /dev/null @@ -1,193 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9557.dtsi" - -/ { - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - aliases { - led-status = &system; - }; - - gpio_leds: leds { - compatible = "gpio-leds"; - - system: system { - label = "tp-link:green:system"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - usb1 { - label = "tp-link:green:usb1"; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port1>; - linux,default-trigger = "usbport"; - }; - - usb2 { - label = "tp-link:green:usb2"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port0>; - linux,default-trigger = "usbport"; - }; - - led_wlan2g: wlan2g { - label = "tp-link:green:wlan2g"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy1tpt"; - }; - - qss { - label = "tp-link:green:qss"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - gpio_keys: keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - reset { - label = "Reset button"; - linux,code = ; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_usb1_power { - gpio-export,name = "tp-link:power:usb1"; - gpio-export,output = <1>; - gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; - - gpio_usb2_power { - gpio-export,name = "tp-link:power:usb2"; - gpio-export,output = <1>; - gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; - }; - - }; -}; - -&pcie1 { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb_phy0 { - status = "okay"; -}; - -&usb0 { - status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy1 { - status = "okay"; -}; - -&usb1 { - status = "okay"; - - hub_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - mtdparts: partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - }; - }; -}; - -&mdio0 { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - - qca,ar8327-initvals = < - 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ - 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */ - 0x50 0xc737c737 /* LED_CTRL0 */ - 0x54 0x00000000 /* LED_CTRL1 */ - 0x58 0x00000000 /* LED_CTRL2 */ - 0x5c 0x0030c300 /* LED_CTRL3 */ - 0x7c 0x0000007e /* PORT0_STATUS */ - 0x94 0x0000007e /* PORT6 STATUS */ - >; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; - phy-handle = <&phy0>; - - gmac-config { - device = <&gmac>; - rgmii-enabled = <1>; - }; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/qca9558_tl-wr1043nd-v2.dts b/target/linux/ath79/dts/qca9558_tl-wr1043nd-v2.dts deleted file mode 100644 index 0cfc486883..0000000000 --- a/target/linux/ath79/dts/qca9558_tl-wr1043nd-v2.dts +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9558_tl-wr1043nd.dtsi" - -/ { - compatible = "tplink,tl-wr1043nd-v2", "qca,qca9557"; - model = "TP-Link TL-WR1043ND Version 2"; -}; diff --git a/target/linux/ath79/dts/qca9558_tl-wr1043nd-v3.dts b/target/linux/ath79/dts/qca9558_tl-wr1043nd-v3.dts deleted file mode 100644 index c41129837c..0000000000 --- a/target/linux/ath79/dts/qca9558_tl-wr1043nd-v3.dts +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9558_tl-wr1043nd.dtsi" - -/ { - compatible = "tplink,tl-wr1043nd-v3", "qca,qca9557"; - model = "TP-Link TL-WR1043ND Version 3"; -}; diff --git a/target/linux/ath79/dts/qca9558_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tl-wr1043nd.dtsi deleted file mode 100644 index 4438f911fc..0000000000 --- a/target/linux/ath79/dts/qca9558_tl-wr1043nd.dtsi +++ /dev/null @@ -1,180 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9557.dtsi" - -/ { - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - aliases { - led-status = &system; - }; - - leds { - compatible = "gpio-leds"; - - system: system { - label = "tp-link:green:system"; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - linux,default-trigger = "heartbeat"; - }; - - usb { - label = "tp-link:green:usb"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port0>; - linux,default-trigger = "usbport"; - }; - - wifi_green { - label = "tp-link:green:wlan"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - wifi_wps { - label = "tp-link:green:wps"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - reset { - label = "Reset button"; - linux,code = ; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wifi { - label = "RFKILL button"; - linux,code = ; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_usb_power { - gpio-export,name = "tp-link:power:usb"; - gpio-export,output = <1>; - gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&usb_phy0 { - status = "okay"; -}; - -&usb0 { - status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - 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 { - label = "firmware"; - reg = <0x020000 0x7d0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x010000>; - read-only; - }; - }; - }; -}; - -&mdio0 { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - qca,ar8327-initvals = < - 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ - 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */ - 0x10 0x81000080 /* POWER_ON_STRIP */ - 0x50 0xcc35cc35 /* LED_CTRL0 */ - 0x54 0xca35ca35 /* LED_CTRL1 */ - 0x58 0xc935c935 /* LED_CTRL2 */ - 0x5c 0x03ffff00 /* LED_CTRL3 */ - 0x7c 0x0000007e /* PORT0_STATUS */ - 0x94 0x0000007e /* PORT6 STATUS */ - >; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; - phy-handle = <&phy0>; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&uboot 0x1fc00>; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; -}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7-v2.dts new file mode 100644 index 0000000000..e096db7485 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7-v2.dts @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_tplink_tl-archer-c7.dtsi" + +/ { + compatible = "tplink,tl-archer-c7-v2", "qca,qca9558"; + model = "TP-Link Archer C7 Version 2"; +}; + +&gpio_keys { + rfkill { + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + debounce-interval = <60>; + }; +}; + +&gpio_leds { + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; +}; + +&mtdparts { + uboot: u-boot@0 { + reg = <0x000000 0x020000>; + read-only; + }; + + firmware@20000 { + reg = <0x020000 0xfd0000>; + }; + + art: art@ff0000 { + reg = <0xff0000 0x010000>; + read-only; + }; +}; \ No newline at end of file diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7.dtsi new file mode 100644 index 0000000000..6fb25a9d2e --- /dev/null +++ b/target/linux/ath79/dts/qca9558_tplink_tl-archer-c7.dtsi @@ -0,0 +1,193 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + usb1 { + label = "tp-link:green:usb1"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port1>; + linux,default-trigger = "usbport"; + }; + + usb2 { + label = "tp-link:green:usb2"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; + + led_wlan2g: wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy1tpt"; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + gpio_keys: keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_usb1_power { + gpio-export,name = "tp-link:power:usb1"; + gpio-export,output = <1>; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + }; + + gpio_usb2_power { + gpio-export,name = "tp-link:power:usb2"; + gpio-export,output = <1>; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + }; + + }; +}; + +&pcie1 { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy1 { + status = "okay"; +}; + +&usb1 { + status = "okay"; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + mtdparts: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */ + 0x50 0xc737c737 /* LED_CTRL0 */ + 0x54 0x00000000 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x0030c300 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6 STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; + phy-handle = <&phy0>; + + gmac-config { + device = <&gmac>; + rgmii-enabled = <1>; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts new file mode 100644 index 0000000000..a2992c10fe --- /dev/null +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_tplink_tl-wr1043nd.dtsi" + +/ { + compatible = "tplink,tl-wr1043nd-v2", "qca,qca9557"; + model = "TP-Link TL-WR1043ND Version 2"; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts new file mode 100644 index 0000000000..a473cf42ea --- /dev/null +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_tplink_tl-wr1043nd.dtsi" + +/ { + compatible = "tplink,tl-wr1043nd-v3", "qca,qca9557"; + model = "TP-Link TL-WR1043ND Version 3"; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi new file mode 100644 index 0000000000..4438f911fc --- /dev/null +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -0,0 +1,180 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + }; + + leds { + compatible = "gpio-leds"; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + + usb { + label = "tp-link:green:usb"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; + + wifi_green { + label = "tp-link:green:wlan"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + wifi_wps { + label = "tp-link:green:wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wifi { + label = "RFKILL button"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_usb_power { + gpio-export,name = "tp-link:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + 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 { + label = "firmware"; + reg = <0x020000 0x7d0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */ + 0x10 0x81000080 /* POWER_ON_STRIP */ + 0x50 0xcc35cc35 /* LED_CTRL0 */ + 0x54 0xca35ca35 /* LED_CTRL1 */ + 0x58 0xc935c935 /* LED_CTRL2 */ + 0x5c 0x03ffff00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6 STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; + phy-handle = <&phy0>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/qca9563_phicomm-k2t.dts b/target/linux/ath79/dts/qca9563_phicomm-k2t.dts deleted file mode 100644 index 4ff9320d5c..0000000000 --- a/target/linux/ath79/dts/qca9563_phicomm-k2t.dts +++ /dev/null @@ -1,151 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca956x.dtsi" - -/ { - model = "Phicomm K2T"; - compatible = "phicomm,k2t"; - - aliases { - led-status = &status_red; - }; - - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - leds { - compatible = "gpio-leds"; - - status_blue { - label = "phicomm:blue:status"; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - status_red: status_red { - label = "phicomm:red:status"; - gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; - default-state = "off"; - }; - - status_yellow { - label = "phicomm:yellow:status"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - linux,code = ; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&pcie { - status = "okay"; -}; - -&spi { - num-cs = <1>; - - status = "okay"; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x30000>; - read-only; - }; - - partition@30000 { - label = "config"; - reg = <0x030000 0x10000>; - read-only; - }; - - partition@40000 { - label = "permanent"; - reg = <0x040000 0x50000>; - read-only; - }; - - partition@90000 { - label = "firmware"; - reg = <0x090000 0xf60000>; - }; - - art: partition@ff0000 { - label = "art"; - reg = <0xff0000 0x010000>; - read-only; - }; - }; - }; -}; - -&mdio0 { - status = "okay"; - - phy-mask = <0>; - - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "sgmii"; - - qca,ar8327-initvals = < - 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ - 0x10 0x81000080 /* POWER_ON_STRIP */ - 0x50 0xcc35cc35 /* LED_CTRL0 */ - 0x54 0xcb37cb37 /* LED_CTRL1 */ - 0x58 0x00000000 /* LED_CTRL2 */ - 0x5c 0x00f3cf00 /* LED_CTRL3 */ - 0x7c 0x0000007e /* PORT0_STATUS */ - >; - }; -}; - -ð0 { - status = "okay"; - - pll-data = <0x03000101 0x00000101 0x00001919>; - - phy-mode = "sgmii"; - phy-handle = <&phy0>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; -}; diff --git a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts new file mode 100644 index 0000000000..4ff9320d5c --- /dev/null +++ b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + model = "Phicomm K2T"; + compatible = "phicomm,k2t"; + + aliases { + led-status = &status_red; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + status_blue { + label = "phicomm:blue:status"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + status_red: status_red { + label = "phicomm:red:status"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + status_yellow { + label = "phicomm:yellow:status"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&spi { + num-cs = <1>; + + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x030000 0x10000>; + read-only; + }; + + partition@40000 { + label = "permanent"; + reg = <0x040000 0x50000>; + read-only; + }; + + partition@90000 { + label = "firmware"; + reg = <0x090000 0xf60000>; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x10 0x81000080 /* POWER_ON_STRIP */ + 0x50 0xcc35cc35 /* LED_CTRL0 */ + 0x54 0xcb37cb37 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x00f3cf00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x03000101 0x00000101 0x00001919>; + + phy-mode = "sgmii"; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; +}; diff --git a/target/linux/ath79/dts/qca9563_tl-re450-v2.dts b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts deleted file mode 100644 index 646cdf2975..0000000000 --- a/target/linux/ath79/dts/qca9563_tl-re450-v2.dts +++ /dev/null @@ -1,195 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca956x.dtsi" - -/ { - compatible = "tplink,re450-v2", "qca,qca9563"; - model = "TP-Link RE450 v2"; - - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - aliases { - led-status = &system; - mdio-gpio0 = &mdio2; - }; - - leds { - compatible = "gpio-leds"; - - system: power { - label = "tp-link:blue:power"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - }; - - wlan2g { - label = "tp-link:blue:wlan2g"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy1tpt"; - }; - - wlan5g { - label = "tp-link:blue:wlan5g"; - gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - lan_link { - label = "tp-link:green:lan_link"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan_data { - label = "tp-link:green:lan_data"; - gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - wps_blue { - label = "tp-link:blue:wps"; - gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - default-state = "off"; - }; - - wps_red { - label = "tp-link:red:wps"; - gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - reset { - label = "Reset button"; - linux,code = ; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - power { - label = "Power button"; - linux,code = ; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - leds { - label = "LED control button"; - linux,code = ; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wps { - label = "WPS button"; - linux,code = ; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - mdio2: mdio { - compatible = "virtual,mdio-gpio"; - - gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */ - <&gpio 4 GPIO_ACTIVE_HIGH>; /* MDIO */ - #address-cells = <1>; - #size-cells = <0>; - - phy0: ethernet-phy@4 { - reg = <4>; - device_type = "ethernet-phy"; - reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x020000>; - read-only; - }; - - partition@20000 { - label = "firmware"; - reg = <0x020000 0x5e0000>; - }; - - partition@600000 { - label = "partition-table"; - reg = <0x600000 0x010000>; - read-only; - }; - - info: partition@610000 { - label = "product-info"; - reg = <0x610000 0x020000>; - read-only; - }; - - partition@630000 { - label = "config"; - reg = <0x630000 0x020000>; - read-only; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x010000>; - read-only; - }; - }; - }; -}; - -ð0 { - status = "okay"; - mtd-mac-address = <&info 0x8>; - phy-handle = <&phy0>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; -}; diff --git a/target/linux/ath79/dts/qca9563_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tl-wr1043n.dtsi deleted file mode 100644 index 6c56306ad5..0000000000 --- a/target/linux/ath79/dts/qca9563_tl-wr1043n.dtsi +++ /dev/null @@ -1,204 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca956x.dtsi" - -/ { - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - aliases { - led-status = &system; - }; - - gpio_leds: leds { - compatible = "gpio-leds"; - - system: system { - label = "tp-link:green:system"; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - linux,default-trigger = "heartbeat"; - }; - - wifi_green { - label = "tp-link:green:wlan"; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; - linux,default-trigger = "phy0tpt"; - }; - - wifi_wps { - label = "tp-link:green:wps"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - wan { - label = "tp-link:green:wan"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - wan_fail { - label = "tp-link:orange:wan"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan1 { - label = "tp-link:green:lan1"; - gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan2 { - label = "tp-link:green:lan2"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan3 { - label = "tp-link:green:lan3"; - gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - lan4 { - label = "tp-link:green:lan4"; - gpios = <&gpio 20 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; - - keys { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - - reset { - label = "Reset button"; - linux,code = ; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wifi { - label = "RFKILL button"; - linux,code = ; - gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_usb_power { - gpio-export,name = "tp-link:power:usb"; - gpio-export,output = <1>; - gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&uart { - status = "okay"; -}; - -&gpio { - status = "okay"; -}; - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x020000>; - read-only; - }; - - partition@20000 { - label = "firmware"; - reg = <0x020000 0xf30000>; - }; - - info: partition@f50000 { - label = "product-info"; - reg = <0xf50000 0x020000>; - read-only; - }; - - partition@f70000 { - label = "config"; - reg = <0xf70000 0x050000>; - read-only; - }; - - partition@fc0000 { - label = "partition-table"; - reg = <0xfc0000 0x010000>; - read-only; - }; - - partition@fd0000 { - label = "logs"; - reg = <0xfd0000 0x020000>; - read-only; - }; - - art: partition@ff0000 { - label = "ART"; - reg = <0xff0000 0x010000>; - read-only; - }; - }; - }; -}; - -&mdio0 { - status = "okay"; - - phy-mask = <0>; - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "sgmii"; - - qca,ar8327-initvals = < - 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ - 0x7c 0x0000007e /* PORT0_STATUS */ - >; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&info 0x8>; - phy-mode = "sgmii"; - phy-handle = <&phy0>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; -}; diff --git a/target/linux/ath79/dts/qca9563_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tl-wr1043nd-v4.dts deleted file mode 100644 index bc0f356000..0000000000 --- a/target/linux/ath79/dts/qca9563_tl-wr1043nd-v4.dts +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9563_tl-wr1043n.dtsi" - -/ { - compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563"; - model = "TP-Link TL-WR1043ND Version 4"; -}; - -&gpio_leds { - usb { - label = "tp-link:green:usb"; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - default-state = "off"; - trigger-sources = <&hub_port0>; - linux,default-trigger = "usbport"; - }; -}; - -&usb_phy0 { - status = "okay"; -}; - -&usb0 { - status = "okay"; - - hub_port0: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-re450-v2.dts b/target/linux/ath79/dts/qca9563_tplink_tl-re450-v2.dts new file mode 100644 index 0000000000..646cdf2975 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_tl-re450-v2.dts @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + compatible = "tplink,re450-v2", "qca,qca9563"; + model = "TP-Link RE450 v2"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + mdio-gpio0 = &mdio2; + }; + + leds { + compatible = "gpio-leds"; + + system: power { + label = "tp-link:blue:power"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "tp-link:blue:wlan2g"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "tp-link:blue:wlan5g"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + lan_link { + label = "tp-link:green:lan_link"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan_data { + label = "tp-link:green:lan_data"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + wps_blue { + label = "tp-link:blue:wps"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + wps_red { + label = "tp-link:red:wps"; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + power { + label = "Power button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + leds { + label = "LED control button"; + linux,code = ; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + mdio2: mdio { + compatible = "virtual,mdio-gpio"; + + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */ + <&gpio 4 GPIO_ACTIVE_HIGH>; /* MDIO */ + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@4 { + reg = <4>; + device_type = "ethernet-phy"; + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x020000 0x5e0000>; + }; + + partition@600000 { + label = "partition-table"; + reg = <0x600000 0x010000>; + read-only; + }; + + info: partition@610000 { + label = "product-info"; + reg = <0x610000 0x020000>; + read-only; + }; + + partition@630000 { + label = "config"; + reg = <0x630000 0x020000>; + read-only; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&info 0x8>; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi new file mode 100644 index 0000000000..6c56306ad5 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + + wifi_green { + label = "tp-link:green:wlan"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + default-state = "off"; + linux,default-trigger = "phy0tpt"; + }; + + wifi_wps { + label = "tp-link:green:wps"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + wan_fail { + label = "tp-link:orange:wan"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; + + keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wifi { + label = "RFKILL button"; + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_usb_power { + gpio-export,name = "tp-link:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x020000 0xf30000>; + }; + + info: partition@f50000 { + label = "product-info"; + reg = <0xf50000 0x020000>; + read-only; + }; + + partition@f70000 { + label = "config"; + reg = <0xf70000 0x050000>; + read-only; + }; + + partition@fc0000 { + label = "partition-table"; + reg = <0xfc0000 0x010000>; + read-only; + }; + + partition@fd0000 { + label = "logs"; + reg = <0xfd0000 0x020000>; + read-only; + }; + + art: partition@ff0000 { + label = "ART"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&info 0x8>; + phy-mode = "sgmii"; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts new file mode 100644 index 0000000000..5f48e6a5d1 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9563_tplink_tl-wr1043n.dtsi" + +/ { + compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563"; + model = "TP-Link TL-WR1043ND Version 4"; +}; + +&gpio_leds { + usb { + label = "tp-link:green:usb"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + default-state = "off"; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 537dafa152..49b28f7599 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -1,19 +1,18 @@ include ./common-tp-link.mk -define Device/tl-archer-c7-v2 +define Device/tplink_tl-archer-c7-v2 $(Device/tplink-16mlzma) ATH_SOC := qca9558 DEVICE_TITLE := TP-LINK Archer C7 v2 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x TPLINK_HWID := 0xc7000002 - SUPPORTED_DEVICES := tplink,tl-archer-c7-v2 IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU endef -TARGET_DEVICES += tl-archer-c7-v2 +TARGET_DEVICES += tplink_tl-archer-c7-v2 -define Device/tl-re450-v2 +define Device/tplink_tl-re450-v2 $(Device/tplink) ATH_SOC := qca9563 IMAGE_SIZE := 6016k @@ -27,59 +26,58 @@ define Device/tl-re450-v2 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := append-rootfs | tplink-safeloader factory - SUPPORTED_DEVICES := tplink,re450-v2 endef -TARGET_DEVICES += tl-re450-v2 +TARGET_DEVICES += tplink_tl-re450-v2 -define Device/tl-wdr3600 +define Device/tplink_tl-wdr3600 $(Device/tplink-8mlzma) ATH_SOC := ar9344 DEVICE_TITLE := TP-LINK TL-WDR3600 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x36000001 - SUPPORTED_DEVICES := tplink,tl-wdr3600 tl-wdr3600 + SUPPORTED_DEVICES += tl-wdr3600 endef -TARGET_DEVICES += tl-wdr3600 +TARGET_DEVICES += tplink_tl-wdr3600 -define Device/tl-wdr4300 - $(Device/tl-wdr3600) +define Device/tplink_tl-wdr4300 + $(Device/tplink_tl-wdr3600) DEVICE_TITLE := TP-LINK TL-WDR4300 TPLINK_HWID := 0x43000001 - SUPPORTED_DEVICES := tplink,tl-wdr4300 tl-wdr4300 + SUPPORTED_DEVICES += tl-wdr4300 endef -TARGET_DEVICES += tl-wdr4300 +TARGET_DEVICES += tplink_tl-wdr4300 -define Device/tl-wr1043nd-v1 +define Device/tplink_tl-wr1043nd-v1 $(Device/tplink-8m) ATH_SOC := ar9132 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v1 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x10430001 - SUPPORTED_DEVICES := tplink,tl-wr1043nd-v1 tl-wr1043nd + SUPPORTED_DEVICES += tl-wr1043nd endef -TARGET_DEVICES += tl-wr1043nd-v1 +TARGET_DEVICES += tplink_tl-wr1043nd-v1 -define Device/tl-wr1043nd-v2 +define Device/tplink_tl-wr1043nd-v2 $(Device/tplink-8mlzma) ATH_SOC := qca9558 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v2 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x10430002 - SUPPORTED_DEVICES := tplink,tl-wr1043nd-v2 tl-wr1043nd-v2 + SUPPORTED_DEVICES += tl-wr1043nd-v2 endef -TARGET_DEVICES += tl-wr1043nd-v2 +TARGET_DEVICES += tplink_tl-wr1043nd-v2 -define Device/tl-wr1043nd-v3 +define Device/tplink_tl-wr1043nd-v3 $(Device/tplink-8mlzma) ATH_SOC := qca9558 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v3 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x10430003 - SUPPORTED_DEVICES := tplink,tl-wr1043nd-v3 tl-wr1043nd-v3 + SUPPORTED_DEVICES += tl-wr1043nd-v3 endef -TARGET_DEVICES += tl-wr1043nd-v3 +TARGET_DEVICES += tplink_tl-wr1043nd-v3 -define Device/tl-wr1043nd-v4 +define Device/tplink_tl-wr1043nd-v4 $(Device/tplink) ATH_SOC := qca9563 IMAGE_SIZE := 15552k @@ -91,11 +89,11 @@ define Device/tl-wr1043nd-v4 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := append-rootfs | tplink-safeloader factory - SUPPORTED_DEVICES := tplink,tl-wr1043nd-v4 tl-wr1043nd-v4 + SUPPORTED_DEVICES += tl-wr1043nd-v4 endef -TARGET_DEVICES += tl-wr1043nd-v4 +TARGET_DEVICES += tplink_tl-wr1043nd-v4 -define Device/tl-wr2543-v1 +define Device/tplink_tl-wr2543-v1 $(Device/tplink-8mlzma) ATH_SOC := ar7242 DEVICE_TITLE := TP-LINK TL-WR2543N/ND v1 @@ -104,6 +102,6 @@ define Device/tl-wr2543-v1 IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 | \ append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99 - SUPPORTED_DEVICES := tplink,tl-wr2543-v1 tl-wr2543-v1 + SUPPORTED_DEVICES += tl-wr2543-v1 endef -TARGET_DEVICES += tl-wr2543-v1 +TARGET_DEVICES += tplink_tl-wr2543-v1 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index a924fa90b0..f91f328417 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -18,18 +18,17 @@ define Device/embeddedwireless_dorin DEVICE_TITLE := Embedded Wireless Dorin DEVICE_PACKAGES := kmod-usb-chipidea2 IMAGE_SIZE := 16000k - SUPPORTED_DEVICES += ew-dorin endef TARGET_DEVICES += embeddedwireless_dorin -define Device/etactica-eg200 +define Device/etactica_eg200 ATH_SOC := ar9331 DEVICE_TITLE := eTactica EG200 DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-ledtrig-oneshot \ kmod-usb-serial kmod-usb-serial-ftdi kmod-usb-storage kmod-fs-ext4 - SUPPORTED_DEVICES += etactica,eg200 rme-eg200 + SUPPORTED_DEVICES += rme-eg200 endef -TARGET_DEVICES += etactica-eg200 +TARGET_DEVICES += etactica_eg200 define Device/glinet_ar150 ATH_SOC := ar9330 @@ -121,7 +120,7 @@ define Device/buffalo_wzr-hp-g450h endef TARGET_DEVICES += buffalo_wzr-hp-g450h -define Device/phicomm-k2t +define Device/phicomm_k2t ATH_SOC := qca9563 DEVICE_TITLE := Phicomm K2T KERNEL := kernel-bin | append-dtb | lzma | uImage lzma @@ -131,6 +130,5 @@ define Device/phicomm-k2t IMAGE/default := append-kernel | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k ath10k-firmware-qca9888 - SUPPORTED_DEVICES += phicomm,k2t endef -TARGET_DEVICES += phicomm-k2t +TARGET_DEVICES += phicomm_k2t diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 48d14e9e2e..8782e4064f 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -18,10 +18,9 @@ define Device/netgear_wnr612-v2 endef TARGET_DEVICES += netgear_wnr612-v2 -define Device/n150r +define Device/on_n150r ATH_SOC := ar7240 DEVICE_TITLE := ON Network N150R - DEVICE_DTS := ar7240_on_n150r NETGEAR_KERNEL_MAGIC := 0x32303631 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma @@ -31,6 +30,6 @@ define Device/n150r IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE) - SUPPORTED_DEVICES := on,n150r n150r + SUPPORTED_DEVICES += n150r endef -TARGET_DEVICES += n150r +TARGET_DEVICES += on_n150r diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index 6abc8365fb..44dd2700a5 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -1,97 +1,97 @@ include ./common-tp-link.mk -define Device/tl-mr10u +define Device/tplink_tl-mr10u $(Device/tplink-4mlzma) ATH_SOC := ar9331 DEVICE_TITLE := TP-Link TL-MR10U DEVICE_PACKAGES := kmod-usb-chipidea2 TPLINK_HWID := 0x00100101 - SUPPORTED_DEVICES := tplink,tl-mr10u tl-mr10u + SUPPORTED_DEVICES += tl-mr10u endef -TARGET_DEVICES += tl-mr10u +TARGET_DEVICES += tplink_tl-mr10u -define Device/tl-mr3020-v1 +define Device/tplink_tl-mr3020-v1 $(Device/tplink-4mlzma) ATH_SOC := ar9331 DEVICE_TITLE := TP-LINK TL-MR3020 v1 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x30200001 - SUPPORTED_DEVICES := tplink,tl-mr3020-v1 tl-mr3020-v1 + SUPPORTED_DEVICES += tl-mr3020-v1 endef -TARGET_DEVICES += tl-mr3020-v1 +TARGET_DEVICES += tplink_tl-mr3020-v1 -define Device/tl-mr3220-v1 +define Device/tplink_tl-mr3220-v1 $(Device/tplink-4m) ATH_SOC := ar7241 DEVICE_TITLE := TP-Link TL-MR3220 v1 TPLINK_HWID := 0x32200001 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - SUPPORTED_DEVICES := tplink,tl-mr3220-v1 tl-mr3220-v1 + SUPPORTED_DEVICES += tl-mr3220-v1 endef -TARGET_DEVICES += tl-mr3220-v1 +TARGET_DEVICES += tplink_tl-mr3220-v1 -define Device/tl-mr3420-v1 +define Device/tplink_tl-mr3420-v1 $(Device/tplink-4m) ATH_SOC := ar7241 DEVICE_TITLE := TP-Link TL-MR3420 v1 TPLINK_HWID := 0x34200001 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - SUPPORTED_DEVICES := tplink,tl-mr3420-v1 tl-mr3420-v1 + SUPPORTED_DEVICES += tl-mr3420-v1 endef -TARGET_DEVICES += tl-mr3420-v1 +TARGET_DEVICES += tplink_tl-mr3420-v1 -define Device/tl-wr703n +define Device/tplink_tl-wr703n $(Device/tplink-4mlzma) ATH_SOC := ar9331 DEVICE_TITLE := TP-Link TL-WR703N DEVICE_PACKAGES := kmod-usb-chipidea2 TPLINK_HWID := 0x07030101 - SUPPORTED_DEVICES := tplink,tl-wr703n tl-wr703n + SUPPORTED_DEVICES += tl-wr703n endef -TARGET_DEVICES += tl-wr703n +TARGET_DEVICES += tplink_tl-wr703n -define Device/tl-wr740n-v2 +define Device/tplink_tl-wr740n-v2 $(Device/tplink-4m) ATH_SOC := ar7240 DEVICE_TITLE := TP-Link TL-WR740N/ND v2 TPLINK_HWID := 0x07400001 - SUPPORTED_DEVICES := tplink,tl-wr740n-v2 tl-wr740n-v2 + SUPPORTED_DEVICES += tl-wr740n-v2 endef -TARGET_DEVICES += tl-wr740n-v2 +TARGET_DEVICES += tplink_tl-wr740n-v2 -define Device/tl-wr740nd-v4 +define Device/tplink_tl-wr740nd-v4 $(Device/tplink-4mlzma) ATH_SOC := ar9331 DEVICE_TITLE := TP-LINK TL-WR740N/ND v4 TPLINK_HWID := 0x07400004 - SUPPORTED_DEVICES := tplink,tl-wr740n-v4 tl-wr740n-v4 + SUPPORTED_DEVICES += tl-wr740n-v4 endef -TARGET_DEVICES += tl-wr740nd-v4 +TARGET_DEVICES += tplink_tl-wr740nd-v4 -define Device/tl-wr741nd-v4 +define Device/tplink_tl-wr741nd-v4 $(Device/tplink-4mlzma) ATH_SOC := ar9331 DEVICE_TITLE := TP-LINK TL-WR741N/ND v4 TPLINK_HWID := 0x07410004 - SUPPORTED_DEVICES := tplink,tl-wr741n-v4 tl-wr741n-v4 + SUPPORTED_DEVICES += tl-wr741n-v4 endef -TARGET_DEVICES += tl-wr741nd-v4 +TARGET_DEVICES += tplink_tl-wr741nd-v4 -define Device/tl-wr841-v7 +define Device/tplink_tl-wr841-v7 $(Device/tplink-4m) ATH_SOC := ar7241 DEVICE_TITLE := TP-LINK TL-WR841N/ND v7 TPLINK_HWID := 0x08410007 - SUPPORTED_DEVICES := tplink,tl-wr841-v7 tl-wr841-v7 + SUPPORTED_DEVICES += tl-wr841-v7 endef -TARGET_DEVICES += tl-wr841-v7 +TARGET_DEVICES += tplink_tl-wr841-v7 -define Device/tl-wr841-v9 +define Device/tplink_tl-wr841-v9 $(Device/tplink-4mlzma) ATH_SOC := qca9533 DEVICE_TITLE := TP-LINK TL-WR841N/ND v9 TPLINK_HWID := 0x08410009 - SUPPORTED_DEVICES := tplink,tl-wr841n-v9 tl-wr841n-v9 + SUPPORTED_DEVICES += tl-wr841n-v9 endef -TARGET_DEVICES += tl-wr841-v9 +TARGET_DEVICES += tplink_tl-wr841-v9