Skip to contentSkip to conversation

Enable RPi header on j721e sk

PATCH Superseded Rahul T R 2 participants 7 messages May 30, 2022

Subsystems (3)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Rahul T R

author
#0 lore raw

v2 cover Enable RPi header on j721e sk

The following series of patches enables RPi header on j721e sk. It is a 40 pin io expasion header which brings out i2c5, ehrpwm 2,3 and some pins of gpio 0,1

v2:
- Add full path for clock property $ref
- Remove the discription for clock pattern property, since $ref is added
- Remove the label in the example
- Fix the indentation in the example

Rahul T R (1):
dt-bindings: mfd: ti,j721e-system-controller: Add clock property

Sinthu Raja (1):
arm64: dts: ti: k3-j721e-sk: Add pinmux for RPi Header

Vijay Pothukuchi (1):
arm64: dts: ti: k3-j721e-*: Add dts nodes for EHRPWMs

 .../mfd/ti,j721e-system-controller.yaml       |  10 ++
 .../dts/ti/k3-j721e-common-proc-board.dts     |  24 +++++
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     |  62 ++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 101 +++++++++++++++++-
 4 files changed, 191 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/3 dt-bindings: mfd: ti,j721e-system-controller: Add clock property

Add a pattern property for clock, also update the example with a clock node

---
 .../bindings/mfd/ti,j721e-system-controller.yaml       | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +10 -0
index fa86691ebf16..290b22cab52f 100644
@@ -48,6 +48,10 @@ patternProperties:
     description:
       This is the SERDES lane control mux.
 
+  "^clock@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+
 required:
   - compatible
   - reg
@@ -79,5 +83,11 @@ examples:
                 <0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;
                 /* SERDES4 lane0/1/2/3 select */
         };
+
+        clock@4140 {
+            compatible = "ti,am654-ehrpwm-tbclk", "syscon";
+            reg = <0x4140 0x18>;
+            #clock-cells = <1>;
+        };
     };
 ...
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH v2 1/3] dt-bindings: mfd: ti,j721e-system-controller: Add clock property

Quoted 13 lines · Rahul T R

Add a pattern property for clock, also update the example with a clock node

---
 .../bindings/mfd/ti,j721e-system-controller.yaml       | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +0 -0
index fa86691ebf16..290b22cab52f 100644

Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml patternProperties: · line 54

Quoted 7 lines
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +4 -0
@@ -48,6 +48,10 @@ patternProperties:
     description:
       This is the SERDES lane control mux.
 
+  "^clock@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+

Thanks for the changes, but the question what is this remains. Clock consumers use "clocks" property. Is this a clock controller (provider) instead?

Best regards,
Krzysztof

author
#3 lore raw

Re: [PATCH v2 1/3] dt-bindings: mfd: ti,j721e-system-controller: Add clock property

Quoted 26 lines · Krzysztof Kozlowski
Quoted 13 lines · Rahul T R

Add a pattern property for clock, also update the example with a clock node

---
 .../bindings/mfd/ti,j721e-system-controller.yaml       | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +0 -0
index fa86691ebf16..290b22cab52f 100644

Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml patternProperties: · line 54

Quoted 7 lines
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +4 -0
@@ -48,6 +48,10 @@ patternProperties:
     description:
       This is the SERDES lane control mux.
 
+  "^clock@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+

Thanks for the changes, but the question what is this remains. Clock consumers use "clocks" property. Is this a clock controller (provider) instead?

Quoted 2 lines

Best regards,
Krzysztof

Hi Krzysztof,

Yes, this is a clock provider node, I will add the correct description and will also update the example with a clock consumer node that is using a clock from this

That should be enough right?

Regards
Rahul T R

#4 lore raw

Re: [PATCH v2 1/3] dt-bindings: mfd: ti,j721e-system-controller: Add clock property

Quoted 30 lines · Rahul T R
Quoted 26 lines · Krzysztof Kozlowski
Quoted 13 lines · Rahul T R

Add a pattern property for clock, also update the example with a clock node

---
 .../bindings/mfd/ti,j721e-system-controller.yaml       | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +0 -0
index fa86691ebf16..290b22cab52f 100644

Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml patternProperties: · line 54

