2023-06-18 10:23:14

by Svyatoslav Ryhel

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: tegra: transformers: add connector node

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 <[email protected]> # ASUS TF T30
Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
Signed-off-by: Svyatoslav Ryhel <[email protected]>
---
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



2023-07-27 15:28:51

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node

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 <[email protected]> # ASUS TF T30
> Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
> Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
> Signed-off-by: Svyatoslav Ryhel <[email protected]>
> ---
> 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


Attachments:
(No filename) (1.50 kB)
signature.asc (849.00 B)
Download all attachments

2023-07-27 17:25:19

by Svyatoslav Ryhel

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node



27 липня 2023 р. 19:50:35 GMT+03:00, Thierry Reding <[email protected]> написав(-ла):
>On Thu, Jul 27, 2023 at 07:26:28PM +0300, Svyatoslav Ryhel wrote:
>>
>>
>> 27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <[email protected]> написав(-ла):
>> >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 <[email protected]> # ASUS TF T30
>> >> Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
>> >> Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
>> >> Signed-off-by: Svyatoslav Ryhel <[email protected]>
>> >> ---
>> >> 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

2023-07-27 17:33:45

by Svyatoslav Ryhel

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node



27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <[email protected]> написав(-ла):
>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 <[email protected]> # ASUS TF T30
>> Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
>> Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
>> Signed-off-by: Svyatoslav Ryhel <[email protected]>
>> ---
>> 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

2023-07-27 17:59:00

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node

On Thu, Jul 27, 2023 at 07:26:28PM +0300, Svyatoslav Ryhel wrote:
>
>
> 27 липня 2023 р. 18:11:15 GMT+03:00, Thierry Reding <[email protected]> написав(-ла):
> >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 <[email protected]> # ASUS TF T30
> >> Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
> >> Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
> >> Signed-off-by: Svyatoslav Ryhel <[email protected]>
> >> ---
> >> 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


Attachments:
(No filename) (1.98 kB)
signature.asc (849.00 B)
Download all attachments

2023-08-01 21:56:56

by Maxim Schwalm

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: tegra: transformers: add connector node

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 <[email protected]> написав(-ла):
>>> 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 <[email protected]> # ASUS TF T30
>>>> Tested-by: Robert Eckelmann <[email protected]> # ASUS TF101 T20
>>>> Tested-by: Svyatoslav Ryhel <[email protected]> # ASUS TF201 T30
>>>> Signed-off-by: Svyatoslav Ryhel <[email protected]>
>>>> ---
>>>> 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