Message ID | 20230501121111.1058190-1-bryan.odonoghue@linaro.org |
---|---|
Headers | show |
Series | Add Qualcomm PMIC TPCM support | expand |
On 1.05.2023 14:11, Bryan O'Donoghue wrote: > Switch on VBUS for the Type-C port. We need to support a higher amperage > than the bootloader set 2 Amps. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index dd924331b0eea..b326bdeeb7742 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -1338,3 +1338,9 @@ &qup_spi0_data_clk { > drive-strength = <6>; > bias-disable; > }; > + > +&pm8150b_vbus { > + regulator-min-microamp = <500000>; > + regulator-max-microamp = <3000000>; > + status = "okay"; > +};
On 01/05/2023 14:11, Bryan O'Donoghue wrote: > Add a description for the Type-C silicon interface inside Qualcomm's > PM8150b hardware block. > > Based on original work by Wesley. > > Signed-off-by: Wesley Cheng <wcheng@codeaurora.org> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- Thank you for your patch. There is something to discuss/improve. Two nits below > + port@1 { > + reg = <1>; > + pmic_typec_role_switch_out: endpoint { > + remote-endpoint = <&usb_controller_role_switch_in>; > + }; > + }; > + }; > + }; > + }; > + }; > + > + usb_controller { No underscores in node names, just "usb" > + dr_mode = "otg"; > + usb-role-switch; > + port { > + usb_controller_role_switch_in: endpoint { > + remote-endpoint = <&pmic_typec_role_switch_out>; > + }; > + }; > + }; > + > + usb_phy { usb-phy With fixes above: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 1.05.2023 14:11, Bryan O'Donoghue wrote: > Switch on TCPM for the RB5. Here we declare as a source only not a sink > since qrb5165 doesn't support powering exclusively from the type-c port. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index b326bdeeb7742..1e0b6fd59abc9 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -9,6 +9,7 @@ > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > #include <dt-bindings/sound/qcom,q6afe.h> > #include <dt-bindings/sound/qcom,q6asm.h> > +#include <dt-bindings/usb/pd.h> > #include "sm8250.dtsi" > #include "pm8150.dtsi" > #include "pm8150b.dtsi" > @@ -1344,3 +1345,19 @@ &pm8150b_vbus { > regulator-max-microamp = <3000000>; > status = "okay"; > }; > + > +&pm8150b_typec { > + status = "okay"; Missing newline Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > + connector { > + compatible = "usb-c-connector"; > + > + power-role = "source"; > + data-role = "dual"; > + self-powered; > + > + source-pdos = <PDO_FIXED(5000, 3000, > + PDO_FIXED_DUAL_ROLE | > + PDO_FIXED_USB_COMM | > + PDO_FIXED_DATA_SWAP)>; > + }; > +};
On 1.05.2023 14:11, Bryan O'Donoghue wrote: > Switch on USB orientation-switching for usb_1_qmp via TCPM. Detecting the > orientation switch is required to get the PHY to reset and bring-up the PHY > with the CC lines set to the appropriate lane. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index b5cc45358a474..8935a8e327904 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -1295,6 +1295,14 @@ &usb_1_qmpphy { > > vdda-phy-supply = <&vreg_l9a_1p2>; > vdda-pll-supply = <&vreg_l18a_0p92>; > + orientation-switch; > + ports { > + port@1 { > + qmpphy_typec_mux_in: endpoint { You defined these ports in patch 6, you can simply reference the labels and assign endpoints. Konrad > + remote-endpoint = <&pm8150b_typec_mux_out>; > + }; > + }; > + }; > }; > > &usb_2 { > @@ -1375,6 +1383,12 @@ pm8150b_role_switch_out: endpoint { > remote-endpoint = <&dwc3_role_switch_in>; > }; > }; > + port@1 { > + reg = <1>; > + pm8150b_typec_mux_out: endpoint { > + remote-endpoint = <&qmpphy_typec_mux_in>; > + }; > + }; > }; > }; > };
On 1.05.2023 14:11, Bryan O'Donoghue wrote: > ports for orientation switching input and output. The individual board dts > files will instantiate port@0 and port@1 depending on the supported > feature-set. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > arch/arm64/boot/dts/qcom/sm8250.dtsi | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi > index a91d1175255e8..af16d3ba76b8e 100644 > --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi > @@ -3581,6 +3581,19 @@ dp_phy: dp-phy@88ea200 { > #phy-cells = <0>; > #clock-cells = <1>; > }; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + }; > + > + port@1 { > + reg = <1>; > + }; > + }; > }; > > usb_2_qmpphy: phy@88eb000 {