rockchip: correctly set vop0 or vop1

Arnaud Patard (Rtp) arnaud.patard at rtp-net.org
Mon Jun 8 10:18:19 CEST 2020


Patrick Wildt <patrick at blueri.se> writes:

Hi,

> The EDP_LCDC_SEL bit has to be set correctly to select vop0 or
> vop1, but so far we have set it in both conditions, which is not
> correct.
>
> Can someone verify this is the correct way round?  vop1 -> set,
> vop0 -> clear?
>
> Signed-off-by: Patrick Wildt <patrick at blueri.se>
>
> diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
> index 92188be9275..000bd481408 100644
> --- a/drivers/video/rockchip/rk_edp.c
> +++ b/drivers/video/rockchip/rk_edp.c
> @@ -1062,7 +1062,8 @@ static int rk_edp_probe(struct udevice *dev)
>  	rk_setreg(&priv->grf->soc_con12, 1 << 4);
>  
>  	/* select epd signal from vop0 or vop1 */
> -	rk_setreg(&priv->grf->soc_con6, (vop_id == 1) ? (1 << 5) : (1 << 5));
> +	rk_clrsetreg(&priv->grf->soc_con6, (1 << 5),
> +	    (vop_id == 1) ? (1 << 5) : (0 << 5));

While working on PBP EDP support, found this too but I'm not sure it's
fine or not. For rk3399, my (not yet published) patch is doing:

+       if (vop_id == 0)
+               rk_clrreg(&priv->grf->soc_con20, (1 << 5));
+       else
+               rk_setreg(&priv->grf->soc_con20, (1 << 5));

I believe that the rk3288 may need similar treatment but I've yet to
look at the rk3288 manual.

Arnaud


More information about the U-Boot mailing list