diff mbox series

[2/2] ARM: tegra: Move panels to AUX bus

Message ID 20211220104855.428290-3-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/tegra: Fix panel support on Venice 2 and Nyan | expand

Commit Message

Thierry Reding Dec. 20, 2021, 10:48 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

Move the eDP panel on Venice 2 and Nyan boards into the corresponding
AUX bus device tree node. This allows us to avoid a nasty circular
dependency that would otherwise be created between the DPAUX and panel
nodes via the DDC/I2C phandle.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm/boot/dts/tegra124-nyan-big.dts   | 15 +++++++++------
 arch/arm/boot/dts/tegra124-nyan-blaze.dts | 15 +++++++++------
 arch/arm/boot/dts/tegra124-venice2.dts    | 14 +++++++-------
 3 files changed, 25 insertions(+), 19 deletions(-)

Comments

Dmitry Osipenko Dec. 22, 2021, 7:30 p.m. UTC | #1
20.12.2021 13:48, Thierry Reding пишет:
> From: Thierry Reding <treding@nvidia.com>
> 
> Move the eDP panel on Venice 2 and Nyan boards into the corresponding
> AUX bus device tree node. This allows us to avoid a nasty circular
> dependency that would otherwise be created between the DPAUX and panel
> nodes via the DDC/I2C phandle.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  arch/arm/boot/dts/tegra124-nyan-big.dts   | 15 +++++++++------
>  arch/arm/boot/dts/tegra124-nyan-blaze.dts | 15 +++++++++------
>  arch/arm/boot/dts/tegra124-venice2.dts    | 14 +++++++-------
>  3 files changed, 25 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
> index 1d2aac2cb6d0..fdc1d64dfff9 100644
> --- a/arch/arm/boot/dts/tegra124-nyan-big.dts
> +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
> @@ -13,12 +13,15 @@ / {
>  		     "google,nyan-big-rev1", "google,nyan-big-rev0",
>  		     "google,nyan-big", "google,nyan", "nvidia,tegra124";
>  
> -	panel: panel {
> -		compatible = "auo,b133xtn01";
> -
> -		power-supply = <&vdd_3v3_panel>;
> -		backlight = <&backlight>;
> -		ddc-i2c-bus = <&dpaux>;
> +	host1x@50000000 {
> +		dpaux@545c0000 {
> +			aux-bus {
> +				panel: panel {
> +					compatible = "auo,b133xtn01";
> +					backlight = <&backlight>;
> +				};
> +			};
> +		};
>  	};
>  
>  	mmc@700b0400 { /* SD Card on this bus */
> diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> index 677babde6460..abdf4456826f 100644
> --- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> +++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> @@ -15,12 +15,15 @@ / {
>  		     "google,nyan-blaze-rev0", "google,nyan-blaze",
>  		     "google,nyan", "nvidia,tegra124";
>  
> -	panel: panel {
> -		compatible = "samsung,ltn140at29-301";
> -
> -		power-supply = <&vdd_3v3_panel>;
> -		backlight = <&backlight>;
> -		ddc-i2c-bus = <&dpaux>;
> +	host1x@50000000 {
> +		dpaux@545c0000 {
> +			aux-bus {
> +				panel: panel {
> +					compatible = "samsung,ltn140at29-301";
> +					backlight = <&backlight>;
> +				};
> +			};
> +		};
>  	};
>  
>  	sound {
> diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
> index 232c90604df9..6a9592ceb5f2 100644
> --- a/arch/arm/boot/dts/tegra124-venice2.dts
> +++ b/arch/arm/boot/dts/tegra124-venice2.dts
> @@ -48,6 +48,13 @@ sor@54540000 {
>  		dpaux@545c0000 {
>  			vdd-supply = <&vdd_3v3_panel>;
>  			status = "okay";
> +
> +			aux-bus {
> +				panel: panel {
> +					compatible = "lg,lp129qe";
> +					backlight = <&backlight>;
> +				};
> +			};
>  		};
>  	};
>  
> @@ -1080,13 +1087,6 @@ power {
>  		};
>  	};
>  
> -	panel: panel {
> -		compatible = "lg,lp129qe";
> -		power-supply = <&vdd_3v3_panel>;
> -		backlight = <&backlight>;
> -		ddc-i2c-bus = <&dpaux>;
> -	};
> -
>  	vdd_mux: regulator-mux {
>  		compatible = "regulator-fixed";
>  		regulator-name = "+VDD_MUX";
> 

You should add stable tag for 5.15 and also add separate patch to update
the new arch/arm/boot/dts/tegra124-nyan-big-fhd.dts which we have in
-next now.
Doug Anderson Jan. 6, 2022, 1:02 a.m. UTC | #2
Hi,

On Mon, Dec 20, 2021 at 2:49 AM Thierry Reding <thierry.reding@gmail.com> wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> Move the eDP panel on Venice 2 and Nyan boards into the corresponding
> AUX bus device tree node. This allows us to avoid a nasty circular
> dependency that would otherwise be created between the DPAUX and panel
> nodes via the DDC/I2C phandle.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  arch/arm/boot/dts/tegra124-nyan-big.dts   | 15 +++++++++------
>  arch/arm/boot/dts/tegra124-nyan-blaze.dts | 15 +++++++++------
>  arch/arm/boot/dts/tegra124-venice2.dts    | 14 +++++++-------
>  3 files changed, 25 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
> index 1d2aac2cb6d0..fdc1d64dfff9 100644
> --- a/arch/arm/boot/dts/tegra124-nyan-big.dts
> +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
> @@ -13,12 +13,15 @@ / {
>                      "google,nyan-big-rev1", "google,nyan-big-rev0",
>                      "google,nyan-big", "google,nyan", "nvidia,tegra124";
>
> -       panel: panel {
> -               compatible = "auo,b133xtn01";
> -
> -               power-supply = <&vdd_3v3_panel>;

You remove the "power-supply" line here but don't add it below. Isn't
that a problem? power-supply for the panel is listed as "required" in
the panel dt bindings so I presume this will increase validation
warnings?


> -               backlight = <&backlight>;
> -               ddc-i2c-bus = <&dpaux>;
> +       host1x@50000000 {
> +               dpaux@545c0000 {

Optional nit: on other SoC dts files I've always had the policy to try
to avoid replicating hierarchies like this (host1x@50000000 =>
dpaux@545c0000). Instead I'd express this as:

&dpaux {
  aux-bux {
    panel: panel {
      ...
    };
  };
};


> +                       aux-bus {
> +                               panel: panel {
> +                                       compatible = "auo,b133xtn01";
> +                                       backlight = <&backlight>;

nit: In theory the "backlight" could go in tegra124-nyan.dtsi, right?
Then you just need to override the compatible...


-Doug
Dmitry Osipenko March 6, 2022, 5:59 p.m. UTC | #3
22.12.2021 22:30, Dmitry Osipenko пишет:
> 20.12.2021 13:48, Thierry Reding пишет:
>> From: Thierry Reding <treding@nvidia.com>
>>
>> Move the eDP panel on Venice 2 and Nyan boards into the corresponding
>> AUX bus device tree node. This allows us to avoid a nasty circular
>> dependency that would otherwise be created between the DPAUX and panel
>> nodes via the DDC/I2C phandle.
>>
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>>  arch/arm/boot/dts/tegra124-nyan-big.dts   | 15 +++++++++------
>>  arch/arm/boot/dts/tegra124-nyan-blaze.dts | 15 +++++++++------
>>  arch/arm/boot/dts/tegra124-venice2.dts    | 14 +++++++-------
>>  3 files changed, 25 insertions(+), 19 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
>> index 1d2aac2cb6d0..fdc1d64dfff9 100644
>> --- a/arch/arm/boot/dts/tegra124-nyan-big.dts
>> +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
>> @@ -13,12 +13,15 @@ / {
>>  		     "google,nyan-big-rev1", "google,nyan-big-rev0",
>>  		     "google,nyan-big", "google,nyan", "nvidia,tegra124";
>>  
>> -	panel: panel {
>> -		compatible = "auo,b133xtn01";
>> -
>> -		power-supply = <&vdd_3v3_panel>;
>> -		backlight = <&backlight>;
>> -		ddc-i2c-bus = <&dpaux>;
>> +	host1x@50000000 {
>> +		dpaux@545c0000 {
>> +			aux-bus {
>> +				panel: panel {
>> +					compatible = "auo,b133xtn01";
>> +					backlight = <&backlight>;
>> +				};
>> +			};
>> +		};
>>  	};
>>  
>>  	mmc@700b0400 { /* SD Card on this bus */
>> diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
>> index 677babde6460..abdf4456826f 100644
>> --- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts
>> +++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
>> @@ -15,12 +15,15 @@ / {
>>  		     "google,nyan-blaze-rev0", "google,nyan-blaze",
>>  		     "google,nyan", "nvidia,tegra124";
>>  
>> -	panel: panel {
>> -		compatible = "samsung,ltn140at29-301";
>> -
>> -		power-supply = <&vdd_3v3_panel>;
>> -		backlight = <&backlight>;
>> -		ddc-i2c-bus = <&dpaux>;
>> +	host1x@50000000 {
>> +		dpaux@545c0000 {
>> +			aux-bus {
>> +				panel: panel {
>> +					compatible = "samsung,ltn140at29-301";
>> +					backlight = <&backlight>;
>> +				};
>> +			};
>> +		};
>>  	};
>>  
>>  	sound {
>> diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
>> index 232c90604df9..6a9592ceb5f2 100644
>> --- a/arch/arm/boot/dts/tegra124-venice2.dts
>> +++ b/arch/arm/boot/dts/tegra124-venice2.dts
>> @@ -48,6 +48,13 @@ sor@54540000 {
>>  		dpaux@545c0000 {
>>  			vdd-supply = <&vdd_3v3_panel>;
>>  			status = "okay";
>> +
>> +			aux-bus {
>> +				panel: panel {
>> +					compatible = "lg,lp129qe";
>> +					backlight = <&backlight>;
>> +				};
>> +			};
>>  		};
>>  	};
>>  
>> @@ -1080,13 +1087,6 @@ power {
>>  		};
>>  	};
>>  
>> -	panel: panel {
>> -		compatible = "lg,lp129qe";
>> -		power-supply = <&vdd_3v3_panel>;
>> -		backlight = <&backlight>;
>> -		ddc-i2c-bus = <&dpaux>;
>> -	};
>> -
>>  	vdd_mux: regulator-mux {
>>  		compatible = "regulator-fixed";
>>  		regulator-name = "+VDD_MUX";
>>
> 
> You should add stable tag for 5.15 and also add separate patch to update
> the new arch/arm/boot/dts/tegra124-nyan-big-fhd.dts which we have in
> -next now.

Thierry, are you going to address this review comment? I see in
linux-next that you picked up this incomplete version of the patch.
Thierry Reding March 7, 2022, 7:45 a.m. UTC | #4
On Sun, Mar 06, 2022 at 08:59:13PM +0300, Dmitry Osipenko wrote:
> 22.12.2021 22:30, Dmitry Osipenko пишет:
> > 20.12.2021 13:48, Thierry Reding пишет:
> >> From: Thierry Reding <treding@nvidia.com>
> >>
> >> Move the eDP panel on Venice 2 and Nyan boards into the corresponding
> >> AUX bus device tree node. This allows us to avoid a nasty circular
> >> dependency that would otherwise be created between the DPAUX and panel
> >> nodes via the DDC/I2C phandle.
> >>
> >> Signed-off-by: Thierry Reding <treding@nvidia.com>
> >> ---
> >>  arch/arm/boot/dts/tegra124-nyan-big.dts   | 15 +++++++++------
> >>  arch/arm/boot/dts/tegra124-nyan-blaze.dts | 15 +++++++++------
> >>  arch/arm/boot/dts/tegra124-venice2.dts    | 14 +++++++-------
> >>  3 files changed, 25 insertions(+), 19 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
> >> index 1d2aac2cb6d0..fdc1d64dfff9 100644
> >> --- a/arch/arm/boot/dts/tegra124-nyan-big.dts
> >> +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
> >> @@ -13,12 +13,15 @@ / {
> >>  		     "google,nyan-big-rev1", "google,nyan-big-rev0",
> >>  		     "google,nyan-big", "google,nyan", "nvidia,tegra124";
> >>  
> >> -	panel: panel {
> >> -		compatible = "auo,b133xtn01";
> >> -
> >> -		power-supply = <&vdd_3v3_panel>;
> >> -		backlight = <&backlight>;
> >> -		ddc-i2c-bus = <&dpaux>;
> >> +	host1x@50000000 {
> >> +		dpaux@545c0000 {
> >> +			aux-bus {
> >> +				panel: panel {
> >> +					compatible = "auo,b133xtn01";
> >> +					backlight = <&backlight>;
> >> +				};
> >> +			};
> >> +		};
> >>  	};
> >>  
> >>  	mmc@700b0400 { /* SD Card on this bus */
> >> diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> >> index 677babde6460..abdf4456826f 100644
> >> --- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> >> +++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
> >> @@ -15,12 +15,15 @@ / {
> >>  		     "google,nyan-blaze-rev0", "google,nyan-blaze",
> >>  		     "google,nyan", "nvidia,tegra124";
> >>  
> >> -	panel: panel {
> >> -		compatible = "samsung,ltn140at29-301";
> >> -
> >> -		power-supply = <&vdd_3v3_panel>;
> >> -		backlight = <&backlight>;
> >> -		ddc-i2c-bus = <&dpaux>;
> >> +	host1x@50000000 {
> >> +		dpaux@545c0000 {
> >> +			aux-bus {
> >> +				panel: panel {
> >> +					compatible = "samsung,ltn140at29-301";
> >> +					backlight = <&backlight>;
> >> +				};
> >> +			};
> >> +		};
> >>  	};
> >>  
> >>  	sound {
> >> diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
> >> index 232c90604df9..6a9592ceb5f2 100644
> >> --- a/arch/arm/boot/dts/tegra124-venice2.dts
> >> +++ b/arch/arm/boot/dts/tegra124-venice2.dts
> >> @@ -48,6 +48,13 @@ sor@54540000 {
> >>  		dpaux@545c0000 {
> >>  			vdd-supply = <&vdd_3v3_panel>;
> >>  			status = "okay";
> >> +
> >> +			aux-bus {
> >> +				panel: panel {
> >> +					compatible = "lg,lp129qe";
> >> +					backlight = <&backlight>;
> >> +				};
> >> +			};
> >>  		};
> >>  	};
> >>  
> >> @@ -1080,13 +1087,6 @@ power {
> >>  		};
> >>  	};
> >>  
> >> -	panel: panel {
> >> -		compatible = "lg,lp129qe";
> >> -		power-supply = <&vdd_3v3_panel>;
> >> -		backlight = <&backlight>;
> >> -		ddc-i2c-bus = <&dpaux>;
> >> -	};
> >> -
> >>  	vdd_mux: regulator-mux {
> >>  		compatible = "regulator-fixed";
> >>  		regulator-name = "+VDD_MUX";
> >>
> > 
> > You should add stable tag for 5.15 and also add separate patch to update
> > the new arch/arm/boot/dts/tegra124-nyan-big-fhd.dts which we have in
> > -next now.
> 
> Thierry, are you going to address this review comment? I see in
> linux-next that you picked up this incomplete version of the patch.

Ah, shoot. I've got this in my local tree but forgot to squash this in
with the other changes. I'll send out a follow-up.

Thierry
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
index 1d2aac2cb6d0..fdc1d64dfff9 100644
--- a/arch/arm/boot/dts/tegra124-nyan-big.dts
+++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
@@ -13,12 +13,15 @@  / {
 		     "google,nyan-big-rev1", "google,nyan-big-rev0",
 		     "google,nyan-big", "google,nyan", "nvidia,tegra124";
 
-	panel: panel {
-		compatible = "auo,b133xtn01";
-
-		power-supply = <&vdd_3v3_panel>;
-		backlight = <&backlight>;
-		ddc-i2c-bus = <&dpaux>;
+	host1x@50000000 {
+		dpaux@545c0000 {
+			aux-bus {
+				panel: panel {
+					compatible = "auo,b133xtn01";
+					backlight = <&backlight>;
+				};
+			};
+		};
 	};
 
 	mmc@700b0400 { /* SD Card on this bus */
diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
index 677babde6460..abdf4456826f 100644
--- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts
+++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
@@ -15,12 +15,15 @@  / {
 		     "google,nyan-blaze-rev0", "google,nyan-blaze",
 		     "google,nyan", "nvidia,tegra124";
 
-	panel: panel {
-		compatible = "samsung,ltn140at29-301";
-
-		power-supply = <&vdd_3v3_panel>;
-		backlight = <&backlight>;
-		ddc-i2c-bus = <&dpaux>;
+	host1x@50000000 {
+		dpaux@545c0000 {
+			aux-bus {
+				panel: panel {
+					compatible = "samsung,ltn140at29-301";
+					backlight = <&backlight>;
+				};
+			};
+		};
 	};
 
 	sound {
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 232c90604df9..6a9592ceb5f2 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -48,6 +48,13 @@  sor@54540000 {
 		dpaux@545c0000 {
 			vdd-supply = <&vdd_3v3_panel>;
 			status = "okay";
+
+			aux-bus {
+				panel: panel {
+					compatible = "lg,lp129qe";
+					backlight = <&backlight>;
+				};
+			};
 		};
 	};
 
@@ -1080,13 +1087,6 @@  power {
 		};
 	};
 
-	panel: panel {
-		compatible = "lg,lp129qe";
-		power-supply = <&vdd_3v3_panel>;
-		backlight = <&backlight>;
-		ddc-i2c-bus = <&dpaux>;
-	};
-
 	vdd_mux: regulator-mux {
 		compatible = "regulator-fixed";
 		regulator-name = "+VDD_MUX";