Quoted 7 lines
Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml +4 -0
@@ -48,6 +48,10 @@ patternProperties:
     description:
       This is the SERDES lane control mux.
 
+  "^clock@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+

Thanks for the changes, but the question what is this remains. Clock consumers use "clocks" property. Is this a clock controller (provider) instead?

Quoted 2 lines

Best regards,
Krzysztof

Quoted 6 lines

Hi Krzysztof,

Yes, this is a clock provider node, I will add the correct description and will also update the example with a clock consumer node that is using a clock from this

Thanks for the description. Skip the consumer example please, just mention shortly what is this. If this is one clock, then node name is correct. If there are more clocks inside, then the node name should be "clock-controller".

Best regards,
Krzysztof

author
#5 lore raw

PATCH v2 2/3 arm64: dts: ti: k3-j721e-*: Add dts nodes for EHRPWMs

In reply to Rahul T R

From: Vijay Pothukuchi <[email protected]>

Add dts nodes for 6 EHRPWM instances on SoC

---
 .../dts/ti/k3-j721e-common-proc-board.dts     | 24 +++++++
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 62 ++++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 24 +++++++
 3 files changed, 109 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +24 -0
index 2bc26a296496..f7d02fa4d6fc 100644
@@ -995,3 +995,27 @@
 &main_mcan13 {
 	status = "disabled";
 };
+
+&main_ehrpwm0 {
+	status = "disabled";
+};
+
+&main_ehrpwm1 {
+	status = "disabled";
+};
+
+&main_ehrpwm2 {
+	status = "disabled";
+};
+
+&main_ehrpwm3 {
+	status = "disabled";
+};
+
+&main_ehrpwm4 {
+	status = "disabled";
+};
+
+&main_ehrpwm5 {
+	status = "disabled";
+};
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +61 -1

68 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-j721e-sk.dts +24 -0
index 80358cba6954..98a55778f3fe 100644
@@ -1129,3 +1129,27 @@
 	memory-region = <&c71_0_dma_memory_region>,
 			<&c71_0_memory_region>;
 };
+
+&main_ehrpwm0 {
+	status = "disabled";
+};
+
+&main_ehrpwm1 {
+	status = "disabled";
+};
+
+&main_ehrpwm2 {
+	status = "disabled";
+};
+
+&main_ehrpwm3 {
+	status = "disabled";
+};
+
+&main_ehrpwm4 {
+	status = "disabled";
+};
+
+&main_ehrpwm5 {
+	status = "disabled";
+};
Signature · 1 line
2.17.1
author
#6 lore raw

PATCH v2 3/3 arm64: dts: ti: k3-j721e-sk: Add pinmux for RPi Header

In reply to Rahul T R

From: Sinthu Raja <[email protected]>

Add pinmux required to bring out
i2c5, ehrpwm 2 and 3 and gpios on
40 pin RPi header on sk board

---
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 89 ++++++++++++++++++++++----
 1 file changed, 78 insertions(+), 11 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-sk.dts +78 -11
index 98a55778f3fe..b913b18ae133 100644
@@ -400,6 +400,57 @@
 			J721E_IOPAD(0x124, PIN_INPUT, 7) /* (Y24) PRG0_PRU1_GPO9.GPIO0_72 */
 		>;
 	};
