Skip to contentSkip to conversation

Enable PWMs

PATCH Applied Judith Mendez 3 participants 6 messages Apr 22, 2025 – Apr 25, 2025

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

cover Enable PWMs

This patch series enables PWM signal outputs on am625 SK, am62 lp SK, am62a7 SK, and am62p5 SK boards.

For am625 SK and am62 lp SK, add pinmux, eCAP, and eHRPWM nodes in the k3-am62x-sk-common.dtsi so as to not duplicate nodes in the board files.

Judith Mendez (3):
arm64: dts: ti: k3-am62p5-sk: Enable PWM
arm64: dts: ti: k3-am62a7-sk: Enable PWM
arm64: dts: ti: k3-am625-sk: Enable PWM

 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts       | 40 ++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts       | 54 +++++++++++++++++++
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 40 ++++++++++++++
 3 files changed, 134 insertions(+)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/3 arm64: dts: ti: k3-am62p5-sk: Enable PWM

PWM signals can be routed to the user expansion header on am62p5 SK. Enable eCAP0, eCAP1, eHRPWM0, eHRPWM1 and route the output PWM signals to pins on J4 header.

---
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 54 +++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +54 -0
index d29f524600af0..c2f55cc5a8ebc 100644
@@ -356,6 +356,32 @@ wlan_en_pins_default: wlan-en-default-pins {
 			AM62PX_IOPAD(0x0124, PIN_INPUT, 7) /* (J25) MMC2_SDCD.GPIO0_71 */
 		>;
 	};
+
+	main_ecap1_pins_default: main-ecap1-default-pins {
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x019c, PIN_OUTPUT, 2) /* (E24) MCASP0_AXR1.ECAP1_IN_APWM_OUT */
+		>;
+	};
+
+	main_ecap2_pins_default: main-ecap2-default-pins {
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x01a4, PIN_OUTPUT, 2) /* (F24) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */
+		>;
+	};
+
+	main_epwm0_pins_default: main-epwm0-default-pins {
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x01b4, PIN_OUTPUT, 2) /* (D20) SPI0_CS0.EHRPWM0_A */
+			AM62PX_IOPAD(0x01b8, PIN_OUTPUT, 2) /* (E20) SPI0_CS1.EHRPWM0_B */
+		>;
+	};
+
+	main_epwm1_pins_default: main-epwm1-default-pins {
+		pinctrl-single,pins = <
+			AM62PX_IOPAD(0x01bc, PIN_OUTPUT, 2) /* (B21) SPI0_CLK.EHRPWM1_A */
+			AM62PX_IOPAD(0x01c0, PIN_OUTPUT, 2) /* (B20) SPI0_D0.EHRPWM1_B */
+		>;
+	};
 };
 
 &main_i2c0 {
@@ -683,3 +709,31 @@ &mcu_gpio0 {
 &mcu_gpio_intr {
 	status = "reserved";
 };
+
+&ecap1 {
+	/* P36 of J4 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap1_pins_default>;
+	status = "okay";
+};
+
+&ecap2 {
+	/* P11 of J4 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap2_pins_default>;
+	status = "okay";
+};
+
+&epwm0 {
+	/* P24/P26 of J4 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_epwm0_pins_default>;
+	status = "okay";
+};
+
+&epwm1 {
+	/* P23/P19 of J4 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_epwm1_pins_default>;
+	status = "okay";
+};
Signature · 1 line
2.49.0
#2 lore raw

PATCH 2/3 arm64: dts: ti: k3-am62a7-sk: Enable PWM

In reply to Judith Mendez

PWM signals can be routed to the user expansion header on am62a7 SK. Enable eCAP0, eCAP1, eHRPWM1, and route the output PWM signals to pins on J3 header.

---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 40 +++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +40 -0
index 1c9d95696c839..a9557ee73b831 100644
@@ -383,6 +383,25 @@ vddshv_sdio_pins_default: vddshv-sdio-default-pins {
 			AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
 		>;
 	};
+
+	main_ecap0_pins_default: main-ecap0-default-pins {
+		pinctrl-single,pins = <
+			AM62AX_IOPAD(0x01b8, PIN_OUTPUT, 3) /* (C16) SPI0_CS1.ECAP0_IN_APWM_OUT */
+		>;
+	};
+
+	main_ecap2_pins_default: main-ecap2-default-pins {
+		pinctrl-single,pins = <
+			AM62AX_IOPAD(0x01a4, PIN_OUTPUT, 2) /* (A19) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */
+		>;
+	};
+
+	main_epwm1_pins_default: main-epwm1-default-pins {
+		pinctrl-single,pins = <
+			AM62AX_IOPAD(0x019c, PIN_OUTPUT, 6) /* (B18) MCASP0_AXR1.EHRPWM1_A */
+			AM62AX_IOPAD(0x01a0, PIN_OUTPUT, 6) /* (B20) MCASP0_AXR0.EHRPWM1_B */
+		>;
+	};
 };
 
 &mcu_pmx0 {
@@ -741,3 +760,24 @@ dpi1_out: endpoint {
 		};
 	};
 };
