pwm: mediatek: always use bus clock for PWM on MT7622
Subsystems (2)
PATCH 1/1 pwm: mediatek: always use bus clock for PWM on MT7622
According to MT7622 Reference Manual for Development Board v1.0 the PWM unit found in the MT7622 SoC also comes with the PWM_CK_26M_SEL register at offset 0x210 just like other modern MediaTek ARM64 SoCs. And also MT7622 sets that register to 0x00000001 on reset which is described as 'Select 26M fix CLK as BCLK' in the datasheet. Hence set has_ck_26m_sel to true also for MT7622 which results in the driver writing 0 to the PWM_CK_26M_SEL register which is described as 'Select bus CLK as BCLK'.
--- drivers/pwm/pwm-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pwm/pwm-mediatek.c +1 -1
@@ -296,7 +296,7 @@ static const struct pwm_mediatek_of_data mt6795_pwm_data = {static const struct pwm_mediatek_of_data mt7622_pwm_data = { .num_pwms =6 , .pwm45_fixup = false, - .has_ck_26m_sel = false, + .has_ck_26m_sel = true, };static const struct pwm_mediatek_of_data mt7623_pwm_data = {
Signature · 1 line
2.38.1
Il 26/10/22 02:56, Daniel Golle ha scritto:
Quoted 11 lines
According to MT7622 Reference Manual for Development Board v1.0 the PWM unit found in the MT7622 SoC also comes with the
PWM_CK_26M_SELregister at offset0x210just like other modern MediaTek ARM64 SoCs. And also MT7622 sets that register to0x00000001on reset which is described as 'Select 26M fix CLK as BCLK' in the datasheet. Hence sethas_ck_26m_selto true also for MT7622 which results in the driver writing 0 to thePWM_CK_26M_SELregister which is described as 'Select bus CLK as BCLK'.Fixes 0c0ead76235db0 ("pwm: mediatek: Always use bus clock")Signed-off-by Daniel Golle <[email protected]>
Uwe Kleine-König
Acked-byQuoted 10 lines · AngeloGioacchino Del Regno
Il 26/10/22 02:56, Daniel Golle ha scritto:
Quoted 9 lines
According to MT7622 Reference Manual for Development Board v1.0 the PWM unit found in the MT7622 SoC also comes with the
PWM_CK_26M_SELregister at offset0x210just like other modern MediaTek ARM64 SoCs. And also MT7622 sets that register to0x00000001on reset which is described as 'Select 26M fix CLK as BCLK' in the datasheet. Hence sethas_ck_26m_selto true also for MT7622 which results in the driver writing 0 to thePWM_CK_26M_SELregister which is described as 'Select bus CLK as BCLK'.
Quoted 4 lines
Quoted 2 lines
Fixes 0c0ead76235db0 ("pwm: mediatek: Always use bus clock")Signed-off-by Daniel Golle <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |