* [PATCH v8 1/9] dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
@ 2026-11-27 7:47 ` Jason Yang
2026-11-27 7:47 ` [PATCH v8 2/9] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add phy-type Jason Yang
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jason Yang, Krzysztof Kozlowski
A MIPI D-PHY or C-PHY can be a transmitter or a receiver. Some PHY
blocks have one of each and can use them at the same time, so one PHY
node offers two PHYs. The existing cell, PHY_TYPE_DPHY or
PHY_TYPE_CPHY, selects the mode of the whole block, not one of the two
PHYs.
Add PHY_DIRECTION_TX and PHY_DIRECTION_RX for a cell that selects the
transmitter or the receiver. The first user is the Rockchip RK3588 MIPI
DC-PHY, where the transmitter serves a DSI host and the receiver a CSI-2
host.
Suggested-by: Michael Riesch <michael.riesch@collabora.com>
Link: https://lore.kernel.org/r/7425ac83-f6d8-4443-a26e-a47f9306aa24@collabora.com
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
---
include/dt-bindings/phy/phy.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/dt-bindings/phy/phy.h b/include/dt-bindings/phy/phy.h
index 979b5dfd8353..9ead74d9a172 100644
--- a/include/dt-bindings/phy/phy.h
+++ b/include/dt-bindings/phy/phy.h
@@ -29,4 +29,7 @@
#define PHY_POL_INVERT 1
#define PHY_POL_AUTO 2
+#define PHY_DIRECTION_TX 0
+#define PHY_DIRECTION_RX 1
+
#endif /* _DT_BINDINGS_PHY */
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 2/9] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add phy-type
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
2026-11-27 7:47 ` [PATCH v8 1/9] dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions Jason Yang
@ 2026-11-27 7:47 ` Jason Yang
2026-11-27 7:47 ` [PATCH v8 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure Jason Yang
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jason Yang
The Samsung MIPI D-/C-PHY block on RK3588 and RK3576 has a transmitter
for DSI and a receiver for CSI-2, and the DSI host and the CSI-2 host
can use the transmitter and the receiver at the same time. The single
cell of this binding selects the mode and refers to the transmitter, so
the receiver cannot be described.
Change the cell to select the transmitter or the receiver. The
transmitter and the receiver cannot operate in different modes [1], so
the optional phy-type property of the PHY node sets the mode for the
whole block, D-PHY by default:
/* the MIPI DSI host, driving the transmitter */
phys = <&mipidcphy0 PHY_DIRECTION_TX>;
/* the MIPI CSI-2 host, driving the receiver */
phys = <&mipidcphy0 PHY_DIRECTION_RX>;
For C-PHY the consumers stay the same and the PHY node gets:
phy-type = <PHY_TYPE_CPHY>;
Existing DTs on a newer kernel: PHY_TYPE_DPHY and PHY_TYPE_CPHY remain
valid as deprecated values. They select the transmitter and imply
phy-type = <PHY_TYPE_DPHY> or <PHY_TYPE_CPHY> respectively, so nothing
changes for them.
New DTs on an older kernel: an ABI break. The older kernel ignores
phy-type and takes any cell value as the mode of the block. A DSI node
with PHY_DIRECTION_TX therefore gets no display, and a CSI-2 node with
PHY_DIRECTION_RX gets no camera.
[1] RK3588 TRM: section 22.1 (overview): "The TX and RX only support
operate in the same PHY mode."
Suggested-by: Michael Riesch <michael.riesch@collabora.com>
Link: https://lore.kernel.org/r/94d47cab-10c6-4ec3-84a0-3bddc9d67f5f@collabora.com
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
---
.../bindings/phy/rockchip,rk3588-mipi-dcphy.yaml | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml
index c8ff5ba22a86..1ea21ab203ba 100644
--- a/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml
+++ b/Documentation/devicetree/bindings/phy/rockchip,rk3588-mipi-dcphy.yaml
@@ -22,11 +22,23 @@ properties:
"#phy-cells":
const: 1
description: |
- Argument is mode to operate in. Supported modes are:
- - PHY_TYPE_DPHY
- - PHY_TYPE_CPHY
+ Argument defines whether receiver or transmitter PHY is used.
+ - PHY_DIRECTION_TX
+ - PHY_DIRECTION_RX
+
+ PHY_TYPE_DPHY and PHY_TYPE_CPHY are deprecated. They select the
+ transmitter and imply phy-type = <PHY_TYPE_DPHY> or <PHY_TYPE_CPHY>
+ respectively. Use PHY_DIRECTION_TX and phy-type instead.
+
See include/dt-bindings/phy/phy.h for constants.
+ phy-type:
+ description: D-PHY (default) or C-PHY mode
+ enum:
+ - 10 # PHY_TYPE_DPHY
+ - 11 # PHY_TYPE_CPHY
+ default: 10
+
clocks:
maxItems: 2
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
2026-11-27 7:47 ` [PATCH v8 1/9] dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions Jason Yang
2026-11-27 7:47 ` [PATCH v8 2/9] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add phy-type Jason Yang
@ 2026-11-27 7:47 ` Jason Yang
2026-11-27 7:47 ` [PATCH v8 4/9] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers Jason Yang
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Sashiko, Jason Yang
samsung_mipi_dphy_power_on() returns on a PLL lock timeout with PLL_EN
set and m_phy_rst still asserted, and the PHY core does not call
power_off after a failed power_on.
Today the APB reset at the start of the next power_on cleans this up.
A later change moves that reset to runtime resume, so the leftover
PLL_EN would stay set, and regmap_update_bits() would not even write
it again.
Unwind the power-on before returning the error.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/linux-phy/sashiko-outbox-174059@kernel.org/
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger CSI1 2-lane IMX219, CSI0 2-lane OV5675+DSI
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
index 7382043e1f31..ce1bc62497c5 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -1343,8 +1343,11 @@ static int samsung_mipi_dphy_power_on(struct samsung_mipi_dcphy *samsung)
samsung_mipi_dphy_clk_lane_timing_init(samsung);
samsung_mipi_dphy_data_lane_timing_init(samsung);
ret = samsung_mipi_dcphy_pll_enable(samsung);
- if (ret < 0)
+ if (ret < 0) {
+ samsung_mipi_dcphy_pll_disable(samsung);
+ reset_control_deassert(samsung->m_phy_rst);
return ret;
+ }
samsung_mipi_dphy_lane_enable(samsung);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 4/9] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
` (2 preceding siblings ...)
2026-11-27 7:47 ` [PATCH v8 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure Jason Yang
@ 2026-11-27 7:47 ` Jason Yang
2026-11-27 7:47 ` [PATCH v8 5/9] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume Jason Yang
2026-11-27 7:47 ` [PATCH v8 7/9] phy: rockchip-samsung-dcphy: Support the new phy-type and direction binding Jason Yang
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jason Yang
The lane timing init functions write DPHY_MC_ANA_CON1, the four data
lane ANA_CON1 registers and DPHY_MC_DESKEW_CON0 only above a data
rate threshold, and the registers have to be zero below it [1].
Today the APB reset at the start of every power_on provides the zero.
A later change moves that reset to runtime resume, so a power_on at a
lower rate after a higher one would keep the old values.
Write the registers on every power_on, with zero below the threshold.
[1] RK3588 TRM: sections 22.4.2 (reset values) and 22.4.3
(DPHY_MC_ANA_CON1, DPHY_MC_DESKEW_CON0)
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger CSI1 2-lane IMX219, CSI0 2-lane OV5675+DSI
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 24 +++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
index ce1bc62497c5..7a009d87a665 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -1228,7 +1228,10 @@ samsung_mipi_dphy_clk_lane_timing_init(struct samsung_mipi_dcphy *samsung)
regmap_write(samsung->regmap, DPHY_MC_ANA_CON0, val);
if (lane_hs_rate >= 4500)
- regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, 0x0001);
+ val = 0x0001;
+ else
+ val = 0;
+ regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, val);
val = 0;
/*
@@ -1259,7 +1262,10 @@ samsung_mipi_dphy_clk_lane_timing_init(struct samsung_mipi_dcphy *samsung)
* under 1.5Gbps or equal to 1.5Gbps.
*/
if (lane_hs_rate > 1500)
- regmap_write(samsung->regmap, DPHY_MC_DESKEW_CON0, 0x9cb1);
+ val = 0x9cb1;
+ else
+ val = 0;
+ regmap_write(samsung->regmap, DPHY_MC_DESKEW_CON0, val);
}
static void
@@ -1284,12 +1290,14 @@ samsung_mipi_dphy_data_lane_timing_init(struct samsung_mipi_dcphy *samsung)
regmap_write(samsung->regmap, COMBO_MD2_ANA_CON0, val);
regmap_write(samsung->regmap, DPHY_MD3_ANA_CON0, val);
- if (lane_hs_rate >= 4500) {
- regmap_write(samsung->regmap, COMBO_MD0_ANA_CON1, 0x0001);
- regmap_write(samsung->regmap, COMBO_MD1_ANA_CON1, 0x0001);
- regmap_write(samsung->regmap, COMBO_MD2_ANA_CON1, 0x0001);
- regmap_write(samsung->regmap, DPHY_MD3_ANA_CON1, 0x0001);
- }
+ if (lane_hs_rate >= 4500)
+ val = 0x0001;
+ else
+ val = 0;
+ regmap_write(samsung->regmap, COMBO_MD0_ANA_CON1, val);
+ regmap_write(samsung->regmap, COMBO_MD1_ANA_CON1, val);
+ regmap_write(samsung->regmap, COMBO_MD2_ANA_CON1, val);
+ regmap_write(samsung->regmap, DPHY_MD3_ANA_CON1, val);
val = 0;
/*
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 5/9] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
` (3 preceding siblings ...)
2026-11-27 7:47 ` [PATCH v8 4/9] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers Jason Yang
@ 2026-11-27 7:47 ` Jason Yang
2026-11-27 7:47 ` [PATCH v8 7/9] phy: rockchip-samsung-dcphy: Support the new phy-type and direction binding Jason Yang
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jason Yang
The APB reset and the BIAS references have to be treated as block-level
[1]: both the transmitter and the receiver need them, and they only have
to be programmed once. They are programmed from the transmitter's
power-on path today.
A later change registers one struct phy for each of them, and a second
consumer coming up would then reset the block underneath a PHY that is
already running.
Program them from runtime resume instead, where whichever of the two
comes up first brings the block up and a second one no longer resets it.
This puts the BIAS writes ahead of the per-PHY reset assert, where the
TRM's worked example has them after [1]. That is safe: neither M_RESETN
nor S_RESETN covers the BIAS registers, and the values written are those
registers' reset defaults.
[1] RK3588 TRM: sections 22.4.1 (address map), 22.4.2 (reset values),
22.6.1.2 (reset) and 22.6.4.1 (D-PHY transmitter start-up)
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger CSI1 2-lane IMX219, CSI0 2-lane OV5675+DSI
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
index 7a009d87a665..d6acc3e2d448 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -1346,7 +1346,6 @@ static int samsung_mipi_dphy_power_on(struct samsung_mipi_dcphy *samsung)
reset_control_assert(samsung->m_phy_rst);
- samsung_mipi_dcphy_bias_block_enable(samsung);
samsung_mipi_dcphy_pll_configure(samsung);
samsung_mipi_dphy_clk_lane_timing_init(samsung);
samsung_mipi_dphy_data_lane_timing_init(samsung);
@@ -1373,10 +1372,6 @@ static int samsung_mipi_dcphy_power_on(struct phy *phy)
{
struct samsung_mipi_dcphy *samsung = phy_get_drvdata(phy);
- reset_control_assert(samsung->apb_rst);
- udelay(1);
- reset_control_deassert(samsung->apb_rst);
-
switch (samsung->type) {
case PHY_TYPE_DPHY:
return samsung_mipi_dphy_power_on(samsung);
@@ -1667,6 +1662,12 @@ static __maybe_unused int samsung_mipi_dcphy_runtime_resume(struct device *dev)
return ret;
}
+ reset_control_assert(samsung->apb_rst);
+ udelay(1);
+ reset_control_deassert(samsung->apb_rst);
+
+ samsung_mipi_dcphy_bias_block_enable(samsung);
+
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 7/9] phy: rockchip-samsung-dcphy: Support the new phy-type and direction binding
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
` (4 preceding siblings ...)
2026-11-27 7:47 ` [PATCH v8 5/9] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume Jason Yang
@ 2026-11-27 7:47 ` Jason Yang
5 siblings, 0 replies; 6+ messages in thread
From: Jason Yang @ 2026-11-27 7:47 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Guochun Huang,
Philipp Zabel
Cc: Michael Riesch, Sebastian Reichel, Bryan O'Donoghue,
Quentin Schulz, linux-phy, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jason Yang
The binding now selects the PHY with the cell and the mode of the block
with the phy-type property of the provider. Read phy-type in probe,
D-PHY by default.
of_xlate() returns the transmitter for PHY_DIRECTION_TX. The deprecated
PHY_TYPE_DPHY and PHY_TYPE_CPHY select the transmitter as today, so
existing DTs are unaffected.
A phy-type other than D-PHY or C-PHY fails probe. A deprecated cell
value that does not match phy-type gets a warning, and the transmitter
then refuses to power on, as in C-PHY mode today.
Signed-off-by: Jason Yang <jason98166@gmail.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # RK3588 Tiger CSI1 2-lane IMX219, CSI0 2-lane OV5675+DSI
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 32 ++++++++++++++++++-----
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
index 7a62db810d4b..1228bd794759 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -309,6 +309,7 @@ struct samsung_mipi_dcphy {
struct reset_control *grf_apb_rst;
struct samsung_mipi_phy tx;
u8 type;
+ bool legacy_mismatch;
const struct samsung_mipi_dcphy_plat_data *pdata;
};
@@ -1384,6 +1385,9 @@ static int samsung_mipi_dcphy_tx_power_on(struct phy *phy)
{
struct samsung_mipi_dcphy *samsung = phy_get_drvdata(phy);
+ if (samsung->legacy_mismatch)
+ return -EOPNOTSUPP;
+
switch (samsung->type) {
case PHY_TYPE_DPHY:
return samsung_mipi_dphy_tx_power_on(samsung);
@@ -1557,13 +1561,21 @@ static struct phy *samsung_mipi_dcphy_xlate(struct device *dev,
return ERR_PTR(-EINVAL);
}
- if (samsung->type != PHY_NONE && samsung->type != args->args[0])
- dev_warn(dev, "phy type select %d overwriting type %d\n",
- args->args[0], samsung->type);
-
- samsung->type = args->args[0];
-
- return samsung->tx.phy;
+ switch (args->args[0]) {
+ case PHY_DIRECTION_TX:
+ return samsung->tx.phy;
+ case PHY_TYPE_DPHY:
+ case PHY_TYPE_CPHY:
+ if (args->args[0] != samsung->type) {
+ dev_warn(dev, "unsupported phy cell %u with phy-type %u\n",
+ args->args[0], samsung->type);
+ samsung->legacy_mismatch = true;
+ }
+ return samsung->tx.phy;
+ default:
+ dev_err(dev, "invalid phy cell %u\n", args->args[0]);
+ return ERR_PTR(-EINVAL);
+ }
}
static int samsung_mipi_dcphy_probe(struct platform_device *pdev)
@@ -1574,6 +1586,7 @@ static int samsung_mipi_dcphy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct resource *res;
void __iomem *regs;
+ u32 type = PHY_TYPE_DPHY;
int ret;
samsung = devm_kzalloc(dev, sizeof(*samsung), GFP_KERNEL);
@@ -1628,6 +1641,11 @@ static int samsung_mipi_dcphy_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(samsung->grf_apb_rst),
"Failed to get system grf_apb_rst control\n");
+ of_property_read_u32(np, "phy-type", &type);
+ if (type != PHY_TYPE_DPHY && type != PHY_TYPE_CPHY)
+ return dev_err_probe(dev, -EINVAL, "unsupported phy-type %u\n", type);
+ samsung->type = type;
+
ret = devm_pm_runtime_enable(dev);
if (ret)
return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-27 7:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261127-dcphy-rx-v1-v8-0-9ddfef99221d@gmail.com>
2026-11-27 7:47 ` [PATCH v8 1/9] dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions Jason Yang
2026-11-27 7:47 ` [PATCH v8 2/9] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add phy-type Jason Yang
2026-11-27 7:47 ` [PATCH v8 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure Jason Yang
2026-11-27 7:47 ` [PATCH v8 4/9] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers Jason Yang
2026-11-27 7:47 ` [PATCH v8 5/9] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume Jason Yang
2026-11-27 7:47 ` [PATCH v8 7/9] phy: rockchip-samsung-dcphy: Support the new phy-type and direction binding Jason Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox