Skip to content

Commit ceef601

Browse files
Jian Huthierryreding
authored andcommitted
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 <[email protected]> Signed-off-by: Yixun Lan <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 2284855 commit ceef601

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

drivers/pwm/pwm-meson.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,24 @@ static const struct meson_pwm_data pwm_gxbb_ao_data = {
411411
.num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names),
412412
};
413413

414+
static const char * const pwm_axg_ee_parent_names[] = {
415+
"xtal", "fclk_div5", "fclk_div4", "fclk_div3"
416+
};
417+
418+
static 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+
423+
static const char * const pwm_axg_ao_parent_names[] = {
424+
"aoclk81", "xtal", "fclk_div4", "fclk_div5"
425+
};
426+
427+
static 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+
414432
static const struct of_device_id meson_pwm_matches[] = {
415433
{
416434
.compatible = "amlogic,meson8b-pwm",
@@ -424,6 +442,14 @@ static const struct of_device_id meson_pwm_matches[] = {
424442
.compatible = "amlogic,meson-gxbb-ao-pwm",
425443
.data = &pwm_gxbb_ao_data
426444
},
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+
},
427453
{},
428454
};
429455
MODULE_DEVICE_TABLE(of, meson_pwm_matches);

0 commit comments

Comments
 (0)