[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB113468BC5564207D6DE745B1486AC2@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Tue, 1 Apr 2025 05:23:23 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
CC: Geert Uytterhoeven <geert+renesas@...der.be>, Andrzej Hajda
<andrzej.hajda@...el.com>, Neil Armstrong <neil.armstrong@...aro.org>, Robert
Foss <rfoss@...nel.org>, laurent.pinchart
<laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>, Jernej
Skrabec <jernej.skrabec@...il.com>, David Airlie <airlied@...il.com>, Simona
Vetter <simona@...ll.ch>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Kieran Bingham
<kieran.bingham+renesas@...asonboard.com>, Stephen Boyd <sboyd@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>, "linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>, "linux-clk@...r.kernel.org"
<linux-clk@...r.kernel.org>, Fabrizio Castro
<fabrizio.castro.jz@...esas.com>, Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH 11/17] drm: renesas: rz-du: mipi_dsi: Add OF data support
Hi Prabhakar,
> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@...il.com>
> Sent: 31 March 2025 16:27
> Subject: Re: [PATCH 11/17] drm: renesas: rz-du: mipi_dsi: Add OF data support
>
> Hi Biju,
>
> On Mon, Mar 31, 2025 at 4:04 PM Biju Das <biju.das.jz@...renesas.com> wrote:
> >
> > Hi Prabhakar,
> >
> > > -----Original Message-----
> > > From: Lad, Prabhakar <prabhakar.csengg@...il.com>
> > > Sent: 31 March 2025 15:44
> > > Subject: Re: [PATCH 11/17] drm: renesas: rz-du: mipi_dsi: Add OF
> > > data support
> > >
> > > Hi Biju,
> > >
> > > On Mon, Mar 31, 2025 at 3:14 PM Biju Das <biju.das.jz@...renesas.com> wrote:
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Lad, Prabhakar <prabhakar.csengg@...il.com>
> > > > > Sent: 31 March 2025 14:59
> > > > > To: Biju Das <biju.das.jz@...renesas.com>
> > > > > Cc: Geert Uytterhoeven <geert+renesas@...der.be>; Andrzej Hajda
> > > > > <andrzej.hajda@...el.com>; Neil Armstrong
> > > > > <neil.armstrong@...aro.org>; Robert Foss <rfoss@...nel.org>;
> > > > > laurent.pinchart <laurent.pinchart@...asonboard.com>; Jonas
> > > > > Karlman <jonas@...boo.se>; Jernej Skrabec
> > > > > <jernej.skrabec@...il.com>; David Airlie <airlied@...il.com>;
> > > > > Simona Vetter <simona@...ll.ch>; Maarten Lankhorst
> > > > > <maarten.lankhorst@...ux.intel.com>; Maxime Ripard
> > > > > <mripard@...nel.org>; Thomas Zimmermann <tzimmermann@...e.de>;
> > > > > Rob Herring <robh@...nel.org>; Krzysztof Kozlowski
> > > > > <krzk+dt@...nel.org>; Conor Dooley <conor+dt@...nel.org>; Mauro
> > > > > Carvalho Chehab <mchehab@...nel.org>; Kieran Bingham
> > > > > <kieran.bingham+renesas@...asonboard.com>; Stephen Boyd
> > > > > <sboyd@...nel.org>; Philipp Zabel <p.zabel@...gutronix.de>;
> > > > > devicetree@...r.kernel.org; linux-kernel@...r.kernel.org;
> > > > > linux-renesas- soc@...r.kernel.org; linux-media@...r.kernel.org;
> > > > > linux-clk@...r.kernel.org; Fabrizio Castro
> > > > > <fabrizio.castro.jz@...esas.com>; Prabhakar Mahadev Lad
> > > > > <prabhakar.mahadev-lad.rj@...renesas.com>
> > > > > Subject: Re: [PATCH 11/17] drm: renesas: rz-du: mipi_dsi: Add OF
> > > > > data support
> > > > >
> > > > > Hi Biju,
> > > > >
> > > > > Thank you for the review.
> > > > >
> > > > > On Mon, Mar 31, 2025 at 1:38 PM Biju Das <biju.das.jz@...renesas.com> wrote:
> > > > > >
> > > > > > Hi Prabhakar,
> > > > > >
> > > > > > Thanks for the patch.
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Prabhakar <prabhakar.csengg@...il.com>
> > > > > > > Sent: 30 March 2025 22:07
> > > > > > > Subject: [PATCH 11/17] drm: renesas: rz-du: mipi_dsi: Add OF
> > > > > > > data support
> > > > > > >
> > > > > > > From: Lad Prabhakar
> > > > > > > <prabhakar.mahadev-lad.rj@...renesas.com>
> > > > > > >
> > > > > > > In preparation for adding support for the Renesas RZ/V2H(P)
> > > > > > > SoC, this patch introduces a mechanism to pass SoC-specific
> > > > > > > information via OF data in the DSI driver. This enables the
> > > > > > > driver to adapt dynamically to various SoC-
> > > > > specific requirements without hardcoding configurations.
> > > > > > >
> > > > > > > The MIPI DSI interface on the RZ/V2H(P) SoC is nearly
> > > > > > > identical to the one on the RZ/G2L SoC. While the LINK
> > > > > > > registers are shared between the two SoCs, the D-PHY
> > > > > > > registers differ. Also the VCLK range differs on both these
> > > > > > > SoCs. To accommodate these differences `struct
> > > > > > > rzg2l_mipi_dsi_hw_info`
> > > > > is introduced and as now passed as OF data.
> > > > > > >
> > > > > > > These changes lay the groundwork for the upcoming RZ/V2H(P)
> > > > > > > SoC support by allowing SoC-specific data to be passed through OF.
> > > > > > >
> > > > > <snip>
> > > > > > > +
> > > > > > > ret = drm_of_get_data_lanes_count_ep(dsi->dev->of_node, 1, 0, 1, 4);
> > > > > > > if (ret < 0)
> > > > > > > return dev_err_probe(dsi->dev, ret, @@ -729,10
> > > > > > > +750,12 @@ static int rzg2l_mipi_dsi_probe(struct
> > > > > > > +platform_device *pdev)
> > > > > > > if (IS_ERR(dsi->vclk))
> > > > > > > return PTR_ERR(dsi->vclk);
> > > > > > >
> > > > > > > - dsi->rstc = devm_reset_control_get_exclusive(dsi->dev, "rst");
> > > > > > > - if (IS_ERR(dsi->rstc))
> > > > > > > - return dev_err_probe(dsi->dev, PTR_ERR(dsi->rstc),
> > > > > > > - "failed to get rst\n");
> > > > > > > + if (dsi->info->has_dphy_rstc) {
> > > > > > > + dsi->rstc =
> > > > > > > + devm_reset_control_get_exclusive(dsi->dev,
> > > > > > > + "rst");
> > > > > >
> > > > > > Maybe use devm_reset_control_get_optional_exclusive by dropping has_dphy_rstc.
> > > > > >
> > > > > As the dtbs_check doesn't enforce this, `has_dphy_rstc` flag
> > > > > was added. Recently the same was done for the CRU [0] based on the recent comment received.
> > > > >
> > > >
> > > > RZ/V2H has "arst" and "prst". So, If you add "rst" for RZ/V2H then
> > > > you should get dtbs warning,
> > > right?
> > > >
> > > No we dont [0], note DT binding is written based on the recent feedback received.
> >
> > That is strange. It is triggering warning for me, if I just update the example.
> >
> Ahh right I missed that. The current implementation is based on this comment received [0] (same being
> applied for reset). Please let me know if you still want me to use
> devm_reset_control_get_optional_exclusive() (and same for the clk).
Both OK to me. As DT binding validates optional resets, I would avoid redundant check in
driver as it is anyway like no-op with optional calls.
Cheers,
Biju
Powered by blists - more mailing lists