summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorJian Hu <jian.hu@amlogic.com>2017-12-04 01:00:17 -0500
committerThierry Reding <thierry.reding@gmail.com>2017-12-05 03:51:36 -0500
commitbccaa3f917c90917a758020dfbdd9027290a7c4e (patch)
treea8616b930f1607ae2aa28de86b54a753251c6f28 /drivers/pwm
parenta52d97ca0d44b7f5096136afaa9714e973091ad3 (diff)
pwm: meson: Add clock source configuration for Meson-AXG
For PWM controller in the Meson-AXG SoC, the EE domain and AO domain have different clock sources. This patch tries to describe them in the DT compatible data. Signed-off-by: Jian Hu <jian.hu@amlogic.com> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-meson.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index d589331d1884..0767deba8e62 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -411,6 +411,24 @@ static const struct meson_pwm_data pwm_gxbb_ao_data = {
411 .num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names), 411 .num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names),
412}; 412};
413 413
414static const char * const pwm_axg_ee_parent_names[] = {
415 "xtal", "fclk_div5", "fclk_div4", "fclk_div3"
416};
417
418static const struct meson_pwm_data pwm_axg_ee_data = {
419 .parent_names = pwm_axg_ee_parent_names,
420 .num_parents = ARRAY_SIZE(pwm_axg_ee_parent_names),
421};
422
423static const char * const pwm_axg_ao_parent_names[] = {
424 "aoclk81", "xtal", "fclk_div4", "fclk_div5"
425};
426
427static const struct meson_pwm_data pwm_axg_ao_data = {
428 .parent_names = pwm_axg_ao_parent_names,
429 .num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names),
430};
431
414static const struct of_device_id meson_pwm_matches[] = { 432static const struct of_device_id meson_pwm_matches[] = {
415 { 433 {
416 .compatible = "amlogic,meson8b-pwm", 434 .compatible = "amlogic,meson8b-pwm",
@@ -424,6 +442,14 @@ static const struct of_device_id meson_pwm_matches[] = {
424 .compatible = "amlogic,meson-gxbb-ao-pwm", 442 .compatible = "amlogic,meson-gxbb-ao-pwm",
425 .data = &pwm_gxbb_ao_data 443 .data = &pwm_gxbb_ao_data
426 }, 444 },
445 {
446 .compatible = "amlogic,meson-axg-ee-pwm",
447 .data = &pwm_axg_ee_data
448 },
449 {
450 .compatible = "amlogic,meson-axg-ao-pwm",
451 .data = &pwm_axg_ao_data
452 },
427 {}, 453 {},
428}; 454};
429MODULE_DEVICE_TABLE(of, meson_pwm_matches); 455MODULE_DEVICE_TABLE(of, meson_pwm_matches);