Hi Geert, On 2025-01-06 10:45:51 +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Sat, Jan 4, 2025 at 1:17 PM Niklas Söderlund > <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote: > > On 2024-12-27 14:22:31 +0100, Geert Uytterhoeven wrote: > > > On Thu, Nov 21, 2024 at 2:41 PM Niklas Söderlund > > > <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote: > > > > The second CSI-2 C-PHY data-lane have a different line order (BCA) then > > > > the two other data-lanes (ABC) for both connected CSI-2 receivers, > > > > describe this in the device tree. > > > > > > > > This have worked in the past as the R-Car CSI-2 driver did not have > > > > > > has > > > > > > > documentation for the line order configuration and a magic value was > > > > written to the register for this specific setup. Now the registers > > > > involved are documented and the hardware description as well as the > > > > driver needs to be corrected. > > > > > > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> > > > > > > Thanks for your patch! > > > > > > Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > > > > > > --- a/arch/arm64/boot/dts/renesas/white-hawk-csi-dsi.dtsi > > > > +++ b/arch/arm64/boot/dts/renesas/white-hawk-csi-dsi.dtsi > > > > @@ -21,6 +21,9 @@ csi40_in: endpoint { > > > > bus-type = <MEDIA_BUS_TYPE_CSI2_CPHY>; > > > > clock-lanes = <0>; > > > > data-lanes = <1 2 3>; > > > > + line-orders = <MEDIA_BUS_CSI2_CPHY_LINE_ORDER_ABC > > > > + MEDIA_BUS_CSI2_CPHY_LINE_ORDER_BCA > > > > + MEDIA_BUS_CSI2_CPHY_LINE_ORDER_ABC>; > > > > remote-endpoint = <&max96712_out0>; > > > > }; > > > > }; > > > > @@ -41,6 +44,9 @@ csi41_in: endpoint { > > > > bus-type = <MEDIA_BUS_TYPE_CSI2_CPHY>; > > > > clock-lanes = <0>; > > > > data-lanes = <1 2 3>; > > > > + line-orders = <MEDIA_BUS_CSI2_CPHY_LINE_ORDER_ABC > > > > + MEDIA_BUS_CSI2_CPHY_LINE_ORDER_BCA > > > > + MEDIA_BUS_CSI2_CPHY_LINE_ORDER_ABC>; > > > > remote-endpoint = <&max96712_out1>; > > > > }; > > > > }; > > > > > > Using the MEDIA_BUS_CSI2_CPHY_LINE_ORDER_* definitions has a hard > > > dependency on commit 91a7088096a49eb4 ("media: dt-bindings: Add property > > > to describe CSI-2 C-PHY line orders") in media/master, hence I cannot > > > take this patch in renesas-devel until that dependency is resolved. > > > > > > However, according to the cover letter, commit 573b4adddbd22baf ("media: > > > v4l: fwnode: Parse MiPI DisCo for C-PHY line-orders") in media/master > > > causes a regression in the absence of the line-orders properties > > > (which I had missed before, unfortunately). > > > So I think it is best if this patch goes in through the media tree, > > > which already has the prerequisites and the regression: > > > Acked-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > > > > > Alternatively, I can: > > > 1. Cherry-pick commit 91a7088096a49eb4 first, > > > 2. Replace the MEDIA_BUS_CSI2_CPHY_LINE_ORDER_* definitions by > > > their numerical values. > > > > > > Please let me know if you prefer option 1 or 2. > > > Thanks! > > > > My preference would be for this patch to go thru the media tree with > > your tags to create the least churn, if Sakari is OK with that ofc. > > > > If not I leave it up to Sakari which option is most preferable to him, > > I'm OK with both alternatives. > > Note that it's getting a bit late for the alternatives, as I plan to send > my PRs for soc today, or tomorrow the latest. Thanks for letting us know. As we all are slowly wakening from the holiday season maybe the best alternative is to go with option 2, numerical values to avoid the issue? Then in next cycle follow up with using the defines? -- Kind Regards, Niklas Söderlund