Message ID | 20211120214227.779742-9-danct12@riseup.net (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Improve support for Xiaomi Redmi Note 7 | expand |
On 20/11/2021 21:42, Dang Huynh wrote: > From: Alexey Min <alexey.min@gmail.com> > > Enable and configure DWC3 and QUSB2 PHY to enable USB > functionality on the Redmi Note 7. > > Signed-off-by: Alexey Min <alexey.min@gmail.com> > Co-developed-by: Dang Huynh <danct12@riseup.net> > Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> > Signed-off-by: Dang Huynh <danct12@riseup.net> > --- > .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 25 +++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts > index 45e58714af71..6cdd9f7c864b 100644 > --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts > +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts > @@ -79,6 +79,15 @@ framebuffer_mem: memory@9d400000 { > no-map; > }; > }; > + > + /* > + * Until we hook up type-c detection, we > + * have to stick with this. But it works. > + */ > + extcon_usb: extcon-usb { > + compatible = "linux,extcon-usb-gpio"; > + id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>; > + }; > }; > > &blsp1_uart2 { > @@ -95,6 +104,13 @@ &pon_resin { > linux,code = <KEY_VOLUMEDOWN>; > }; > > +&qusb2phy { > + status = "okay"; > + > + vdd-supply = <&vreg_l1b_0p925>; > + vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; > +}; > + > &rpm_requests { > pm660l-regulators { > compatible = "qcom,rpm-pm660l-regulators"; > @@ -370,3 +386,12 @@ &sdhc_2 { > &tlmm { > gpio-reserved-ranges = <8 4>; > }; > + > +&usb3 { > + status = "okay"; > +}; > + > +&usb3_dwc3 { > + dr_mode = "peripheral"; > + extcon = <&extcon_usb>; > +}; > -- > 2.33.1 > Reviewed-by: Caleb Connolly <caleb@connolly> -- Kind Regards, Caleb
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts index 45e58714af71..6cdd9f7c864b 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts @@ -79,6 +79,15 @@ framebuffer_mem: memory@9d400000 { no-map; }; }; + + /* + * Until we hook up type-c detection, we + * have to stick with this. But it works. + */ + extcon_usb: extcon-usb { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>; + }; }; &blsp1_uart2 { @@ -95,6 +104,13 @@ &pon_resin { linux,code = <KEY_VOLUMEDOWN>; }; +&qusb2phy { + status = "okay"; + + vdd-supply = <&vreg_l1b_0p925>; + vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; +}; + &rpm_requests { pm660l-regulators { compatible = "qcom,rpm-pm660l-regulators"; @@ -370,3 +386,12 @@ &sdhc_2 { &tlmm { gpio-reserved-ranges = <8 4>; }; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; + extcon = <&extcon_usb>; +};