aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2019-04-23 09:36:45 -0400
committerThierry Reding <thierry.reding@gmail.com>2019-05-09 11:29:31 -0400
commitf41efceb46e697a750e93c19e4579dc50697effe (patch)
tree8350555760e5729767cb74a2bc0f378d20b8f588
parentad36cb9186bc805b8fd0b9908469e29617211658 (diff)
pwm: meson: Add clock source configuration for Meson G12A
For the PWM controller in the Meson G12A SoC, the EE domain and AO domain have different clock sources. This patch tries to describe them in the DT compatible data. The two AO PWM controller has different clock source, but the first AO controller (A & B) can reuse the AXG parents name. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r--drivers/pwm/pwm-meson.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index e247ab632530..ba748027ecbf 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -433,6 +433,24 @@ static const struct meson_pwm_data pwm_axg_ao_data = {
433 .num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names), 433 .num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names),
434}; 434};
435 435
436static const char * const pwm_g12a_ao_cd_parent_names[] = {
437 "aoclk81", "xtal",
438};
439
440static const struct meson_pwm_data pwm_g12a_ao_cd_data = {
441 .parent_names = pwm_g12a_ao_cd_parent_names,
442 .num_parents = ARRAY_SIZE(pwm_g12a_ao_cd_parent_names),
443};
444
445static const char * const pwm_g12a_ee_parent_names[] = {
446 "xtal", "hdmi_pll", "fclk_div4", "fclk_div3"
447};
448
449static const struct meson_pwm_data pwm_g12a_ee_data = {
450 .parent_names = pwm_g12a_ee_parent_names,
451 .num_parents = ARRAY_SIZE(pwm_g12a_ee_parent_names),
452};
453
436static const struct of_device_id meson_pwm_matches[] = { 454static const struct of_device_id meson_pwm_matches[] = {
437 { 455 {
438 .compatible = "amlogic,meson8b-pwm", 456 .compatible = "amlogic,meson8b-pwm",
@@ -454,6 +472,18 @@ static const struct of_device_id meson_pwm_matches[] = {
454 .compatible = "amlogic,meson-axg-ao-pwm", 472 .compatible = "amlogic,meson-axg-ao-pwm",
455 .data = &pwm_axg_ao_data 473 .data = &pwm_axg_ao_data
456 }, 474 },
475 {
476 .compatible = "amlogic,meson-g12a-ee-pwm",
477 .data = &pwm_g12a_ee_data
478 },
479 {
480 .compatible = "amlogic,meson-g12a-ao-pwm-ab",
481 .data = &pwm_axg_ao_data
482 },
483 {
484 .compatible = "amlogic,meson-g12a-ao-pwm-cd",
485 .data = &pwm_g12a_ao_cd_data
486 },
457 {}, 487 {},
458}; 488};
459MODULE_DEVICE_TABLE(of, meson_pwm_matches); 489MODULE_DEVICE_TABLE(of, meson_pwm_matches);