Skip to contentSkip to conversation

ARM: dts: AM33XX: Add ECAP and EHRPWM device tree data

PATCH New Philip, Avinash 1 participant 3 messages Sep 29, 2012 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: AM33XX: Add ECAP and EHRPWM device tree data

This patch set adds support for device tree data for ECAP & EHRPWM & device tree data for am335x-evm with PWM as backlight.

This has been based on [1] merged with [2] & depends on [3]
1. linux-next/master
2. linux-omap-dt/for_3.7/dts_part2
3. http://www.mail-archive.com/linux-kernel at vger.kernel.org/msg312091.html

PWM back light tested on AM335X evm for different backlight levels.

Philip, Avinash (2):
ARM: dts: AM33XX: Add ECAP & EHRPWM device tree nodes
ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evm

 arch/arm/boot/dts/am335x-evm.dts |   21 ++++++++++++++++
 arch/arm/boot/dts/am33xx.dtsi    |   48 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/2 ARM: dts: AM33XX: Add ECAP & EHRPWM device tree nodes

Add ECAP and EHRPWM device tree nodes to AM33XX SoC family by adding necessary properties like pwm-cells, base reg & set disabled as status.

---
:100644 100644 a9c885a... 736ba0a... M arch/arm/boot/dts/am33xx.dtsi

 arch/arm/boot/dts/am33xx.dtsi |   48 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +48 -0
index a9c885a..736ba0a 100644
@@ -313,5 +313,53 @@
 			ti,hwmods = "timer7";
 			ti,timer-pwm;
 		};
+
+		ecap0: ecap at 48300100 {
+			compatible = "ti,am33xx-ecap";
+			#pwm-cells = <3>;
+			reg = <0x48300100 0x80 0x48300000 0x10>;
+			ti,hwmods = "ecap0";
+			status = "disabled";
+		};
+
+		ecap1: ecap at 48302100 {
+			compatible = "ti,am33xx-ecap";
+			#pwm-cells = <3>;
+			reg = <0x48302100 0x80 0x48302000 0x10>;
+			ti,hwmods = "ecap1";
+			status = "disabled";
+		};
+
+		ecap2: ecap at 48304100 {
+			compatible = "ti,am33xx-ecap";
+			#pwm-cells = <3>;
+			reg = <0x48304100 0x80 0x48304000 0x10>;
+			ti,hwmods = "ecap2";
+			status = "disabled";
+		};
+
+		ehrpwm0: ehrpwm at 48300200 {
+			compatible = "ti,am33xx-ehrpwm";
+			#pwm-cells = <3>;
+			reg = <0x48300200 0x100 0x48300000 0x10>;
+			ti,hwmods = "ehrpwm0";
+			status = "disabled";
+		};
+
+		ehrpwm1: ehrpwm at 48302200 {
+			compatible = "ti,am33xx-ehrpwm";
+			#pwm-cells = <3>;
+			reg = <0x48302200 0x100 0x48302000 0x10>;
+			ti,hwmods = "ehrpwm1";
+			status = "disabled";
+		};
+
+		ehrpwm2: ehrpwm at 48304200 {
+			compatible = "ti,am33xx-ehrpwm";
+			#pwm-cells = <3>;
+			reg = <0x48304200 0x100 0x48304000 0x10>;
+			ti,hwmods = "ehrpwm2";
+			status = "disabled";
+		};
 	};
 };
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evm

In reply to Philip, Avinash

PWM output from ecap0 uses as backlight source. Also adds low threshold value to have a uniform divisions in brightness-levels scales.

---
:100644 100644 a5c4c62... 5516098... M arch/arm/boot/dts/am335x-evm.dts

 arch/arm/boot/dts/am335x-evm.dts |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +21 -0
index a5c4c62..5516098 100644
@@ -24,6 +24,14 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	am33xx_pinmux: pinmux at 44e10800 {
+		ecap0_pins: backlight_pins {
+			pinctrl-single,pins = <
+				0x164 0x0	/* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+			>;
+		};
+	};
+
 	ocp {
 		uart1: serial at 44e09000 {
 			status = "okay";
@@ -75,6 +83,12 @@
 				reg = <0x48>;
 			};
 		};
+
+		ecap0: ecap at 48300100 {
+			status = "okay";
+			pinctrl-names = "default";
+			pinctrl-0 = <&ecap0_pins>;
+		};
 	};
 
 	vbat: fixedregulator at 0 {
@@ -90,6 +104,13 @@
 		regulator-name = "lis3_reg";
 		regulator-boot-on;
 	};
+
+	backlight {
+		compatible	= "pwm-backlight";
+		pwms = <&ecap0 0 50000 0>;
+		brightness-levels = <0 51 53 56 62 75 101 152 255>;
+		default-brightness-level = <8>;
+	};
 };
 
 /include/ "tps65910.dtsi"
Signature · 1 line
1.7.0.4