All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4
@ 2024-03-22  8:01 Luca Weiss
  2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

This series adds support for Type-C Port Management on the Fairphone 4
which enables USB role switching and orientation switching.

This enables a user for example to plug in a USB stick or a USB keyboard
to the Type-C port.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (5):
      dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
      dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC
      arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster
      arm64: dts: qcom: pm7250b: Add a TCPM description
      arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching

 .../regulator/qcom,usb-vbus-regulator.yaml         |  1 +
 .../devicetree/bindings/usb/qcom,pmic-typec.yaml   |  1 +
 arch/arm64/boot/dts/qcom/pm7250b.dtsi              | 45 +++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6350.dtsi               | 25 ++++++++++
 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  | 57 +++++++++++++++++++++-
 5 files changed, 128 insertions(+), 1 deletion(-)
---
base-commit: fa564eb0e6faf40ceea92b2e5ba7a08d0a79594c
change-id: 20240322-fp4-tcpm-2ad68ef55346

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


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

* [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
@ 2024-03-22  8:01 ` Luca Weiss
  2024-03-22 10:24   ` Bryan O'Donoghue
  2024-03-22 17:55   ` Conor Dooley
  2024-03-22  8:01 ` [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC Luca Weiss
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

The VBUS register block on the PM6150 PMIC shares the design with the
PM8150B one. Define corresponding compatible string, having the
qcom,pm8150b-vbus-reg as a fallback.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 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 33ae1f786802..fcefc722ee2a 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
@@ -26,6 +26,7 @@ properties:
           - enum:
               - qcom,pm4125-vbus-reg
               - qcom,pm6150-vbus-reg
+              - qcom,pm7250b-vbus-reg
               - qcom,pmi632-vbus-reg
           - const: qcom,pm8150b-vbus-reg
 

-- 
2.44.0


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

* [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
  2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
@ 2024-03-22  8:01 ` Luca Weiss
  2024-03-22 17:55   ` Conor Dooley
  2024-03-22  8:01 ` [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Luca Weiss
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

The PM6150 PMIC has the same Type-C register block as the PM8150B.
Define corresponding compatible string, having the qcom,pm8150b-vbus-reg
as a fallback.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
index d9694570c419..0cdc60b76fbd 100644
--- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
@@ -21,6 +21,7 @@ properties:
       - items:
           - enum:
               - qcom,pm6150-typec
+              - qcom,pm7250b-typec
           - const: qcom,pm8150b-typec
       - items:
           - enum:

-- 
2.44.0


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

* [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
  2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
  2024-03-22  8:01 ` [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC Luca Weiss
@ 2024-03-22  8:01 ` Luca Weiss
  2024-03-22 10:31   ` Bryan O'Donoghue
  2024-03-22 18:18   ` Konrad Dybcio
  2024-03-22  8:01 ` [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description Luca Weiss
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

Add the required DTS node for the USB VBUS output regulator, which is
available on PM7250B. This will provide the VBUS source to connected
peripherals.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/pm7250b.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
index 3bf7cf5d1700..91a046b3529c 100644
--- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
@@ -45,6 +45,12 @@ pmic@PM7250B_SID {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pm7250b_vbus: usb-vbus-regulator@1100 {
+			compatible = "qcom,pm7250b-vbus-reg", "qcom,pm8150b-vbus-reg";
+			status = "disabled";
+			reg = <0x1100>;
+		};
+
 		pm7250b_temp: temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;

-- 
2.44.0


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

* [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
                   ` (2 preceding siblings ...)
  2024-03-22  8:01 ` [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Luca Weiss
@ 2024-03-22  8:01 ` Luca Weiss
  2024-03-22 10:32   ` Bryan O'Donoghue
  2024-03-22 18:20   ` Konrad Dybcio
  2024-03-22  8:01 ` [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Luca Weiss
  2024-03-25 17:44 ` (subset) [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Mark Brown
  5 siblings, 2 replies; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

Type-C port management functionality lives inside of the PMIC block on
pm7250b.

The Type-C port management logic controls orientation detection,
vbus/vconn sense and to send/receive Type-C Power Domain messages.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/pm7250b.dtsi | 39 +++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
index 91a046b3529c..d9abac052afe 100644
--- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
@@ -51,6 +51,45 @@ pm7250b_vbus: usb-vbus-regulator@1100 {
 			reg = <0x1100>;
 		};
 
+		pm7250b_typec: typec@1500 {
+			compatible = "qcom,pm7250b-typec", "qcom,pm8150b-typec";
+			reg = <0x1500>,
+			      <0x1700>;
+			interrupts = <PM7250B_SID 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
+				     <PM7250B_SID 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
+				     <PM7250B_SID 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
+				     <PM7250B_SID 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
+				     <PM7250B_SID 0x17 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",
+					  "sig-tx",
+					  "sig-rx",
+					  "msg-tx",
+					  "msg-rx",
+					  "msg-tx-failed",
+					  "msg-tx-discarded",
+					  "msg-rx-discarded",
+					  "fr-swap";
+			vdd-vbus-supply = <&pm7250b_vbus>;
+		};
+
 		pm7250b_temp: temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;

-- 
2.44.0


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

* [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
                   ` (3 preceding siblings ...)
  2024-03-22  8:01 ` [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description Luca Weiss
@ 2024-03-22  8:01 ` Luca Weiss
  2024-03-22 10:54   ` Dmitry Baryshkov
  2024-03-22 10:58   ` Bryan O'Donoghue
  2024-03-25 17:44 ` (subset) [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Mark Brown
  5 siblings, 2 replies; 16+ messages in thread
From: Luca Weiss @ 2024-03-22  8:01 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: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb, Luca Weiss

Configure the Type-C and VBUS regulator on PM7250B and wire it up to the
USB PHY, so that USB role and orientation switching works.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
With this patch I'm not quite sure if the 'ports' are connected
correctly, though functionally everything appears to work fine.

On some other SoCs port@1 in qmpphy and a second port in dwc3 are
connected together also - one port of USB 2.0 HS, one for USB 3.0 SS.

Here I'm following sm8250's solution. Also checking the binding doc
doesn't reveal anything useful.
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi              | 25 ++++++++++
 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 57 ++++++++++++++++++++++-
 2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 24bcec3366ef..b267500467f0 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1686,6 +1686,27 @@ usb_1_qmpphy: phy@88e8000 {
 			#phy-cells = <1>;
 
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usb_1_qmpphy_out: endpoint {};
+				};
+
+				port@1 {
+					reg = <1>;
+				};
+
+				port@2 {
+					reg = <2>;
+
+					usb_1_qmpphy_dp_in: endpoint {};
+				};
+			};
 		};
 
 		dc_noc: interconnect@9160000 {
@@ -1861,6 +1882,10 @@ usb_1_dwc3: usb@a600000 {
 				snps,hird-threshold = /bits/ 8 <0x10>;
 				phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
 				phy-names = "usb2-phy", "usb3-phy";
+
+				port {
+					usb_1_role_switch_out: endpoint {};
+				};
 			};
 		};
 
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index bc67e8c1fe4d..104f23ec322d 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -19,6 +19,7 @@
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/usb/pd.h>
 #include "sm7225.dtsi"
 #include "pm6150l.dtsi"
 #include "pm6350.dtsi"
@@ -543,6 +544,50 @@ conn-therm@1 {
 	};
 };
 
+&pm7250b_typec {
+	vdd-pdphy-supply = <&vreg_l3a>;
+
+	status = "okay";
+
+	connector {
+		compatible = "usb-c-connector";
+
+		power-role = "source";
+		data-role = "dual";
+		self-powered;
+
+		source-pdos = <PDO_FIXED(5000, 1500,
+					 PDO_FIXED_DUAL_ROLE |
+					 PDO_FIXED_USB_COMM |
+					 PDO_FIXED_DATA_SWAP)>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				pm7250b_role_switch_in: endpoint {
+					remote-endpoint = <&usb_1_role_switch_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				pm7250b_typec_mux_in: endpoint {
+					remote-endpoint = <&usb_1_qmpphy_out>;
+				};
+			};
+		};
+	};
+};
+
+&pm7250b_vbus {
+	regulator-min-microamp = <500000>;
+	regulator-max-microamp = <1500000>;
+	status = "okay";
+};
+
 &pmk8350_rtc {
 	status = "okay";
 };
@@ -726,7 +771,12 @@ &usb_1 {
 
 &usb_1_dwc3 {
 	maximum-speed = "super-speed";
-	dr_mode = "peripheral";
+	dr_mode = "otg";
+	usb-role-switch;
+};
+
+&usb_1_role_switch_out {
+	remote-endpoint = <&pm7250b_role_switch_in>;
 };
 
 &usb_1_hsphy {
@@ -740,10 +790,15 @@ &usb_1_hsphy {
 &usb_1_qmpphy {
 	vdda-phy-supply = <&vreg_l22a>;
 	vdda-pll-supply = <&vreg_l16a>;
+	orientation-switch;
 
 	status = "okay";
 };
 
+&usb_1_qmpphy_out {
+	remote-endpoint = <&pm7250b_typec_mux_in>;
+};
+
 &wifi {
 	vdd-0.8-cx-mx-supply = <&vreg_l4a>;
 	vdd-1.8-xo-supply = <&vreg_l7a>;

-- 
2.44.0


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

* Re: [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
  2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
@ 2024-03-22 10:24   ` Bryan O'Donoghue
  2024-03-22 17:55   ` Conor Dooley
  1 sibling, 0 replies; 16+ messages in thread
From: Bryan O'Donoghue @ 2024-03-22 10:24 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Wesley Cheng, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22/03/2024 08:01, Luca Weiss wrote:
> The VBUS register block on the PM6150 PMIC shares the design with the
> PM8150B one. Define corresponding compatible string, having the
> qcom,pm8150b-vbus-reg as a fallback.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>   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 33ae1f786802..fcefc722ee2a 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
> @@ -26,6 +26,7 @@ properties:
>             - enum:
>                 - qcom,pm4125-vbus-reg
>                 - qcom,pm6150-vbus-reg
> +              - qcom,pm7250b-vbus-reg
>                 - qcom,pmi632-vbus-reg
>             - const: qcom,pm8150b-vbus-reg
>   
> 
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

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

* Re: [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster
  2024-03-22  8:01 ` [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Luca Weiss
@ 2024-03-22 10:31   ` Bryan O'Donoghue
  2024-03-22 18:18   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Bryan O'Donoghue @ 2024-03-22 10:31 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Wesley Cheng, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22/03/2024 08:01, Luca Weiss wrote:
> Add the required DTS node for the USB VBUS output regulator, which is
> available on PM7250B. This will provide the VBUS source to connected
> peripherals.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>   arch/arm64/boot/dts/qcom/pm7250b.dtsi | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> index 3bf7cf5d1700..91a046b3529c 100644
> --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> @@ -45,6 +45,12 @@ pmic@PM7250B_SID {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
>   
> +		pm7250b_vbus: usb-vbus-regulator@1100 {
> +			compatible = "qcom,pm7250b-vbus-reg", "qcom,pm8150b-vbus-reg";
> +			status = "disabled";
> +			reg = <0x1100>;
> +		};
> +
>   		pm7250b_temp: temp-alarm@2400 {
>   			compatible = "qcom,spmi-temp-alarm";
>   			reg = <0x2400>;
> 

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

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

* Re: [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description
  2024-03-22  8:01 ` [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description Luca Weiss
@ 2024-03-22 10:32   ` Bryan O'Donoghue
  2024-03-22 18:20   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Bryan O'Donoghue @ 2024-03-22 10:32 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Wesley Cheng, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22/03/2024 08:01, Luca Weiss wrote:
> Type-C port management functionality lives inside of the PMIC block on
> pm7250b.
> 
> The Type-C port management logic controls orientation detection,
> vbus/vconn sense and to send/receive Type-C Power Domain messages.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>   arch/arm64/boot/dts/qcom/pm7250b.dtsi | 39 +++++++++++++++++++++++++++++++++++
>   1 file changed, 39 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> index 91a046b3529c..d9abac052afe 100644
> --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> @@ -51,6 +51,45 @@ pm7250b_vbus: usb-vbus-regulator@1100 {
>   			reg = <0x1100>;
>   		};
>   
> +		pm7250b_typec: typec@1500 {
> +			compatible = "qcom,pm7250b-typec", "qcom,pm8150b-typec";
> +			reg = <0x1500>,
> +			      <0x1700>;
> +			interrupts = <PM7250B_SID 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
> +				     <PM7250B_SID 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
> +				     <PM7250B_SID 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
> +				     <PM7250B_SID 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
> +				     <PM7250B_SID 0x17 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",
> +					  "sig-tx",
> +					  "sig-rx",
> +					  "msg-tx",
> +					  "msg-rx",
> +					  "msg-tx-failed",
> +					  "msg-tx-discarded",
> +					  "msg-rx-discarded",
> +					  "fr-swap";
> +			vdd-vbus-supply = <&pm7250b_vbus>;
> +		};
> +
>   		pm7250b_temp: temp-alarm@2400 {
>   			compatible = "qcom,spmi-temp-alarm";
>   			reg = <0x2400>;
> 

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

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

* Re: [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching
  2024-03-22  8:01 ` [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Luca Weiss
@ 2024-03-22 10:54   ` Dmitry Baryshkov
  2024-03-22 10:58   ` Bryan O'Donoghue
  1 sibling, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2024-03-22 10:54 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On Fri, 22 Mar 2024 at 10:03, Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> Configure the Type-C and VBUS regulator on PM7250B and wire it up to the
> USB PHY, so that USB role and orientation switching works.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> With this patch I'm not quite sure if the 'ports' are connected
> correctly, though functionally everything appears to work fine.
>
> On some other SoCs port@1 in qmpphy and a second port in dwc3 are
> connected together also - one port of USB 2.0 HS, one for USB 3.0 SS.
>
> Here I'm following sm8250's solution. Also checking the binding doc
> doesn't reveal anything useful.

Thanks for pointing it out. The SM8250 / RB5 predated final DP
bindings / graphs. As such it didn't fully describe the signal chain
(the signals go from DWC3 and from DP controllers to the QMP PHY,
where they are muxed to the 4 output lanes).
I'll post an update for sm8250 / bindings doc.

I'd kindly ask to connect qmp / port@1 and dwc / port@1

> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi              | 25 ++++++++++
>  arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 57 ++++++++++++++++++++++-
>  2 files changed, 81 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index 24bcec3366ef..b267500467f0 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -1686,6 +1686,27 @@ usb_1_qmpphy: phy@88e8000 {
>                         #phy-cells = <1>;
>
>                         status = "disabled";
> +
> +                       ports {
> +                               #address-cells = <1>;
> +                               #size-cells = <0>;
> +
> +                               port@0 {
> +                                       reg = <0>;
> +
> +                                       usb_1_qmpphy_out: endpoint {};
> +                               };
> +
> +                               port@1 {
> +                                       reg = <1>;
> +                               };
> +
> +                               port@2 {
> +                                       reg = <2>;
> +
> +                                       usb_1_qmpphy_dp_in: endpoint {};
> +                               };
> +                       };
>                 };
>
>                 dc_noc: interconnect@9160000 {
> @@ -1861,6 +1882,10 @@ usb_1_dwc3: usb@a600000 {
>                                 snps,hird-threshold = /bits/ 8 <0x10>;
>                                 phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
>                                 phy-names = "usb2-phy", "usb3-phy";
> +
> +                               port {
> +                                       usb_1_role_switch_out: endpoint {};
> +                               };
>                         };
>                 };
>
> diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> index bc67e8c1fe4d..104f23ec322d 100644
> --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> @@ -19,6 +19,7 @@
>  #include <dt-bindings/leds/common.h>
>  #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/usb/pd.h>
>  #include "sm7225.dtsi"
>  #include "pm6150l.dtsi"
>  #include "pm6350.dtsi"
> @@ -543,6 +544,50 @@ conn-therm@1 {
>         };
>  };
>
> +&pm7250b_typec {
> +       vdd-pdphy-supply = <&vreg_l3a>;
> +
> +       status = "okay";
> +
> +       connector {
> +               compatible = "usb-c-connector";
> +
> +               power-role = "source";
> +               data-role = "dual";
> +               self-powered;
> +
> +               source-pdos = <PDO_FIXED(5000, 1500,
> +                                        PDO_FIXED_DUAL_ROLE |
> +                                        PDO_FIXED_USB_COMM |
> +                                        PDO_FIXED_DATA_SWAP)>;
> +
> +               ports {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       port@0 {
> +                               reg = <0>;
> +                               pm7250b_role_switch_in: endpoint {
> +                                       remote-endpoint = <&usb_1_role_switch_out>;
> +                               };
> +                       };
> +
> +                       port@1 {
> +                               reg = <1>;
> +                               pm7250b_typec_mux_in: endpoint {
> +                                       remote-endpoint = <&usb_1_qmpphy_out>;
> +                               };
> +                       };
> +               };
> +       };
> +};
> +
> +&pm7250b_vbus {
> +       regulator-min-microamp = <500000>;
> +       regulator-max-microamp = <1500000>;
> +       status = "okay";
> +};
> +
>  &pmk8350_rtc {
>         status = "okay";
>  };
> @@ -726,7 +771,12 @@ &usb_1 {
>
>  &usb_1_dwc3 {
>         maximum-speed = "super-speed";
> -       dr_mode = "peripheral";
> +       dr_mode = "otg";
> +       usb-role-switch;
> +};
> +
> +&usb_1_role_switch_out {
> +       remote-endpoint = <&pm7250b_role_switch_in>;
>  };
>
>  &usb_1_hsphy {
> @@ -740,10 +790,15 @@ &usb_1_hsphy {
>  &usb_1_qmpphy {
>         vdda-phy-supply = <&vreg_l22a>;
>         vdda-pll-supply = <&vreg_l16a>;
> +       orientation-switch;
>
>         status = "okay";
>  };
>
> +&usb_1_qmpphy_out {
> +       remote-endpoint = <&pm7250b_typec_mux_in>;
> +};
> +
>  &wifi {
>         vdd-0.8-cx-mx-supply = <&vreg_l4a>;
>         vdd-1.8-xo-supply = <&vreg_l7a>;
>
> --
> 2.44.0
>
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching
  2024-03-22  8:01 ` [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Luca Weiss
  2024-03-22 10:54   ` Dmitry Baryshkov
@ 2024-03-22 10:58   ` Bryan O'Donoghue
  1 sibling, 0 replies; 16+ messages in thread
From: Bryan O'Donoghue @ 2024-03-22 10:58 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Wesley Cheng, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22/03/2024 08:01, Luca Weiss wrote:
> Configure the Type-C and VBUS regulator on PM7250B and wire it up to the
> USB PHY, so that USB role and orientation switching works.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> With this patch I'm not quite sure if the 'ports' are connected
> correctly, though functionally everything appears to work fine.
> 
> On some other SoCs port@1 in qmpphy and a second port in dwc3 are
> connected together also - one port of USB 2.0 HS, one for USB 3.0 SS.
> 
> Here I'm following sm8250's solution. Also checking the binding doc
> doesn't reveal anything useful.

I don't see a redriver on your schematics which appears to be the only 
big difference to the qrb5165 reference.

https://www.fairphone.com/wp-content/uploads/2022/09/FP4_Information-for-repairers-and-recyclers.pdf


> ---
>   arch/arm64/boot/dts/qcom/sm6350.dtsi              | 25 ++++++++++
>   arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 57 ++++++++++++++++++++++-
>   2 files changed, 81 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index 24bcec3366ef..b267500467f0 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -1686,6 +1686,27 @@ usb_1_qmpphy: phy@88e8000 {
>   			#phy-cells = <1>;
>   
>   			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +
> +					usb_1_qmpphy_out: endpoint {};
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +
> +					usb_1_qmpphy_dp_in: endpoint {};
> +				};
> +			};
>   		};
>   
>   		dc_noc: interconnect@9160000 {
> @@ -1861,6 +1882,10 @@ usb_1_dwc3: usb@a600000 {
>   				snps,hird-threshold = /bits/ 8 <0x10>;
>   				phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
>   				phy-names = "usb2-phy", "usb3-phy";
> +
> +				port {
> +					usb_1_role_switch_out: endpoint {};
> +				};
>   			};
>   		};
>   
> diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> index bc67e8c1fe4d..104f23ec322d 100644
> --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> @@ -19,6 +19,7 @@
>   #include <dt-bindings/leds/common.h>
>   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>   #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/usb/pd.h>
>   #include "sm7225.dtsi"
>   #include "pm6150l.dtsi"
>   #include "pm6350.dtsi"
> @@ -543,6 +544,50 @@ conn-therm@1 {
>   	};
>   };
>   
> +&pm7250b_typec {
> +	vdd-pdphy-supply = <&vreg_l3a>;
> +
> +	status = "okay";
> +
> +	connector {
> +		compatible = "usb-c-connector";
> +
> +		power-role = "source";
> +		data-role = "dual";
> +		self-powered;
> +
> +		source-pdos = <PDO_FIXED(5000, 1500,
> +					 PDO_FIXED_DUAL_ROLE |
> +					 PDO_FIXED_USB_COMM |
> +					 PDO_FIXED_DATA_SWAP)>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				pm7250b_role_switch_in: endpoint {
> +					remote-endpoint = <&usb_1_role_switch_out>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +				pm7250b_typec_mux_in: endpoint {
> +					remote-endpoint = <&usb_1_qmpphy_out>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&pm7250b_vbus {
> +	regulator-min-microamp = <500000>;
> +	regulator-max-microamp = <1500000>;
> +	status = "okay";
> +};
> +
>   &pmk8350_rtc {
>   	status = "okay";
>   };
> @@ -726,7 +771,12 @@ &usb_1 {
>   
>   &usb_1_dwc3 {
>   	maximum-speed = "super-speed";
> -	dr_mode = "peripheral";
> +	dr_mode = "otg";
> +	usb-role-switch;
> +};
> +
> +&usb_1_role_switch_out {
> +	remote-endpoint = <&pm7250b_role_switch_in>;
>   };
>   
>   &usb_1_hsphy {
> @@ -740,10 +790,15 @@ &usb_1_hsphy {
>   &usb_1_qmpphy {
>   	vdda-phy-supply = <&vreg_l22a>;
>   	vdda-pll-supply = <&vreg_l16a>;
> +	orientation-switch;
>   
>   	status = "okay";
>   };
>   
> +&usb_1_qmpphy_out {
> +	remote-endpoint = <&pm7250b_typec_mux_in>;
> +};
> +
>   &wifi {
>   	vdd-0.8-cx-mx-supply = <&vreg_l4a>;
>   	vdd-1.8-xo-supply = <&vreg_l7a>;
> 

This looks consistent with 8250

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

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

* Re: [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC
  2024-03-22  8:01 ` [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC Luca Weiss
@ 2024-03-22 17:55   ` Conor Dooley
  0 siblings, 0 replies; 16+ messages in thread
From: Conor Dooley @ 2024-03-22 17:55 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

On Fri, Mar 22, 2024 at 09:01:33AM +0100, Luca Weiss wrote:
> The PM6150 PMIC has the same Type-C register block as the PM8150B.
> Define corresponding compatible string, having the qcom,pm8150b-vbus-reg
> as a fallback.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> index d9694570c419..0cdc60b76fbd 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> @@ -21,6 +21,7 @@ properties:
>        - items:
>            - enum:
>                - qcom,pm6150-typec
> +              - qcom,pm7250b-typec
>            - const: qcom,pm8150b-typec
>        - items:
>            - enum:
> 
> -- 
> 2.44.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
  2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
  2024-03-22 10:24   ` Bryan O'Donoghue
@ 2024-03-22 17:55   ` Conor Dooley
  1 sibling, 0 replies; 16+ messages in thread
From: Conor Dooley @ 2024-03-22 17:55 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman,
	~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On Fri, Mar 22, 2024 at 09:01:32AM +0100, Luca Weiss wrote:
> The VBUS register block on the PM6150 PMIC shares the design with the
> PM8150B one. Define corresponding compatible string, having the
> qcom,pm8150b-vbus-reg as a fallback.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster
  2024-03-22  8:01 ` [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Luca Weiss
  2024-03-22 10:31   ` Bryan O'Donoghue
@ 2024-03-22 18:18   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2024-03-22 18:18 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22.03.2024 09:01, Luca Weiss wrote:
> Add the required DTS node for the USB VBUS output regulator, which is
> available on PM7250B. This will provide the VBUS source to connected
> peripherals.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  arch/arm64/boot/dts/qcom/pm7250b.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> index 3bf7cf5d1700..91a046b3529c 100644
> --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
> @@ -45,6 +45,12 @@ pmic@PM7250B_SID {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> +		pm7250b_vbus: usb-vbus-regulator@1100 {
> +			compatible = "qcom,pm7250b-vbus-reg", "qcom,pm8150b-vbus-reg";
> +			status = "disabled";
> +			reg = <0x1100>;

Could you fix the ordering here?

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description
  2024-03-22  8:01 ` [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description Luca Weiss
  2024-03-22 10:32   ` Bryan O'Donoghue
@ 2024-03-22 18:20   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2024-03-22 18:20 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On 22.03.2024 09:01, Luca Weiss wrote:
> Type-C port management functionality lives inside of the PMIC block on
> pm7250b.
> 
> The Type-C port management logic controls orientation detection,
> vbus/vconn sense and to send/receive Type-C Power Domain messages.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: (subset) [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4
  2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
                   ` (4 preceding siblings ...)
  2024-03-22  8:01 ` [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Luca Weiss
@ 2024-03-25 17:44 ` Mark Brown
  5 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2024-03-25 17:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	linux-kernel, devicetree, linux-usb

On Fri, 22 Mar 2024 09:01:31 +0100, Luca Weiss wrote:
> This series adds support for Type-C Port Management on the Fairphone 4
> which enables USB role switching and orientation switching.
> 
> This enables a user for example to plug in a USB stick or a USB keyboard
> to the Type-C port.
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
      commit: 0c5f77f4eaef8ed9fe752d21f40ac471dd511cfc

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2024-03-25 17:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22  8:01 [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Luca Weiss
2024-03-22  8:01 ` [PATCH 1/5] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible Luca Weiss
2024-03-22 10:24   ` Bryan O'Donoghue
2024-03-22 17:55   ` Conor Dooley
2024-03-22  8:01 ` [PATCH 2/5] dt-bindings: usb: qcom,pmic-typec: Add support for the PM7250B PMIC Luca Weiss
2024-03-22 17:55   ` Conor Dooley
2024-03-22  8:01 ` [PATCH 3/5] arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Luca Weiss
2024-03-22 10:31   ` Bryan O'Donoghue
2024-03-22 18:18   ` Konrad Dybcio
2024-03-22  8:01 ` [PATCH 4/5] arm64: dts: qcom: pm7250b: Add a TCPM description Luca Weiss
2024-03-22 10:32   ` Bryan O'Donoghue
2024-03-22 18:20   ` Konrad Dybcio
2024-03-22  8:01 ` [PATCH 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Luca Weiss
2024-03-22 10:54   ` Dmitry Baryshkov
2024-03-22 10:58   ` Bryan O'Donoghue
2024-03-25 17:44 ` (subset) [PATCH 0/5] Add TCPM support for PM7250B and Fairphone 4 Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.