]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: mediatek: always use bus clock for PWM on MT7622
authorDaniel Golle <daniel@makrotopia.org>
Fri, 2 Dec 2022 18:35:08 +0000 (19:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:18 +0000 (07:39 +0200)
commitb09ed99b0dbb468f56f21271584dcf2a99fc6aa6
tree2dd8e66ea85773db7b978183ccc1c4ed30948b2c
parent1dcf08fcff5ca529de6dc0395091f28854f4e54a
pwm: mediatek: always use bus clock for PWM on MT7622

commit aa3c668f2f98856af96e13f44da6ca4f26f0b98c upstream.

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'.

Fixes: 0c0ead76235db0 ("pwm: mediatek: Always use bus clock")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/Y1iF2slvSblf6bYK@makrotopia.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/pwm-mediatek.c