dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Support bridge/connector by Tegra HDMI
@ 2023-06-18  8:50 Svyatoslav Ryhel
  2023-06-18  8:50 ` [PATCH v2 1/2] drm/tegra: output: hdmi: Support bridge/connector Svyatoslav Ryhel
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-06-18  8:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Mikko Perttunen, David Airlie, Daniel Vetter,
	Svyatoslav Ryhel, Maxim Schwalm, Dmitry Osipenko
  Cc: linux-tegra, devicetree, linux-kernel, dri-devel

This patch adds support for the bridge/connector attached to the
HDMI output, allowing to model the hardware properly. It keeps
backwards compatibility with existing bindings and is required
by devices which have a simple or MHL bridge connected to HDMI
output like ASUS P1801-T or LG P880/P895 or HTC One X.

Tested on ASUS Transformers which have no dedicated bridge but
have type d HDMI connector directly available. Tests went smoothly.

---

Chandes from v1:
- no changes, re-sending

---

Maxim Schwalm (1):
  drm/tegra: output: hdmi: Support bridge/connector

Svyatoslav Ryhel (1):
  ARM: tegra: transformers: add connector node

 arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++--
 .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++-
 drivers/gpu/drm/tegra/hdmi.c                  | 44 ++++++++++++++-----
 3 files changed, 71 insertions(+), 16 deletions(-)

-- 
2.39.2


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

* [PATCH v2 1/2] drm/tegra: output: hdmi: Support bridge/connector
  2023-06-18  8:50 [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Svyatoslav Ryhel
@ 2023-06-18  8:50 ` Svyatoslav Ryhel
  2023-06-18  8:50 ` [PATCH v2 2/2] ARM: tegra: transformers: add connector node Svyatoslav Ryhel
  2023-07-27 15:09 ` [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Thierry Reding
  2 siblings, 0 replies; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-06-18  8:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Mikko Perttunen, David Airlie, Daniel Vetter,
	Svyatoslav Ryhel, Maxim Schwalm, Dmitry Osipenko
  Cc: linux-tegra, devicetree, linux-kernel, dri-devel

From: Maxim Schwalm <maxim.schwalm@gmail.com>

Some Tegra device-trees may specify a video output graph, which involves
MHL bridge/simple bridge and/or connector framework. This patch adds
support for the bridge/connector attached to the HDMI output, allowing
us to model the hardware properly.

Inspired by: 29efdc2 ("drm/tegra: output: rgb: Support LVDS encoder bridge")

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
Tested-by: Maxim Schwalm <maxim.schwalm@gmail.com> # ASUS P1801-T T30
Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/tegra/hdmi.c | 44 +++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 6eac54ae1205..a5b12b169e57 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -19,6 +19,7 @@
 #include <soc/tegra/common.h>
 #include <sound/hdmi-codec.h>
 
+#include <drm/drm_bridge_connector.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_debugfs.h>
@@ -1544,26 +1545,47 @@ static int tegra_hdmi_init(struct host1x_client *client)
 {
 	struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client);
 	struct drm_device *drm = dev_get_drvdata(client->host);
+	struct drm_connector *connector;
 	int err;
 
 	hdmi->output.dev = client->dev;
 
-	drm_connector_init_with_ddc(drm, &hdmi->output.connector,
-				    &tegra_hdmi_connector_funcs,
-				    DRM_MODE_CONNECTOR_HDMIA,
-				    hdmi->output.ddc);
-	drm_connector_helper_add(&hdmi->output.connector,
-				 &tegra_hdmi_connector_helper_funcs);
-	hdmi->output.connector.dpms = DRM_MODE_DPMS_OFF;
-
 	drm_simple_encoder_init(drm, &hdmi->output.encoder,
 				DRM_MODE_ENCODER_TMDS);
 	drm_encoder_helper_add(&hdmi->output.encoder,
 			       &tegra_hdmi_encoder_helper_funcs);
 
-	drm_connector_attach_encoder(&hdmi->output.connector,
-					  &hdmi->output.encoder);
-	drm_connector_register(&hdmi->output.connector);
+	if (hdmi->output.bridge) {
+		err = drm_bridge_attach(&hdmi->output.encoder, hdmi->output.bridge,
+					NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+		if (err) {
+			dev_err(client->dev, "failed to attach bridge: %d\n",
+				err);
+			return err;
+		}
+
+		connector = drm_bridge_connector_init(drm, &hdmi->output.encoder);
+		if (IS_ERR(connector)) {
+			dev_err(client->dev,
+				"failed to initialize bridge connector: %pe\n",
+				connector);
+			return PTR_ERR(connector);
+		}
+
+		drm_connector_attach_encoder(connector, &hdmi->output.encoder);
+	} else {
+		drm_connector_init_with_ddc(drm, &hdmi->output.connector,
+					    &tegra_hdmi_connector_funcs,
+					    DRM_MODE_CONNECTOR_HDMIA,
+					    hdmi->output.ddc);
+		drm_connector_helper_add(&hdmi->output.connector,
+					 &tegra_hdmi_connector_helper_funcs);
+		hdmi->output.connector.dpms = DRM_MODE_DPMS_OFF;
+
+		drm_connector_attach_encoder(&hdmi->output.connector,
+					     &hdmi->output.encoder);
+		drm_connector_register(&hdmi->output.connector);
+	}
 
 	err = tegra_output_init(drm, &hdmi->output);
 	if (err < 0) {
-- 
2.39.2


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

* [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-06-18  8:50 [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Svyatoslav Ryhel
  2023-06-18  8:50 ` [PATCH v2 1/2] drm/tegra: output: hdmi: Support bridge/connector Svyatoslav Ryhel
@ 2023-06-18  8:50 ` Svyatoslav Ryhel
  2023-07-27 15:11   ` Thierry Reding
  2023-07-27 15:09 ` [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Thierry Reding
  2 siblings, 1 reply; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-06-18  8:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Mikko Perttunen, David Airlie, Daniel Vetter,
	Svyatoslav Ryhel, Maxim Schwalm, Dmitry Osipenko
  Cc: linux-tegra, devicetree, linux-kernel, dri-devel

All ASUS Transformers have micro-HDMI connector directly available.
After Tegra HDMI got bridge/connector support, we should use connector
framework for proper HW description.

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
 .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
 2 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
index c2a9c3fb5b33..97350f566539 100644
--- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
+++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
@@ -82,9 +82,11 @@ hdmi@54280000 {
 			pll-supply = <&hdmi_pll_reg>;
 			hdmi-supply = <&vdd_hdmi_en>;
 
-			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
-			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
-				GPIO_ACTIVE_HIGH>;
+			port@0 {
+				hdmi_out: endpoint {
+					remote-endpoint = <&connector_in>;
+				};
+			};
 		};
 	};
 
@@ -963,6 +965,20 @@ clk32k_in: clock-32k-in {
 		#clock-cells = <0>;
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "d";
+
+		hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+		ddc-i2c-bus = <&hdmi_ddc>;
+
+		port {
+			connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+
 	cpus {
 		cpu0: cpu@0 {
 			cpu-supply = <&vdd_cpu>;
diff --git a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi
index bdb898ad6262..153d34a012bd 100644
--- a/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi
+++ b/arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi
@@ -80,8 +80,11 @@ hdmi: hdmi@54280000 {
 			pll-supply = <&vdd_1v8_vio>;
 			vdd-supply = <&vdd_3v3_sys>;
 
-			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
-			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
+			port@0 {
+				hdmi_out: endpoint {
+					remote-endpoint = <&connector_in>;
+				};
+			};
 		};
 	};
 
@@ -1492,6 +1495,20 @@ clk32k_in: clock-32k {
 		clock-output-names = "pmic-oscillator";
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "d";
+
+		hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+		ddc-i2c-bus = <&hdmi_ddc>;
+
+		port {
+			connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+
 	cpus {
 		cpu0: cpu@0 {
 			cpu-supply = <&vdd_cpu>;
-- 
2.39.2


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

* Re: [PATCH v2 0/2] Support bridge/connector by Tegra HDMI
  2023-06-18  8:50 [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Svyatoslav Ryhel
  2023-06-18  8:50 ` [PATCH v2 1/2] drm/tegra: output: hdmi: Support bridge/connector Svyatoslav Ryhel
  2023-06-18  8:50 ` [PATCH v2 2/2] ARM: tegra: transformers: add connector node Svyatoslav Ryhel
@ 2023-07-27 15:09 ` Thierry Reding
  2023-07-27 16:24   ` Svyatoslav Ryhel
  2 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2023-07-27 15:09 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter

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

On Sun, Jun 18, 2023 at 11:50:44AM +0300, Svyatoslav Ryhel wrote:
> This patch adds support for the bridge/connector attached to the
> HDMI output, allowing to model the hardware properly. It keeps
> backwards compatibility with existing bindings and is required
> by devices which have a simple or MHL bridge connected to HDMI
> output like ASUS P1801-T or LG P880/P895 or HTC One X.
> 
> Tested on ASUS Transformers which have no dedicated bridge but
> have type d HDMI connector directly available. Tests went smoothly.

If I understand correctly, we still need the drm/tegra patch to be
applied before the DT change, otherwise the driver won't know what to do
about the connector, right?

That shouldn't be big problem, but it means that the patches need to be
staged in correctly to avoid breaking things.

Thierry

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

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

* Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-06-18  8:50 ` [PATCH v2 2/2] ARM: tegra: transformers: add connector node Svyatoslav Ryhel
@ 2023-07-27 15:11   ` Thierry Reding
  2023-07-27 16:26     ` Svyatoslav Ryhel
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2023-07-27 15:11 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter

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

On Sun, Jun 18, 2023 at 11:50:46AM +0300, Svyatoslav Ryhel wrote:
> All ASUS Transformers have micro-HDMI connector directly available.
> After Tegra HDMI got bridge/connector support, we should use connector
> framework for proper HW description.
> 
> Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
> Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
>  .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
>  2 files changed, 38 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
> index c2a9c3fb5b33..97350f566539 100644
> --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
> +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
> @@ -82,9 +82,11 @@ hdmi@54280000 {
>  			pll-supply = <&hdmi_pll_reg>;
>  			hdmi-supply = <&vdd_hdmi_en>;
>  
> -			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
> -			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
> -				GPIO_ACTIVE_HIGH>;
> +			port@0 {
> +				hdmi_out: endpoint {
> +					remote-endpoint = <&connector_in>;
> +				};
> +			};

Does this need a bindings change? nvidia,tegra20-hdmi currently doesn't
support OF graphs, so this would probably fail to validate if we merge
it without a corresponding DT bindings update.

Thierry

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

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

* Re: [PATCH v2 0/2] Support bridge/connector by Tegra HDMI
  2023-07-27 15:09 ` [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Thierry Reding
@ 2023-07-27 16:24   ` Svyatoslav Ryhel
  2023-07-27 16:52     ` Thierry Reding
  0 siblings, 1 reply; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-07-27 16:24 UTC (permalink / raw)
  To: Thierry Reding
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter



27 липня 2023 р. 18:09:22 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
>On Sun, Jun 18, 2023 at 11:50:44AM +0300, Svyatoslav Ryhel wrote:
>> This patch adds support for the bridge/connector attached to the
>> HDMI output, allowing to model the hardware properly. It keeps
>> backwards compatibility with existing bindings and is required
>> by devices which have a simple or MHL bridge connected to HDMI
>> output like ASUS P1801-T or LG P880/P895 or HTC One X.
>> 
>> Tested on ASUS Transformers which have no dedicated bridge but
>> have type d HDMI connector directly available. Tests went smoothly.
>
>If I understand correctly, we still need the drm/tegra patch to be
>applied before the DT change, otherwise the driver won't know what to do
>about the connector, right?
>
>That shouldn't be big problem, but it means that the patches need to be
>staged in correctly to avoid breaking things.

Patchset contains drm/tegra patch

>Thierry

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

* Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-07-27 15:11   ` Thierry Reding
@ 2023-07-27 16:26     ` Svyatoslav Ryhel
  2023-07-27 16:50       ` Thierry Reding
  0 siblings, 1 reply; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-07-27 16:26 UTC (permalink / raw)
  To: Thierry Reding
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter



27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
>On Sun, Jun 18, 2023 at 11:50:46AM +0300, Svyatoslav Ryhel wrote:
>> All ASUS Transformers have micro-HDMI connector directly available.
>> After Tegra HDMI got bridge/connector support, we should use connector
>> framework for proper HW description.
>> 
>> Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
>> Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
>> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
>> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>> ---
>>  arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
>>  .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
>>  2 files changed, 38 insertions(+), 5 deletions(-)
>> 
>> diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> index c2a9c3fb5b33..97350f566539 100644
>> --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> @@ -82,9 +82,11 @@ hdmi@54280000 {
>>  			pll-supply = <&hdmi_pll_reg>;
>>  			hdmi-supply = <&vdd_hdmi_en>;
>>  
>> -			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
>> -			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
>> -				GPIO_ACTIVE_HIGH>;
>> +			port@0 {
>> +				hdmi_out: endpoint {
>> +					remote-endpoint = <&connector_in>;
>> +				};
>> +			};
>
>Does this need a bindings change? nvidia,tegra20-hdmi currently doesn't
>support OF graphs, so this would probably fail to validate if we merge
>it without a corresponding DT bindings update.

drm/tegra patch is backwards compatible and connector node is optional.

>Thierry

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

* Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-07-27 16:26     ` Svyatoslav Ryhel
@ 2023-07-27 16:50       ` Thierry Reding
  2023-07-27 16:52         ` Svyatoslav Ryhel
  2023-08-01 21:29         ` Maxim Schwalm
  0 siblings, 2 replies; 11+ messages in thread
From: Thierry Reding @ 2023-07-27 16:50 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter

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

On Thu, Jul 27, 2023 at 07:26:28PM +0300, Svyatoslav Ryhel wrote:
> 
> 
> 27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
> >On Sun, Jun 18, 2023 at 11:50:46AM +0300, Svyatoslav Ryhel wrote:
> >> All ASUS Transformers have micro-HDMI connector directly available.
> >> After Tegra HDMI got bridge/connector support, we should use connector
> >> framework for proper HW description.
> >> 
> >> Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
> >> Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
> >> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
> >> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> >> ---
> >>  arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
> >>  .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
> >>  2 files changed, 38 insertions(+), 5 deletions(-)
> >> 
> >> diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
> >> index c2a9c3fb5b33..97350f566539 100644
> >> --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
> >> +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
> >> @@ -82,9 +82,11 @@ hdmi@54280000 {
> >>  			pll-supply = <&hdmi_pll_reg>;
> >>  			hdmi-supply = <&vdd_hdmi_en>;
> >>  
> >> -			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
> >> -			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
> >> -				GPIO_ACTIVE_HIGH>;
> >> +			port@0 {
> >> +				hdmi_out: endpoint {
> >> +					remote-endpoint = <&connector_in>;
> >> +				};
> >> +			};
> >
> >Does this need a bindings change? nvidia,tegra20-hdmi currently doesn't
> >support OF graphs, so this would probably fail to validate if we merge
> >it without a corresponding DT bindings update.
> 
> drm/tegra patch is backwards compatible and connector node is optional.

We still need to document the connector node, otherwise the DT
validation will complain about port@0 being used here, won't it?

Thierry

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

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

* Re: [PATCH v2 0/2] Support bridge/connector by Tegra HDMI
  2023-07-27 16:24   ` Svyatoslav Ryhel
@ 2023-07-27 16:52     ` Thierry Reding
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2023-07-27 16:52 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter

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

On Thu, Jul 27, 2023 at 07:24:56PM +0300, Svyatoslav Ryhel wrote:
> 
> 
> 27 липня 2023 р. 18:09:22 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
> >On Sun, Jun 18, 2023 at 11:50:44AM +0300, Svyatoslav Ryhel wrote:
> >> This patch adds support for the bridge/connector attached to the
> >> HDMI output, allowing to model the hardware properly. It keeps
> >> backwards compatibility with existing bindings and is required
> >> by devices which have a simple or MHL bridge connected to HDMI
> >> output like ASUS P1801-T or LG P880/P895 or HTC One X.
> >> 
> >> Tested on ASUS Transformers which have no dedicated bridge but
> >> have type d HDMI connector directly available. Tests went smoothly.
> >
> >If I understand correctly, we still need the drm/tegra patch to be
> >applied before the DT change, otherwise the driver won't know what to do
> >about the connector, right?
> >
> >That shouldn't be big problem, but it means that the patches need to be
> >staged in correctly to avoid breaking things.
> 
> Patchset contains drm/tegra patch

I understand, but my point is that if we apply the DT patch before the
driver patch, then the display won't be correctly initialized because
the old driver code only looks within the HDMI node for the additional
properties. Only after the drm/tegra patch is applied will the move in
DT be recognized by the driver.

So for now I've picked up the drm/tegra patch and then I'll apply the DT
change later on.

Thierry

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

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

* Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-07-27 16:50       ` Thierry Reding
@ 2023-07-27 16:52         ` Svyatoslav Ryhel
  2023-08-01 21:29         ` Maxim Schwalm
  1 sibling, 0 replies; 11+ messages in thread
From: Svyatoslav Ryhel @ 2023-07-27 16:52 UTC (permalink / raw)
  To: Thierry Reding
  Cc: devicetree, Conor Dooley, Maxim Schwalm, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter



27 липня 2023 р. 19:50:35 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
>On Thu, Jul 27, 2023 at 07:26:28PM +0300, Svyatoslav Ryhel wrote:
>> 
>> 
>> 27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
>> >On Sun, Jun 18, 2023 at 11:50:46AM +0300, Svyatoslav Ryhel wrote:
>> >> All ASUS Transformers have micro-HDMI connector directly available.
>> >> After Tegra HDMI got bridge/connector support, we should use connector
>> >> framework for proper HW description.
>> >> 
>> >> Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
>> >> Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
>> >> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
>> >> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>> >> ---
>> >>  arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
>> >>  .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
>> >>  2 files changed, 38 insertions(+), 5 deletions(-)
>> >> 
>> >> diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> >> index c2a9c3fb5b33..97350f566539 100644
>> >> --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> >> +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>> >> @@ -82,9 +82,11 @@ hdmi@54280000 {
>> >>  			pll-supply = <&hdmi_pll_reg>;
>> >>  			hdmi-supply = <&vdd_hdmi_en>;
>> >>  
>> >> -			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
>> >> -			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
>> >> -				GPIO_ACTIVE_HIGH>;
>> >> +			port@0 {
>> >> +				hdmi_out: endpoint {
>> >> +					remote-endpoint = <&connector_in>;
>> >> +				};
>> >> +			};
>> >
>> >Does this need a bindings change? nvidia,tegra20-hdmi currently doesn't
>> >support OF graphs, so this would probably fail to validate if we merge
>> >it without a corresponding DT bindings update.
>> 
>> drm/tegra patch is backwards compatible and connector node is optional.
>
>We still need to document the connector node, otherwise the DT
>validation will complain about port@0 being used here, won't it?

Honestly? I have no idea, linux dt yamls are my nightmare and a reason why most of my patches still are hanging in the void of mailing lists.

>Thierry

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

* Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node
  2023-07-27 16:50       ` Thierry Reding
  2023-07-27 16:52         ` Svyatoslav Ryhel
@ 2023-08-01 21:29         ` Maxim Schwalm
  1 sibling, 0 replies; 11+ messages in thread
From: Maxim Schwalm @ 2023-08-01 21:29 UTC (permalink / raw)
  To: Thierry Reding, Svyatoslav Ryhel
  Cc: devicetree, Conor Dooley, linux-kernel, dri-devel,
	Mikko Perttunen, Rob Herring, Krzysztof Kozlowski, linux-tegra,
	Dmitry Osipenko, Jonathan Hunter

Hi,

On 27.07.23 18:50, Thierry Reding wrote:
> On Thu, Jul 27, 2023 at 07:26:28PM +0300, Svyatoslav Ryhel wrote:
>>
>>
>> 27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
>>> On Sun, Jun 18, 2023 at 11:50:46AM +0300, Svyatoslav Ryhel wrote:
>>>> All ASUS Transformers have micro-HDMI connector directly available.
>>>> After Tegra HDMI got bridge/connector support, we should use connector
>>>> framework for proper HW description.
>>>>
>>>> Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30
>>>> Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
>>>> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF201 T30
>>>> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>>>> ---
>>>>  arch/arm/boot/dts/tegra20-asus-tf101.dts      | 22 ++++++++++++++++---
>>>>  .../dts/tegra30-asus-transformer-common.dtsi  | 21 ++++++++++++++++--
>>>>  2 files changed, 38 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>>>> index c2a9c3fb5b33..97350f566539 100644
>>>> --- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
>>>> +++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
>>>> @@ -82,9 +82,11 @@ hdmi@54280000 {
>>>>  			pll-supply = <&hdmi_pll_reg>;
>>>>  			hdmi-supply = <&vdd_hdmi_en>;
>>>>  
>>>> -			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
>>>> -			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
>>>> -				GPIO_ACTIVE_HIGH>;
>>>> +			port@0 {
>>>> +				hdmi_out: endpoint {
>>>> +					remote-endpoint = <&connector_in>;
>>>> +				};
>>>> +			};
>>>
>>> Does this need a bindings change? nvidia,tegra20-hdmi currently doesn't
>>> support OF graphs, so this would probably fail to validate if we merge
>>> it without a corresponding DT bindings update.
>>
>> drm/tegra patch is backwards compatible and connector node is optional.
> 
> We still need to document the connector node, otherwise the DT
> validation will complain about port@0 being used here, won't it?

this change indeed causes several new warnings:

    /mnt/linux/.output/arch/arm/boot/dts/tegra20-asus-tf101.dtb: hdmi@54280000: 'port@0' does not match any of the regexes: 'pinctrl-[0-9]+'
            From schema: /mnt/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-hdmi.yaml
    /mnt/linux/.output/arch/arm/boot/dts/tegra20-asus-tf101.dtb: hdmi@54280000: 'nvidia,ddc-i2c-bus' is a required property
            From schema: /mnt/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-hdmi.yaml
    /mnt/linux/.output/arch/arm/boot/dts/tegra20-asus-tf101.dtb: hdmi@54280000: 'nvidia,hpd-gpio' is a required property
            From schema: /mnt/linux/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-hdmi.yaml

BTW, the parallel RGB port isn't properly documented in nvidia,tegra20-dc either.

Best regards,
Maxim

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

end of thread, other threads:[~2023-08-02  7:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-18  8:50 [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Svyatoslav Ryhel
2023-06-18  8:50 ` [PATCH v2 1/2] drm/tegra: output: hdmi: Support bridge/connector Svyatoslav Ryhel
2023-06-18  8:50 ` [PATCH v2 2/2] ARM: tegra: transformers: add connector node Svyatoslav Ryhel
2023-07-27 15:11   ` Thierry Reding
2023-07-27 16:26     ` Svyatoslav Ryhel
2023-07-27 16:50       ` Thierry Reding
2023-07-27 16:52         ` Svyatoslav Ryhel
2023-08-01 21:29         ` Maxim Schwalm
2023-07-27 15:09 ` [PATCH v2 0/2] Support bridge/connector by Tegra HDMI Thierry Reding
2023-07-27 16:24   ` Svyatoslav Ryhel
2023-07-27 16:52     ` Thierry Reding

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).