Skip to contentSkip to conversation

K2G: Add support for PWM ECAP

PATCH Applied Vignesh R 3 participants 7 messages Aug 7, 2017 – Aug 21, 2017

Subsystems (3)
lore
Share & tools
lore

Vignesh R

author
#0 lore raw

cover K2G: Add support for PWM ECAP

This series adds support for TI ECAP PWM IP present in 66AK2G SoC. Based on linux-next.

Vignesh R (4):
pwm: pwm-tiecap: Add TI 66AK2G SoC specific compatible
ARM: dts: keystone-k2g: Add ECAP PWM DT nodes
ARM: dts: keystone-k2g-evm: Enable PWM ECAP0
ARM: configs: keystone: Enable TIECAP PWM driver

 Documentation/devicetree/bindings/pwm/pwm-tiecap.txt |  1 +
 arch/arm/boot/dts/keystone-k2g-evm.dts               | 12 ++++++++++++
 arch/arm/boot/dts/keystone-k2g.dtsi                  | 20 ++++++++++++++++++++
 arch/arm/configs/keystone_defconfig                  |  2 ++
 4 files changed, 35 insertions(+)
Signature · 1 line
2.13.3
author
#1 lore raw

PATCH 1/4 pwm: pwm-tiecap: Add TI 66AK2G SoC specific compatible

Add a new compatible string "ti,k2g-ecap" to support PWM ECAP IP of TI 66AK2G SoC.

---
 Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pwm/pwm-tiecap.txt +1 -0
index 8007e839a716..06a363d9ccef 100644
@@ -6,6 +6,7 @@ Required properties:
   for am4372 - compatible = "ti,am4372-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
   for da850  - compatible = "ti,da850-ecap", "ti,am3352-ecap", "ti,am33xx-ecap";
   for dra746 - compatible = "ti,dra746-ecap", "ti,am3352-ecap";
+  for 66ak2g - compatible = "ti,k2g-ecap", "ti,am3352-ecap";
 - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
   the cells format. The PWM channel index ranges from 0 to 4. The only third
   cell flag supported by this binding is PWM_POLARITY_INVERTED.
Signature · 1 line
2.13.3
maintainer Acked-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] pwm: pwm-tiecap: Add TI 66AK2G SoC specific compatible

Quoted 7 lines · Vignesh R

Add a new compatible string "ti,k2g-ecap" to support PWM ECAP IP of TI 66AK2G SoC.

---
 Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 1 +
 1 file changed, 1 insertion(+)
#3 lore raw

Re: [PATCH 1/4] pwm: pwm-tiecap: Add TI 66AK2G SoC specific compatible

In reply to Vignesh R
Quoted 7 lines · Vignesh R

Add a new compatible string "ti,k2g-ecap" to support PWM ECAP IP of TI 66AK2G SoC.

---
 Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | 1 +
 1 file changed, 1 insertion(+)

Applied to for-4.14/drivers, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170821/29b876ec/attachment.sig>

author
#4 lore raw

PATCH 2/4 ARM: dts: keystone-k2g: Add ECAP PWM DT nodes

In reply to Vignesh R

Add DT nodes for PWM ECAP IP present on 66AK2G SoC.

---
 arch/arm/boot/dts/keystone-k2g.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/keystone-k2g.dtsi +20 -0
index bf4d1fa30840..b35d29672f30 100644
@@ -168,5 +168,25 @@
 				#reset-cells = <2>;
 			};
 		};
+
+		ecap0: pwm at 21d1800 {
+			compatible = "ti,k2g-ecap", "ti,am3352-ecap";
+			#pwm-cells = <3>;
+			reg = <0x021d1800 0x60>;
+			power-domains = <&k2g_pds 0x38>;
+			clocks = <&k2g_clks 0x38 0>;
+			clock-names = "fck";
+			status = "disabled";
+		};
+
+		ecap1: pwm at 21d1c00 {
+			compatible = "ti,k2g-ecap", "ti,am3352-ecap";
+			#pwm-cells = <3>;
+			reg = <0x021d1c00 0x60>;
+			power-domains = <&k2g_pds 0x39>;
+			clocks = <&k2g_clks 0x39 0x0>;
+			clock-names = "fck";
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
2.13.3
author
#5 lore raw

PATCH 3/4 ARM: dts: keystone-k2g-evm: Enable PWM ECAP0

In reply to Vignesh R

Enable PWM ECAP0 which will be used for display backlight.

---
 arch/arm/boot/dts/keystone-k2g-evm.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/keystone-k2g-evm.dts +12 -0
index 61883cb969d2..3ce8010622ff 100644
@@ -34,6 +34,12 @@
 			K2G_CORE_IOPAD(0x11d0) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
 		>;
 	};
+
+	ecap0_pins: ecap0_pins {
+		pinctrl-single,pins = <
+			K2G_CORE_IOPAD(0x1374) (BUFFER_CLASS_B | MUX_MODE4)	/* pr1_mdio_data.ecap0_in_apwm0_out */
+		>;
+	};
 };
 
 &uart0 {
@@ -41,3 +47,9 @@
 	pinctrl-0 = <&uart0_pins>;
 	status = "okay";
 };
+
+&ecap0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&ecap0_pins>;
+};
Signature · 1 line
2.13.3
author
#6 lore raw

PATCH 4/4 ARM: configs: keystone: Enable TIECAP PWM driver

In reply to Vignesh R

Enable PWM_TIECAP driver to support ECAP IP present in 66AK2G SoC.

---
 arch/arm/configs/keystone_defconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/keystone_defconfig +2 -0
index d47ea43d097e..445ad438b451 100644
@@ -182,6 +182,8 @@ CONFIG_KEYSTONE_NAVIGATOR_DMA=y
 CONFIG_TI_SCI_PM_DOMAINS=y
 CONFIG_MEMORY=y
 CONFIG_TI_AEMIF=y
+CONFIG_PWM=y
+CONFIG_PWM_TIECAP=m
 CONFIG_KEYSTONE_IRQ=y
 CONFIG_RESET_TI_SCI=m
 CONFIG_RESET_TI_SYSCON=m
Signature · 1 line
2.13.3