Swap clock polarity of MIPI D-PHY receiver

Hi,

I’m trying to understand if the polarity of the MIPI clock can be changed by software configuration on the Orin NX. From the Technical Reference Manual Version 1.1:

There seems to be a contradiction, though: on the one hand it says “no polarity swapping on clock lanes”, on the other hand the table suggests that polarity swapping was “Allowed on a clock lane” for Clock Lane ‘a’. Which of the statements is true?

I realize that there is a POLARITY_SWIZZLE_CLK_* bit

Could this be used to invert the clock polarity? Is there a corresponding devicetree setting?

Thank you

hello david.roerich,

FYI,
it’s now able to support data-lane polarity swap via device tree settings, i.e. lane_polarity.

please see-also Camera Architecture Stack.
you may use v4l2src to have clock polarity swap by modify the VI driver.
however, by using libargus, it’s software side it doesn’t fully support clock polarity swapped.

Hi Jerry,

thank you for your reply and thank you for bringing up lane_polarity. I’m aware of this setting for data lanes.

Concerning the clock polarity: do I understand it correctly that

  • Clock polarity can in principle be changed in the V4L2 device driver
  • libargus and the “Tegra Drivers” don’t support a clock polarity change
    • Consequently, the clock polarity cannot be changed when the ISP is used

Thank you

It would also be good to know if the “Tegra Drivers” / libargus could in principle be patched by us to change the clock polarity?

hello david.roerich,

sorry for late reply, I must miss the thread updates.

all of above were correct.
currently it’s not supported through libargus to change clock polarity.