]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: dts: ti: k3-am62a7-sk: Enable PWM
authorJudith Mendez <jm@ti.com>
Tue, 22 Apr 2025 00:08:50 +0000 (19:08 -0500)
committerNishanth Menon <nm@ti.com>
Fri, 25 Apr 2025 20:58:13 +0000 (15:58 -0500)
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.

Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Link: https://lore.kernel.org/r/20250422000851.4118545-3-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts

index 1c9d95696c839a51b607839abb9429a8de6fa620..a9557ee73b8311087db9ce9cd9596efb8bb8975d 100644 (file)
                        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 {
                };
        };
 };
+
+&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";
+};