+
+	main_i2c5_pins_default: main-i2c5-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x150, PIN_INPUT_PULLUP, 2) /* (Y26) PRG0_MDIO0_MDIO.I2C5_SCL */
+			J721E_IOPAD(0x154, PIN_INPUT_PULLUP, 2) /* (AA27) PRG0_MDIO0_MDC.I2C5_SDA */
+		>;
+	};
+
+	rpi_header_gpio0_pins_default: rpi-header-gpio0-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x01c, PIN_INPUT, 7) /* (AD22) PRG1_PRU0_GPO6.GPIO0_7 */
+			J721E_IOPAD(0x120, PIN_INPUT, 7) /* (AA28) PRG0_PRU1_GPO8.GPIO0_71 */
+			J721E_IOPAD(0x14c, PIN_INPUT, 7) /* (AA29) PRG0_PRU1_GPO19.GPIO0_82 */
+			J721E_IOPAD(0x02c, PIN_INPUT, 7) /* (AD21) PRG1_PRU0_GPO10.GPIO0_11 */
+			J721E_IOPAD(0x198, PIN_INPUT, 7) /* (V25) RGMII6_TD1.GPIO0_101 */
+			J721E_IOPAD(0x1b0, PIN_INPUT, 7) /* (W24) RGMII6_RD1.GPIO0_107 */
+			J721E_IOPAD(0x1a0, PIN_INPUT, 7) /* (W29) RGMII6_TXC.GPIO0_103 */
+			J721E_IOPAD(0x008, PIN_INPUT, 7) /* (AG22) PRG1_PRU0_GPO1.GPIO0_2 */
+			J721E_IOPAD(0x1d0, PIN_INPUT, 7) /* (AA3) SPI0_D1.GPIO0_115 */
+			J721E_IOPAD(0x11c, PIN_INPUT, 7) /* (AA24) PRG0_PRU1_GPO7.GPIO0_70 */
+			J721E_IOPAD(0x148, PIN_INPUT, 7) /* (AA26) PRG0_PRU1_GPO18.GPIO0_81 */
+			J721E_IOPAD(0x004, PIN_INPUT, 7) /* (AC23) PRG1_PRU0_GPO0.GPIO0_1 */
+			J721E_IOPAD(0x014, PIN_INPUT, 7) /* (AH23) PRG1_PRU0_GPO4.GPIO0_5 */
+			J721E_IOPAD(0x020, PIN_INPUT, 7) /* (AE20) PRG1_PRU0_GPO7.GPIO0_8 */
+			J721E_IOPAD(0x19c, PIN_INPUT, 7) /* (W27) RGMII6_TD0.GPIO0_102 */
+			J721E_IOPAD(0x1b4, PIN_INPUT, 7) /* (W25) RGMII6_RD0.GPIO0_108 */
+			J721E_IOPAD(0x188, PIN_INPUT, 7) /* (Y28) RGMII6_TX_CTL.GPIO0_97 */
+			J721E_IOPAD(0x00c, PIN_INPUT, 7) /* (AF22) PRG1_PRU0_GPO2.GPIO0_3 */
+			J721E_IOPAD(0x010, PIN_INPUT, 7) /* (AJ23) PRG1_PRU0_GPO3.GPIO0_4 */
+		>;
+	};
+
+	rpi_header_gpio1_pins_default: rpi-header-gpio1-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3) EXT_REFCLK1.GPIO1_12 */
+		>;
+	};
+
+	rpi_header_ehrpwm2_pins_default: rpi-header-ehrpwm2-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x178, PIN_INPUT, 6) /* (U27) RGMII5_RD3.EHRPWM2_A */
+			J721E_IOPAD(0x17c, PIN_INPUT, 6) /* (U24) RGMII5_RD2.EHRPWM2_B */
+		>;
+	};
+
+	rpi_header_ehrpwm3_pins_default: rpi-header-ehrpwm3-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x18c, PIN_INPUT, 6) /* (V23) RGMII6_RX_CTL.EHRPWM3_A */
+			J721E_IOPAD(0x190, PIN_INPUT, 6) /* (W23) RGMII6_TD3.EHRPWM3_B */
+		>;
+	};
 };
 
 &wkup_pmx0 {
@@ -631,11 +682,6 @@
 	status = "disabled";
 };
 
-&main_i2c5 {
-	/* Brought out on RPi Header */
-	status = "disabled";
-};
-
 &main_i2c6 {
 	/* Unused */
 	status = "disabled";
@@ -1138,18 +1184,39 @@
 	status = "disabled";
 };
 
-&main_ehrpwm2 {
+&main_ehrpwm4 {
 	status = "disabled";
 };
 
-&main_ehrpwm3 {
+&main_ehrpwm5 {
 	status = "disabled";
 };
 
-&main_ehrpwm4 {
-	status = "disabled";
+&main_gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rpi_header_gpio0_pins_default>;
 };
 
-&main_ehrpwm5 {
-	status = "disabled";
+&main_gpio1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rpi_header_gpio1_pins_default>;
+};
+
+&main_i2c5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c5_pins_default>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&main_ehrpwm2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rpi_header_ehrpwm2_pins_default>;
+	status = "okay";
+};
+
+&main_ehrpwm3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rpi_header_ehrpwm3_pins_default>;
+	status = "okay";
 };
Signature · 1 line
2.17.1