Skip to contentSkip to conversation

Add the Allwinner A31/A31s PWM driver.

PATCH Superseded [email protected] 1 participant 1 message Feb 7, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add the Allwinner A31/A31s PWM driver.

From: Siarhei Volkau <[email protected]>

A31 SoC have a different map of PWM registers than others Allwinner SoCs, so the operation of access to the registers reworked for all existing in driver SoCs.

Tested on Onda V972 (a31) and Marsboard A20, but only PWM channel 0, because other channels pins are not routed or have another function on these boards.

---
 arch/arm/boot/dts/sun6i-a31.dtsi |   8 ++
 drivers/pwm/pwm-sun4i.c          | 195 +++++++++++++++++++++++++++++++++------
 2 files changed, 175 insertions(+), 28 deletions(-)
arch/arm/boot/dts/sun6i-a31.dtsi +8 -0
index ee1eb6d..fcba129 100644
@@ -627,6 +627,14 @@
 			status = "disabled";
 		};
 
+		pwm: pwm at 01c21400 {
+			compatible = "allwinner,sun6i-a31-pwm";
+			reg = <0x01c21400 0x400>;
+			clocks = <&osc24M>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		lradc: lradc at 01c22800 {
 			compatible = "allwinner,sun4i-a10-lradc-keys";
 			reg = <0x01c22800 0x100>;
drivers/pwm/pwm-sun4i.c +167 -28

352 lines not on this page · raw message

Signature · 1 line
2.4.11