Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jian Hu and committed by
Thierry Reding
bccaa3f9 a52d97ca

+26
+26
drivers/pwm/pwm-meson.c
··· 411 411 .num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names), 412 412 }; 413 413 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 + 414 432 static const struct of_device_id meson_pwm_matches[] = { 415 433 { 416 434 .compatible = "amlogic,meson8b-pwm", ··· 441 423 { 442 424 .compatible = "amlogic,meson-gxbb-ao-pwm", 443 425 .data = &pwm_gxbb_ao_data 426 + }, 427 + { 428 + .compatible = "amlogic,meson-axg-ee-pwm", 429 + .data = &pwm_axg_ee_data 430 + }, 431 + { 432 + .compatible = "amlogic,meson-axg-ao-pwm", 433 + .data = &pwm_axg_ao_data 444 434 }, 445 435 {}, 446 436 };