+
+&ecap0 {
+	/* P26 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap0_pins_default>;
+	status = "okay";
+};
+
+&ecap2 {
+	/* P11 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap2_pins_default>;
+	status = "okay";
+};
+
+&epwm1 {
+	/* P36/P33 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_epwm1_pins_default>;
+	status = "okay";
+};
Signature · 1 line
2.49.0
#3 lore raw

PATCH 3/3 arm64: dts: ti: k3-am625-sk: Enable PWM

In reply to Judith Mendez

PWM signals can be routed to the user expansion header on am625 SK and am62 lp sk. Enable eCAP0, eCAP1, eHRPWM1, and route the output PWM signals to pins on J3 header.

---
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +40 -0
index d52cb2a5a589a..20d1437f253d4 100644
@@ -303,6 +303,25 @@ AM62X_IOPAD(0x074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
 			AM62X_IOPAD(0x078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
 		>;
 	};
+
+	main_ecap0_pins_default: main-ecap0-default-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x01b8, PIN_OUTPUT, 3) /* (C13) SPI0_CS1.ECAP0_IN_APWM_OUT */
+		>;
+	};
+
+	main_ecap2_pins_default: main-ecap2-default-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x01a4, PIN_OUTPUT, 2) /* (B20) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */
+		>;
+	};
+
+	main_epwm1_pins_default: main-epwm1-default-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x019c, PIN_OUTPUT, 6) /* (B18) MCASP0_AXR1.EHRPWM1_A */
+			AM62X_IOPAD(0x01a0, PIN_OUTPUT, 6) /* (E18) MCASP0_AXR0.EHRPWM1_B */
+		>;
+	};
 };
 
 &mcu_pmx0 {
@@ -560,3 +579,24 @@ &mcu_gpio0 {
 &mcu_gpio_intr {
 	status = "reserved";
 };
+
+&ecap0 {
+	/* P26 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap0_pins_default>;
+	status = "okay";
+};
+
+&ecap2 {
+	/* P11 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_ecap2_pins_default>;
+	status = "okay";
+};
+
+&epwm1 {
+	/* P36/P33 of J3 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_epwm1_pins_default>;
+	status = "okay";
+};
Signature · 1 line
2.49.0
Reviewed-by on the v1 series
#4 lore raw
In reply to Judith Mendez

On April 21, 2025 thus sayeth Judith Mendez:

Quoted 12 lines

This patch series enables PWM signal outputs on am625 SK, am62 lp SK, am62a7 SK, and am62p5 SK boards.

For am625 SK and am62 lp SK, add pinmux, eCAP, and eHRPWM nodes in the k3-am62x-sk-common.dtsi so as to not duplicate nodes in the board files.

Judith Mendez (3):
arm64: dts: ti: k3-am62p5-sk: Enable PWM
arm64: dts: ti: k3-am62a7-sk: Enable PWM
arm64: dts: ti: k3-am625-sk: Enable PWM

Quoted 5 lines
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts       | 40 ++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts       | 54 +++++++++++++++++++
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 40 ++++++++++++++
 3 files changed, 134 insertions(+)

Looks Good! Thanks Judith

~Bryan

maintainer Applied
#5 lore raw
In reply to Judith Mendez

Hi Judith Mendez,

Quoted 8 lines · Judith Mendez

This patch series enables PWM signal outputs on am625 SK, am62 lp SK, am62a7 SK, and am62p5 SK boards.

For am625 SK and am62 lp SK, add pinmux, eCAP, and eHRPWM nodes in the k3-am62x-sk-common.dtsi so as to not duplicate nodes in the board files.

[...]

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

[1/3] arm64: dts: ti: k3-am62p5-sk: Enable PWM

      commit: b2fd55f906ff70a39e67d5ad770774622164bef1
[2/3] arm64: dts: ti: k3-am62a7-sk: Enable PWM
      commit: 5aec1169b53969d07cc288814f7eebd2ef01f9a0
[3/3] arm64: dts: ti: k3-am625-sk: Enable PWM
      commit: d864bb528a6725e775d564fd4430762acbb9dd0d

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

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D