Skip to contentSkip to conversation

AM654: Add ECAP PWM support

PATCH New Vignesh R 1 participant 3 messages Dec 7, 2018

Subsystems (2)
lore
Share & tools
lore

Vignesh R

author maintainer
#0 lore raw

cover AM654: Add ECAP PWM support

Couple of patches to add ECAP PWM support for AM654 SoC. Based on top of
git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux.git 4.20-rc1-am65x-queue

Vignesh R (2):
arm64: dts: ti: k3-am65-main: Add ECAP PWM node
arm64: dts: ti: k3-am654-base-board: Enable ECAP PWM

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi       |  9 +++++++++
 arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 11 +++++++++++
 2 files changed, 20 insertions(+)
Signature · 1 line
2.19.2
author maintainer
#1 lore raw

PATCH 1/2 arm64: dts: ti: k3-am65-main: Add ECAP PWM node

Add DT entry for ECAP0 PWM node present in main domain

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +9 -0
index 916434839603..0a0a8fc5df64 100644
@@ -129,4 +129,13 @@
 		clocks = <&k3_clks 113 1>;
 		power-domains = <&k3_pds 113>;
 	};
+
+	ecap0: pwm@3100000 {
+		compatible = "ti,am654-ecap", "ti,am3352-ecap";
+		#pwm-cells = <3>;
+		reg = <0x0 0x03100000 0x0 0x60>;
+		power-domains = <&k3_pds 39>;
+		clocks = <&k3_clks 39 0>;
+		clock-names = "fck";
+	};
 };
Signature · 1 line
2.19.2
author maintainer
#2 lore raw

PATCH 2/2 arm64: dts: ti: k3-am654-base-board: Enable ECAP PWM

In reply to Vignesh R

Enable ECAP PWM which is used for LCD backlight.

---
 arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/ti/k3-am654-base-board.dts +11 -0
index bd5a0069191d..49ec2c3f5ef1 100644
@@ -76,6 +76,12 @@
 			AM65X_IOPAD(0x000c, PIN_INPUT, 0) /* (E21) I2C1_SDA */
 		>;
 	};
+
+	ecap0_pins_default: ecap0-pins-default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0010, PIN_INPUT, 0) /* (D21) ECAP0_IN_APWM_OUT */
+		>;
+	};
 };
 
 &wkup_uart0 {
@@ -125,3 +131,8 @@
 	pinctrl-0 = <&main_i2c2_pins_default>;
 	clock-frequency = <400000>;
 };
+
+&ecap0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ecap0_pins_default>;
+};
Signature · 1 line
2.19.2