Skip to contentSkip to conversation

arm64: dts: mediatek: mt8183: add pwm node

PATCH Applied Fabien Parent 2 participants 4 messages Dec 9, 2020 – Jan 29, 2021

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

PATCH v2 1/2 arm64: dts: mediatek: mt8183: add pwm node

MT8183 SoC has 4 PWMs. Add the pwm node in order to support them.

---

V2: rename pwm0 to pwm1 since disp-pwm has been merged in v5.11 as pwm0

 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +14 -0
index 5b782a4769e7..a0004bd9f9c2 100644
@@ -667,6 +667,20 @@ pwm0: pwm@1100e000 {
 			clock-names = "main", "mm";
 		};
 
+		pwm1: pwm@11006000 {
+			compatible = "mediatek,mt8183-pwm";
+			reg = <0 0x11006000 0 0x1000>;
+			#pwm-cells = <2>;
+			clocks = <&infracfg CLK_INFRA_PWM>,
+				 <&infracfg CLK_INFRA_PWM_HCLK>,
+				 <&infracfg CLK_INFRA_PWM1>,
+				 <&infracfg CLK_INFRA_PWM2>,
+				 <&infracfg CLK_INFRA_PWM3>,
+				 <&infracfg CLK_INFRA_PWM4>;
+			clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
+				      "pwm4";
+		};
+
 		i2c3: i2c@1100f000 {
 			compatible = "mediatek,mt8183-i2c";
 			reg = <0 0x1100f000 0 0x1000>,
Signature · 7 lines
2.29.2


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw

PATCH v2 2/2 arm64: dts: mediatek: mt8183-evb: add PWM support

Enable the pwm driver and set the pinctrl for PWM A line.

---

V2:
* rename pwm0 to pwm1 since disp-pwm has been merged in v5.11 as pwm0
* rename the pio node and labels to match the coding standard of this dts

 arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +12 -0
index cba2d8933e79..3249c959f76f 100644
@@ -344,6 +344,12 @@ pins_spi{
 			bias-disable;
 		};
 	};
+
+	pwm_pins_1: pwm1 {
+		pins_pwm {
+			pinmux = <PINMUX_GPIO90__FUNC_PWM_A>;
+		};
+	};
 };
 
 &spi0 {
@@ -392,3 +398,9 @@ &spi5 {
 &uart0 {
 	status = "okay";
 };
+
+&pwm1 {
+	status = "okay";
+	pinctrl-0 = <&pwm_pins_1>;
+	pinctrl-names = "default";
+};
Signature · 7 lines
2.29.2


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
maintainer Applied
#2 lore raw

Re: [PATCH v2 2/2] arm64: dts: mediatek: mt8183-evb: add PWM support

Quoted 3 lines · Fabien Parent

Enable the pwm driver and set the pinctrl for PWM A line.

Applied to v5.11-next/dts64

Thanks

Quoted 28 lines

---

V2:
* rename pwm0 to pwm1 since disp-pwm has been merged in v5.11 as pwm0
* rename the pio node and labels to match the coding standard of this dts

 arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +6 -0
index cba2d8933e79..3249c959f76f 100644
@@ -344,6 +344,12 @@ pins_spi{
 			bias-disable;
 		};
 	};
+
+	pwm_pins_1: pwm1 {
+		pins_pwm {
+			pinmux = <PINMUX_GPIO90__FUNC_PWM_A>;
+		};
+	};
 };
 
 &spi0 {

arch/arm64/boot/dts/mediatek/mt8183-evb.dts &spi5 { · line 406

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +6 -0
@@ -392,3 +398,9 @@ &spi5 {
 &uart0 {
 	status = "okay";
 };
+
+&pwm1 {
+	status = "okay";
+	pinctrl-0 = <&pwm_pins_1>;
+	pinctrl-names = "default";
+};

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer Applied
#3 lore raw
In reply to Fabien Parent
Quoted 3 lines · Fabien Parent

MT8183 SoC has 4 PWMs. Add the pwm node in order to support them.

Applied to v5.11-next/dts64

Thanks

Quoted 23 lines

---

V2: rename pwm0 to pwm1 since disp-pwm has been merged in v5.11 as pwm0

 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +7 -0
index 5b782a4769e7..a0004bd9f9c2 100644
@@ -667,6 +667,20 @@ pwm0: pwm@1100e000 {
 			clock-names = "main", "mm";
 		};
 
+		pwm1: pwm@11006000 {
+			compatible = "mediatek,mt8183-pwm";
+			reg = <0 0x11006000 0 0x1000>;
+			#pwm-cells = <2>;
+			clocks = <&infracfg CLK_INFRA_PWM>,
+				 <&infracfg CLK_INFRA_PWM_HCLK>,
+				 <&infracfg CLK_INFRA_PWM1>,

arch/arm64/boot/dts/mediatek/mt8183.dtsi pwm0: pwm@1100e000 { · line 686

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8183.dtsi +7 -0
+				 <&infracfg CLK_INFRA_PWM2>,
+				 <&infracfg CLK_INFRA_PWM3>,
+				 <&infracfg CLK_INFRA_PWM4>;
+			clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
+				      "pwm4";
+		};
+
 		i2c3: i2c@1100f000 {
 			compatible = "mediatek,mt8183-i2c";
 			reg = <0 0x1100f000 0 0x1000>,

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek