diff mbox series

[5/7] arm64: dts: qcom: sc8280xp: fix USB interrupts

Message ID 20220713131340.29401-6-johan+linaro@kernel.org (mailing list archive)
State New, archived
Headers show
Series usb: dwc3: add support for SC8280XP | expand

Commit Message

Johan Hovold July 13, 2022, 1:13 p.m. UTC
The two single-port SC8280XP USB controllers do not have an hs_phy_irq
interrupt. Instead they have a pwr_event interrupt which is distinct
from the former and not yet supported by the driver.

Fix the USB node interrupt names so that they match the devicetree
binding.

Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Andrew Halaney July 13, 2022, 2:12 p.m. UTC | #1
On Wed, Jul 13, 2022 at 03:13:38PM +0200, Johan Hovold wrote:
> The two single-port SC8280XP USB controllers do not have an hs_phy_irq
> interrupt. Instead they have a pwr_event interrupt which is distinct
> from the former and not yet supported by the driver.
> 
> Fix the USB node interrupt names so that they match the devicetree
> binding.
> 
> Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index 45cc7d714fd2..4a7aa9992f3a 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -1875,8 +1875,10 @@ usb_0: usb@a6f8800 {
>  					      <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
>  					      <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
>  					      <&pdc 138 IRQ_TYPE_LEVEL_HIGH>;
> -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> -					  "dm_hs_phy_irq", "ss_phy_irq";
> +			interrupt-names = "pwr_event",
> +					  "dp_hs_phy_irq",
> +					  "dm_hs_phy_irq",
> +					  "ss_phy_irq";
>  
>  			power-domains = <&gcc USB30_PRIM_GDSC>;
>  
> @@ -1925,8 +1927,10 @@ usb_1: usb@a8f8800 {
>  					      <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
>  					      <&pdc 13 IRQ_TYPE_EDGE_BOTH>,
>  					      <&pdc 136 IRQ_TYPE_LEVEL_HIGH>;
> -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> -					  "dm_hs_phy_irq", "ss_phy_irq";
> +			interrupt-names = "pwr_event",
> +					  "dp_hs_phy_irq",
> +					  "dm_hs_phy_irq",
> +					  "ss_phy_irq";

For this specific change to pwr_event:

    Reviewed-by: Andrew Halaney <ahalaney@redhat.com>

That being said, I was reviewing this against the (fairly old)
downstream release I have, and the IRQs defined there look like this:

		interrupts-extended = <&pdc 12 IRQ_TYPE_EDGE_RISING>,
				<&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>,
				<&pdc 136 IRQ_TYPE_LEVEL_HIGH>,
				<&pdc 13 IRQ_TYPE_EDGE_RISING>;
		interrupt-names = "dp_hs_phy_irq", "pwr_event_irq",
				"ss_phy_irq", "dm_hs_phy_irq";

The part I want to highlight is that the "pwr_event" irq downstream maps
to <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, but the current upstream
devicetree I'm looking at has it mapped to <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>

Do you happen to have any source you can also check to confirm if this
is a bug or not?

Thanks,
Andrew

>  
>  			power-domains = <&gcc USB30_SEC_GDSC>;
>  
> -- 
> 2.35.1
>
Johan Hovold July 13, 2022, 2:35 p.m. UTC | #2
On Wed, Jul 13, 2022 at 09:12:28AM -0500, Andrew Halaney wrote:
> On Wed, Jul 13, 2022 at 03:13:38PM +0200, Johan Hovold wrote:
> > The two single-port SC8280XP USB controllers do not have an hs_phy_irq
> > interrupt. Instead they have a pwr_event interrupt which is distinct
> > from the former and not yet supported by the driver.
> > 
> > Fix the USB node interrupt names so that they match the devicetree
> > binding.
> > 
> > Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > index 45cc7d714fd2..4a7aa9992f3a 100644
> > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > @@ -1875,8 +1875,10 @@ usb_0: usb@a6f8800 {
> >  					      <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
> >  					      <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
> >  					      <&pdc 138 IRQ_TYPE_LEVEL_HIGH>;
> > -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> > -					  "dm_hs_phy_irq", "ss_phy_irq";
> > +			interrupt-names = "pwr_event",
> > +					  "dp_hs_phy_irq",
> > +					  "dm_hs_phy_irq",
> > +					  "ss_phy_irq";
> >  
> >  			power-domains = <&gcc USB30_PRIM_GDSC>;
> >  
> > @@ -1925,8 +1927,10 @@ usb_1: usb@a8f8800 {
> >  					      <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
> >  					      <&pdc 13 IRQ_TYPE_EDGE_BOTH>,
> >  					      <&pdc 136 IRQ_TYPE_LEVEL_HIGH>;
> > -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> > -					  "dm_hs_phy_irq", "ss_phy_irq";
> > +			interrupt-names = "pwr_event",
> > +					  "dp_hs_phy_irq",
> > +					  "dm_hs_phy_irq",
> > +					  "ss_phy_irq";
> 
> For this specific change to pwr_event:
> 
>     Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> 
> That being said, I was reviewing this against the (fairly old)
> downstream release I have, and the IRQs defined there look like this:
> 
> 		interrupts-extended = <&pdc 12 IRQ_TYPE_EDGE_RISING>,
> 				<&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>,
> 				<&pdc 136 IRQ_TYPE_LEVEL_HIGH>,
> 				<&pdc 13 IRQ_TYPE_EDGE_RISING>;
> 		interrupt-names = "dp_hs_phy_irq", "pwr_event_irq",
> 				"ss_phy_irq", "dm_hs_phy_irq";
> 
> The part I want to highlight is that the "pwr_event" irq downstream maps
> to <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, but the current upstream
> devicetree I'm looking at has it mapped to <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>
> 
> Do you happen to have any source you can also check to confirm if this
> is a bug or not?

Good catch! I believe this is another copy-paste error when creating
base dtsi based on some vendor source (or perhaps an error carried over
from an earlier version).

The vendor devicetree I have access to also has 811 here, which matches
the pattern for usb_0 (dwc3 interrupt + 1).

Do you mind if I fold a fix for that into a v2 of this patch?

Thanks for reviewing!

Johan
Andrew Halaney July 13, 2022, 2:43 p.m. UTC | #3
On Wed, Jul 13, 2022 at 04:35:22PM +0200, Johan Hovold wrote:
> On Wed, Jul 13, 2022 at 09:12:28AM -0500, Andrew Halaney wrote:
> > On Wed, Jul 13, 2022 at 03:13:38PM +0200, Johan Hovold wrote:
> > > The two single-port SC8280XP USB controllers do not have an hs_phy_irq
> > > interrupt. Instead they have a pwr_event interrupt which is distinct
> > > from the former and not yet supported by the driver.
> > > 
> > > Fix the USB node interrupt names so that they match the devicetree
> > > binding.
> > > 
> > > Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
> > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > > index 45cc7d714fd2..4a7aa9992f3a 100644
> > > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> > > @@ -1875,8 +1875,10 @@ usb_0: usb@a6f8800 {
> > >  					      <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
> > >  					      <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
> > >  					      <&pdc 138 IRQ_TYPE_LEVEL_HIGH>;
> > > -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> > > -					  "dm_hs_phy_irq", "ss_phy_irq";
> > > +			interrupt-names = "pwr_event",
> > > +					  "dp_hs_phy_irq",
> > > +					  "dm_hs_phy_irq",
> > > +					  "ss_phy_irq";
> > >  
> > >  			power-domains = <&gcc USB30_PRIM_GDSC>;
> > >  
> > > @@ -1925,8 +1927,10 @@ usb_1: usb@a8f8800 {
> > >  					      <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
> > >  					      <&pdc 13 IRQ_TYPE_EDGE_BOTH>,
> > >  					      <&pdc 136 IRQ_TYPE_LEVEL_HIGH>;
> > > -			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
> > > -					  "dm_hs_phy_irq", "ss_phy_irq";
> > > +			interrupt-names = "pwr_event",
> > > +					  "dp_hs_phy_irq",
> > > +					  "dm_hs_phy_irq",
> > > +					  "ss_phy_irq";
> > 
> > For this specific change to pwr_event:
> > 
> >     Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> > 
> > That being said, I was reviewing this against the (fairly old)
> > downstream release I have, and the IRQs defined there look like this:
> > 
> > 		interrupts-extended = <&pdc 12 IRQ_TYPE_EDGE_RISING>,
> > 				<&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>,
> > 				<&pdc 136 IRQ_TYPE_LEVEL_HIGH>,
> > 				<&pdc 13 IRQ_TYPE_EDGE_RISING>;
> > 		interrupt-names = "dp_hs_phy_irq", "pwr_event_irq",
> > 				"ss_phy_irq", "dm_hs_phy_irq";
> > 
> > The part I want to highlight is that the "pwr_event" irq downstream maps
> > to <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, but the current upstream
> > devicetree I'm looking at has it mapped to <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>
> > 
> > Do you happen to have any source you can also check to confirm if this
> > is a bug or not?
> 
> Good catch! I believe this is another copy-paste error when creating
> base dtsi based on some vendor source (or perhaps an error carried over
> from an earlier version).
> 
> The vendor devicetree I have access to also has 811 here, which matches
> the pattern for usb_0 (dwc3 interrupt + 1).
> 
> Do you mind if I fold a fix for that into a v2 of this patch?
> 
> Thanks for reviewing!

Sounds good, feel free to add my R-B with that change as well!

> 
> Johan
>
Johan Hovold July 13, 2022, 3:03 p.m. UTC | #4
On Wed, Jul 13, 2022 at 09:43:10AM -0500, Andrew Halaney wrote:
> On Wed, Jul 13, 2022 at 04:35:22PM +0200, Johan Hovold wrote:

> > Do you mind if I fold a fix for that into a v2 of this patch?

> Sounds good, feel free to add my R-B with that change as well!

Done. I'll wait a bit for any further comments before reposting.

Thanks again.

Johan
Krzysztof Kozlowski July 14, 2022, 10:52 a.m. UTC | #5
On 13/07/2022 15:13, Johan Hovold wrote:
> The two single-port SC8280XP USB controllers do not have an hs_phy_irq
> interrupt. Instead they have a pwr_event interrupt which is distinct
> from the former and not yet supported by the driver.
> 
> Fix the USB node interrupt names so that they match the devicetree
> binding.
> 
> Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 45cc7d714fd2..4a7aa9992f3a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -1875,8 +1875,10 @@  usb_0: usb@a6f8800 {
 					      <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 138 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
-					  "dm_hs_phy_irq", "ss_phy_irq";
+			interrupt-names = "pwr_event",
+					  "dp_hs_phy_irq",
+					  "dm_hs_phy_irq",
+					  "ss_phy_irq";
 
 			power-domains = <&gcc USB30_PRIM_GDSC>;
 
@@ -1925,8 +1927,10 @@  usb_1: usb@a8f8800 {
 					      <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 13 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 136 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
-					  "dm_hs_phy_irq", "ss_phy_irq";
+			interrupt-names = "pwr_event",
+					  "dp_hs_phy_irq",
+					  "dm_hs_phy_irq",
+					  "ss_phy_irq";
 
 			power-domains = <&gcc USB30_SEC_GDSC>;