From: Chuanhong Guo Date: Mon, 29 Oct 2018 03:56:46 +0000 (+0800) Subject: ath79: rename qca9533.dtsi to qca953x.dtsi X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c36ec336a3bd275f64c6b73c2df1b7fec2e11ad5;p=openwrt%2Fstaging%2Fjow.git ath79: rename qca9533.dtsi to qca953x.dtsi qca9533 is a costdown version of qca9531 which doesn't have USB and PCIE. Rename the misleading dtsi names and fix the SoC type of gl-ar300m. Signed-off-by: Chuanhong Guo [apply the changes for the gl-x750 as well] Signed-off-by: Mathias Kresin --- diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi new file mode 100644 index 0000000000..986177df01 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi @@ -0,0 +1,102 @@ +/dts-v1/; + +#include +#include + +#include "qca953x.dtsi" + +/ { + compatible = "glinet,ar300m", "qca,qca9531"; + model = "GL.iNet GL-AR300M"; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + button0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + button1 { + label = "button right"; + linux,code = ; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + button3 { + label = "button left"; + linux,code = ; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + usb { + label = "gl-ar300m:green:usb"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + + wlan { + label = "gl-ar300m:green:wlan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "gl-ar300m:green:lan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + status { + label = "gl-ar300m:green:status"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; + phy-handle = <&swphy4>; +}; + +ð1 { + mtd-mac-address = <&art 0x6>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x1002>; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts new file mode 100644 index 0000000000..f188ac6c33 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts @@ -0,0 +1,63 @@ +/dts-v1/; + +#include "qca9531_glinet_ar300m.dtsi" + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "winbond,w25q128", "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 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + label = "reserved"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; + + flash@1 { + compatible = "spinand,mt29f"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x000000 0x0200000>; + }; + + partition@1 { + label = "ubi"; + reg = <0x200000 0x7e00000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts new file mode 100644 index 0000000000..c78f03ac22 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts @@ -0,0 +1,44 @@ +/dts-v1/; + +#include +#include + +#include "qca9531_glinet_ar300m.dtsi" + +&spi { + status = "okay"; + num-cs = <0>; + + flash@0 { + compatible = "winbond,w25q128", "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 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts new file mode 100644 index 0000000000..de12163f0d --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca953x.dtsi" + +/ { + compatible = "glinet,gl-x750", "qca,qca9531"; + model = "GL.iNet GL-X750"; + + keys { + compatible = "gpio-keys-polled"; + + poll-interval = <20>; + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + button0 { + label = "reset"; + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + power { + label = "gl-x750:green:power"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wlan2g { + label = "gl-x750:green:wlan2g"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "gl-x750:green:wlan5g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan { + label = "gl-x750:green:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + 4g { + label = "gl-x750:green:4g"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <0>; + + flash@0 { + 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 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + art: partition@50000 { + label = "art"; + reg = <0x050000 0x010000>; + }; + + partition@60000 { + label = "firmware"; + reg = <0x060000 0xfa0000>; + }; + }; + }; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; + phy-handle = <&swphy4>; +}; + +ð1 { + mtd-mac-address = <&art 0x6>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x1002>; +}; diff --git a/target/linux/ath79/dts/qca9533.dtsi b/target/linux/ath79/dts/qca9533.dtsi deleted file mode 100644 index 97179a391e..0000000000 --- a/target/linux/ath79/dts/qca9533.dtsi +++ /dev/null @@ -1,286 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include -#include "ath79.dtsi" - -/ { - compatible = "qca,qca9533"; - - #address-cells = <1>; - #size-cells = <1>; - - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "mips,mips24Kc"; - clocks = <&pll ATH79_CLK_CPU>; - reg = <0>; - }; - }; - - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <25000000>; - }; - - ahb { - apb { - ddr_ctrl: memory-controller@18000000 { - compatible = "qca,ar9530-ddr-controller", - "qca,ar7240-ddr-controller"; - reg = <0x18000000 0x128>; - - #qca,ddr-wb-channel-cells = <1>; - }; - - uart: uart@18020000 { - compatible = "ns16550a"; - reg = <0x18020000 0x20>; - - interrupts = <3>; - - clocks = <&pll ATH79_CLK_REF>; - clock-names = "uart"; - - reg-io-width = <4>; - reg-shift = <2>; - no-loopback-test; - - status = "disabled"; - }; - - usb_phy: usb-phy@18030000 { - compatible = "qca,ar7200-usb-phy"; - reg = <0x18030000 0x100>; - #phy-cells = <0>; - - reset-names = "usb-phy", "usb-suspend-override"; - resets = <&rst 4>, <&rst 3>; - - status = "disabled"; - }; - - gpio: gpio@18040000 { - compatible = "qca,ar9530-gpio", - "qca,ar9340-gpio"; - reg = <0x18040000 0x28>; - - interrupts = <2>; - ngpios = <20>; - - gpio-controller; - #gpio-cells = <2>; - - interrupt-controller; - #interrupt-cells = <2>; - }; - - pinmux: pinmux@1804002c { - compatible = "pinctrl-single"; - - reg = <0x1804002c 0x48>; - - #size-cells = <0>; - - pinctrl-single,bit-per-mux; - pinctrl-single,register-width = <32>; - pinctrl-single,function-mask = <0x1>; - #pinctrl-cells = <2>; - - jtag_disable_pins: pinmux_jtag_disable_pins { - pinctrl-single,bits = <0x40 0x2 0x2>; - }; - }; - - pll: pll-controller@18050000 { - compatible = "qca,qca9530-pll", "syscon"; - reg = <0x18050000 0x48>; - - #clock-cells = <1>; - clock-output-names = "cpu", "ddr", "ahb"; - clocks = <&extosc>; - }; - - wdt: wdt@18060008 { - compatible = "qca,qca9530-wdt", "qca,ar7130-wdt"; - reg = <0x18060008 0x8>; - - interrupts = <4>; - - clocks = <&pll ATH79_CLK_AHB>; - clock-names = "wdt"; - }; - - rst: reset-controller@1806001c { - compatible = "qca,qca9530-reset", - "qca,ar7100-reset"; - reg = <0x1806001c 0xac>; - - #reset-cells = <1>; - - intc2: interrupt-controller { - compatible = "qca,ar9340-intc"; - - interrupt-parent = <&cpuintc>; - interrupts = <2>; - - interrupt-controller; - #interrupt-cells = <1>; - - qca,int-status-addr = <0xac>; - qca,pending-bits = <0xf>, /* wmac */ - <0x1f0>; /* pcie rc1 */ - - qca,ddr-wb-channel-interrupts = <0>, <1>; - qca,ddr-wb-channels = <&ddr_ctrl 4>, <&ddr_ctrl 3>; - }; - }; - - pcie0: pcie-controller@180c0000 { - compatible = "qcom,ar7240-pci"; - #address-cells = <3>; - #size-cells = <2>; - bus-range = <0x0 0x0>; - reg = <0x180c0000 0x1000>, /* CRP */ - <0x180f0000 0x100>, /* CTRL */ - <0x14000000 0x1000>; /* CFG */ - reg-names = "crp_base", "ctrl_base", "cfg_base"; - ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000 /* pci memory */ - 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */ - interrupt-parent = <&intc2>; - interrupts = <1>; - - interrupt-controller; - #interrupt-cells = <1>; - - interrupt-map-mask = <0 0 0 1>; - interrupt-map = <0 0 0 0 &pcie0 0>; - status = "disabled"; - }; - - gmac: gmac@18070000 { - compatible = "qca,ar9330-gmac"; - reg = <0x18070000 0x4>; - }; - - wmac: wmac@18100000 { - compatible = "qca,qca9530-wmac"; - reg = <0x18100000 0x230000>; - - interrupt-parent = <&intc2>; - interrupts = <0>; - - status = "disabled"; - }; - }; - - usb0: usb@1b000000 { - compatible = "generic-ehci"; - reg = <0x1b000000 0x1000>; - - interrupts = <3>; - resets = <&rst 5>; - reset-names = "usb-host"; - dr_mode = "host"; - - has-transaction-translator; - caps-offset = <0x100>; - - phy-names = "usb-phy"; - phys = <&usb_phy>; - - status = "disabled"; - }; - - spi: spi@1f000000 { - compatible = "qca,ar9530-spi", "qca,ar7100-spi"; - reg = <0x1f000000 0x10>; - - clocks = <&pll ATH79_CLK_AHB>; - clock-names = "ahb"; - - status = "disabled"; - - #address-cells = <1>; - #size-cells = <0>; - }; - - }; - -}; - -&cpuintc { - qca,ddr-wb-channel-interrupts = <3>, <4>, <5>; - qca,ddr-wb-channels = <&ddr_ctrl 2>, <&ddr_ctrl 0>, - <&ddr_ctrl 1>; -}; - -ð0 { - compatible = "qca,qca9530-eth", "syscon"; - pll-data = <0x82000101 0x80000101 0x80001313>; - reg = <0x19000000 0x200 - 0x18070000 0x4>; - pll-reg = <0x4 0x2c 17>; - pll-handle = <&pll>; - - reset-names = "mac"; - resets = <&rst 9>; - - phy-mode = "mii"; -}; - - -&mdio1 { - status = "okay"; - resets = <&rst 23>; - reset-names = "mdio"; - builtin-switch; - - builtin_switch: switch0@1f { - compatible = "qca,ar8229-builtin"; - - reg = <0x1f>; - resets = <&rst 8>; - reset-names = "switch"; - phy-mode = "gmii"; - phy4-mii-enable; - - mdio-bus { - #address-cells = <1>; - #size-cells = <0>; - - swphy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "mii"; - }; - - swphy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "mii"; - }; - }; - }; -}; - -ð1 { - status = "okay"; - - compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; - resets = <&rst 13>; - reset-names = "mac"; - - phy-mode = "gmii"; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi b/target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi deleted file mode 100644 index 35de594bf2..0000000000 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi +++ /dev/null @@ -1,102 +0,0 @@ -/dts-v1/; - -#include -#include - -#include "qca9533.dtsi" - -/ { - compatible = "glinet,ar300m", "qca,qca9533"; - model = "GL.iNet GL-AR300M"; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - pinctrl-names = "default"; - pinctrl-0 = <&jtag_disable_pins>; - - button0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - - button1 { - label = "button right"; - linux,code = ; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - }; - - button3 { - label = "button left"; - linux,code = ; - gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - usb { - label = "gl-ar300m:green:usb"; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - - wlan { - label = "gl-ar300m:green:wlan"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - lan { - label = "gl-ar300m:green:lan"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - status { - label = "gl-ar300m:green:status"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&pcie0 { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&usb0 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -ð0 { - status = "okay"; - mtd-mac-address = <&art 0x0>; - phy-handle = <&swphy4>; -}; - -ð1 { - mtd-mac-address = <&art 0x6>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x1002>; -}; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts b/target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts deleted file mode 100644 index 33226b9889..0000000000 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts +++ /dev/null @@ -1,63 +0,0 @@ -/dts-v1/; - -#include "qca9533_glinet_ar300m.dtsi" - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - compatible = "winbond,w25q128", "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 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - label = "reserved"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; - - flash@1 { - compatible = "spinand,mt29f"; - reg = <1>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "kernel"; - reg = <0x000000 0x0200000>; - }; - - partition@1 { - label = "ubi"; - reg = <0x200000 0x7e00000>; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts b/target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts deleted file mode 100644 index 9357ea66d4..0000000000 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts +++ /dev/null @@ -1,44 +0,0 @@ -/dts-v1/; - -#include -#include - -#include "qca9533_glinet_ar300m.dtsi" - -&spi { - status = "okay"; - num-cs = <0>; - - flash@0 { - compatible = "winbond,w25q128", "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 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - label = "firmware"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/qca9533_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9533_glinet_gl-x750.dts deleted file mode 100644 index 14bad8aab6..0000000000 --- a/target/linux/ath79/dts/qca9533_glinet_gl-x750.dts +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include -#include - -#include "qca9533.dtsi" - -/ { - compatible = "glinet,gl-x750", "qca,qca9533"; - model = "GL.iNet GL-X750"; - - keys { - compatible = "gpio-keys-polled"; - - poll-interval = <20>; - pinctrl-names = "default"; - pinctrl-0 = <&jtag_disable_pins>; - - button0 { - label = "reset"; - linux,code = ; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - power { - label = "gl-x750:green:power"; - gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - wlan2g { - label = "gl-x750:green:wlan2g"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - - wlan5g { - label = "gl-x750:green:wlan5g"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - wan { - label = "gl-x750:green:wan"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - 4g { - label = "gl-x750:green:4g"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - }; -}; - -&pcie0 { - status = "okay"; -}; - -&uart { - status = "okay"; -}; - -&usb0 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&spi { - status = "okay"; - num-cs = <0>; - - flash@0 { - 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 0x040000>; - read-only; - }; - - partition@40000 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - art: partition@50000 { - label = "art"; - reg = <0x050000 0x010000>; - }; - - partition@60000 { - label = "firmware"; - reg = <0x060000 0xfa0000>; - }; - }; - }; -}; - -ð0 { - status = "okay"; - mtd-mac-address = <&art 0x0>; - phy-handle = <&swphy4>; -}; - -ð1 { - mtd-mac-address = <&art 0x6>; -}; - -&wmac { - status = "okay"; - mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x1002>; -}; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index 3621b7e1e8..5b8e8dbc68 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -4,7 +4,7 @@ #include #include -#include "qca9533.dtsi" +#include "qca953x.dtsi" / { chosen { diff --git a/target/linux/ath79/dts/qca953x.dtsi b/target/linux/ath79/dts/qca953x.dtsi new file mode 100644 index 0000000000..4ce5bfe0a2 --- /dev/null +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include +#include "ath79.dtsi" + +/ { + compatible = "qca,qca9530"; + + #address-cells = <1>; + #size-cells = <1>; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "mips,mips24Kc"; + clocks = <&pll ATH79_CLK_CPU>; + reg = <0>; + }; + }; + + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <25000000>; + }; + + ahb { + apb { + ddr_ctrl: memory-controller@18000000 { + compatible = "qca,ar9530-ddr-controller", + "qca,ar7240-ddr-controller"; + reg = <0x18000000 0x128>; + + #qca,ddr-wb-channel-cells = <1>; + }; + + uart: uart@18020000 { + compatible = "ns16550a"; + reg = <0x18020000 0x20>; + + interrupts = <3>; + + clocks = <&pll ATH79_CLK_REF>; + clock-names = "uart"; + + reg-io-width = <4>; + reg-shift = <2>; + no-loopback-test; + + status = "disabled"; + }; + + usb_phy: usb-phy@18030000 { + compatible = "qca,ar7200-usb-phy"; + reg = <0x18030000 0x100>; + #phy-cells = <0>; + + reset-names = "usb-phy", "usb-suspend-override"; + resets = <&rst 4>, <&rst 3>; + + status = "disabled"; + }; + + gpio: gpio@18040000 { + compatible = "qca,ar9530-gpio", + "qca,ar9340-gpio"; + reg = <0x18040000 0x28>; + + interrupts = <2>; + ngpios = <20>; + + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + pinmux: pinmux@1804002c { + compatible = "pinctrl-single"; + + reg = <0x1804002c 0x48>; + + #size-cells = <0>; + + pinctrl-single,bit-per-mux; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <0x1>; + #pinctrl-cells = <2>; + + jtag_disable_pins: pinmux_jtag_disable_pins { + pinctrl-single,bits = <0x40 0x2 0x2>; + }; + }; + + pll: pll-controller@18050000 { + compatible = "qca,qca9530-pll", "syscon"; + reg = <0x18050000 0x48>; + + #clock-cells = <1>; + clock-output-names = "cpu", "ddr", "ahb"; + clocks = <&extosc>; + }; + + wdt: wdt@18060008 { + compatible = "qca,qca9530-wdt", "qca,ar7130-wdt"; + reg = <0x18060008 0x8>; + + interrupts = <4>; + + clocks = <&pll ATH79_CLK_AHB>; + clock-names = "wdt"; + }; + + rst: reset-controller@1806001c { + compatible = "qca,qca9530-reset", + "qca,ar7100-reset"; + reg = <0x1806001c 0xac>; + + #reset-cells = <1>; + + intc2: interrupt-controller { + compatible = "qca,ar9340-intc"; + + interrupt-parent = <&cpuintc>; + interrupts = <2>; + + interrupt-controller; + #interrupt-cells = <1>; + + qca,int-status-addr = <0xac>; + qca,pending-bits = <0xf>, /* wmac */ + <0x1f0>; /* pcie rc1 */ + + qca,ddr-wb-channel-interrupts = <0>, <1>; + qca,ddr-wb-channels = <&ddr_ctrl 4>, <&ddr_ctrl 3>; + }; + }; + + pcie0: pcie-controller@180c0000 { + compatible = "qcom,ar7240-pci"; + #address-cells = <3>; + #size-cells = <2>; + bus-range = <0x0 0x0>; + reg = <0x180c0000 0x1000>, /* CRP */ + <0x180f0000 0x100>, /* CTRL */ + <0x14000000 0x1000>; /* CFG */ + reg-names = "crp_base", "ctrl_base", "cfg_base"; + ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000 /* pci memory */ + 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */ + interrupt-parent = <&intc2>; + interrupts = <1>; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-map-mask = <0 0 0 1>; + interrupt-map = <0 0 0 0 &pcie0 0>; + status = "disabled"; + }; + + gmac: gmac@18070000 { + compatible = "qca,ar9330-gmac"; + reg = <0x18070000 0x4>; + }; + + wmac: wmac@18100000 { + compatible = "qca,qca9530-wmac"; + reg = <0x18100000 0x230000>; + + interrupt-parent = <&intc2>; + interrupts = <0>; + + status = "disabled"; + }; + }; + + usb0: usb@1b000000 { + compatible = "generic-ehci"; + reg = <0x1b000000 0x1000>; + + interrupts = <3>; + resets = <&rst 5>; + reset-names = "usb-host"; + dr_mode = "host"; + + has-transaction-translator; + caps-offset = <0x100>; + + phy-names = "usb-phy"; + phys = <&usb_phy>; + + status = "disabled"; + }; + + spi: spi@1f000000 { + compatible = "qca,ar9530-spi", "qca,ar7100-spi"; + reg = <0x1f000000 0x10>; + + clocks = <&pll ATH79_CLK_AHB>; + clock-names = "ahb"; + + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + }; + + }; + +}; + +&cpuintc { + qca,ddr-wb-channel-interrupts = <3>, <4>, <5>; + qca,ddr-wb-channels = <&ddr_ctrl 2>, <&ddr_ctrl 0>, + <&ddr_ctrl 1>; +}; + +ð0 { + compatible = "qca,qca9530-eth", "syscon"; + pll-data = <0x82000101 0x80000101 0x80001313>; + reg = <0x19000000 0x200 + 0x18070000 0x4>; + pll-reg = <0x4 0x2c 17>; + pll-handle = <&pll>; + + reset-names = "mac"; + resets = <&rst 9>; + + phy-mode = "mii"; +}; + + +&mdio1 { + status = "okay"; + resets = <&rst 23>; + reset-names = "mdio"; + builtin-switch; + + builtin_switch: switch0@1f { + compatible = "qca,ar8229-builtin"; + + reg = <0x1f>; + resets = <&rst 8>; + reset-names = "switch"; + phy-mode = "gmii"; + phy4-mii-enable; + + mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + swphy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "mii"; + }; + + swphy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "mii"; + }; + }; + }; +}; + +ð1 { + status = "okay"; + + compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; + resets = <&rst 13>; + reset-names = "mac"; + + phy-mode = "gmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 2b4556bc76..f0c7691102 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -175,7 +175,7 @@ endef TARGET_DEVICES += glinet_ar150 define Device/glinet_ar300m_nor - ATH_SOC := qca9533 + ATH_SOC := qca9531 DEVICE_TITLE := GL.iNet GL-AR300M DEVICE_PACKAGES := kmod-usb-core kmod-usb2 IMAGE_SIZE := 16000k @@ -184,7 +184,7 @@ endef TARGET_DEVICES += glinet_ar300m_nor define Device/glinet_gl-x750 - ATH_SOC := qca9533 + ATH_SOC := qca9531 DEVICE_TITLE := GL.iNet GL-X750 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9887 IMAGE_SIZE := 16000k diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 979afd2b2b..1852ca4179 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,5 +1,5 @@ define Device/glinet_ar300m_nand - ATH_SOC := qca9533 + ATH_SOC := qca9531 DEVICE_TITLE := GL-AR300M (NAND) DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-usb-ledtrig-usbport KERNEL_SIZE := 2048k