* [PATCH 1/4] phy: dphy: Add lane_positions to DPHY config struct
2026-03-25 21:47 [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Bryan O'Donoghue
@ 2026-03-25 21:47 ` Bryan O'Donoghue
2026-03-25 21:47 ` [PATCH 2/4] phy: dphy: Add lane_polarities " Bryan O'Donoghue
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-03-25 21:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Marco Felsch, Maxime Ripard
Cc: linux-phy, linux-kernel, Bryan O'Donoghue
Add lane_positions to the DPHY configuration struct. This data-field
represents the physical positions of the data-lanes indexed by lane number.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
include/linux/phy/phy-mipi-dphy.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index 1ac128d78dfeb..c7eb11c41d7ec 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -6,6 +6,8 @@
#ifndef __PHY_MIPI_DPHY_H_
#define __PHY_MIPI_DPHY_H_
+#define PHY_MIPI_DPHY_MAX_DATA_LANES 4
+
/**
* struct phy_configure_opts_mipi_dphy - MIPI D-PHY configuration set
*
@@ -269,10 +271,19 @@ struct phy_configure_opts_mipi_dphy {
/**
* @lanes:
*
- * Number of active, consecutive, data lanes, starting from
- * lane 0, used for the transmissions.
+ * Number of active data lanes used for the transmission.
+ * When @lane_positions is not populated, lanes are consecutive
+ * starting from lane 0.
*/
unsigned char lanes;
+
+ /**
+ * @lane_positions:
+ *
+ * Array representing the physical positions of the data-lanes.
+ * Indexed by logical lane number.
+ */
+ unsigned char lane_positions[PHY_MIPI_DPHY_MAX_DATA_LANES];
};
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
--
2.52.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] phy: dphy: Add lane_polarities to DPHY config struct
2026-03-25 21:47 [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Bryan O'Donoghue
2026-03-25 21:47 ` [PATCH 1/4] phy: dphy: Add lane_positions to DPHY config struct Bryan O'Donoghue
@ 2026-03-25 21:47 ` Bryan O'Donoghue
2026-03-25 21:47 ` [PATCH 3/4] phy: dphy: Add clock_lane_position " Bryan O'Donoghue
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-03-25 21:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Marco Felsch, Maxime Ripard
Cc: linux-phy, linux-kernel, Bryan O'Donoghue
Pass an array of data-lane polarities from controller to PHY. A true value
means the lane polarity is inverted.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
include/linux/phy/phy-mipi-dphy.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index c7eb11c41d7ec..3e0333b5a1a71 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -284,6 +284,14 @@ struct phy_configure_opts_mipi_dphy {
* Indexed by logical lane number.
*/
unsigned char lane_positions[PHY_MIPI_DPHY_MAX_DATA_LANES];
+
+ /**
+ * @lane_polarities:
+ *
+ * Array representing data-lane polarities. True means inverted.
+ * Indexed by logical lane number.
+ */
+ bool lane_polarities[PHY_MIPI_DPHY_MAX_DATA_LANES];
};
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
--
2.52.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] phy: dphy: Add clock_lane_position to DPHY config struct
2026-03-25 21:47 [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Bryan O'Donoghue
2026-03-25 21:47 ` [PATCH 1/4] phy: dphy: Add lane_positions to DPHY config struct Bryan O'Donoghue
2026-03-25 21:47 ` [PATCH 2/4] phy: dphy: Add lane_polarities " Bryan O'Donoghue
@ 2026-03-25 21:47 ` Bryan O'Donoghue
2026-03-25 21:48 ` [PATCH 4/4] phy: dphy: Add clock_lane_polarity " Bryan O'Donoghue
2026-05-19 10:27 ` [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-03-25 21:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Marco Felsch, Maxime Ripard
Cc: linux-phy, linux-kernel, Bryan O'Donoghue
We need to identify which lane is the clock-lane as many different PHYs
allow for a range of lanes, potentially any of the lanes to be the clock
input lane on a PHY.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
include/linux/phy/phy-mipi-dphy.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index 3e0333b5a1a71..76d41580e225a 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -292,6 +292,13 @@ struct phy_configure_opts_mipi_dphy {
* Indexed by logical lane number.
*/
bool lane_polarities[PHY_MIPI_DPHY_MAX_DATA_LANES];
+
+ /**
+ * @clock_lane_position:
+ *
+ * Physical lane number used as the clock lane.
+ */
+ unsigned char clock_lane_position;
};
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
--
2.52.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/4] phy: dphy: Add clock_lane_polarity to DPHY config struct
2026-03-25 21:47 [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Bryan O'Donoghue
` (2 preceding siblings ...)
2026-03-25 21:47 ` [PATCH 3/4] phy: dphy: Add clock_lane_position " Bryan O'Donoghue
@ 2026-03-25 21:48 ` Bryan O'Donoghue
2026-05-19 10:27 ` [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-03-25 21:48 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Marco Felsch, Maxime Ripard
Cc: linux-phy, linux-kernel, Bryan O'Donoghue
Specify the polarity of the clock lane in DPHY mode. When true this bool
means the polarity is inverted.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
include/linux/phy/phy-mipi-dphy.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index 76d41580e225a..f7b4ad29e6f83 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -299,6 +299,13 @@ struct phy_configure_opts_mipi_dphy {
* Physical lane number used as the clock lane.
*/
unsigned char clock_lane_position;
+
+ /**
+ * @clock_lane_polarity:
+ *
+ * Clock lane polarity. True means inverted.
+ */
+ bool clock_lane_polarity;
};
int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
--
2.52.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity
2026-03-25 21:47 [PATCH 0/4] Extend phy_configure_opts_mipi_dphy to support position and polarity Bryan O'Donoghue
` (3 preceding siblings ...)
2026-03-25 21:48 ` [PATCH 4/4] phy: dphy: Add clock_lane_polarity " Bryan O'Donoghue
@ 2026-05-19 10:27 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2026-05-19 10:27 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Neil Armstrong, Marco Felsch, Maxime Ripard, linux-phy,
linux-kernel
On 25-03-26, 21:47, Bryan O'Donoghue wrote:
> struct phy_configure_opts_mipi_dphy currently passes @lanes as a linear
> count of data-lanes starting from lane zero to a consuming DPHY driver.
>
> This proves insufficient when we want to specify lane location and lane
> polarity.
>
> To address this gap extend the structure to pass four new fields.
Sure, but where is the user...?
Please repost with users added in
Thanks
pw-bot: cr
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 6+ messages in thread