From 313cc8bf5b31a76f3a90457c7761de71659b4b6a Mon Sep 17 00:00:00 2001 From: Christoph Muellner Date: Mon, 17 Jun 2019 15:33:31 +0200 Subject: rk3368: grf: Switch PWM to RK_PWM. The RK3368's GRF has the bit 'pwm_sel' in GRF_SOC_CON15, which defines the active PWM controller. By default this is the DW_PWM block. Contrary to that the DTSI only lists the RK_PWM block. The effect of that is, that PWM does not work as expected on the RK3368. Although the PWM counter registers shows that the PWM controller is working as expected, there is no PWM output on the corresponding PWM pin. This patch switches the PWM source to the RK_PWM block during bootup with the effect, that the RK_PWM block can be used (as specified in the DTSI). Signed-off-by: Christoph Muellner --- drivers/soc/rockchip/grf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c index 5705f5c5bdcf..dba3380c1c20 100644 --- a/drivers/soc/rockchip/grf.c +++ b/drivers/soc/rockchip/grf.c @@ -119,6 +119,7 @@ static const struct rockchip_grf_info rk3308_grf __initconst = { static const struct rockchip_grf_value rk3368_defaults[] __initconst = { { "jtag switching", RK3368_GRF_SOC_CON15, HIWORD_UPDATE(0, 1, 13) }, + { "pwm switching", RK3368_GRF_SOC_CON15, HIWORD_UPDATE(1, 1, 12) }, }; static const struct rockchip_grf_info rk3368_grf __initconst = { -- cgit v1.2.3