Skip to contentSkip to conversation

Disable PWMs in imx6ql.dtsi

PATCH New Philipp Zabel 2 participants 5 messages Mar 9, 2015 – Mar 11, 2015

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

cover Disable PWMs in imx6ql.dtsi

Hi,

PWMs are only useful if they have an output pin connected. Since most boards don't have all of the PWM output pins assigned, let's disable the PWMs by default in imx6qdl.dtsi and have each board device tree explicitly enable just the PWMs they need. Most device trees do this already - add the missing ones and change the default status to "disabled" in the dtsi.

regards
Philipp

Philipp Zabel (3):
ARM: dts: imx6dl-aristainetos: enable backlight PWM explicitly
ARM: dts: hummingboard/cubox-i: enable front LED PWM explicitly
ARM: dts: imx6qdl: disable PWMs by default

 arch/arm/boot/dts/imx6dl-aristainetos_4.dts | 4 ++++
 arch/arm/boot/dts/imx6dl-aristainetos_7.dts | 4 ++++
 arch/arm/boot/dts/imx6qdl-cubox-i.dtsi      | 4 ++++
 arch/arm/boot/dts/imx6qdl.dtsi              | 4 ++++
 4 files changed, 16 insertions(+)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/3 ARM: dts: imx6dl-aristainetos: enable backlight PWM explicitly

All PWM users should explicitly enable the used PWMs in their device tree so they can be disabled by default in imx6qdl.dtsi.

---
 arch/arm/boot/dts/imx6dl-aristainetos_4.dts | 4 ++++
 arch/arm/boot/dts/imx6dl-aristainetos_7.dts | 4 ++++
 2 files changed, 8 insertions(+)
arch/arm/boot/dts/imx6dl-aristainetos_4.dts +4 -0
index 9cd06e5..d4c4a22 100644
@@ -83,3 +83,7 @@
 &ipu1_di0_disp0 {
 	remote-endpoint = <&display0_in>;
 };
+
+&pwm1 {
+	status = "okay";
+};
arch/arm/boot/dts/imx6dl-aristainetos_7.dts +4 -0
index b413e24..15203f0 100644
@@ -72,3 +72,7 @@
 &ipu1_di0_disp0 {
 	remote-endpoint = <&display0_in>;
 };
+
+&pwm3 {
+	status = "okay";
+};
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/3 ARM: dts: hummingboard/cubox-i: enable front LED PWM explicitly

In reply to Philipp Zabel

All PWM users should explicitly enable the used PWMs in their device tree so they can be disabled by default in imx6qdl.dtsi.

---
 arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/imx6qdl-cubox-i.dtsi +4 -0
index 6a524ca..6c9f5e9 100644
@@ -173,6 +173,10 @@
 	};
 };
 
+&pwm1 {
+	status = "okay";
+};
+
 &spdif {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_cubox_i_spdif>;
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/3 ARM: dts: imx6qdl: disable PWMs by default

In reply to Philipp Zabel

Since PWMs are only useful if they are actually connected to an output pin, let users enable them explicitly in their device trees where they should also set up the pin configuration.

---
 arch/arm/boot/dts/imx6qdl.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/imx6qdl.dtsi +4 -0
index ce37bbf1..9cc30a4 100644
@@ -380,6 +380,7 @@
 				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_PWM1>;
 				clock-names = "ipg", "per";
+				status = "disabled";
 			};
 
 			pwm2: pwm at 02084000 {
@@ -390,6 +391,7 @@
 				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_PWM2>;
 				clock-names = "ipg", "per";
+				status = "disabled";
 			};
 
 			pwm3: pwm at 02088000 {
@@ -400,6 +402,7 @@
 				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_PWM3>;
 				clock-names = "ipg", "per";
+				status = "disabled";
 			};
 
 			pwm4: pwm at 0208c000 {
@@ -410,6 +413,7 @@
 				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_PWM4>;
 				clock-names = "ipg", "per";
+				status = "disabled";
 			};
 
 			can1: flexcan at 02090000 {
Signature · 1 line
2.1.4
Applied
#4 lore raw

cover Disable PWMs in imx6ql.dtsi

In reply to Philipp Zabel
Quoted 4 lines · Philipp Zabel

Philipp Zabel (3):
ARM: dts: imx6dl-aristainetos: enable backlight PWM explicitly
ARM: dts: hummingboard/cubox-i: enable front LED PWM explicitly
ARM: dts: imx6qdl: disable PWMs by default

Applied all, thanks.