* [PATCH] video: check hardware version of DSI
@ 2020-06-24 8:43 Yannick Fertre
2020-06-24 13:24 ` Patrick DELAUNAY
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yannick Fertre @ 2020-06-24 8:43 UTC (permalink / raw)
To: u-boot
Check the hardware version of DSI. Versions 1.30 & 1.31 are only
supported.
Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
---
drivers/video/stm32/stm32_dsi.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index 04796435f1..31ab8ebec7 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -271,7 +271,6 @@ static int dsi_get_lane_mbps(void *priv_data, struct display_timing *timings,
u32 val;
/* Update lane capabilities according to hw version */
- dsi->hw_version = dsi_read(dsi, DSI_VERSION) & VERSION;
dsi->lane_min_kbps = LANE_MIN_KBPS;
dsi->lane_max_kbps = LANE_MAX_KBPS;
if (dsi->hw_version == HWVER_131) {
@@ -475,6 +474,15 @@ static int stm32_dsi_probe(struct udevice *dev)
/* Reset */
reset_deassert(&rst);
+ /* check hardware version */
+ priv->hw_version = dsi_read(priv, DSI_VERSION) & VERSION;
+ if (priv->hw_version != HWVER_130 &&
+ priv->hw_version != HWVER_131) {
+ dev_err(dev, "DSI version 0x%x not supported\n", priv->hw_version);
+ ret = -ENODEV;
+ goto err_clk;
+ }
+
return 0;
err_clk:
clk_disable(&clk);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] video: check hardware version of DSI
2020-06-24 8:43 [PATCH] video: check hardware version of DSI Yannick Fertre
@ 2020-06-24 13:24 ` Patrick DELAUNAY
2020-06-26 9:08 ` Philippe CORNU
2020-06-29 7:01 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Patrick DELAUNAY @ 2020-06-24 13:24 UTC (permalink / raw)
To: u-boot
Hi Yannick
> From: Yannick FERTRE <yannick.fertre@st.com>
> Sent: mercredi 24 juin 2020 10:44
>
> Check the hardware version of DSI. Versions 1.30 & 1.31 are only supported.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
> ---
> drivers/video/stm32/stm32_dsi.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Reagrds
Patrick
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] video: check hardware version of DSI
2020-06-24 8:43 [PATCH] video: check hardware version of DSI Yannick Fertre
2020-06-24 13:24 ` Patrick DELAUNAY
@ 2020-06-26 9:08 ` Philippe CORNU
2020-06-29 7:01 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Philippe CORNU @ 2020-06-26 9:08 UTC (permalink / raw)
To: u-boot
Hi Yannick,
Many thanks for your patch,
Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Philippe :-)
On 6/24/20 10:43 AM, Yannick Fertre wrote:
> Check the hardware version of DSI. Versions 1.30 & 1.31 are only
> supported.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
> ---
> drivers/video/stm32/stm32_dsi.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
> index 04796435f1..31ab8ebec7 100644
> --- a/drivers/video/stm32/stm32_dsi.c
> +++ b/drivers/video/stm32/stm32_dsi.c
> @@ -271,7 +271,6 @@ static int dsi_get_lane_mbps(void *priv_data, struct display_timing *timings,
> u32 val;
>
> /* Update lane capabilities according to hw version */
> - dsi->hw_version = dsi_read(dsi, DSI_VERSION) & VERSION;
> dsi->lane_min_kbps = LANE_MIN_KBPS;
> dsi->lane_max_kbps = LANE_MAX_KBPS;
> if (dsi->hw_version == HWVER_131) {
> @@ -475,6 +474,15 @@ static int stm32_dsi_probe(struct udevice *dev)
> /* Reset */
> reset_deassert(&rst);
>
> + /* check hardware version */
> + priv->hw_version = dsi_read(priv, DSI_VERSION) & VERSION;
> + if (priv->hw_version != HWVER_130 &&
> + priv->hw_version != HWVER_131) {
> + dev_err(dev, "DSI version 0x%x not supported\n", priv->hw_version);
> + ret = -ENODEV;
> + goto err_clk;
> + }
> +
> return 0;
> err_clk:
> clk_disable(&clk);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] video: check hardware version of DSI
2020-06-24 8:43 [PATCH] video: check hardware version of DSI Yannick Fertre
2020-06-24 13:24 ` Patrick DELAUNAY
2020-06-26 9:08 ` Philippe CORNU
@ 2020-06-29 7:01 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2020-06-29 7:01 UTC (permalink / raw)
To: u-boot
On Wed, 24 Jun 2020 10:43:59 +0200
Yannick Fertre yannick.fertre at st.com wrote:
> Check the hardware version of DSI. Versions 1.30 & 1.31 are only
> supported.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
> ---
> drivers/video/stm32/stm32_dsi.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-29 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 8:43 [PATCH] video: check hardware version of DSI Yannick Fertre
2020-06-24 13:24 ` Patrick DELAUNAY
2020-06-26 9:08 ` Philippe CORNU
2020-06-29 7:01 ` Anatolij Gustschin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.