[RFC PATCH v2 12/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers

Cosmin Tanislav demonsingur at gmail.com
Tue May 6 12:46:11 PDT 2025



On 5/6/25 10:15 PM, Jakub Kostiw wrote:
>  > I'm aware of this issue and had it fixed locally, just haven't submitted
>  > a new version yet.
> 
> Great !
> 
>  > Are you setting a specific polarity on the lanes? I've validated
>  > MAX96714 (after the upstream submission) myself and it works.
> 
> Our design has all lanes inverted, so we used:
> lane-polarities = <1 1 1>;
> 

Got it.

Can you revert the change you made to polarity_on_physical_lanes, and
try the following?

diff --git a/drivers/media/i2c/maxim-serdes/max9296a.c 
b/drivers/media/i2c/maxim-serdes/max9296a.c
index f48f5b68a750..dea0518fd790 100644
--- a/drivers/media/i2c/maxim-serdes/max9296a.c
+++ b/drivers/media/i2c/maxim-serdes/max9296a.c
@@ -474,7 +474,7 @@ static int max9296a_init_phy(struct max_des *des, 
struct max_des_phy *phy)
                  */

                 if (priv->info->polarity_on_physical_lanes)
-                       map = phy->mipi.data_lanes[i];
+                       map = phy->mipi.data_lanes[i] - 1;
                 else
                         map = i;

data_lanes is 1-based (since 0 is the clock lane), but the bits
in register 0x335 start from 0. That means we should adjust the
values in data_lanes to be 0-based.

> Only after mentioned change we managed to get the video stream.
> 
>  > This should already be implemented by using different numbers in
>  > data-lanes property in devicetree.
> 
> Awesome, this will come in handy for sure.
> 




More information about the linux-arm-kernel mailing list