devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: tegra: Fix HSUART for Smaug
@ 2023-07-14 10:10 Diogo Ivo
  2023-07-14 10:21 ` Jon Hunter
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Diogo Ivo @ 2023-07-14 10:10 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, thierry.reding,
	jonathanh, diogo.ivo, devicetree, linux-tegra

After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
reset-names") was applied, the HSUART failed to probe and the following
error is seen:

 serial-tegra 70006300.serial: Couldn't get the reset
 serial-tegra: probe of 70006300.serial failed with error -2

Commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
reset-names") is correct because the "reset-names" property is not
needed for 8250 UARTs. However, the "reset-names" is required for the
HSUART and should have been populated as part of commit a63c0cd83720c
("arm64: dts: tegra: smaug: Add Bluetooth node") that enabled the HSUART
for the Pixel C. Fix this by populating the "reset-names" property for
the HSUART on the Pixel C.

Fixes: a63c0cd83720 ("arm64: dts: tegra: smaug: Add Bluetooth node")
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
index 2c608d645642..bcb533cc002c 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
@@ -1364,6 +1364,7 @@ serial@70006000 {
 
 	uartd: serial@70006300 {
 		compatible = "nvidia,tegra30-hsuart";
+		reset-names = "serial";
 		status = "okay";
 
 		bluetooth {
-- 
2.41.0


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

* Re: [PATCH] arm64: tegra: Fix HSUART for Smaug
  2023-07-14 10:10 [PATCH] arm64: tegra: Fix HSUART for Smaug Diogo Ivo
@ 2023-07-14 10:21 ` Jon Hunter
  2023-07-14 14:41 ` Thierry Reding
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jon Hunter @ 2023-07-14 10:21 UTC (permalink / raw)
  To: Diogo Ivo, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	thierry.reding, devicetree, linux-tegra


On 14/07/2023 11:10, Diogo Ivo wrote:
> After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") was applied, the HSUART failed to probe and the following
> error is seen:
> 
>   serial-tegra 70006300.serial: Couldn't get the reset
>   serial-tegra: probe of 70006300.serial failed with error -2
> 
> Commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") is correct because the "reset-names" property is not
> needed for 8250 UARTs. However, the "reset-names" is required for the
> HSUART and should have been populated as part of commit a63c0cd83720c
> ("arm64: dts: tegra: smaug: Add Bluetooth node") that enabled the HSUART
> for the Pixel C. Fix this by populating the "reset-names" property for
> the HSUART on the Pixel C.
> 
> Fixes: a63c0cd83720 ("arm64: dts: tegra: smaug: Add Bluetooth node")
> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> ---
>   arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> index 2c608d645642..bcb533cc002c 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> @@ -1364,6 +1364,7 @@ serial@70006000 {
>   
>   	uartd: serial@70006300 {
>   		compatible = "nvidia,tegra30-hsuart";
> +		reset-names = "serial";
>   		status = "okay";
>   
>   		bluetooth {


Thanks!

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>

Jon

-- 
nvpublic

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

* Re: [PATCH] arm64: tegra: Fix HSUART for Smaug
  2023-07-14 10:10 [PATCH] arm64: tegra: Fix HSUART for Smaug Diogo Ivo
  2023-07-14 10:21 ` Jon Hunter
