linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio
@ 2025-10-27 22:26 Laurent Pinchart
  2025-10-27 22:26 ` [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property Laurent Pinchart
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Laurent Pinchart @ 2025-10-27 22:26 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, linux-arm-kernel, linux-rockchip, Sandy Huang,
	Heiko Stübner, Andy Yan, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Cristian Ciocaltea

Hello,

The dw_hdmi_qp driver supports a "enable-gpios" DT property that is not
documented in the corresponding DT bindings, and is not used in any
upstream device tree sources. This patch series renames the property to
"frl-enable-gpios" to express its purpose more clearly, and documents it
in the bindings.

In the previous these two patches were part of "[PATCH v2 0/5] arm64:
dts: rockchip: Add device tree for the Orange Pi CM5 Base board" ([1]).
I have split them from the Orange Pi CM5 Base DT and rebased them on top
of the drm-misc-next branch to ease integration.

The other main change compared to v2 is the rename of the property from
"tmds-enable-gpios" to "frl-enable-gpios".

[1] https://lore.kernel.org/all/20251005235542.1017-1-laurent.pinchart@ideasonboard.com/

Cristian Ciocaltea (2):
  dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property
  drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main
    struct

 .../rockchip/rockchip,rk3588-dw-hdmi-qp.yaml       | 11 +++++++++++
 drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c     | 14 +++++++-------
 2 files changed, 18 insertions(+), 7 deletions(-)


base-commit: 18ff1dc462ef6dacba76ea9cb9a4fadb385d6ec4
-- 
Regards,

Laurent Pinchart



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property
  2025-10-27 22:26 [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
@ 2025-10-27 22:26 ` Laurent Pinchart
  2025-10-28 19:25   ` Conor Dooley
  2025-10-27 22:26 ` [PATCH v3 2/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct Laurent Pinchart
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2025-10-27 22:26 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, linux-arm-kernel, linux-rockchip, Sandy Huang,
	Heiko Stübner, Andy Yan, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Cristian Ciocaltea

From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>

Add an optional property to RK3588 HDMI TX Controller binding describing
a GPIO line to be asserted when operating in HDMI 2.1 FRL mode and
deasserted for HDMI 1.4/2.0 TMDS.

This is used to control an external voltage bias for HDMI data lines.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v2:

- Rename tmds-enable to frl-enable
- Replace "level shifter" with "voltage bias"
- Describe the behaviour when the property is absent
---
 .../display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml  | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml
index 96b4b088eebe..d649808c59da 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml
@@ -113,6 +113,14 @@ properties:
     description:
       Additional HDMI QP related data is accessed through VO GRF regs.
 
+  frl-enable-gpios:
+    description:
+      Optional GPIO line to be asserted when operating in HDMI 2.1 FRL mode and
+      deasserted for HDMI 1.4/2.0 TMDS. It can be used to control external
+      voltage bias for HDMI data lines. When not present the HDMI encoder will
+      operate in TMDS mode only.
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -132,8 +140,10 @@ unevaluatedProperties: false
 examples:
   - |
     #include <dt-bindings/clock/rockchip,rk3588-cru.h>
+    #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/pinctrl/rockchip.h>
     #include <dt-bindings/power/rk3588-power.h>
     #include <dt-bindings/reset/rockchip,rk3588-cru.h>
 
@@ -164,6 +174,7 @@ examples:
         rockchip,grf = <&sys_grf>;
         rockchip,vo-grf = <&vo1_grf>;
         #sound-dai-cells = <0>;
+        frl-enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_LOW>;
 
         ports {
           #address-cells = <1>;
-- 
Regards,

Laurent Pinchart



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 2/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct
  2025-10-27 22:26 [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
  2025-10-27 22:26 ` [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property Laurent Pinchart
@ 2025-10-27 22:26 ` Laurent Pinchart
  2025-11-13 22:09 ` [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
  2025-11-14 23:04 ` Heiko Stuebner
  3 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2025-10-27 22:26 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, linux-arm-kernel, linux-rockchip, Sandy Huang,
	Heiko Stübner, Andy Yan, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Cristian Ciocaltea

From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>

The name of the enable_gpio member in struct rockchip_hdmi_qp is too
generic, as initially "borrowed" from downstream BSP code. Moreover,
this hasn't been really in use so far, since there is neither a DT
providing an "enable-gpios" property to any of the "hdmi" nodes, nor a
binding documenting it.

The actual purpose of this GPIO line is to control the voltage bias for
the HDMI TX data lines when switching between TMDS and FRL operating
modes.

A previous patch introduced the "frl-enable-gpios" property of the
RK3588 HDMI TX Controller binding, hence pass the updated string to
devm_gpiod_get_optional(), rename the struct member accordingly and set
it to a low level.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v2:

- Rename tmds-enable to frl-enable
- Acquire the GPIO with GPIOD_OUT_LOW
---
 drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index 931343b072ad..36363136a695 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -92,7 +92,7 @@ struct rockchip_hdmi_qp {
 	struct rockchip_encoder encoder;
 	struct dw_hdmi_qp *hdmi;
 	struct phy *phy;
-	struct gpio_desc *enable_gpio;
+	struct gpio_desc *frl_enable_gpio;
 	struct delayed_work hpd_work;
 	int port_id;
 	const struct rockchip_hdmi_qp_ctrl_ops *ctrl_ops;
@@ -118,7 +118,7 @@ static void dw_hdmi_qp_rockchip_encoder_enable(struct drm_encoder *encoder)
 	unsigned long long rate;
 
 	/* Unconditionally switch to TMDS as FRL is not yet supported */
-	gpiod_set_value(hdmi->enable_gpio, 1);
+	gpiod_set_value(hdmi->frl_enable_gpio, 0);
 
 	if (crtc && crtc->state) {
 		rate = drm_hdmi_compute_mode_clock(&crtc->state->adjusted_mode,
@@ -515,11 +515,11 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
 	plat_data.ref_clk_rate = clk_get_rate(ref_clk);
 	clk_put(ref_clk);
 
-	hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
-						    GPIOD_OUT_HIGH);
-	if (IS_ERR(hdmi->enable_gpio))
-		return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->enable_gpio),
-				     "Failed to request enable GPIO\n");
+	hdmi->frl_enable_gpio = devm_gpiod_get_optional(hdmi->dev, "frl-enable",
+							GPIOD_OUT_LOW);
+	if (IS_ERR(hdmi->frl_enable_gpio))
+		return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->frl_enable_gpio),
+				     "Failed to request FRL enable GPIO\n");
 
 	hdmi->phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
 	if (IS_ERR(hdmi->phy))
-- 
Regards,

Laurent Pinchart



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property
  2025-10-27 22:26 ` [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property Laurent Pinchart
@ 2025-10-28 19:25   ` Conor Dooley
  0 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2025-10-28 19:25 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	Sandy Huang, Heiko Stübner, Andy Yan, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Cristian Ciocaltea

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

On Tue, Oct 28, 2025 at 12:26:40AM +0200, Laurent Pinchart wrote:
> From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> 
> Add an optional property to RK3588 HDMI TX Controller binding describing
> a GPIO line to be asserted when operating in HDMI 2.1 FRL mode and
> deasserted for HDMI 1.4/2.0 TMDS.
> 
> This is used to control an external voltage bias for HDMI data lines.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio
  2025-10-27 22:26 [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
  2025-10-27 22:26 ` [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property Laurent Pinchart
  2025-10-27 22:26 ` [PATCH v3 2/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct Laurent Pinchart
@ 2025-11-13 22:09 ` Laurent Pinchart
  2025-11-14 23:04 ` Heiko Stuebner
  3 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2025-11-13 22:09 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, linux-arm-kernel, linux-rockchip, Sandy Huang,
	Heiko Stübner, Andy Yan, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Cristian Ciocaltea

Andy, Heiko, Sandy, could one of you push this to drm-misc ?

On Tue, Oct 28, 2025 at 12:26:39AM +0200, Laurent Pinchart wrote:
> Hello,
> 
> The dw_hdmi_qp driver supports a "enable-gpios" DT property that is not
> documented in the corresponding DT bindings, and is not used in any
> upstream device tree sources. This patch series renames the property to
> "frl-enable-gpios" to express its purpose more clearly, and documents it
> in the bindings.
> 
> In the previous these two patches were part of "[PATCH v2 0/5] arm64:
> dts: rockchip: Add device tree for the Orange Pi CM5 Base board" ([1]).
> I have split them from the Orange Pi CM5 Base DT and rebased them on top
> of the drm-misc-next branch to ease integration.
> 
> The other main change compared to v2 is the rename of the property from
> "tmds-enable-gpios" to "frl-enable-gpios".
> 
> [1] https://lore.kernel.org/all/20251005235542.1017-1-laurent.pinchart@ideasonboard.com/
> 
> Cristian Ciocaltea (2):
>   dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property
>   drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main
>     struct
> 
>  .../rockchip/rockchip,rk3588-dw-hdmi-qp.yaml       | 11 +++++++++++
>  drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c     | 14 +++++++-------
>  2 files changed, 18 insertions(+), 7 deletions(-)
> 
> 
> base-commit: 18ff1dc462ef6dacba76ea9cb9a4fadb385d6ec4

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio
  2025-10-27 22:26 [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
                   ` (2 preceding siblings ...)
  2025-11-13 22:09 ` [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
@ 2025-11-14 23:04 ` Heiko Stuebner
  3 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2025-11-14 23:04 UTC (permalink / raw)
  To: dri-devel, Laurent Pinchart
  Cc: Heiko Stuebner, devicetree, linux-arm-kernel, linux-rockchip,
	Sandy Huang, Andy Yan, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Cristian Ciocaltea


On Tue, 28 Oct 2025 00:26:39 +0200, Laurent Pinchart wrote:
> The dw_hdmi_qp driver supports a "enable-gpios" DT property that is not
> documented in the corresponding DT bindings, and is not used in any
> upstream device tree sources. This patch series renames the property to
> "frl-enable-gpios" to express its purpose more clearly, and documents it
> in the bindings.
> 
> In the previous these two patches were part of "[PATCH v2 0/5] arm64:
> dts: rockchip: Add device tree for the Orange Pi CM5 Base board" ([1]).
> I have split them from the Orange Pi CM5 Base DT and rebased them on top
> of the drm-misc-next branch to ease integration.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property
      commit: ca408d8d93d33423cafe3046f40bcc81bc6ee5f3
[2/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct
      commit: 53dd063bb6b342ca00d2a0c138ba58807a690417

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-14 23:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 22:26 [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
2025-10-27 22:26 ` [PATCH v3 1/2] dt-bindings: display: rk3588-dw-hdmi-qp: Add frl-enable-gpios property Laurent Pinchart
2025-10-28 19:25   ` Conor Dooley
2025-10-27 22:26 ` [PATCH v3 2/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct Laurent Pinchart
2025-11-13 22:09 ` [PATCH v3 0/2] drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio Laurent Pinchart
2025-11-14 23:04 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).