arm64: dts: ti: k3-am65: dtbs_check warnings fixups
Subsystems (2)
Nishanth Menon
maintainercover arm64: dts: ti: k3-am65: dtbs_check warnings fixups
Hi,
One round of long pending dtbs_checks warnings fixups for am65.
Bootlog: https://gist.github.com/nmenon/605142cb4a4ffb2b9d05bea944f8fd32#file-am654-evm-patchset2-txt
Pending warnings: https://gist.github.com/nmenon/605142cb4a4ffb2b9d05bea944f8fd32#file-pending-dtbs_check_warnings
Nishanth Menon (7):
arm64: dts: ti: k3-am65-main: Remove "syscon" nodes added for
pcieX_ctrl
arm64: dts: ti: k3-am65-main: Fix mux controller node name
arm64: dts: ti: k3-am65: Switch to "ti,j721e-system-controller"
compatible
arm64: dts: ti: k3-am65-main: Fix mcan node name
arm64: dts: ti: k3-am65-main: Drop deprecated ti,otap-del-sel property
arm64: dts: ti: k3-am65-mcu: Fix fss node
arm64: dts: ti: k3-am65-iot2050-common: Rename rtc8564 nodename
.../boot/dts/ti/k3-am65-iot2050-common.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 32 +++++-------------- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 9 +++--- 3 files changed, 14 insertions(+), 29 deletions(-)
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 1/7 arm64: dts: ti: k3-am65-main: Remove "syscon" nodes added for pcieX_ctrl
Remove "syscon" nodes added for pcieX_ctrl and have the PCIe node point to the parent with an offset argument. This change is as discussed in [1].
[1] http://lore.kernel.org/r/CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 27 ++++++------------------ 1 file changed, 6 insertions(+), 21 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +6 -21
@@ -481,21 +481,6 @@ scm_conf: scm-conf@100000 { #size-cells = <1>; ranges = <0x0 0x0 0x00100000 0x1c000>; - pcie0_mode: pcie-mode@4060 { - compatible = "syscon"; - reg = <0x00004060 0x4>; - }; - - pcie1_mode: pcie-mode@4070 { - compatible = "syscon"; - reg = <0x00004070 0x4>; - }; - - pcie_devid: pcie-devid@210 { - compatible = "syscon"; - reg = <0x00000210 0x4>; - }; - serdes0_clk: clock@4080 { compatible = "syscon"; reg = <0x00004080 0x4>;
@@ -883,8 +868,8 @@ pcie0_rc: pcie@5500000 { #size-cells = <2>; ranges = <0x81000000 0 0 0x0 0x10020000 0 0x00010000>, <0x82000000 0 0x10030000 0x0 0x10030000 0 0x07FD0000>; - ti,syscon-pcie-id = <&pcie_devid>; - ti,syscon-pcie-mode = <&pcie0_mode>; + ti,syscon-pcie-id = <&scm_conf 0x210>; + ti,syscon-pcie-mode = <&scm_conf 0x4060>; bus-range = <0x0 0xff>; num-viewport = <16>; max-link-speed = <2>;
@@ -900,7 +885,7 @@ pcie0_ep: pcie-ep@5500000 { reg = <0x0 0x5500000 0x0 0x1000>, <0x0 0x5501000 0x0 0x1000>, <0x0 0x10000000 0x0 0x8000000>, <0x0 0x5506000 0x0 0x1000>; reg-names = "app", "dbics", "addr_space", "atu"; power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>; - ti,syscon-pcie-mode = <&pcie0_mode>; + ti,syscon-pcie-mode = <&scm_conf 0x4060>; num-ib-windows = <16>; num-ob-windows = <16>; max-link-speed = <2>;
@@ -918,8 +903,8 @@ pcie1_rc: pcie@5600000 { #size-cells = <2>; ranges = <0x81000000 0 0 0x0 0x18020000 0 0x00010000>, <0x82000000 0 0x18030000 0x0 0x18030000 0 0x07FD0000>; - ti,syscon-pcie-id = <&pcie_devid>; - ti,syscon-pcie-mode = <&pcie1_mode>; + ti,syscon-pcie-id = <&scm_conf 0x210>; + ti,syscon-pcie-mode = <&scm_conf 0x4070>; bus-range = <0x0 0xff>; num-viewport = <16>; max-link-speed = <2>;
@@ -935,7 +920,7 @@ pcie1_ep: pcie-ep@5600000 { reg = <0x0 0x5600000 0x0 0x1000>, <0x0 0x5601000 0x0 0x1000>, <0x0 0x18000000 0x0 0x4000000>, <0x0 0x5606000 0x0 0x1000>; reg-names = "app", "dbics", "addr_space", "atu"; power-domains = <&k3_pds 121 TI_SCI_PD_EXCLUSIVE>; - ti,syscon-pcie-mode = <&pcie1_mode>; + ti,syscon-pcie-mode = <&scm_conf 0x4070>; num-ib-windows = <16>; num-ob-windows = <16>; max-link-speed = <2>;
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 2/7 arm64: dts: ti: k3-am65-main: Fix mux controller node name
In reply to Nishanth MenonAdd unit address to form a proper node name.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -1
@@ -491,7 +491,7 @@ serdes1_clk: clock@4090 { reg = <0x00004090 0x4>; }; - serdes_mux: mux-controller { + serdes_mux: mux-controller@4080 { compatible = "mmio-mux"; #mux-control-cells = <1>; mux-reg-masks = <0x4080 0x3>, /* SERDES0 lane select */
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 3/7 arm64: dts: ti: k3-am65: Switch to "ti,j721e-system-controller" compatible
In reply to Nishanth MenonSwitch scm-conf to "ti,j721e-system-controller" compatible to be more specific.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -1
@@ -475,7 +475,7 @@ sdhci1: mmc@4fa0000 { }; scm_conf: scm-conf@100000 { - compatible = "syscon", "simple-mfd"; + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; reg = <0 0x00100000 0 0x1c000>; #address-cells = <1>; #size-cells = <1>;
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +1 -1
@@ -7,7 +7,7 @@ &cbass_mcu { mcu_conf: scm-conf@40f00000 { - compatible = "syscon", "simple-mfd"; + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; reg = <0x0 0x40f00000 0x0 0x20000>; #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.40.0
Re: [PATCH 3/7] arm64: dts: ti: k3-am65: Switch to "ti,j721e-system-controller" compatible
Quoted 27 lines · Nishanth Menon
Switch scm-conf to "ti,j721e-system-controller" compatible to be more specific.
Signed-off-by Nishanth Menon <[email protected]>--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1
-1@@ -475,7 +475,7 @@ sdhci1: mmc@4fa0000 { }; scm_conf: scm-conf@100000 { - compatible = "syscon", "simple-mfd"; + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; reg = <0 0x00100000 0 0x1c000>; #address-cells = <1>; #size-cells = <1>;arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +0
-0
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi line 10
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +1
-1@@ -7,7 +7,7 @@ &cbass_mcu { mcu_conf: scm-conf@40f00000 { - compatible = "syscon", "simple-mfd"; + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
This node is not a "j721e-system-controller". Only the one in main could be said to be one, but even it is different enough that this is not correct IMHO. It almost seems like you are using "ti,j721e-system-controller" as a workaround for the restriction on raw "syscon", "simple-mfd" nodes. And just replacing all instance of those with something that avoids the warning.
What we should do here is turn both of these nodes into "simple-bus". The sub-nodes themselves would describe what they are. This is the normal DT way vs having all our device nodes pointing into one big "syscon" node with various offsets (which makes it hard to see all users of a node and near impossible to work out the real memory map in these "system-controller" nodes).
Worse, if the parent is a "syscon" then the whole memory region gets one big regmap over it, and any child nodes that also build a regmap for their smaller sub-range leads to having two regmaps pointing to the same memory area. This breaks some assumptions around atomic access and reg caching.
Taking a quick look I see some of our sub-node drivers expecting the parent to always be a syscon, others turn themselves into a syscon, and others still do the normal "reg" mapping. What a mess..
To unwind this I'd suggest we do this:
* Add support for these sub-node drivers to use the normal "reg" property by default if available, falling back to expecting the parent to be a syscon only for backwards compatibility.
* Add "reg" properties to the sub-nodes.
* Remove "syscon" from our system-controller nodes and instead use "simple-bus". Which more accurately describes what these regions are, and prevents issues like having a regmap over gaps (as these system-controller have gaps in between the sub device memory regions)
We would still have to add simple compatibles for the efuse and pcie mode/id regions, but that is much more correct than hiding them in the device's node like done in patch 1/7 of this series.
Andrew
Quoted 3 lines
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +0
-0reg = <0x0 0x40f00000 0x0 0x20000>; #address-cells = <1>; #size-cells = <1>;
Nishanth Menon
maintainerPATCH 4/7 arm64: dts: ti: k3-am65-main: Fix mcan node name
In reply to Nishanth Menons/mcan/can to stay in sync with bindings conventions.
--- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +2 -2
@@ -227,7 +227,7 @@ mcu_udmap: dma-controller@285c0000 { }; }; - m_can0: mcan@40528000 { + m_can0: can@40528000 { compatible = "bosch,m_can"; reg = <0x0 0x40528000 0x0 0x400>, <0x0 0x40500000 0x0 0x4400>;
@@ -243,7 +243,7 @@ m_can0: mcan@40528000 { status = "disabled"; }; - m_can1: mcan@40568000 { + m_can1: can@40568000 { compatible = "bosch,m_can"; reg = <0x0 0x40568000 0x0 0x400>, <0x0 0x40540000 0x0 0x4400>;
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 5/7 arm64: dts: ti: k3-am65-main: Drop deprecated ti,otap-del-sel property
In reply to Nishanth Menonti,otap-del-sel has been deprecated in favor of ti,otap-del-sel-legacy.
Drop the duplicate and misleading ti,otap-del-sel property.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +0 -1
@@ -469,7 +469,6 @@ sdhci1: mmc@4fa0000 { ti,otap-del-sel-ddr52 = <0x4>; ti,otap-del-sel-hs200 = <0x7>; ti,clkbuf-sel = <0x7>; - ti,otap-del-sel = <0x2>; ti,trm-icp = <0x8>; dma-coherent; };
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 6/7 arm64: dts: ti: k3-am65-mcu: Fix fss node
In reply to Nishanth MenonFix fss node name with a bus node and proper reg range.
--- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi +2 -1
@@ -259,8 +259,9 @@ m_can1: can@40568000 { status = "disabled"; }; - fss: fss@47000000 { + fss: bus@47000000 { compatible = "simple-bus"; + reg = <0x0 0x47000000 0x0 0x70000>; #address-cells = <2>; #size-cells = <2>; ranges;
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH 7/7 arm64: dts: ti: k3-am65-iot2050-common: Rename rtc8564 nodename
In reply to Nishanth MenonJust use "rtc" as the nodename to better match with the bindings.
--- arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +1 -1
@@ -483,7 +483,7 @@ &main_i2c0 { pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; - rtc: rtc8564@51 { + rtc: rtc@51 { compatible = "nxp,pcf8563"; reg = <0x51>; };
Signature · 1 line
2.40.0