@ 2023-07-14 14:41 ` Thierry Reding
  2023-07-14 14:52 ` Thierry Reding
  2023-07-17  8:03 ` Krzysztof Kozlowski
  3 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-07-14 14:41 UTC (permalink / raw)
  To: Diogo Ivo
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, jonathanh, devicetree,
	linux-tegra

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

On Fri, Jul 14, 2023 at 11:10:17AM +0100, Diogo Ivo wrote:
> After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") was applied, the HSUART failed to probe and the following
> error is seen:
> 
>  serial-tegra 70006300.serial: Couldn't get the reset
>  serial-tegra: probe of 70006300.serial failed with error -2
> 
> Commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") is correct because the "reset-names" property is not
> needed for 8250 UARTs. However, the "reset-names" is required for the
> HSUART and should have been populated as part of commit a63c0cd83720c
> ("arm64: dts: tegra: smaug: Add Bluetooth node") that enabled the HSUART
> for the Pixel C. Fix this by populating the "reset-names" property for
> the HSUART on the Pixel C.
> 
> Fixes: a63c0cd83720 ("arm64: dts: tegra: smaug: Add Bluetooth node")
> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> ---
>  arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> index 2c608d645642..bcb533cc002c 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> @@ -1364,6 +1364,7 @@ serial@70006000 {
>  
>  	uartd: serial@70006300 {
>  		compatible = "nvidia,tegra30-hsuart";
> +		reset-names = "serial";
>  		status = "okay";
>  
>  		bluetooth {

FWIW, we need to do this for a whole bunch of devices. I've got a local
patch for all the cases that allows schema validation. I'll pull in your
patch and then rebase mine on top and send it out.

Thanks,
Thierry

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

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

* Re: [PATCH] arm64: tegra: Fix HSUART for Smaug
  2023-07-14 10:10 [PATCH] arm64: tegra: Fix HSUART for Smaug Diogo Ivo
  2023-07-14 10:21 ` Jon Hunter
  2023-07-14 14:41 ` Thierry Reding
@ 2023-07-14 14:52 ` Thierry Reding
  2023-07-17  8:03 ` Krzysztof Kozlowski
  3 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-07-14 14:52 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, thierry.reding,
	jonathanh, devicetree, linux-tegra, Diogo Ivo

From: Thierry Reding <treding@nvidia.com>


On Fri, 14 Jul 2023 11:10:17 +0100, Diogo Ivo wrote:
> After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") was applied, the HSUART failed to probe and the following
> error is seen:
> 
>  serial-tegra 70006300.serial: Couldn't get the reset
>  serial-tegra: probe of 70006300.serial failed with error -2
> 
> [...]

Applied, thanks!

[1/1] arm64: tegra: Fix HSUART for Smaug
      commit: 590bfe51838f6345a6a3288507661dc9b7208464

Best regards,
-- 
Thierry Reding <treding@nvidia.com>

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

* Re: [PATCH] arm64: tegra: Fix HSUART for Smaug
  2023-07-14 10:10 [PATCH] arm64: tegra: Fix HSUART for Smaug Diogo Ivo
                   ` (2 preceding siblings ...)
  2023-07-14 14:52 ` Thierry Reding
@ 2023-07-17  8:03 ` Krzysztof Kozlowski
  2023-07-18  7:59   ` Thierry Reding
  3 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-17  8:03 UTC (permalink / raw)
  To: Diogo Ivo, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	thierry.reding, jonathanh, devicetree, linux-tegra

On 14/07/2023 12:10, Diogo Ivo wrote:
> After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") was applied, the HSUART failed to probe and the following
> error is seen:
> 
>  serial-tegra 70006300.serial: Couldn't get the reset
>  serial-tegra: probe of 70006300.serial failed with error -2
> 
> Commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> reset-names") is correct because the "reset-names" property is not
> needed for 8250 UARTs. However, the "reset-names" is required for the
> HSUART and should have been populated as part of commit a63c0cd83720c
> ("arm64: dts: tegra: smaug: Add Bluetooth node") that enabled the HSUART
> for the Pixel C. Fix this by populating the "reset-names" property for
> the HSUART on the Pixel C.
> 
> Fixes: a63c0cd83720 ("arm64: dts: tegra: smaug: Add Bluetooth node")
> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> ---
>  arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> index 2c608d645642..bcb533cc002c 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> @@ -1364,6 +1364,7 @@ serial@70006000 {
>  
>  	uartd: serial@70006300 {
>  		compatible = "nvidia,tegra30-hsuart";
> +		reset-names = "serial";

Why reset-names is board specific? This makes little sense. If you need
reset-names, then it is part of SoC.

Best regards,
Krzysztof


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

* Re: [PATCH] arm64: tegra: Fix HSUART for Smaug
  2023-07-17  8:03 ` Krzysztof Kozlowski
@ 2023-07-18  7:59   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-07-18  7:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Diogo Ivo, robh+dt, krzysztof.kozlowski+dt, conor+dt, jonathanh,
	devicetree, linux-tegra

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

On Mon, Jul 17, 2023 at 10:03:19AM +0200, Krzysztof Kozlowski wrote:
> On 14/07/2023 12:10, Diogo Ivo wrote:
> > After commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> > reset-names") was applied, the HSUART failed to probe and the following
> > error is seen:
> > 
> >  serial-tegra 70006300.serial: Couldn't get the reset
> >  serial-tegra: probe of 70006300.serial failed with error -2
> > 
> > Commit 71de0a054d0e ("arm64: tegra: Drop serial clock-names and
> > reset-names") is correct because the "reset-names" property is not
> > needed for 8250 UARTs. However, the "reset-names" is required for the
> > HSUART and should have been populated as part of commit a63c0cd83720c
> > ("arm64: dts: tegra: smaug: Add Bluetooth node") that enabled the HSUART
> > for the Pixel C. Fix this by populating the "reset-names" property for
> > the HSUART on the Pixel C.
> > 
> > Fixes: a63c0cd83720 ("arm64: dts: tegra: smaug: Add Bluetooth node")
> > Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> > ---
> >  arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> > index 2c608d645642..bcb533cc002c 100644
> > --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> > +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> > @@ -1364,6 +1364,7 @@ serial@70006000 {
> >  
> >  	uartd: serial@70006300 {
> >  		compatible = "nvidia,tegra30-hsuart";
> > +		reset-names = "serial";
> 
> Why reset-names is board specific? This makes little sense. If you need
> reset-names, then it is part of SoC.

As the commit message explains, this is because we have two
"conflicting" device tree bindings for these devices. One is a standard
UART, typically used when the device is a debug serial console and a
more specialized high-speed UART which then requires additional
properties.

Effectively this means that whenever we override the standard UART with
the high-speed UART we need to extend the device tree with those
additional properties. We actually have similar issues with dmas and
dma-names, which are only valid for the HS UART and I have a couple of
patches[0][1] to clean that all up. It's a bit weird because we
basically have a patch that removes reset-names (for standard UART) and
then we have another patch that adds the reset-names (for HS UART), but
I don't see a way around it given the bindings that we have.

Thierry

[0]: http://patchwork.ozlabs.org/project/linux-tegra/list/?series=364269
[1]: http://patchwork.ozlabs.org/project/linux-tegra/list/?series=364270

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

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

end of thread, other threads:[~2023-07-18  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 10:10 [PATCH] arm64: tegra: Fix HSUART for Smaug Diogo Ivo
2023-07-14 10:21 ` Jon Hunter
2023-07-14 14:41 ` Thierry Reding
2023-07-14 14:52 ` Thierry Reding
2023-07-17  8:03 ` Krzysztof Kozlowski
2023-07-18  7:59   ` 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).