Message ID | 20230405125759.4201-9-quic_kriskura@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | Add multiport support for DWC3 controllers | expand |
On Wed, Apr 05, 2023 at 06:27:59PM +0530, Krishna Kurapati wrote: > Enable first port of Quad port Tertiary USB controller for SA8540 Ride. > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> This is nitpicky, but I liked some of the description in the first[0] version of this patch that I authored for you: From dcb27d07f079194ebd7efe1c9bec64da78beb290 Mon Sep 17 00:00:00 2001 From: Andrew Halaney <ahalaney@redhat.com> Date: Thu, 19 Jan 2023 14:53:38 -0600 Subject: [PATCH] arm64: dts: qcom: sa8540p-ride: Enable usb_2 Content-type: text/plain There is now support for the multiport USB controller this uses so enable it. The board only has a single port hooked up (despite it being wired up to the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, which by default on boot is selected to mux properly. Grab the gpio controlling that and ensure it stays in the right position so USB 2.0 continues to be routed from the external port to the SoC. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Specifically the bit helping explain what the mux, its default state, etc are things I find explain some of the hardware/patch better. Personal opinion of course but I'll highlight it since you dropped it out :) [0] https://lore.kernel.org/linux-arm-msm/20230119220942.ja5gbo3t3fl63gpy@halaney-x13s/ Either way, thanks for taking the patch along and working on this. Thanks, Andrew
On 4/14/2023 9:21 PM, Andrew Halaney wrote: > On Wed, Apr 05, 2023 at 06:27:59PM +0530, Krishna Kurapati wrote: >> Enable first port of Quad port Tertiary USB controller for SA8540 Ride. >> >> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > This is nitpicky, but I liked some of the description in the first[0] > version of this patch that I authored for you: > > From dcb27d07f079194ebd7efe1c9bec64da78beb290 Mon Sep 17 00:00:00 2001 > From: Andrew Halaney <ahalaney@redhat.com> > Date: Thu, 19 Jan 2023 14:53:38 -0600 > Subject: [PATCH] arm64: dts: qcom: sa8540p-ride: Enable usb_2 > Content-type: text/plain > > There is now support for the multiport USB controller this uses > so enable it. > > The board only has a single port hooked up (despite it being wired up to > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > which by default on boot is selected to mux properly. Grab the gpio > controlling that and ensure it stays in the right position so USB 2.0 > continues to be routed from the external port to the SoC. > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > Specifically the bit helping explain what the mux, its default state, > etc are things I find explain some of the hardware/patch better. Personal > opinion of course but I'll highlight it since you dropped it out :) > > [0] https://lore.kernel.org/linux-arm-msm/20230119220942.ja5gbo3t3fl63gpy@halaney-x13s/ > > Either way, thanks for taking the patch along and working on this. > > Thanks, > Andrew > Hi Andrew, Sorry for that. Will make sure to update the commit text with this info in the next version. Regards, Krishna,
diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts index 24fa449d48a6..53d47593306e 100644 --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts @@ -309,6 +309,19 @@ &usb_2_qmpphy0 { status = "okay"; }; +&usb_2 { + pinctrl-names = "default"; + pinctrl-0 = <&usb2_en_state>; + + status = "okay"; +}; + +&usb_2_dwc3 { + dr_mode = "host"; + phy-names = "usb2-port0", "usb3-port0"; + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; +}; + &xo_board_clk { clock-frequency = <38400000>; }; @@ -401,4 +414,13 @@ wake-pins { bias-pull-up; }; }; + + usb2_en_state: usb2-en-state { + /* TS3USB221A USB2.0 mux select */ + pins = "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; };
Enable first port of Quad port Tertiary USB controller for SA8540 Ride. Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> --- Link to v5: https://lore.kernel.org/all/20230310163420.7582-9-quic_kriskura@quicinc.com/ arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)