diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2021-03-05 13:27:53 +0300 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2021-04-10 12:56:22 +0300 |
commit | cd529f7ad628f0632313082e237352392e0a47a3 (patch) | |
tree | d5028f84dbe1b07bd18afca66537258cca2b2611 /drivers/video/rockchip/rk_edp.c | |
parent | 3fd64112cea5d5182e08698fb53ffd1589896086 (diff) | |
download | u-boot-cd529f7ad628f0632313082e237352392e0a47a3.tar.xz |
rockchip: video: edp: Add missing reset support
In order to ensure that the eDP registers are in correct state,
add missing support for the eDP reset lines found in the device-tree.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Diffstat (limited to 'drivers/video/rockchip/rk_edp.c')
-rw-r--r-- | drivers/video/rockchip/rk_edp.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c index 6baee7b890..0ddf5e02d6 100644 --- a/drivers/video/rockchip/rk_edp.c +++ b/drivers/video/rockchip/rk_edp.c @@ -8,11 +8,13 @@ #include <clk.h> #include <display.h> #include <dm.h> +#include <dm/device_compat.h> #include <edid.h> #include <log.h> #include <malloc.h> #include <panel.h> #include <regmap.h> +#include <reset.h> #include <syscon.h> #include <asm/gpio.h> #include <asm/io.h> @@ -1053,6 +1055,7 @@ static int rk_edp_probe(struct udevice *dev) struct rk_edp_priv *priv = dev_get_priv(dev); struct rk3288_edp *regs = priv->regs; struct rockchip_dp_data *edp_data = (struct rockchip_dp_data *)dev_get_driver_data(dev); + struct reset_ctl dp_rst; struct clk clk; int ret; @@ -1065,6 +1068,25 @@ static int rk_edp_probe(struct udevice *dev) return ret; } + ret = reset_get_by_name(dev, "dp", &dp_rst); + if (ret) { + dev_err(dev, "failed to get dp reset (ret=%d)\n", ret); + return ret; + } + + ret = reset_assert(&dp_rst); + if (ret) { + dev_err(dev, "failed to assert dp reset (ret=%d)\n", ret); + return ret; + } + udelay(20); + + ret = reset_deassert(&dp_rst); + if (ret) { + dev_err(dev, "failed to deassert dp reset (ret=%d)\n", ret); + return ret; + } + int vop_id = uc_plat->source_id; debug("%s, uc_plat=%p, vop_id=%u\n", __func__, uc_plat, vop_id); |