* [PATCH 0/5] drm/rockchip: Add RK3126/RK3128 LVDS support
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel, stable,
Molnár Máté
This adds LVDS output for the RK3126/RK3128. The LVDS serializer on
these SoCs is part of the shared MIPI/LVDS Inno D-PHY, which is already
supported for DSI, and the remaining setup is a few GRF bits, so the
encoder side is close to the PX30 one.
Patch 1 is a fix for the existing driver and is independent of the
rest: since the panel reference handling changed, rockchip_lvds keeps
overriding the panel bridge funcs while lvds->panel is NULL, so no one
powers the panel up any more. This affects the RK3288 and PX30 panels
too, hence the stable tag.
Patch 3 matters on its own as well: the RK3126 VOP has separate LVDS
output enable and dclk polarity bits, and driving LVDS through the RGB
bits leaves the LVDS dclk non-inverted. The panel then samples on the
wrong edge, which shows up as stray dark pixels at 0x7f/0x80
transitions.
Tested on next-20261201 on a Denver TAQ-10162 tablet (RK3126, 1024x600
LVDS panel, panel-lvds) with Phosh on top: without patch 1 the panel
supply is switched off as unused and the screen stays dark, with it the
picture is clean. The board DTS will follow in a separate series once
the remaining pieces (AXP192 bits, touchscreen) are ready.
I used an AI coding assistant (Claude) to find the panel bridge bug,
draft the patches and commit messages, and run the hardware tests; I
have reviewed and tested every patch myself.
---
Molnár Máté (5):
drm/rockchip: lvds: Do not override the panel bridge funcs
dt-bindings: display: rockchip,lvds: Add RK3128 LVDS
drm/rockchip: vop: Use the RK3126 LVDS output bits for LVDS
drm/rockchip: lvds: Add RK3128 support
ARM: dts: rockchip: rk3128: Add LVDS node
.../bindings/display/rockchip/rockchip,lvds.yaml | 5 +-
arch/arm/boot/dts/rockchip/rk3128.dtsi | 31 +++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +
drivers/gpu/drm/rockchip/rockchip_lvds.c | 99 ++++++++++++++--------
drivers/gpu/drm/rockchip/rockchip_lvds.h | 6 ++
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +
7 files changed, 114 insertions(+), 37 deletions(-)
---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261206-rk3128-lvds-387596fa8510
Best regards,
--
Molnár Máté <matemolnar88@gmail.com>
^ permalink raw reply [flat|nested] 19+ messages in thread* [PATCH 0/5] drm/rockchip: Add RK3126/RK3128 LVDS support
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel, stable,
Molnár Máté
This adds LVDS output for the RK3126/RK3128. The LVDS serializer on
these SoCs is part of the shared MIPI/LVDS Inno D-PHY, which is already
supported for DSI, and the remaining setup is a few GRF bits, so the
encoder side is close to the PX30 one.
Patch 1 is a fix for the existing driver and is independent of the
rest: since the panel reference handling changed, rockchip_lvds keeps
overriding the panel bridge funcs while lvds->panel is NULL, so no one
powers the panel up any more. This affects the RK3288 and PX30 panels
too, hence the stable tag.
Patch 3 matters on its own as well: the RK3126 VOP has separate LVDS
output enable and dclk polarity bits, and driving LVDS through the RGB
bits leaves the LVDS dclk non-inverted. The panel then samples on the
wrong edge, which shows up as stray dark pixels at 0x7f/0x80
transitions.
Tested on next-20261201 on a Denver TAQ-10162 tablet (RK3126, 1024x600
LVDS panel, panel-lvds) with Phosh on top: without patch 1 the panel
supply is switched off as unused and the screen stays dark, with it the
picture is clean. The board DTS will follow in a separate series once
the remaining pieces (AXP192 bits, touchscreen) are ready.
I used an AI coding assistant (Claude) to find the panel bridge bug,
draft the patches and commit messages, and run the hardware tests; I
have reviewed and tested every patch myself.
---
Molnár Máté (5):
drm/rockchip: lvds: Do not override the panel bridge funcs
dt-bindings: display: rockchip,lvds: Add RK3128 LVDS
drm/rockchip: vop: Use the RK3126 LVDS output bits for LVDS
drm/rockchip: lvds: Add RK3128 support
ARM: dts: rockchip: rk3128: Add LVDS node
.../bindings/display/rockchip/rockchip,lvds.yaml | 5 +-
arch/arm/boot/dts/rockchip/rk3128.dtsi | 31 +++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +
drivers/gpu/drm/rockchip/rockchip_lvds.c | 99 ++++++++++++++--------
drivers/gpu/drm/rockchip/rockchip_lvds.h | 6 ++
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +
7 files changed, 114 insertions(+), 37 deletions(-)
---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261206-rk3128-lvds-387596fa8510
Best regards,
--
Molnár Máté <matemolnar88@gmail.com>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 19+ messages in thread* [PATCH 1/5] drm/rockchip: lvds: Do not override the panel bridge funcs
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
-1 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel, stable,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
rockchip_lvds_bind() wraps the panel in a panel bridge and then replaces
that bridge's funcs, ops and driver_private with its own, which only
implement get_modes() through lvds->panel. Since commit b71a623598d3
("drm/panel: of_drm_find_panel() return a counted reference"), lvds->panel
is cleared right after the panel bridge is created, so:
- the panel bridge's own pre_enable/enable/disable/post_disable are
gone, and nothing calls the panel's prepare/enable any more;
- the drm_panel_prepare()/drm_panel_enable() calls left in the RK3288
and PX30 encoder hooks now get a NULL panel and do nothing.
The panel supply is never enabled and the panel stays dark. On an RK3126
board with a panel-lvds panel, vcc_lcd is switched off by the regulator
core's unused-regulator cleanup while the CRTC is active.
The panel bridge already provides modes, atomic state handling and the
panel power sequence, so drop the override and the now unused
rockchip_lvds_bridge_funcs.
Fixes: b71a623598d3 ("drm/panel: of_drm_find_panel() return a counted reference")
Cc: stable@vger.kernel.org
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 6b51fab44..231258974 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -60,11 +60,6 @@ struct rockchip_lvds {
struct dev_pin_info *pins;
};
-static inline struct rockchip_lvds *brige_to_lvds(struct drm_bridge *bridge)
-{
- return (struct rockchip_lvds *)bridge->driver_private;
-}
-
static inline struct rockchip_lvds *encoder_to_lvds(struct drm_encoder *encoder)
{
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
@@ -105,23 +100,6 @@ static inline int rockchip_lvds_name_to_output(const char *s)
return -EINVAL;
}
-static int
-rockchip_lvds_bridge_get_modes(struct drm_bridge *bridge, struct drm_connector *connector)
-{
- struct rockchip_lvds *lvds = brige_to_lvds(bridge);
- struct drm_panel *panel = lvds->panel;
-
- return drm_panel_get_modes(panel, connector);
-}
-
-static const
-struct drm_bridge_funcs rockchip_lvds_bridge_funcs = {
- .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
- .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
- .atomic_create_state = drm_atomic_helper_bridge_create_state,
- .get_modes = rockchip_lvds_bridge_get_modes,
-};
-
static int
rockchip_lvds_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
@@ -618,10 +596,6 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
}
if (lvds->bridge) {
- lvds->bridge->driver_private = lvds;
- lvds->bridge->ops = DRM_BRIDGE_OP_MODES;
- lvds->bridge->funcs = &rockchip_lvds_bridge_funcs;
-
ret = drm_bridge_attach(encoder, lvds->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret)
goto err_free_bridge;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 1/5] drm/rockchip: lvds: Do not override the panel bridge funcs
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel, stable,
Molnár Máté
rockchip_lvds_bind() wraps the panel in a panel bridge and then replaces
that bridge's funcs, ops and driver_private with its own, which only
implement get_modes() through lvds->panel. Since commit b71a623598d3
("drm/panel: of_drm_find_panel() return a counted reference"), lvds->panel
is cleared right after the panel bridge is created, so:
- the panel bridge's own pre_enable/enable/disable/post_disable are
gone, and nothing calls the panel's prepare/enable any more;
- the drm_panel_prepare()/drm_panel_enable() calls left in the RK3288
and PX30 encoder hooks now get a NULL panel and do nothing.
The panel supply is never enabled and the panel stays dark. On an RK3126
board with a panel-lvds panel, vcc_lcd is switched off by the regulator
core's unused-regulator cleanup while the CRTC is active.
The panel bridge already provides modes, atomic state handling and the
panel power sequence, so drop the override and the now unused
rockchip_lvds_bridge_funcs.
Fixes: b71a623598d3 ("drm/panel: of_drm_find_panel() return a counted reference")
Cc: stable@vger.kernel.org
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 6b51fab44..231258974 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -60,11 +60,6 @@ struct rockchip_lvds {
struct dev_pin_info *pins;
};
-static inline struct rockchip_lvds *brige_to_lvds(struct drm_bridge *bridge)
-{
- return (struct rockchip_lvds *)bridge->driver_private;
-}
-
static inline struct rockchip_lvds *encoder_to_lvds(struct drm_encoder *encoder)
{
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
@@ -105,23 +100,6 @@ static inline int rockchip_lvds_name_to_output(const char *s)
return -EINVAL;
}
-static int
-rockchip_lvds_bridge_get_modes(struct drm_bridge *bridge, struct drm_connector *connector)
-{
- struct rockchip_lvds *lvds = brige_to_lvds(bridge);
- struct drm_panel *panel = lvds->panel;
-
- return drm_panel_get_modes(panel, connector);
-}
-
-static const
-struct drm_bridge_funcs rockchip_lvds_bridge_funcs = {
- .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
- .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
- .atomic_create_state = drm_atomic_helper_bridge_create_state,
- .get_modes = rockchip_lvds_bridge_get_modes,
-};
-
static int
rockchip_lvds_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
@@ -618,10 +596,6 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
}
if (lvds->bridge) {
- lvds->bridge->driver_private = lvds;
- lvds->bridge->ops = DRM_BRIDGE_OP_MODES;
- lvds->bridge->funcs = &rockchip_lvds_bridge_funcs;
-
ret = drm_bridge_attach(encoder, lvds->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret)
goto err_free_bridge;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 1/5] drm/rockchip: lvds: Do not override the panel bridge funcs
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel, stable,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
rockchip_lvds_bind() wraps the panel in a panel bridge and then replaces
that bridge's funcs, ops and driver_private with its own, which only
implement get_modes() through lvds->panel. Since commit b71a623598d3
("drm/panel: of_drm_find_panel() return a counted reference"), lvds->panel
is cleared right after the panel bridge is created, so:
- the panel bridge's own pre_enable/enable/disable/post_disable are
gone, and nothing calls the panel's prepare/enable any more;
- the drm_panel_prepare()/drm_panel_enable() calls left in the RK3288
and PX30 encoder hooks now get a NULL panel and do nothing.
The panel supply is never enabled and the panel stays dark. On an RK3126
board with a panel-lvds panel, vcc_lcd is switched off by the regulator
core's unused-regulator cleanup while the CRTC is active.
The panel bridge already provides modes, atomic state handling and the
panel power sequence, so drop the override and the now unused
rockchip_lvds_bridge_funcs.
Fixes: b71a623598d3 ("drm/panel: of_drm_find_panel() return a counted reference")
Cc: stable@vger.kernel.org
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 6b51fab44..231258974 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -60,11 +60,6 @@ struct rockchip_lvds {
struct dev_pin_info *pins;
};
-static inline struct rockchip_lvds *brige_to_lvds(struct drm_bridge *bridge)
-{
- return (struct rockchip_lvds *)bridge->driver_private;
-}
-
static inline struct rockchip_lvds *encoder_to_lvds(struct drm_encoder *encoder)
{
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
@@ -105,23 +100,6 @@ static inline int rockchip_lvds_name_to_output(const char *s)
return -EINVAL;
}
-static int
-rockchip_lvds_bridge_get_modes(struct drm_bridge *bridge, struct drm_connector *connector)
-{
- struct rockchip_lvds *lvds = brige_to_lvds(bridge);
- struct drm_panel *panel = lvds->panel;
-
- return drm_panel_get_modes(panel, connector);
-}
-
-static const
-struct drm_bridge_funcs rockchip_lvds_bridge_funcs = {
- .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
- .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
- .atomic_create_state = drm_atomic_helper_bridge_create_state,
- .get_modes = rockchip_lvds_bridge_get_modes,
-};
-
static int
rockchip_lvds_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
@@ -618,10 +596,6 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
}
if (lvds->bridge) {
- lvds->bridge->driver_private = lvds;
- lvds->bridge->ops = DRM_BRIDGE_OP_MODES;
- lvds->bridge->funcs = &rockchip_lvds_bridge_funcs;
-
ret = drm_bridge_attach(encoder, lvds->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret)
goto err_free_bridge;
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/5] dt-bindings: display: rockchip,lvds: Add RK3128 LVDS
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
-1 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
The RK3126/RK3128 LVDS transmitter is the shared MIPI/LVDS Inno D-PHY,
configured through the GRF, the same as on PX30. It has no register
block, clock or supplies of its own, so describe it like PX30.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
.../devicetree/bindings/display/rockchip/rockchip,lvds.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
index 03b002a05..249a7402f 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
@@ -14,6 +14,7 @@ properties:
compatible:
enum:
- rockchip,px30-lvds
+ - rockchip,rk3128-lvds
- rockchip,rk3288-lvds
reg:
@@ -87,7 +88,9 @@ allOf:
properties:
compatible:
contains:
- const: rockchip,px30-lvds
+ enum:
+ - rockchip,px30-lvds
+ - rockchip,rk3128-lvds
then:
properties:
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 2/5] dt-bindings: display: rockchip,lvds: Add RK3128 LVDS
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
The RK3126/RK3128 LVDS transmitter is the shared MIPI/LVDS Inno D-PHY,
configured through the GRF, the same as on PX30. It has no register
block, clock or supplies of its own, so describe it like PX30.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
.../devicetree/bindings/display/rockchip/rockchip,lvds.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
index 03b002a05..249a7402f 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
@@ -14,6 +14,7 @@ properties:
compatible:
enum:
- rockchip,px30-lvds
+ - rockchip,rk3128-lvds
- rockchip,rk3288-lvds
reg:
@@ -87,7 +88,9 @@ allOf:
properties:
compatible:
contains:
- const: rockchip,px30-lvds
+ enum:
+ - rockchip,px30-lvds
+ - rockchip,rk3128-lvds
then:
properties:
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 2/5] dt-bindings: display: rockchip,lvds: Add RK3128 LVDS
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
The RK3126/RK3128 LVDS transmitter is the shared MIPI/LVDS Inno D-PHY,
configured through the GRF, the same as on PX30. It has no register
block, clock or supplies of its own, so describe it like PX30.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
.../devicetree/bindings/display/rockchip/rockchip,lvds.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
index 03b002a05..249a7402f 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,lvds.yaml
@@ -14,6 +14,7 @@ properties:
compatible:
enum:
- rockchip,px30-lvds
+ - rockchip,rk3128-lvds
- rockchip,rk3288-lvds
reg:
@@ -87,7 +88,9 @@ allOf:
properties:
compatible:
contains:
- const: rockchip,px30-lvds
+ enum:
+ - rockchip,px30-lvds
+ - rockchip,rk3128-lvds
then:
properties:
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/5] drm/rockchip: vop: Use the RK3126 LVDS output bits for LVDS
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
-1 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
On RK3126/RK3128 the VOP has a separate output enable and dclk polarity
bit for LVDS in AXI_BUS_CTRL (bits 26 and 27), next to the RGB ones
(bits 24 and 25). The driver currently drives an LVDS connector through
the RGB bits, so the LVDS dclk is never inverted.
The panel then latches data on the wrong clock edge. On a Denver
TAQ-10162 tablet this shows up as stray dark pixels wherever a channel
crosses 0x7f/0x80, which looks like banding or a 16-bit picture. Setting
the LVDS bits, as the vendor U-Boot does (AXI_BUS_CTRL = 0x0c000000),
gives a clean image.
Describe the two bits for RK3126 and use them for LVDS outputs when the
VOP has them. Other VOPs keep using the RGB bits.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 ++
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 69e72727d..95dd7eb13 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1407,6 +1407,12 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
switch (s->output_type) {
case DRM_MODE_CONNECTOR_LVDS:
+ /* RK3126/RK3128 have separate LVDS output enable and dclk polarity bits */
+ if (VOP_HAS_REG(vop, output, lvds_en)) {
+ VOP_REG_SET(vop, output, lvds_dclk_pol, 1);
+ VOP_REG_SET(vop, output, lvds_en, 1);
+ break;
+ }
VOP_REG_SET(vop, output, rgb_dclk_pol, 1);
VOP_REG_SET(vop, output, rgb_pin_pol, pin_pol);
VOP_REG_SET(vop, output, rgb_en, 1);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index f04c9731a..4c9172e73 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -106,6 +106,8 @@ struct vop_output {
struct vop_reg mipi_en;
struct vop_reg mipi_dual_channel_en;
struct vop_reg rgb_en;
+ struct vop_reg lvds_en;
+ struct vop_reg lvds_dclk_pol;
};
struct vop_common {
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
index 72301e0a3..07f46ecec 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
@@ -233,6 +233,8 @@ static const struct vop_output rk3126_output = {
.hdmi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 23),
.rgb_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 24),
.rgb_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 25),
+ .lvds_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 26),
+ .lvds_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 27),
.mipi_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 28),
.mipi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 29),
};
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 3/5] drm/rockchip: vop: Use the RK3126 LVDS output bits for LVDS
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
On RK3126/RK3128 the VOP has a separate output enable and dclk polarity
bit for LVDS in AXI_BUS_CTRL (bits 26 and 27), next to the RGB ones
(bits 24 and 25). The driver currently drives an LVDS connector through
the RGB bits, so the LVDS dclk is never inverted.
The panel then latches data on the wrong clock edge. On a Denver
TAQ-10162 tablet this shows up as stray dark pixels wherever a channel
crosses 0x7f/0x80, which looks like banding or a 16-bit picture. Setting
the LVDS bits, as the vendor U-Boot does (AXI_BUS_CTRL = 0x0c000000),
gives a clean image.
Describe the two bits for RK3126 and use them for LVDS outputs when the
VOP has them. Other VOPs keep using the RGB bits.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 ++
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 69e72727d..95dd7eb13 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1407,6 +1407,12 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
switch (s->output_type) {
case DRM_MODE_CONNECTOR_LVDS:
+ /* RK3126/RK3128 have separate LVDS output enable and dclk polarity bits */
+ if (VOP_HAS_REG(vop, output, lvds_en)) {
+ VOP_REG_SET(vop, output, lvds_dclk_pol, 1);
+ VOP_REG_SET(vop, output, lvds_en, 1);
+ break;
+ }
VOP_REG_SET(vop, output, rgb_dclk_pol, 1);
VOP_REG_SET(vop, output, rgb_pin_pol, pin_pol);
VOP_REG_SET(vop, output, rgb_en, 1);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index f04c9731a..4c9172e73 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -106,6 +106,8 @@ struct vop_output {
struct vop_reg mipi_en;
struct vop_reg mipi_dual_channel_en;
struct vop_reg rgb_en;
+ struct vop_reg lvds_en;
+ struct vop_reg lvds_dclk_pol;
};
struct vop_common {
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
index 72301e0a3..07f46ecec 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
@@ -233,6 +233,8 @@ static const struct vop_output rk3126_output = {
.hdmi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 23),
.rgb_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 24),
.rgb_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 25),
+ .lvds_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 26),
+ .lvds_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 27),
.mipi_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 28),
.mipi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 29),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 3/5] drm/rockchip: vop: Use the RK3126 LVDS output bits for LVDS
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
On RK3126/RK3128 the VOP has a separate output enable and dclk polarity
bit for LVDS in AXI_BUS_CTRL (bits 26 and 27), next to the RGB ones
(bits 24 and 25). The driver currently drives an LVDS connector through
the RGB bits, so the LVDS dclk is never inverted.
The panel then latches data on the wrong clock edge. On a Denver
TAQ-10162 tablet this shows up as stray dark pixels wherever a channel
crosses 0x7f/0x80, which looks like banding or a 16-bit picture. Setting
the LVDS bits, as the vendor U-Boot does (AXI_BUS_CTRL = 0x0c000000),
gives a clean image.
Describe the two bits for RK3126 and use them for LVDS outputs when the
VOP has them. Other VOPs keep using the RGB bits.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++++
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 ++
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 69e72727d..95dd7eb13 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1407,6 +1407,12 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
switch (s->output_type) {
case DRM_MODE_CONNECTOR_LVDS:
+ /* RK3126/RK3128 have separate LVDS output enable and dclk polarity bits */
+ if (VOP_HAS_REG(vop, output, lvds_en)) {
+ VOP_REG_SET(vop, output, lvds_dclk_pol, 1);
+ VOP_REG_SET(vop, output, lvds_en, 1);
+ break;
+ }
VOP_REG_SET(vop, output, rgb_dclk_pol, 1);
VOP_REG_SET(vop, output, rgb_pin_pol, pin_pol);
VOP_REG_SET(vop, output, rgb_en, 1);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index f04c9731a..4c9172e73 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -106,6 +106,8 @@ struct vop_output {
struct vop_reg mipi_en;
struct vop_reg mipi_dual_channel_en;
struct vop_reg rgb_en;
+ struct vop_reg lvds_en;
+ struct vop_reg lvds_dclk_pol;
};
struct vop_common {
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
index 72301e0a3..07f46ecec 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
@@ -233,6 +233,8 @@ static const struct vop_output rk3126_output = {
.hdmi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 23),
.rgb_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 24),
.rgb_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 25),
+ .lvds_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 26),
+ .lvds_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 27),
.mipi_en = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 28),
.mipi_dclk_pol = VOP_REG(RK3036_AXI_BUS_CTRL, 0x1, 29),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 4/5] drm/rockchip: lvds: Add RK3128 support
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
-1 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
The RK3126/RK3128 LVDS transmitter works like the PX30 one: the
serializer is part of the shared MIPI/LVDS Inno D-PHY, and the LVDS
mode, P2S, MSB select and data format bits live in GRF_LVDS_CON0. There
is only one VOP, so there is no source select. The register layout comes
from the Rockchip 4.4 BSP rk3126_lvds_enable().
Move the D-PHY setup out of px30_lvds_probe() into a helper and use it
as the RK3128 probe function.
Tested on a Denver TAQ-10162 tablet (RK3126, 1024x600 LVDS panel).
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 73 +++++++++++++++++++++++++++-----
drivers/gpu/drm/rockchip/rockchip_lvds.h | 6 +++
2 files changed, 69 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 231258974..a187e1caf 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -422,6 +422,43 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
.atomic_check = rockchip_lvds_encoder_atomic_check,
};
+/*
+ * RK3126/RK3128: the LVDS serializer sits in the shared MIPI/LVDS Inno D-PHY
+ * and its mode bits are in GRF_LVDS_CON0. There is a single VOP, so there is
+ * no source select.
+ */
+static void rk3128_lvds_encoder_enable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+ int ret;
+
+ ret = pm_runtime_resume_and_get(lvds->dev);
+ if (ret < 0) {
+ DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
+ return;
+ }
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(1) | RK3128_LVDS_MODE_EN(1) |
+ RK3128_LVDS_MSBSEL(1) | RK3128_LVDS_FORMAT(lvds->format));
+}
+
+static void rk3128_lvds_encoder_disable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(0) | RK3128_LVDS_MODE_EN(0));
+ pm_runtime_put(lvds->dev);
+}
+
+static const
+struct drm_encoder_helper_funcs rk3128_lvds_encoder_helper_funcs = {
+ .enable = rk3128_lvds_encoder_enable,
+ .disable = rk3128_lvds_encoder_disable,
+ .atomic_check = rockchip_lvds_encoder_atomic_check,
+};
+
static int rk3288_lvds_probe(struct platform_device *pdev,
struct rockchip_lvds *lvds)
{
@@ -456,19 +493,11 @@ static int rk3288_lvds_probe(struct platform_device *pdev,
return 0;
}
-static int px30_lvds_probe(struct platform_device *pdev,
- struct rockchip_lvds *lvds)
+static int rockchip_lvds_dphy_init(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
{
int ret;
- /* MSB */
- ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
- PX30_LVDS_MSBSEL(1),
- PX30_LVDS_MSBSEL(1));
- if (ret)
- return ret;
-
- /* PHY */
lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
if (IS_ERR(lvds->dphy))
return PTR_ERR(lvds->dphy);
@@ -484,6 +513,26 @@ static int px30_lvds_probe(struct platform_device *pdev,
return phy_power_on(lvds->dphy);
}
+static int px30_lvds_probe(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
+{
+ int ret;
+
+ /* MSB */
+ ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
+ PX30_LVDS_MSBSEL(1),
+ PX30_LVDS_MSBSEL(1));
+ if (ret)
+ return ret;
+
+ return rockchip_lvds_dphy_init(pdev, lvds);
+}
+
+static const struct rockchip_lvds_soc_data rk3128_lvds_data = {
+ .probe = rockchip_lvds_dphy_init,
+ .helper_funcs = &rk3128_lvds_encoder_helper_funcs,
+};
+
static const struct rockchip_lvds_soc_data rk3288_lvds_data = {
.probe = rk3288_lvds_probe,
.helper_funcs = &rk3288_lvds_encoder_helper_funcs,
@@ -495,6 +544,10 @@ static const struct rockchip_lvds_soc_data px30_lvds_data = {
};
static const struct of_device_id rockchip_lvds_dt_ids[] = {
+ {
+ .compatible = "rockchip,rk3128-lvds",
+ .data = &rk3128_lvds_data
+ },
{
.compatible = "rockchip,rk3288-lvds",
.data = &rk3288_lvds_data
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.h b/drivers/gpu/drm/rockchip/rockchip_lvds.h
index 2d92447d8..1a2d639cb 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.h
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.h
@@ -109,6 +109,12 @@
#define LVDS_VESA_18 2
#define LVDS_JEIDA_18 3
+#define RK3128_GRF_LVDS_CON0 0x150
+#define RK3128_LVDS_P2S_EN(val) FIELD_PREP_WM16(BIT(9), (val))
+#define RK3128_LVDS_MODE_EN(val) FIELD_PREP_WM16(BIT(6), (val))
+#define RK3128_LVDS_MSBSEL(val) FIELD_PREP_WM16(BIT(3), (val))
+#define RK3128_LVDS_FORMAT(val) FIELD_PREP_WM16(GENMASK(2, 1), (val))
+
#define PX30_LVDS_GRF_PD_VO_CON0 0x434
#define PX30_LVDS_TIE_CLKS(val) FIELD_PREP_WM16(BIT(8), (val))
#define PX30_LVDS_INVERT_CLKS(val) FIELD_PREP_WM16(BIT(9), (val))
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 4/5] drm/rockchip: lvds: Add RK3128 support
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
The RK3126/RK3128 LVDS transmitter works like the PX30 one: the
serializer is part of the shared MIPI/LVDS Inno D-PHY, and the LVDS
mode, P2S, MSB select and data format bits live in GRF_LVDS_CON0. There
is only one VOP, so there is no source select. The register layout comes
from the Rockchip 4.4 BSP rk3126_lvds_enable().
Move the D-PHY setup out of px30_lvds_probe() into a helper and use it
as the RK3128 probe function.
Tested on a Denver TAQ-10162 tablet (RK3126, 1024x600 LVDS panel).
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 73 +++++++++++++++++++++++++++-----
drivers/gpu/drm/rockchip/rockchip_lvds.h | 6 +++
2 files changed, 69 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 231258974..a187e1caf 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -422,6 +422,43 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
.atomic_check = rockchip_lvds_encoder_atomic_check,
};
+/*
+ * RK3126/RK3128: the LVDS serializer sits in the shared MIPI/LVDS Inno D-PHY
+ * and its mode bits are in GRF_LVDS_CON0. There is a single VOP, so there is
+ * no source select.
+ */
+static void rk3128_lvds_encoder_enable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+ int ret;
+
+ ret = pm_runtime_resume_and_get(lvds->dev);
+ if (ret < 0) {
+ DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
+ return;
+ }
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(1) | RK3128_LVDS_MODE_EN(1) |
+ RK3128_LVDS_MSBSEL(1) | RK3128_LVDS_FORMAT(lvds->format));
+}
+
+static void rk3128_lvds_encoder_disable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(0) | RK3128_LVDS_MODE_EN(0));
+ pm_runtime_put(lvds->dev);
+}
+
+static const
+struct drm_encoder_helper_funcs rk3128_lvds_encoder_helper_funcs = {
+ .enable = rk3128_lvds_encoder_enable,
+ .disable = rk3128_lvds_encoder_disable,
+ .atomic_check = rockchip_lvds_encoder_atomic_check,
+};
+
static int rk3288_lvds_probe(struct platform_device *pdev,
struct rockchip_lvds *lvds)
{
@@ -456,19 +493,11 @@ static int rk3288_lvds_probe(struct platform_device *pdev,
return 0;
}
-static int px30_lvds_probe(struct platform_device *pdev,
- struct rockchip_lvds *lvds)
+static int rockchip_lvds_dphy_init(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
{
int ret;
- /* MSB */
- ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
- PX30_LVDS_MSBSEL(1),
- PX30_LVDS_MSBSEL(1));
- if (ret)
- return ret;
-
- /* PHY */
lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
if (IS_ERR(lvds->dphy))
return PTR_ERR(lvds->dphy);
@@ -484,6 +513,26 @@ static int px30_lvds_probe(struct platform_device *pdev,
return phy_power_on(lvds->dphy);
}
+static int px30_lvds_probe(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
+{
+ int ret;
+
+ /* MSB */
+ ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
+ PX30_LVDS_MSBSEL(1),
+ PX30_LVDS_MSBSEL(1));
+ if (ret)
+ return ret;
+
+ return rockchip_lvds_dphy_init(pdev, lvds);
+}
+
+static const struct rockchip_lvds_soc_data rk3128_lvds_data = {
+ .probe = rockchip_lvds_dphy_init,
+ .helper_funcs = &rk3128_lvds_encoder_helper_funcs,
+};
+
static const struct rockchip_lvds_soc_data rk3288_lvds_data = {
.probe = rk3288_lvds_probe,
.helper_funcs = &rk3288_lvds_encoder_helper_funcs,
@@ -495,6 +544,10 @@ static const struct rockchip_lvds_soc_data px30_lvds_data = {
};
static const struct of_device_id rockchip_lvds_dt_ids[] = {
+ {
+ .compatible = "rockchip,rk3128-lvds",
+ .data = &rk3128_lvds_data
+ },
{
.compatible = "rockchip,rk3288-lvds",
.data = &rk3288_lvds_data
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.h b/drivers/gpu/drm/rockchip/rockchip_lvds.h
index 2d92447d8..1a2d639cb 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.h
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.h
@@ -109,6 +109,12 @@
#define LVDS_VESA_18 2
#define LVDS_JEIDA_18 3
+#define RK3128_GRF_LVDS_CON0 0x150
+#define RK3128_LVDS_P2S_EN(val) FIELD_PREP_WM16(BIT(9), (val))
+#define RK3128_LVDS_MODE_EN(val) FIELD_PREP_WM16(BIT(6), (val))
+#define RK3128_LVDS_MSBSEL(val) FIELD_PREP_WM16(BIT(3), (val))
+#define RK3128_LVDS_FORMAT(val) FIELD_PREP_WM16(GENMASK(2, 1), (val))
+
#define PX30_LVDS_GRF_PD_VO_CON0 0x434
#define PX30_LVDS_TIE_CLKS(val) FIELD_PREP_WM16(BIT(8), (val))
#define PX30_LVDS_INVERT_CLKS(val) FIELD_PREP_WM16(BIT(9), (val))
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 4/5] drm/rockchip: lvds: Add RK3128 support
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
The RK3126/RK3128 LVDS transmitter works like the PX30 one: the
serializer is part of the shared MIPI/LVDS Inno D-PHY, and the LVDS
mode, P2S, MSB select and data format bits live in GRF_LVDS_CON0. There
is only one VOP, so there is no source select. The register layout comes
from the Rockchip 4.4 BSP rk3126_lvds_enable().
Move the D-PHY setup out of px30_lvds_probe() into a helper and use it
as the RK3128 probe function.
Tested on a Denver TAQ-10162 tablet (RK3126, 1024x600 LVDS panel).
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 73 +++++++++++++++++++++++++++-----
drivers/gpu/drm/rockchip/rockchip_lvds.h | 6 +++
2 files changed, 69 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 231258974..a187e1caf 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -422,6 +422,43 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
.atomic_check = rockchip_lvds_encoder_atomic_check,
};
+/*
+ * RK3126/RK3128: the LVDS serializer sits in the shared MIPI/LVDS Inno D-PHY
+ * and its mode bits are in GRF_LVDS_CON0. There is a single VOP, so there is
+ * no source select.
+ */
+static void rk3128_lvds_encoder_enable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+ int ret;
+
+ ret = pm_runtime_resume_and_get(lvds->dev);
+ if (ret < 0) {
+ DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
+ return;
+ }
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(1) | RK3128_LVDS_MODE_EN(1) |
+ RK3128_LVDS_MSBSEL(1) | RK3128_LVDS_FORMAT(lvds->format));
+}
+
+static void rk3128_lvds_encoder_disable(struct drm_encoder *encoder)
+{
+ struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+
+ regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
+ RK3128_LVDS_P2S_EN(0) | RK3128_LVDS_MODE_EN(0));
+ pm_runtime_put(lvds->dev);
+}
+
+static const
+struct drm_encoder_helper_funcs rk3128_lvds_encoder_helper_funcs = {
+ .enable = rk3128_lvds_encoder_enable,
+ .disable = rk3128_lvds_encoder_disable,
+ .atomic_check = rockchip_lvds_encoder_atomic_check,
+};
+
static int rk3288_lvds_probe(struct platform_device *pdev,
struct rockchip_lvds *lvds)
{
@@ -456,19 +493,11 @@ static int rk3288_lvds_probe(struct platform_device *pdev,
return 0;
}
-static int px30_lvds_probe(struct platform_device *pdev,
- struct rockchip_lvds *lvds)
+static int rockchip_lvds_dphy_init(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
{
int ret;
- /* MSB */
- ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
- PX30_LVDS_MSBSEL(1),
- PX30_LVDS_MSBSEL(1));
- if (ret)
- return ret;
-
- /* PHY */
lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
if (IS_ERR(lvds->dphy))
return PTR_ERR(lvds->dphy);
@@ -484,6 +513,26 @@ static int px30_lvds_probe(struct platform_device *pdev,
return phy_power_on(lvds->dphy);
}
+static int px30_lvds_probe(struct platform_device *pdev,
+ struct rockchip_lvds *lvds)
+{
+ int ret;
+
+ /* MSB */
+ ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
+ PX30_LVDS_MSBSEL(1),
+ PX30_LVDS_MSBSEL(1));
+ if (ret)
+ return ret;
+
+ return rockchip_lvds_dphy_init(pdev, lvds);
+}
+
+static const struct rockchip_lvds_soc_data rk3128_lvds_data = {
+ .probe = rockchip_lvds_dphy_init,
+ .helper_funcs = &rk3128_lvds_encoder_helper_funcs,
+};
+
static const struct rockchip_lvds_soc_data rk3288_lvds_data = {
.probe = rk3288_lvds_probe,
.helper_funcs = &rk3288_lvds_encoder_helper_funcs,
@@ -495,6 +544,10 @@ static const struct rockchip_lvds_soc_data px30_lvds_data = {
};
static const struct of_device_id rockchip_lvds_dt_ids[] = {
+ {
+ .compatible = "rockchip,rk3128-lvds",
+ .data = &rk3128_lvds_data
+ },
{
.compatible = "rockchip,rk3288-lvds",
.data = &rk3288_lvds_data
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.h b/drivers/gpu/drm/rockchip/rockchip_lvds.h
index 2d92447d8..1a2d639cb 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.h
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.h
@@ -109,6 +109,12 @@
#define LVDS_VESA_18 2
#define LVDS_JEIDA_18 3
+#define RK3128_GRF_LVDS_CON0 0x150
+#define RK3128_LVDS_P2S_EN(val) FIELD_PREP_WM16(BIT(9), (val))
+#define RK3128_LVDS_MODE_EN(val) FIELD_PREP_WM16(BIT(6), (val))
+#define RK3128_LVDS_MSBSEL(val) FIELD_PREP_WM16(BIT(3), (val))
+#define RK3128_LVDS_FORMAT(val) FIELD_PREP_WM16(GENMASK(2, 1), (val))
+
#define PX30_LVDS_GRF_PD_VO_CON0 0x434
#define PX30_LVDS_TIE_CLKS(val) FIELD_PREP_WM16(BIT(8), (val))
#define PX30_LVDS_INVERT_CLKS(val) FIELD_PREP_WM16(BIT(9), (val))
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 4/5] drm/rockchip: lvds: Add RK3128 support
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
(?)
@ 2026-12-06 3:26 ` sashiko-bot
-1 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-12-06 3:26 UTC (permalink / raw)
To: Molnár Máté; +Cc: dri-devel, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] drm/rockchip: Inno D-PHY left uncycled across RK3128 LVDS
disable/enable
- [Low] drm/rockchip: unbalanced pm_runtime_put() on rk3128 LVDS enable
error
--
commit 167c38fbb5c46d1d5b1e6afa49ade12ee926ef77
Author: Molnár Máté <matemolnar88@gmail.com>
drm/rockchip: lvds: Add RK3128 support
This commit adds RK3126/RK3128 LVDS transmitter support to the Rockchip
LVDS driver, configuring GRF_LVDS_CON0 in new encoder enable/disable
callbacks and factoring D-PHY initialization out of px30_lvds_probe() into
a shared helper.
> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> index 231258974639a..a187e1caf3238 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> @@ -422,6 +422,43 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
[ ... ]
> +static void rk3128_lvds_encoder_enable(struct drm_encoder *encoder)
> +{
> + struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
> + int ret;
> +
> + ret = pm_runtime_resume_and_get(lvds->dev);
> + if (ret < 0) {
> + DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
> + return;
> + }
[Severity: Low]
Can this early return cause an unbalanced pm_runtime_put() in
rk3128_lvds_encoder_disable()?
Because drm_encoder_helper_funcs.enable is void, DRM still treats the
encoder as enabled if pm_runtime_resume_and_get() fails (for example,
via the dphy supplier in RK3128_PD_VIO). The later disable then calls
pm_runtime_put(lvds->dev), underflowing the runtime PM usage count.
Tracking whether runtime PM was acquired on struct rockchip_lvds before
calling pm_runtime_put() would avoid the imbalance.
> + regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
> + RK3128_LVDS_P2S_EN(1) | RK3128_LVDS_MODE_EN(1) |
> + RK3128_LVDS_MSBSEL(1) | RK3128_LVDS_FORMAT(lvds->format));
> +}
> +
> +static void rk3128_lvds_encoder_disable(struct drm_encoder *encoder)
> +{
> + struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
> +
> + regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0,
> + RK3128_LVDS_P2S_EN(0) | RK3128_LVDS_MODE_EN(0));
> + pm_runtime_put(lvds->dev);
> +}
[Severity: High]
Does leaving lvds->dphy uncycled across disable and enable break LVDS
output after system suspend/resume?
rockchip_lvds_dphy_init() calls phy_power_on(lvds->dphy) once at probe
time, while rk3128_lvds_encoder_disable() and rk3128_lvds_encoder_enable()
never call phy_power_off() or phy_power_on(). During system suspend,
RK3128_PD_VIO is powered off and the Inno D-PHY loses its register state.
Because inno_dsidphy_driver has no suspend/resume callbacks and
rockchip_drm_sys_resume() relies on drm_mode_config_helper_resume() to
re-enable the encoder, the D-PHY is never reinitialized on resume.
It also keeps its PLL, clocks, and RK3128_PD_VIO active during DPMS off.
Cycling phy_power_off()/phy_power_on() in disable/enable (while ensuring
rockchip_lvds_unbind() does not disable an already-disabled encoder) would
restore D-PHY state on resume and allow it to power down when blanked.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261206-rk3128-lvds-v1-0-09543f8e1e9f@gmail.com?part=4
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 5/5] ARM: dts: rockchip: rk3128: Add LVDS node
2026-12-06 3:08 ` Molnár Máté via B4 Relay
(?)
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
-1 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
Add the LVDS encoder, which drives the shared MIPI/LVDS D-PHY, and
connect it to the VOP. Boards with an LVDS panel enable it and add the
panel on port@1.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index c49099954..8a6be7eb7 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -127,6 +127,32 @@ display_subsystem: display-subsystem {
status = "disabled";
};
+ lvds: lvds {
+ compatible = "rockchip,rk3128-lvds";
+ phys = <&dphy>;
+ phy-names = "dphy";
+ rockchip,grf = <&grf>;
+ rockchip,output = "lvds";
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lvds_in: port@0 {
+ reg = <0>;
+
+ lvds_in_vop: endpoint {
+ remote-endpoint = <&vop_out_lvds>;
+ };
+ };
+
+ lvds_out: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
gpu_opp_table: opp-table-1 {
compatible = "operating-points-v2";
@@ -312,6 +338,11 @@ vop_out_dsi: endpoint@1 {
reg = <1>;
remote-endpoint = <&dsi_in_vop>;
};
+
+ vop_out_lvds: endpoint@2 {
+ reg = <2>;
+ remote-endpoint = <&lvds_in_vop>;
+ };
};
};
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 5/5] ARM: dts: rockchip: rk3128: Add LVDS node
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
Add the LVDS encoder, which drives the shared MIPI/LVDS D-PHY, and
connect it to the VOP. Boards with an LVDS panel enable it and add the
panel on port@1.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index c49099954..8a6be7eb7 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -127,6 +127,32 @@ display_subsystem: display-subsystem {
status = "disabled";
};
+ lvds: lvds {
+ compatible = "rockchip,rk3128-lvds";
+ phys = <&dphy>;
+ phy-names = "dphy";
+ rockchip,grf = <&grf>;
+ rockchip,output = "lvds";
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lvds_in: port@0 {
+ reg = <0>;
+
+ lvds_in_vop: endpoint {
+ remote-endpoint = <&vop_out_lvds>;
+ };
+ };
+
+ lvds_out: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
gpu_opp_table: opp-table-1 {
compatible = "operating-points-v2";
@@ -312,6 +338,11 @@ vop_out_dsi: endpoint@1 {
reg = <1>;
remote-endpoint = <&dsi_in_vop>;
};
+
+ vop_out_lvds: endpoint@2 {
+ reg = <2>;
+ remote-endpoint = <&lvds_in_vop>;
+ };
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 5/5] ARM: dts: rockchip: rk3128: Add LVDS node
@ 2026-12-06 3:08 ` Molnár Máté via B4 Relay
0 siblings, 0 replies; 19+ messages in thread
From: Molnár Máté via B4 Relay @ 2026-12-06 3:08 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Chaoyi Chen,
Damon Ding, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-rockchip, linux-arm-kernel, devicetree,
Albert Esteve, Neil Armstrong, linux-kernel,
Molnár Máté
From: Molnár Máté <matemolnar88@gmail.com>
Add the LVDS encoder, which drives the shared MIPI/LVDS D-PHY, and
connect it to the VOP. Boards with an LVDS panel enable it and add the
panel on port@1.
Signed-off-by: Molnár Máté <matemolnar88@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index c49099954..8a6be7eb7 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -127,6 +127,32 @@ display_subsystem: display-subsystem {
status = "disabled";
};
+ lvds: lvds {
+ compatible = "rockchip,rk3128-lvds";
+ phys = <&dphy>;
+ phy-names = "dphy";
+ rockchip,grf = <&grf>;
+ rockchip,output = "lvds";
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lvds_in: port@0 {
+ reg = <0>;
+
+ lvds_in_vop: endpoint {
+ remote-endpoint = <&vop_out_lvds>;
+ };
+ };
+
+ lvds_out: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
gpu_opp_table: opp-table-1 {
compatible = "operating-points-v2";
@@ -312,6 +338,11 @@ vop_out_dsi: endpoint@1 {
reg = <1>;
remote-endpoint = <&dsi_in_vop>;
};
+
+ vop_out_lvds: endpoint@2 {
+ reg = <2>;
+ remote-endpoint = <&lvds_in_vop>;
+ };
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread