Skip to contentSkip to conversation

arm64: dts: ti: k3-am62a: Remove syscon compatible from epwm_tbclk

PATCH Applied Andrew Davis 3 participants 7 messages Aug 2, 2023 – Aug 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm64: dts: ti: k3-am62a: Remove syscon compatible from epwm_tbclk

The other instances have been fixed, but AM62a seems to have been missed, fix this here.

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index 8397cb80f5596..3198af08fb9fa 100644
@@ -56,7 +56,7 @@ phy_gmii_sel: phy@4044 {
 		};
 
 		epwm_tbclk: clock-controller@4130 {
-			compatible = "ti,am62-epwm-tbclk", "syscon";
+			compatible = "ti,am62-epwm-tbclk";
 			reg = <0x4130 0x4>;
 			#clock-cells = <1>;
 		};
Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 2/3 arm64: dts: ti: k3-am64: Merge the two main_conf nodes

There are two nodes representing the same register space, this looks to have been created by some merge or copy/paste error. Remove the second instance of this node and move its children into the first instance.

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 42 ++++++++++--------------
 1 file changed, 17 insertions(+), 25 deletions(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +17 -25
index d3dd8c426dada..e27eb2e585f14 100644
@@ -44,11 +44,28 @@ main_conf: syscon@43000000 {
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x43000000 0x20000>;
 
+		chipid@14 {
+			compatible = "ti,am654-chipid";
+			reg = <0x00000014 0x4>;
+		};
+
 		serdes_ln_ctrl: mux-controller {
 			compatible = "mmio-mux";
 			#mux-control-cells = <1>;
 			mux-reg-masks = <0x4080 0x3>; /* SERDES0 lane0 select */
 		};
+
+		phy_gmii_sel: phy@4044 {
+			compatible = "ti,am654-phy-gmii-sel";
+			reg = <0x4044 0x8>;
+			#phy-cells = <1>;
+		};
+
+		epwm_tbclk: clock@4140 {
+			compatible = "ti,am64-epwm-tbclk";
+			reg = <0x4130 0x4>;
+			#clock-cells = <1>;
+		};
 	};
 
 	gic500: interrupt-controller@1800000 {
@@ -203,31 +220,6 @@ main_pmx0: pinctrl@f4000 {
 		pinctrl-single,function-mask = <0xffffffff>;
 	};
 
-	main_conf: syscon@43000000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x00 0x43000000 0x00 0x20000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0x00 0x00 0x43000000 0x20000>;
-
-		chipid@14 {
-			compatible = "ti,am654-chipid";
-			reg = <0x00000014 0x4>;
-		};
-
-		phy_gmii_sel: phy@4044 {
-			compatible = "ti,am654-phy-gmii-sel";
-			reg = <0x4044 0x8>;
-			#phy-cells = <1>;
-		};
-
-		epwm_tbclk: clock@4140 {
-			compatible = "ti,am64-epwm-tbclk";
-			reg = <0x4130 0x4>;
-			#clock-cells = <1>;
-		};
-	};
-
 	main_timer0: timer@2400000 {
 		compatible = "ti,am654-timer";
 		reg = <0x00 0x2400000 0x00 0x400>;
Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

Re: [PATCH 2/3] arm64: dts: ti: k3-am64: Merge the two main_conf nodes

Quoted 6 lines · Andrew Davis

There are two nodes representing the same register space, this looks to have been created by some merge or copy/paste error. Remove the second instance of this node and move its children into the first instance.

---

Nishanth, this is based/dependent on your -next branch.

Andrew

Quoted 58 lines
  arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 42 ++++++++++--------------
  1 file changed, 17 insertions(+), 25 deletions(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +17 -18
index d3dd8c426dada..e27eb2e585f14 100644
@@ -44,11 +44,28 @@ main_conf: syscon@43000000 {
  		#size-cells = <1>;
  		ranges = <0x0 0x0 0x43000000 0x20000>;
 
+		chipid@14 {
+			compatible = "ti,am654-chipid";
+			reg = <0x00000014 0x4>;
+		};
+
  		serdes_ln_ctrl: mux-controller {
  			compatible = "mmio-mux";
  			#mux-control-cells = <1>;
  			mux-reg-masks = <0x4080 0x3>; /* SERDES0 lane0 select */
  		};
+
+		phy_gmii_sel: phy@4044 {
+			compatible = "ti,am654-phy-gmii-sel";
+			reg = <0x4044 0x8>;
+			#phy-cells = <1>;
+		};
+
+		epwm_tbclk: clock@4140 {
+			compatible = "ti,am64-epwm-tbclk";
+			reg = <0x4130 0x4>;
+			#clock-cells = <1>;
+		};
  	};
 
  	gic500: interrupt-controller@1800000 {
@@ -203,31 +220,6 @@ main_pmx0: pinctrl@f4000 {
  		pinctrl-single,function-mask = <0xffffffff>;
  	};
 
-	main_conf: syscon@43000000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x00 0x43000000 0x00 0x20000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0x00 0x00 0x43000000 0x20000>;
-
-		chipid@14 {
-			compatible = "ti,am654-chipid";
-			reg = <0x00000014 0x4>;
-		};
-
-		phy_gmii_sel: phy@4044 {
-			compatible = "ti,am654-phy-gmii-sel";
-			reg = <0x4044 0x8>;
-			#phy-cells = <1>;
-		};
-

arch/arm64/boot/dts/ti/k3-am64-main.dtsi main_pmx0: pinctrl@f4000 { · line 225

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +0 -7
-		epwm_tbclk: clock@4140 {
-			compatible = "ti,am64-epwm-tbclk";
-			reg = <0x4130 0x4>;
-			#clock-cells = <1>;
-		};
-	};
-
  	main_timer0: timer@2400000 {
  		compatible = "ti,am654-timer";
  		reg = <0x00 0x2400000 0x00 0x400>;

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH 3/3 arm64: dts: ti: k3-am64: Fix epwm_tbclk node name to generic name

In reply to Andrew Davis

The name "clock" is not allowed for nodes, use "clock-controller" to remove the DTS check warning.

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +1 -1
index e27eb2e585f14..4e3e450e4e4c8 100644
@@ -61,7 +61,7 @@ phy_gmii_sel: phy@4044 {
 			#phy-cells = <1>;
 		};
 
-		epwm_tbclk: clock@4140 {
+		epwm_tbclk: clock-controller@4140 {
 			compatible = "ti,am64-epwm-tbclk";
 			reg = <0x4130 0x4>;
 			#clock-cells = <1>;
Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

Re: [PATCH 3/3] arm64: dts: ti: k3-am64: Fix epwm_tbclk node name to generic name

Hello Andrew, hello Nishanth

Quoted 13 lines · Andrew Davis

The name "clock" is not allowed for nodes, use "clock-controller" to remove the DTS check warning.

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +0 -0
index e27eb2e585f14..4e3e450e4e4c8 100644

arch/arm64/boot/dts/ti/k3-am64-main.dtsi phy_gmii_sel: phy@4044 { · line 64

Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +1 -1
@@ -61,7 +61,7 @@ phy_gmii_sel: phy@4044 {
 			#phy-cells = <1>;
 		};
 
-		epwm_tbclk: clock@4140 {
+		epwm_tbclk: clock-controller@4140 {

I was asked to do the exact same change here [1] by Nishanth, and I'm sending the updated patch in a short while.

However I have one question, according to the devicetree-specification-v0.4.pdf [2] "2.2.2 Generic Names Recommendation", clock is a valid node name.

While testing the DT (make CHECK_DTBS=y), I did not have any warning nor error.

What am I missing?

In addition to that I guess we should also update the example in the dt bindings yaml file.

Francesco

[1] https://lore.kernel.org/all/[email protected]/
[2] https://github.com/devicetree-org/devicetree-specification/releases/download/v0.4/devicetree-specification-v0.4.pdf

#5 lore raw

Re: [PATCH 3/3] arm64: dts: ti: k3-am64: Fix epwm_tbclk node name to generic name

Quoted 25 lines · Francesco Dolcini

Hello Andrew, hello Nishanth

Quoted 13 lines · Andrew Davis

The name "clock" is not allowed for nodes, use "clock-controller" to remove the DTS check warning.

---
  arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +0 -0
index e27eb2e585f14..4e3e450e4e4c8 100644

arch/arm64/boot/dts/ti/k3-am64-main.dtsi phy_gmii_sel: phy@4044 { · line 64

Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +1 -1
@@ -61,7 +61,7 @@ phy_gmii_sel: phy@4044 {
  			#phy-cells = <1>;
  		};
 
-		epwm_tbclk: clock@4140 {
+		epwm_tbclk: clock-controller@4140 {

I was asked to do the exact same change here [1] by Nishanth, and I'm sending the updated patch in a short while.

Quoted 9 lines

However I have one question, according to the devicetree-specification-v0.4.pdf [2] "2.2.2 Generic Names Recommendation", clock is a valid node name.

While testing the DT (make CHECK_DTBS=y), I did not have any warning nor error.

What am I missing?

These nodes are not just any nodes, they are part of "ti,j721e-system-controller" (well not really, we have been just calling these areas that to sneak around the restrictions on "syscon", "simple-mfd" devices), and so can only have the node names specified by that binding [0].

I'm working to convert these areas to normal "simple-bus" nodes, when that is complete then the name "clock" will be fine again here.

Andrew

[0] https://www.kernel.org/doc/Documentation/devicetree/bindings/mfd/ti%2Cj721e-system-controller.yaml

Quoted 8 lines

In addition to that I guess we should also update the example in the dt bindings yaml file.

Francesco

[1] https://lore.kernel.org/all/[email protected]/
[2] https://github.com/devicetree-org/devicetree-specification/releases/download/v0.4/devicetree-specification-v0.4.pdf

maintainer Applied
#6 lore raw
In reply to Andrew Davis

Hi Andrew Davis,

Quoted 3 lines · Andrew Davis

The other instances have been fixed, but AM62a seems to have been missed, fix this here.

The merging of two conf nodes:

I understand the linux-next dependency, it does create a dtbs_check warnings on rc1, but I am picking this up since the yaml fixup is in next already and not a new compatible addition. if the fixups does'nt end up in linus-master for 6.6-rc1, we might need to look at what we need to do. Please let me know if there is any concerns and I can drop this series from my tree.

For the tbclk node name fix up:

I also noticed there were two other places we needed the fix as well, since they were trivial, I rolled up [2] as part of the patch #3. if you think the fixup should be done differently, let me know and I can drop the series from my tree and we can pick a new series up.

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/3] arm64: dts: ti: k3-am62a: Remove syscon compatible from epwm_tbclk

      commit: b9d801dbb2d5cb796dce32ffcee63fba83f72841
[2/3] arm64: dts: ti: k3-am64: Merge the two main_conf nodes
      commit: a57ba56bca42fa484bec916f7a88a3dc03d6cbdf
[3/3] arm64: dts: ti: k3: Fix epwm_tbclk node name to generic name
      commit: 085baaa7084e39a63d72db86821c6fb65bdbff72

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
[2]

arch/arm64/boot/dts/ti/k3-am62-main.dtsi +1 -1
index 33b6aadc9083..ef90b2bc81eb 100644
@@ -55,7 +55,7 @@ phy_gmii_sel: phy@4044 {
 			#phy-cells = <1>;
 		};
 
-		epwm_tbclk: clock@4130 {
+		epwm_tbclk: clock-controller@4130 {
 			compatible = "ti,am62-epwm-tbclk";
 			reg = <0x4130 0x4>;
 			#clock-cells = <1>;
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -1
index 350beddc3d3c..d08f086d7d01 100644
@@ -502,7 +502,7 @@ dss_oldi_io_ctrl: dss-oldi-io-ctrl@41e0 {
 			reg = <0x000041e0 0x14>;
 		};
 
-		ehrpwm_tbclk: clock@4140 {
+		ehrpwm_tbclk: clock-controller@4140 {
 			compatible = "ti,am654-ehrpwm-tbclk";
 			reg = <0x4140 0x18>;
 			#clock-cells = <1>;
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D