* [PATCH 1/4] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PM4125
2024-01-30 19:42 [PATCH 0/4] arm64: dts: qcom: qrb2210-rb1: enable Type-C support Dmitry Baryshkov
@ 2024-01-30 19:42 ` Dmitry Baryshkov
2024-01-31 8:24 ` Krzysztof Kozlowski
2024-01-30 19:42 ` [PATCH 2/4] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block Dmitry Baryshkov
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:42 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
The VBUS register block on the PM4125 PMIC shares the design with the
PM8150B one. Define corresponding compatible string, having the
qcom,pm8150b-vbus-reg as a fallback.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
index 66dcd5ce03e6..3cd489326267 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
@@ -24,6 +24,7 @@ properties:
- qcom,pm8150b-vbus-reg
- items:
- enum:
+ - qcom,pm4125-vbus-reg
- qcom,pmi632-vbus-reg
- const: qcom,pm8150b-vbus-reg
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/4] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PM4125
2024-01-30 19:42 ` [PATCH 1/4] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PM4125 Dmitry Baryshkov
@ 2024-01-31 8:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-31 8:24 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Wesley Cheng, Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
On 30/01/2024 20:42, Dmitry Baryshkov wrote:
> The VBUS register block on the PM4125 PMIC shares the design with the
> PM8150B one. Define corresponding compatible string, having the
> qcom,pm8150b-vbus-reg as a fallback.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block
2024-01-30 19:42 [PATCH 0/4] arm64: dts: qcom: qrb2210-rb1: enable Type-C support Dmitry Baryshkov
2024-01-30 19:42 ` [PATCH 1/4] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PM4125 Dmitry Baryshkov
@ 2024-01-30 19:42 ` Dmitry Baryshkov
2024-01-31 8:24 ` Krzysztof Kozlowski
2024-01-30 19:42 ` [PATCH 3/4] arm64: dts: qcom: pm4125: define USB-C related blocks Dmitry Baryshkov
2024-01-30 19:42 ` [PATCH 4/4] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling Dmitry Baryshkov
3 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:42 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
The PM4125 PMIC has the same Type-C register block as the PMI632.
Likewise it doesn't support USB Power Delivery. Define the compatible
for the TypeC block found on PM4125, using PMI632 as a compatible.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
index 6c0c6b337693..9750cbb7558c 100644
--- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
@@ -14,9 +14,15 @@ description:
properties:
compatible:
- enum:
- - qcom,pmi632-typec
- - qcom,pm8150b-typec
+ oneOf:
+ - enum:
+ - qcom,pmi632-typec
+ - qcom,pm8150b-typec
+ - items:
+ - enum:
+ - qcom,pm4125-typec
+ - const: qcom,pmi632-typec
+
connector:
type: object
@@ -93,6 +99,7 @@ allOf:
contains:
enum:
- qcom,pmi632-typec
+ - qcom,pm4125-typec
then:
properties:
reg:
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 2/4] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block
2024-01-30 19:42 ` [PATCH 2/4] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block Dmitry Baryshkov
@ 2024-01-31 8:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-31 8:24 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Wesley Cheng, Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
On 30/01/2024 20:42, Dmitry Baryshkov wrote:
> The PM4125 PMIC has the same Type-C register block as the PMI632.
> Likewise it doesn't support USB Power Delivery. Define the compatible
> for the TypeC block found on PM4125, using PMI632 as a compatible.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> index 6c0c6b337693..9750cbb7558c 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> @@ -14,9 +14,15 @@ description:
>
> properties:
> compatible:
> - enum:
> - - qcom,pmi632-typec
> - - qcom,pm8150b-typec
> + oneOf:
> + - enum:
> + - qcom,pmi632-typec
> + - qcom,pm8150b-typec
> + - items:
> + - enum:
> + - qcom,pm4125-typec
> + - const: qcom,pmi632-typec
> +
>
> connector:
> type: object
> @@ -93,6 +99,7 @@ allOf:
> contains:
> enum:
> - qcom,pmi632-typec
> + - qcom,pm4125-typec
This should not be needed. You have 632 fallback present here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] arm64: dts: qcom: pm4125: define USB-C related blocks
2024-01-30 19:42 [PATCH 0/4] arm64: dts: qcom: qrb2210-rb1: enable Type-C support Dmitry Baryshkov
2024-01-30 19:42 ` [PATCH 1/4] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PM4125 Dmitry Baryshkov
2024-01-30 19:42 ` [PATCH 2/4] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block Dmitry Baryshkov
@ 2024-01-30 19:42 ` Dmitry Baryshkov
2024-02-01 16:17 ` Konrad Dybcio
2024-01-30 19:42 ` [PATCH 4/4] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling Dmitry Baryshkov
3 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:42 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
Define VBUS regulator and the Type-C handling block as present on the
Quacomm PM4125 PMIC.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pm4125.dtsi | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm4125.dtsi b/arch/arm64/boot/dts/qcom/pm4125.dtsi
index d886a9e4b091..cf8c822e80ce 100644
--- a/arch/arm64/boot/dts/qcom/pm4125.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm4125.dtsi
@@ -36,6 +36,36 @@ pm4125_resin: resin {
};
};
+ pm4125_vbus: usb-vbus-regulator@1100 {
+ compatible = "qcom,pm4125-vbus-reg", "qcom,pm8150b-vbus-reg";
+ reg = <0x1100>;
+ status = "disabled";
+ };
+
+ pm4125_typec: typec@1500 {
+ compatible = "qcom,pm4125-typec", "qcom,pmi632-typec";
+ reg = <0x1500>;
+ interrupts = <0x0 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x15 0x07 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "or-rid-detect-change",
+ "vpd-detect",
+ "cc-state-change",
+ "vconn-oc",
+ "vbus-change",
+ "attach-detach",
+ "legacy-cable-detect",
+ "try-snk-src-detect";
+ vdd-vbus-supply = <&pm4125_vbus>;
+
+ status = "disabled";
+ };
+
rtc@6000 {
compatible = "qcom,pm8941-rtc";
reg = <0x6000>, <0x6100>;
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 3/4] arm64: dts: qcom: pm4125: define USB-C related blocks
2024-01-30 19:42 ` [PATCH 3/4] arm64: dts: qcom: pm4125: define USB-C related blocks Dmitry Baryshkov
@ 2024-02-01 16:17 ` Konrad Dybcio
0 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2024-02-01 16:17 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
On 30.01.2024 20:42, Dmitry Baryshkov wrote:
> Define VBUS regulator and the Type-C handling block as present on the
> Quacomm PM4125 PMIC.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling
2024-01-30 19:42 [PATCH 0/4] arm64: dts: qcom: qrb2210-rb1: enable Type-C support Dmitry Baryshkov
` (2 preceding siblings ...)
2024-01-30 19:42 ` [PATCH 3/4] arm64: dts: qcom: pm4125: define USB-C related blocks Dmitry Baryshkov
@ 2024-01-30 19:42 ` Dmitry Baryshkov
2024-02-01 16:17 ` Konrad Dybcio
3 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:42 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
Plug in USB-C related bits and pieces to enable USB role switching and
USB-C orientation handling for the Qualcomm RB1 board.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 42 ++++++++++++++++++++++
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 60 +++++++++++++++++++++++++++-----
2 files changed, 94 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index 0911fb08ed63..6e9a92556423 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -689,8 +689,29 @@ usb_qmpphy: phy@1615000 {
clock-output-names = "usb3_phy_pipe_clk_src";
#phy-cells = <0>;
+ orientation-switch;
status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_qmpphy_usb_ss_in: endpoint {
+ remote-endpoint = <&usb_dwc3_ss>;
+ };
+ };
+ };
};
system_noc: interconnect@1880000 {
@@ -1373,6 +1394,27 @@ usb_dwc3: usb@4e00000 {
snps,usb3_lpm_capable;
maximum-speed = "super-speed";
dr_mode = "otg";
+ usb-role-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_dwc3_ss: endpoint {
+ remote-endpoint = <&usb_qmpphy_usb_ss_in>;
+ };
+ };
+ };
};
};
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index 64b2ab286279..00fcc01326ff 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -244,6 +244,46 @@ &pm4125_resin {
status = "okay";
};
+&pm4125_typec {
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "dual";
+ data-role = "dual";
+ self-powered;
+
+ typec-power-opmode = "default";
+ pd-disable;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ pm4125_hs_in: endpoint {
+ remote-endpoint = <&usb_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ pm4125_ss_in: endpoint {
+ remote-endpoint = <&usb_qmpphy_out>;
+ };
+ };
+ };
+ };
+};
+
+&pm4125_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <500000>;
+ status = "okay";
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -517,14 +557,8 @@ &usb {
status = "okay";
};
-&usb_qmpphy {
- vdda-phy-supply = <&pm4125_l12>;
- vdda-pll-supply = <&pm4125_l13>;
- status = "okay";
-};
-
-&usb_dwc3 {
- dr_mode = "host";
+&usb_dwc3_hs {
+ remote-endpoint = <&pm4125_hs_in>;
};
&usb_hsphy {
@@ -534,6 +568,16 @@ &usb_hsphy {
status = "okay";
};
+&usb_qmpphy {
+ vdda-phy-supply = <&pm4125_l12>;
+ vdda-pll-supply = <&pm4125_l13>;
+ status = "okay";
+};
+
+&usb_qmpphy_out {
+ remote-endpoint = <&pm4125_ss_in>;
+};
+
&wifi {
vdd-0.8-cx-mx-supply = <&pm4125_l7>;
vdd-1.8-xo-supply = <&pm4125_l13>;
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 4/4] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling
2024-01-30 19:42 ` [PATCH 4/4] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling Dmitry Baryshkov
@ 2024-02-01 16:17 ` Konrad Dybcio
0 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2024-02-01 16:17 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Bryan O'Donoghue, Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-usb
On 30.01.2024 20:42, Dmitry Baryshkov wrote:
> Plug in USB-C related bits and pieces to enable USB role switching and
> USB-C orientation handling for the Qualcomm RB1 board.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
lgtm
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 9+ messages in thread