On 17/01/2026 16:36, David Heidelberg via B4 Relay wrote:
From: Petr Hodina <[email protected]>
The lanes must not be initialized before the driver has access to
the lane configuration, as it depends on whether D-PHY or C-PHY mode
is in use. Move the lane initialization to a later stage where the
configuration structures are available.
Signed-off-by: Petr Hodina <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
---
.../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 91 ++++++++++++++--------
1 file changed, 57 insertions(+), 34 deletions(-)
Now we going to setup D/C-PHY in lanes_enable, which I perceive as
sub-optimal, because when C-PHY is set on the device-tree level, while
the device may handle both D-PHY and C-PHY, the intent is use C-PHY only
when available, because of the advantages, where as disadvantages are
mainly in the implementation complexity (which is already done).
Thus it would be most optimal to take care of the configuration in the
csiphy init, which starts at point, where the device-tree properties
aren't parsed yet.
I tried to do shuffling in camss_probe to make
csiphy->cfg.csi2->lane_cfg available in the subdevice (csiphy) init phase.
Everytime I moved camss_parse_ports earlier or camss_init_subdevices
later I got into some kind of trouble, thus I assume current solution is
(at least until some rewrite) best.
David