Skip to content

Commit 856c45d

Browse files
Peter Vasilthierryreding
authored andcommitted
pwm: sun4i: Support direct clock output on Allwinner A64
Allwinner A64 is capable of a direct clock output on PWM (see A64 User Manual chapter 3.10). Add support for this in the sun4i PWM driver. Signed-off-by: Peter Vasil <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 6f0841a commit 856c45d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/pwm/pwm-sun4i.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ static const struct sun4i_pwm_data sun4i_pwm_single_bypass = {
352352
.npwm = 1,
353353
};
354354

355+
static const struct sun4i_pwm_data sun50i_a64_pwm_data = {
356+
.has_prescaler_bypass = true,
357+
.has_direct_mod_clk_output = true,
358+
.npwm = 1,
359+
};
360+
355361
static const struct sun4i_pwm_data sun50i_h6_pwm_data = {
356362
.has_prescaler_bypass = true,
357363
.has_direct_mod_clk_output = true,
@@ -374,6 +380,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = {
374380
}, {
375381
.compatible = "allwinner,sun8i-h3-pwm",
376382
.data = &sun4i_pwm_single_bypass,
383+
}, {
384+
.compatible = "allwinner,sun50i-a64-pwm",
385+
.data = &sun50i_a64_pwm_data,
377386
}, {
378387
.compatible = "allwinner,sun50i-h6-pwm",
379388
.data = &sun50i_h6_pwm_data,

0 commit comments

Comments
 (0)