From 27f2ea18a62e4fb8e9613f033426229f616e715f Mon Sep 17 00:00:00 2001 From: Erkki Hietaranta Date: Wed, 1 Nov 2023 15:21:39 -0400 Subject: [PATCH] ipq40xx: Split map-ac2200 and rt-ac42u .dts to common .dtsi Split qcom-ipq4019-rt-ac42u.dts to qcom-ipq4019-asus.dtsi Splir qcom-ipq4019-map-ac2200.dts to qcom-ipq4019-asus.dtsi and qcom-ipq401x-map-acxx00.dtsi Converted manually overridden labels to ones that exsists in qcom-ipq2019.dtsi Signed-off-by: Erkki Hietaranta --- .../arch/arm/boot/dts/qcom-ipq4019-asus.dtsi | 135 ++++++++++ .../arm/boot/dts/qcom-ipq4019-map-ac2200.dts | 243 +----------------- .../arm/boot/dts/qcom-ipq4019-rt-ac42u.dts | 153 +---------- .../arm/boot/dts/qcom-ipq401x-map-acxx00.dtsi | 104 ++++++++ 4 files changed, 265 insertions(+), 370 deletions(-) create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-asus.dtsi create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq401x-map-acxx00.dtsi diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-asus.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-asus.dtsi new file mode 100644 index 00000000000000..176f78f19fbc25 --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-asus.dtsi @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include +#include + +/ { + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256MB */ + }; + + soc { + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + }; +}; + +&nand { + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + status = "okay"; + + nand@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SBL1"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "MIBIB"; + reg = <0x80000 0x80000>; + read-only; + }; + + partition@100000 { + label = "QSEE"; + reg = <0x100000 0x100000>; + read-only; + }; + + partition@200000 { + label = "CDT"; + reg = <0x200000 0x80000>; + read-only; + }; + + partition@280000 { + label = "APPSBL"; + reg = <0x280000 0x140000>; + read-only; + }; + + partition@3c0000 { + label = "APPSBLENV"; + reg = <0x3c0000 0x40000>; + read-only; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x7c00000>; + }; + }; + }; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&blsp_dma { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&gmac { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts index 32f0473fb169ae..cce07ca15beb21 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts @@ -1,10 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT #include "qcom-ipq4019.dtsi" -#include -#include -#include #include +#include "qcom-ipq4019-asus.dtsi" +#include "qcom-ipq401x-map-acxx00.dtsi" / { model = "ASUS Lyra MAP-AC2200"; @@ -18,46 +17,6 @@ ethernet1 = &swport4; }; - soc { - rng@22000 { - status = "okay"; - }; - - mdio@90000 { - status = "okay"; - }; - - tcsr@1949000 { - compatible = "qcom,tcsr"; - reg = <0x1949000 0x100>; - qcom,wifi_glb_cfg = ; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,wifi_noc_memtype_m0_m2 = ; - }; - - usb2@60f8800 { - status = "okay"; - }; - - crypto@8e3a000 { - status = "okay"; - }; - - watchdog@b017000 { - status = "okay"; - }; - }; - keys { compatible = "gpio-keys"; @@ -75,60 +34,6 @@ }; }; -&nand { - pinctrl-0 = <&nand_pins>; - pinctrl-names = "default"; - status = "okay"; - - nand@0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "SBL1"; - reg = <0x0 0x80000>; - read-only; - }; - - partition@80000 { - label = "MIBIB"; - reg = <0x80000 0x80000>; - read-only; - }; - - partition@100000 { - label = "QSEE"; - reg = <0x100000 0x100000>; - read-only; - }; - - partition@200000 { - label = "CDT"; - reg = <0x200000 0x80000>; - read-only; - }; - - partition@280000 { - label = "APPSBL"; - reg = <0x280000 0x140000>; - read-only; - }; - - partition@3c0000 { - label = "APPSBLENV"; - reg = <0x3c0000 0x40000>; - read-only; - }; - - partition@400000 { - label = "ubi"; - reg = <0x400000 0x7c00000>; - }; - }; - }; -}; &tlmm { i2c_0_pins: i2c_0_pinmux { @@ -184,16 +89,16 @@ }; }; -&cryptobam { - status = "okay"; -}; - -&blsp_dma { +&swport4 { status = "okay"; + + label = "wan"; }; -&qpic_bam { +&swport5 { status = "okay"; + + label = "lan"; }; &wifi0 { @@ -211,6 +116,7 @@ status = "okay"; perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>; wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>; + clkreq-gpio = <&tlmm 39 GPIO_ACTIVE_LOW>; bridge@0,0 { reg = <0x00000000 0 0 0 0>; @@ -228,136 +134,11 @@ }; }; -&usb2_hs_phy { - /* Bluetooth module attached via USB */ +&usb2 { status = "okay"; }; -&blsp1_i2c3 { - pinctrl-0 = <&i2c_0_pins>; - pinctrl-names = "default"; - status = "okay"; - - led-controller@32 { - /* 9-channel RGB LED controller */ - compatible = "national,lp5523"; - reg = <0x32>; - clock-mode = /bits/ 8 <1>; - #address-cells = <1>; - #size-cells = <0>; - - /* - * There is only one single extremely bright RGB-LED. - * The RGB-color channels are running in parallel to - * increase the current delivery capabilities beyond - * what a single PWM-output of the controller can do. - */ - - led_blue0: led@0 { - chan-name = "blue-0"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <0>; - color = ; - function-enumerator = <0>; - }; - - led@1 { - chan-name = "blue-1"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <1>; - color = ; - function-enumerator = <1>; - }; - - led@2 { - chan-name = "blue-2"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <2>; - color = ; - function-enumerator = <2>; - }; - - led_green0: led@3 { - chan-name = "green-0"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <3>; - color = ; - function-enumerator = <0>; - }; - - led@4 { - chan-name = "green-1"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <4>; - color = ; - function-enumerator = <1>; - }; - - led@5 { - chan-name = "green-2"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <5>; - color = ; - function-enumerator = <2>; - }; - - led_red0: led@6 { - chan-name = "red-0"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <6>; - color = ; - function-enumerator = <0>; - }; - - led@7 { - chan-name = "red-1"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <7>; - color = ; - function-enumerator = <1>; - }; - - led@8 { - chan-name = "red-2"; - led-cur = /bits/ 8 <0xfa>; - max-cur = /bits/ 8 <0xff>; - reg = <8>; - color = ; - function-enumerator = <2>; - }; - }; -}; - -&blsp1_uart1 { - pinctrl-0 = <&serial_pins>; - pinctrl-names = "default"; - status = "okay"; -}; - -&gmac { - status = "okay"; -}; - -&switch { - status = "okay"; -}; - -&swport4 { - status = "okay"; - - label = "wan"; -}; - -&swport5 { +&usb2_hs_phy { + /* Bluetooth module attached via USB */ status = "okay"; - - label = "lan"; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts index 70849d71d67fab..f40a3bc50843cd 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts @@ -1,20 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT #include "qcom-ipq4019.dtsi" -#include -#include #include -#include +#include "qcom-ipq4019-asus.dtsi" / { model = "ASUS RT-AC42U"; compatible = "asus,rt-ac42u"; - memory { - device_type = "memory"; - reg = <0x80000000 0x10000000>; /* 256MB */ - }; - aliases { led-boot = &led_power; led-failsafe = &led_power; @@ -22,67 +15,6 @@ led-upgrade = &led_power; }; - soc { - rng@22000 { - status = "okay"; - }; - - mdio@90000 { - status = "okay"; - }; - - tcsr@1949000 { - compatible = "qcom,tcsr"; - reg = <0x1949000 0x100>; - qcom,wifi_glb_cfg = ; - }; - - tcsr@194b000 { - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,wifi_noc_memtype_m0_m2 = ; - }; - - usb3@8af8800 { - status = "okay"; - - dwc3@8a00000 { - #address-cells = <1>; - #size-cells = <0>; - - usb3_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - - usb3_port2: port@2 { - reg = <2>; - #trigger-source-cells = <0>; - }; - }; - }; - - crypto@8e3a000 { - status = "okay"; - }; - - watchdog@b017000 { - status = "okay"; - }; - }; - keys { compatible = "gpio-keys"; @@ -168,20 +100,8 @@ }; }; -&cryptobam { - status = "okay"; -}; - -&blsp_dma { - status = "okay"; -}; - -&qpic_bam { - status = "okay"; -}; - &tlmm { - serial_0_pins: serial0_pinmux { + serial_pins: serial_pinmux { mux { pins = "gpio16", "gpio17"; function = "blsp_uart0"; @@ -206,57 +126,21 @@ }; }; -&blsp1_uart1 { - pinctrl-0 = <&serial_0_pins>; - pinctrl-names = "default"; +&usb3 { status = "okay"; -}; + + dwc3@8a00000 { + #address-cells = <1>; + #size-cells = <0>; -&nand { - pinctrl-0 = <&nand_pins>; - pinctrl-names = "default"; - status = "okay"; + usb3_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; - nand@0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "SBL1"; - reg = <0x00000000 0x00080000>; - read-only; - }; - partition@80000 { - label = "MIBIB"; - reg = <0x00080000 0x00080000>; - read-only; - }; - partition@100000 { - label = "QSEE"; - reg = <0x00100000 0x00100000>; - read-only; - }; - partition@200000 { - label = "CDT"; - reg = <0x00200000 0x00080000>; - read-only; - }; - partition@280000 { - label = "APPSBL"; - reg = <0x00280000 0x00140000>; - read-only; - }; - partition@3C0000 { - label = "APPSBLENV"; - reg = <0x003C0000 0x00040000>; - read-only; - }; - partition@400000 { - label = "ubi"; - reg = <0x00400000 0x07C00000>; - }; + usb3_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; }; }; }; @@ -269,14 +153,6 @@ status = "okay"; }; -&gmac { - status = "okay"; -}; - -&switch { - status = "okay"; -}; - &swport1 { status = "okay"; }; @@ -317,7 +193,6 @@ wifi2: wifi@1,0 { compatible = "qcom,ath10k"; reg = <0x00010000 0 0 0 0>; - qcom,ath10k-calibration-variant = "ASUS-RT-AC42U"; }; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq401x-map-acxx00.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq401x-map-acxx00.dtsi new file mode 100644 index 00000000000000..5941bdd36a53cd --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq401x-map-acxx00.dtsi @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +&blsp1_i2c3 { + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + status = "okay"; + + led-controller@32 { + /* 9-channel RGB LED controller */ + compatible = "national,lp5523"; + reg = <0x32>; + clock-mode = /bits/ 8 <1>; + #address-cells = <1>; + #size-cells = <0>; + + /* + * There is only one single extremely bright RGB-LED. + * The RGB-color channels are running in parallel to + * increase the current delivery capabilities beyond + * what a single PWM-output of the controller can do. + */ + + led_blue0: led@0 { + chan-name = "blue-0"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <0>; + color = ; + function-enumerator = <0>; + }; + + led@1 { + chan-name = "blue-1"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <1>; + color = ; + function-enumerator = <1>; + }; + + led@2 { + chan-name = "blue-2"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <2>; + color = ; + function-enumerator = <2>; + }; + + led_green0: led@3 { + chan-name = "green-0"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <3>; + color = ; + function-enumerator = <0>; + }; + + led@4 { + chan-name = "green-1"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <4>; + color = ; + function-enumerator = <1>; + }; + + led@5 { + chan-name = "green-2"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <5>; + color = ; + function-enumerator = <2>; + }; + + led_red0: led@6 { + chan-name = "red-0"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <6>; + color = ; + function-enumerator = <0>; + }; + + led@7 { + chan-name = "red-1"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <7>; + color = ; + function-enumerator = <1>; + }; + + led@8 { + chan-name = "red-2"; + led-cur = /bits/ 8 <0xfa>; + max-cur = /bits/ 8 <0xff>; + reg = <8>; + color = ; + function-enumerator = <2>; + }; + }; +};