linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT PATCH 0/4] More QC DWC3 fixups
@ 2024-11-29 22:12 Konrad Dybcio
  2024-11-29 22:12 ` [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996 Konrad Dybcio
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Konrad Dybcio @ 2024-11-29 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Konrad Dybcio,
	Yassine Oudjana
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio

Squashed a couple more warnings, the remaining ones I'll try to figure
out soon.

This is all based on what I was able to make out from docs. Couldn't get
any 8994 or 8996 boards I have access to booting reliably :(
Ccing some folks that I'm hoping could help out testing this

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Konrad Dybcio (4):
      dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996
      dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec
      arm64: dts: qcom: msm8996: Fix up USB3 interrupts
      arm64: dts: qcom: msm8994: Describe USB interrupts

 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 ++-
 arch/arm64/boot/dts/qcom/msm8994.dtsi                | 9 +++++++++
 arch/arm64/boot/dts/qcom/msm8996.dtsi                | 9 +++++++--
 3 files changed, 18 insertions(+), 3 deletions(-)
---
base-commit: f486c8aa16b8172f63bddc70116a0c897a7f3f02
change-id: 20241122-topic-qcom_usb_dtb_fixup-26548114416e

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


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

* [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996
  2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
@ 2024-11-29 22:12 ` Konrad Dybcio
  2024-12-04 14:22   ` Rob Herring (Arm)
  2024-11-29 22:12 ` [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec Konrad Dybcio
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2024-11-29 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Konrad Dybcio,
	Yassine Oudjana
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

MSM8996 has two DWC3 hosts, one of which is USB2, which naturally
means it doesn't have a SuperSpeed interrupt. 3 interrupts are already
allowed, apply the same logic to interrupt-names.

This fixes warnings such as:

usb@76f8800: interrupt-names: ['pwr_event', 'qusb2_phy', 'hs_phy_irq'] is too short

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index 935e204b607bbd3bc9bfbdcd03519202197c9eb4..7ce56db1bbd4cd801129929616eb17f968b097f1 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -422,6 +422,7 @@ allOf:
           minItems: 3
           maxItems: 4
         interrupt-names:
+          minItems: 3
           items:
             - const: pwr_event
             - const: qusb2_phy

-- 
2.47.1


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

* [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec
  2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
  2024-11-29 22:12 ` [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996 Konrad Dybcio
@ 2024-11-29 22:12 ` Konrad Dybcio
  2024-12-04 14:22   ` Rob Herring (Arm)
  2024-11-29 22:12 ` [PATCH RFT 3/4] arm64: dts: qcom: msm8996: Fix up USB3 interrupts Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2024-11-29 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Konrad Dybcio,
	Yassine Oudjana
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

This SoC doesn't seem to have separate DP/DM interrupts, move it to the
category that has a "qusb2_phy" one instead.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index 7ce56db1bbd4cd801129929616eb17f968b097f1..8c9f675083bc9d5964374304d2186c803e81be29 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -411,6 +411,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,msm8994-dwc3
               - qcom,msm8996-dwc3
               - qcom,qcs404-dwc3
               - qcom,sdm660-dwc3
@@ -469,7 +470,6 @@ allOf:
             enum:
               - qcom,ipq4019-dwc3
               - qcom,ipq8064-dwc3
-              - qcom,msm8994-dwc3
               - qcom,qcs8300-dwc3
               - qcom,qdu1000-dwc3
               - qcom,sa8775p-dwc3

-- 
2.47.1


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

* [PATCH RFT 3/4] arm64: dts: qcom: msm8996: Fix up USB3 interrupts
  2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
  2024-11-29 22:12 ` [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996 Konrad Dybcio
  2024-11-29 22:12 ` [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec Konrad Dybcio
@ 2024-11-29 22:12 ` Konrad Dybcio
  2024-11-29 22:12 ` [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts Konrad Dybcio
  2024-12-26 22:38 ` (subset) [RFT PATCH 0/4] More QC DWC3 fixups Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2024-11-29 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Konrad Dybcio,
	Yassine Oudjana
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Add the missing interrupt lines and fix qusb2_phy being an impostor
of hs_phy_irq.

This happens to also fix warnings such as:

usb@6af8800: interrupt-names: ['hs_phy_irq', 'ss_phy_irq'] is too short

Fixes: 4753492de9df ("arm64: dts: qcom: msm8996: Add usb3 interrupts")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index b379623c1b8a0844c9de5255c4647fe3490bd2aa..4719e1fc70d2cb15a6a63d3e28622ae078a367ef 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3065,9 +3065,14 @@ usb3: usb@6af8800 {
 			#size-cells = <1>;
 			ranges;
 
-			interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "hs_phy_irq", "ss_phy_irq";
+			interrupt-names = "pwr_event",
+					  "qusb2_phy",
+					  "hs_phy_irq",
+					  "ss_phy_irq";
 
 			clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
 				 <&gcc GCC_USB30_MASTER_CLK>,

-- 
2.47.1


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

* [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts
  2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
                   ` (2 preceding siblings ...)
  2024-11-29 22:12 ` [PATCH RFT 3/4] arm64: dts: qcom: msm8996: Fix up USB3 interrupts Konrad Dybcio
@ 2024-11-29 22:12 ` Konrad Dybcio
  2024-12-06 22:02   ` Petr Vorel
  2024-12-26 22:38 ` (subset) [RFT PATCH 0/4] More QC DWC3 fixups Bjorn Andersson
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2024-11-29 22:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Konrad Dybcio,
	Yassine Oudjana
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Previously the interrupt lanes were not described, fix that.

Fixes: d9be0bc95f25 ("arm64: dts: qcom: msm8994: Add USB support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8994.dtsi b/arch/arm64/boot/dts/qcom/msm8994.dtsi
index 1acb0f159511996db07bc7543cf4f194a4ebd0fa..8c0b1e3a99a767e7c28bcaf3b9687501cc15cd58 100644
--- a/arch/arm64/boot/dts/qcom/msm8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8994.dtsi
@@ -437,6 +437,15 @@ usb3: usb@f92f8800 {
 			#size-cells = <1>;
 			ranges;
 
+			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "pwr_event",
+					  "qusb2_phy",
+					  "hs_phy_irq",
+					  "ss_phy_irq";
+
 			clocks = <&gcc GCC_USB30_MASTER_CLK>,
 				 <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
 				 <&gcc GCC_USB30_SLEEP_CLK>,

-- 
2.47.1


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

* Re: [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996
  2024-11-29 22:12 ` [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996 Konrad Dybcio
@ 2024-12-04 14:22   ` Rob Herring (Arm)
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2024-12-04 14:22 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Greg Kroah-Hartman, Petr Vorel, linux-usb, Conor Dooley,
	Marijn Suijten, Yassine Oudjana, Konrad Dybcio, Alexander Reimelt,
	Bjorn Andersson, linux-arm-msm, Konrad Dybcio,
	Kryštof Černý, Wesley Cheng, Dominik Kobinski,
	linux-kernel, devicetree, Harry Austen, Krzysztof Kozlowski


On Fri, 29 Nov 2024 23:12:45 +0100, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> MSM8996 has two DWC3 hosts, one of which is USB2, which naturally
> means it doesn't have a SuperSpeed interrupt. 3 interrupts are already
> allowed, apply the same logic to interrupt-names.
> 
> This fixes warnings such as:
> 
> usb@76f8800: interrupt-names: ['pwr_event', 'qusb2_phy', 'hs_phy_irq'] is too short
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec
  2024-11-29 22:12 ` [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec Konrad Dybcio
@ 2024-12-04 14:22   ` Rob Herring (Arm)
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2024-12-04 14:22 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Petr Vorel, Harry Austen, Bjorn Andersson, Conor Dooley,
	Wesley Cheng, Konrad Dybcio, Yassine Oudjana, linux-kernel,
	linux-arm-msm, Kryštof Černý, Alexander Reimelt,
	Marijn Suijten, Dominik Kobinski, Krzysztof Kozlowski,
	Greg Kroah-Hartman, devicetree, Konrad Dybcio, linux-usb


On Fri, 29 Nov 2024 23:12:46 +0100, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> This SoC doesn't seem to have separate DP/DM interrupts, move it to the
> category that has a "qusb2_phy" one instead.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts
  2024-11-29 22:12 ` [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts Konrad Dybcio
@ 2024-12-06 22:02   ` Petr Vorel
  2024-12-14 22:33     ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2024-12-06 22:02 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Yassine Oudjana,
	Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Kryštof Černý,
	Alexander Reimelt, Dominik Kobinski, Harry Austen, Konrad Dybcio

Hi Konrad, all,

> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

> Previously the interrupt lanes were not described, fix that.

> Fixes: d9be0bc95f25 ("arm64: dts: qcom: msm8994: Add USB support")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)

> diff --git a/arch/arm64/boot/dts/qcom/msm8994.dtsi b/arch/arm64/boot/dts/qcom/msm8994.dtsi
> index 1acb0f159511996db07bc7543cf4f194a4ebd0fa..8c0b1e3a99a767e7c28bcaf3b9687501cc15cd58 100644
> --- a/arch/arm64/boot/dts/qcom/msm8994.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8994.dtsi
> @@ -437,6 +437,15 @@ usb3: usb@f92f8800 {
>  			#size-cells = <1>;
>  			ranges;

> +			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "pwr_event",
> +					  "qusb2_phy",
> +					  "hs_phy_irq",
> +					  "ss_phy_irq";
> +

Tested-by: Petr Vorel <petr.vorel@gmail.com>

Well, I tested this on msm8994 Huawei Nexus 6P. It did not break anything,
but obviously it's not enough for phone to get USB working. IMHO none of
msm899[24] has working USB.

msm8996 has usb3phy, hsusb_phy[12] labels, I suppose USB will not be working
until this is set. Below is a snippet of a downstream device tree. I might
be able to transform it to the mainline tree, but feel free to post a patch
(probably obvious for you).

Kind regards,
Petr

		ssphy@f9b38000 {
			phandle = <0xf1>;
			linux,phandle = <0xf1>;
			clock-names = "aux_clk\0pipe_clk\0cfg_ahb_clk\0phy_reset\0phy_phy_reset\0ldo_clk";
			clocks = <0xaa 0xd9a36e0 0xaa 0xf279aff2 0xaa 0xd1231a0e 0xaa 0x3d559f1 0xaa 0xb1a4f885 0xaa 0x124410f7>;
			qcom,no-pipe-clk-switch;
			qcom,vbus-valid-override;
			qcom,vdd-voltage-level = <0x00 0xf4240 0xf4240>;
			vdda18-supply = <0xf4>;
			vdd-supply = <0x2e>;
			reg-names = "qmp_phy_base\0qmp_ahb2phy_base";
			reg = <0xf9b38000 0x800 0xf9b3e000 0x3ff>;
			status = "ok";
			compatible = "qcom,usb-ssphy-qmp";
		};

		hsphy@f92f8800 {
			phandle = <0xf0>;
			linux,phandle = <0xf0>;
			qcom,hsphy-host-init = <0xd1c9a7>;
			clock-names = "phy_sleep_clk";
			clocks = <0xaa 0x2e4d8839>;
			qcom,vdda-force-on;
			qcom,sleep-clk-reset;
			qcom,set-pllbtune;
			qcom,vbus-valid-override;
			qcom,ext-vbus-id;
			qcom,vdd-voltage-level = <0x01 0x05 0x07>;
			vdda33-supply = <0xed>;
			vdda18-supply = <0xf4>;
			vddcx-supply = <0xf3>;
			vdd-supply = <0xf2>;
			qcom,hsphy-init = <0xd191a4>;
			reg-names = "core\0phy_csr";
			reg = <0xf92f8800 0x3ff 0xf9b3a000 0x110>;
			status = "ok";
			compatible = "qcom,usb-hsphy";
		};

		ssusb@f9200000 {
			phandle = <0xea>;
			linux,phandle = <0xea>;
			clock-names = "core_clk\0iface_clk\0utmi_clk\0sleep_clk\0ref_clk\0xo";
			clocks = <0xaa 0xb3b4e2cb 0xaa 0x94d26800 0xaa 0xa800b65a 0xaa 0xd0b65c92 0x47 0x3ab0b36d 0x47 0xf79c19f6>;
			qcom,por-after-power-collapse;
			qcom,power-collapse-on-cable-disconnect;
			qcom,msm-bus,vectors-KBps = <0x3d 0x200 0x00 0x00 0x3d 0x200 0x3a980 0xea600>;
			qcom,msm-bus,num-paths = <0x01>;
			qcom,msm-bus,num-cases = <0x02>;
			qcom,msm-bus,name = "usb3";
			qcom,usb-dbm = <0xef>;
			qcom,dwc-usb3-msm-qdss-tx-fifo-size = <0x2000>;
			qcom,dwc-usb3-msm-tx-fifo-size = <0x7400>;
			vbus_dwc3-supply = <0xee>;
			vdda33-supply = <0xed>;
			USB3_GDSC-supply = <0xec>;
			interrupt-names = "hs_phy_irq\0pwr_event_irq\0pmic_id_irq";
			interrupt-map = <0x00 0x00 0x01 0x00 0x85 0x00 0x00 0x01 0x01 0x00 0xb4 0x00 0x00 0x01 0xeb 0x00 0x00 0x09 0x00>;
			interrupt-map-mask = <0x00 0xffffffff>;
			#interrupt-cells = <0x01>;
			interrupts = <0x00 0x01>;
			interrupt-parent = <0xea>;
			ranges;
			#size-cells = <0x01>;
			#address-cells = <0x01>;
			reg = <0xf9200000 0xfc000 0xfd4ab000 0x04>;
			status = "ok";
			compatible = "qcom,dwc-usb3-msm";

			dwc3@f9200000 {
				maximum-speed = "high-speed";
				usb-phy = <0xf0 0xf1>;
				snps,usb3-u1u2-disable;
				tx-fifo-resize;
				interrupts = <0x00 0x83 0x00>;
				interrupt-parent = <0x01>;
				reg = <0xf9200000 0xfc000>;
				compatible = "synopsys,dwc3";
			};
		};

>  			clocks = <&gcc GCC_USB30_MASTER_CLK>,
>  				 <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
>  				 <&gcc GCC_USB30_SLEEP_CLK>,

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

* Re: [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts
  2024-12-06 22:02   ` Petr Vorel
@ 2024-12-14 22:33     ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2024-12-14 22:33 UTC (permalink / raw)
  To: Petr Vorel, Konrad Dybcio
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Bjorn Andersson, Yassine Oudjana,
	Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Kryštof Černý, Alexander Reimelt,
	Dominik Kobinski, Harry Austen, Konrad Dybcio

On 6.12.2024 11:02 PM, Petr Vorel wrote:
> Hi Konrad, all,
> 
>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
>> Previously the interrupt lanes were not described, fix that.
> 
>> Fixes: d9be0bc95f25 ("arm64: dts: qcom: msm8994: Add USB support")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> ---
>>  arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++
>>  1 file changed, 9 insertions(+)
> 
>> diff --git a/arch/arm64/boot/dts/qcom/msm8994.dtsi b/arch/arm64/boot/dts/qcom/msm8994.dtsi
>> index 1acb0f159511996db07bc7543cf4f194a4ebd0fa..8c0b1e3a99a767e7c28bcaf3b9687501cc15cd58 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8994.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8994.dtsi
>> @@ -437,6 +437,15 @@ usb3: usb@f92f8800 {
>>  			#size-cells = <1>;
>>  			ranges;
> 
>> +			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
>> +				     <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
>> +				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
>> +				     <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>;
>> +			interrupt-names = "pwr_event",
>> +					  "qusb2_phy",
>> +					  "hs_phy_irq",
>> +					  "ss_phy_irq";
>> +
> 
> Tested-by: Petr Vorel <petr.vorel@gmail.com>
> 
> Well, I tested this on msm8994 Huawei Nexus 6P. It did not break anything,
> but obviously it's not enough for phone to get USB working. IMHO none of
> msm899[24] has working USB.

It did work for me on both libra and on the Sony phones.. On the Lumias
it worked when I booted through lk2nd, and I tracked it down to one of
the writes that I never implemented.. and then I removed the repo
where I had it tracked down

I took a quick peek (but don't have the time right now to make sure it's
this one) and if my memory doesn't fail me, you may need to

// the second address in qcom,usb-dwc3-msm in downstream
void __iomem *foo = ioremap(0xFD4AB000, 0x4);
u32 val = readl(foo);
val |= BIT(0);
writel(val, foo);

> msm8996 has usb3phy, hsusb_phy[12] labels, I suppose USB will not be working
> until this is set. Below is a snippet of a downstream device tree. I might
> be able to transform it to the mainline tree, but feel free to post a patch
> (probably obvious for you).

So long as the PHY is not reset, it should be working as well as it
did in the bootloader.. which depending on whether your BL set it up
may mean "well" or "not at all".. Give the above a shot, put it in
some early init code.

Konrad

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

* Re: (subset) [RFT PATCH 0/4] More QC DWC3 fixups
  2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
                   ` (3 preceding siblings ...)
  2024-11-29 22:12 ` [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts Konrad Dybcio
@ 2024-12-26 22:38 ` Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2024-12-26 22:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Yassine Oudjana, Konrad Dybcio
  Cc: Marijn Suijten, linux-arm-msm, linux-usb, devicetree,
	linux-kernel, Konrad Dybcio, Petr Vorel,
	Kryštof Černý, Alexander Reimelt, Dominik Kobinski,
	Harry Austen, Konrad Dybcio


On Fri, 29 Nov 2024 23:12:44 +0100, Konrad Dybcio wrote:
> Squashed a couple more warnings, the remaining ones I'll try to figure
> out soon.
> 
> This is all based on what I was able to make out from docs. Couldn't get
> any 8994 or 8996 boards I have access to booting reliably :(
> Ccing some folks that I'm hoping could help out testing this
> 
> [...]

Applied, thanks!

[3/4] arm64: dts: qcom: msm8996: Fix up USB3 interrupts
      commit: 9cb9c9f4e1380da317a056afd26d66a835c5796c
[4/4] arm64: dts: qcom: msm8994: Describe USB interrupts
      commit: c910544d2234709660d60f80345c285616e73b1c

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2024-12-26 22:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29 22:12 [RFT PATCH 0/4] More QC DWC3 fixups Konrad Dybcio
2024-11-29 22:12 ` [PATCH RFT 1/4] dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for MSM8996 Konrad Dybcio
2024-12-04 14:22   ` Rob Herring (Arm)
2024-11-29 22:12 ` [PATCH RFT 2/4] dt-bindings: usb: qcom,dwc3: Fix MSM8994 interrupt spec Konrad Dybcio
2024-12-04 14:22   ` Rob Herring (Arm)
2024-11-29 22:12 ` [PATCH RFT 3/4] arm64: dts: qcom: msm8996: Fix up USB3 interrupts Konrad Dybcio
2024-11-29 22:12 ` [PATCH RFT 4/4] arm64: dts: qcom: msm8994: Describe USB interrupts Konrad Dybcio
2024-12-06 22:02   ` Petr Vorel
2024-12-14 22:33     ` Konrad Dybcio
2024-12-26 22:38 ` (subset) [RFT PATCH 0/4] More QC DWC3 fixups Bjorn Andersson

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