diff options
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
-rw-r--r-- | drivers/pwm/pwm-atmel.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index 4ac899d8008c..b1473ed55110 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c | |||
@@ -52,6 +52,8 @@ | |||
52 | 52 | ||
53 | /* Only the LSB 16 bits are significant. */ | 53 | /* Only the LSB 16 bits are significant. */ |
54 | #define PWM_MAXV1_PRD 0xFFFF | 54 | #define PWM_MAXV1_PRD 0xFFFF |
55 | /* All 32 bits are significant. */ | ||
56 | #define PWM_MAXV2_PRD 0xFFFFFFFF | ||
55 | #define PRD_MAXV1_PRES 10 | 57 | #define PRD_MAXV1_PRES 10 |
56 | 58 | ||
57 | struct atmel_pwm_registers { | 59 | struct atmel_pwm_registers { |
@@ -311,6 +313,20 @@ static const struct atmel_pwm_data atmel_sama5_pwm_data = { | |||
311 | }, | 313 | }, |
312 | }; | 314 | }; |
313 | 315 | ||
316 | static const struct atmel_pwm_data mchp_sam9x60_pwm_data = { | ||
317 | .regs = { | ||
318 | .period = PWMV1_CPRD, | ||
319 | .period_upd = PWMV1_CUPD, | ||
320 | .duty = PWMV1_CDTY, | ||
321 | .duty_upd = PWMV1_CUPD, | ||
322 | }, | ||
323 | .cfg = { | ||
324 | /* 32 bits to keep period and duty. */ | ||
325 | .max_period = PWM_MAXV2_PRD, | ||
326 | .max_pres = PRD_MAXV1_PRES, | ||
327 | }, | ||
328 | }; | ||
329 | |||
314 | static const struct platform_device_id atmel_pwm_devtypes[] = { | 330 | static const struct platform_device_id atmel_pwm_devtypes[] = { |
315 | { | 331 | { |
316 | .name = "at91sam9rl-pwm", | 332 | .name = "at91sam9rl-pwm", |
@@ -335,6 +351,9 @@ static const struct of_device_id atmel_pwm_dt_ids[] = { | |||
335 | .compatible = "atmel,sama5d2-pwm", | 351 | .compatible = "atmel,sama5d2-pwm", |
336 | .data = &atmel_sama5_pwm_data, | 352 | .data = &atmel_sama5_pwm_data, |
337 | }, { | 353 | }, { |
354 | .compatible = "microchip,sam9x60-pwm", | ||
355 | .data = &mchp_sam9x60_pwm_data, | ||
356 | }, { | ||
338 | /* sentinel */ | 357 | /* sentinel */ |
339 | }, | 358 | }, |
340 | }; | 359 | }; |