* [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC
@ 2024-01-30 19:32 Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Dmitry Baryshkov
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Krzysztof Kozlowski, Luca Weiss,
	Vladimir Zapolskiy
The Qualcomm PMI632 PMIC (found on Qualcomm Robotics RB2 platform)
doesn't support USB Power Delivery. However this PMIC still supports
handling of the Type-C port (orientation detection, etc). Reuse exiting
qcom-pmic-typec driver to support Type-C related functionality of this
PMIC. Use this to enable USB-C connector support on the RB2 platform.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v3:
- Added constraints to qcom,pmic-typec / reg property (Krzysztof)
- Dropped merged TCPM and Qualcomm PHY patches
- Link to v2: https://lore.kernel.org/r/20240113-pmi632-typec-v2-0-182d9aa0a5b3@linaro.org
Changes in v2:
- Split qcom_pmic_typec_pdphy_set_roles() changes to separate patch
  (Konrad)
- Simplified devm_kzalloc / sizeof() argument (Konrad)
- Made start / stop callbacks mandatory (Bryan)
- Reworked Type-C port handling into a backend similar to PD PHY (Bryan)
- Made more qcom-pmic-typec data static const (Bryan)
- Squashed usbc PHY single-lane removal patch (Konrad)
- Further usbc PHY cleanup (Konrad)
- Fixed order of DT properties in pmi632.dtsi (Konrad)
- Instead of specifying bogus PDOs for the port, specify pd-disable and
  typec-power-opmode properties for the connector
- Moved orientation-switch / usb-dual-role properties to sm6115.dtsi
  (Konrad)
- Linked usb_dwc3_ss and usb_qmpphy_usb_ss_in
- Link to v1: https://lore.kernel.org/r/20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org
---
Dmitry Baryshkov (5):
      dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632
      dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block
      usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
      arm64: dts: qcom: pmi632: define USB-C related blocks
      arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
Vladimir Zapolskiy (1):
      arm64: dts: qcom: sm6115: drop pipe clock selection
 .../regulator/qcom,usb-vbus-regulator.yaml         |  9 ++-
 .../devicetree/bindings/usb/qcom,pmic-typec.yaml   | 32 ++++++++-
 arch/arm64/boot/dts/qcom/pmi632.dtsi               | 30 ++++++++
 arch/arm64/boot/dts/qcom/qrb4210-rb2.dts           | 50 +++++++++++++-
 arch/arm64/boot/dts/qcom/sm6115.dtsi               | 44 +++++++++++-
 drivers/usb/typec/tcpm/qcom/Makefile               |  3 +-
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 30 ++++++--
 .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h    |  2 +
 .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c   | 80 ++++++++++++++++++++++
 9 files changed, 266 insertions(+), 14 deletions(-)
---
base-commit: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52
change-id: 20240112-pmi632-typec-4c7533092387
Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH v3 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block Dmitry Baryshkov
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Krzysztof Kozlowski, Luca Weiss
The VBUS register block on the PMI632 PMIC shares the design with the
PM8150B one. Define corresponding compatible string, having the
qcom,pm8150b-vbus-reg as a fallback.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
index 534f87e98716..66dcd5ce03e6 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
@@ -19,8 +19,13 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,pm8150b-vbus-reg
+    oneOf:
+      - enum:
+          - qcom,pm8150b-vbus-reg
+      - items:
+          - enum:
+              - qcom,pmi632-vbus-reg
+          - const: qcom,pm8150b-vbus-reg
 
   reg:
     maxItems: 1
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-02-02 17:35   ` Rob Herring
  2024-01-30 19:32 ` [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC Dmitry Baryshkov
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Luca Weiss
The PMI632 PMIC has the same Type-C register block as the PM8150B.
However this PMIC doesn't support USB Power Delivery. As such it doesn't
have the second region used by the existing pm8150b bindings. Add if
clauses to handle the PMI632 usecase.
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/usb/qcom,pmic-typec.yaml   | 32 +++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
index 55df3129a0bc..6c0c6b337693 100644
--- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
@@ -15,6 +15,7 @@ description:
 properties:
   compatible:
     enum:
+      - qcom,pmi632-typec
       - qcom,pm8150b-typec
 
   connector:
@@ -24,9 +25,11 @@ properties:
 
   reg:
     description: Type-C port and pdphy SPMI register base offsets
+    minItems: 1
     maxItems: 2
 
   interrupts:
+    minItems: 8
     items:
       - description: Type-C CC attach notification, VBUS error, tCCDebounce done
       - description: Type-C VCONN powered
@@ -46,6 +49,7 @@ properties:
       - description: Power Domain Fast Role Swap event
 
   interrupt-names:
+    minItems: 8
     items:
       - const: or-rid-detect-change
       - const: vpd-detect
@@ -81,7 +85,33 @@ required:
   - interrupts
   - interrupt-names
   - vdd-vbus-supply
-  - vdd-pdphy-supply
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,pmi632-typec
+    then:
+      properties:
+        reg:
+          maxItems: 1
+        interrupts:
+          maxItems: 8
+        interrupt-names:
+          maxItems: 8
+        vdd-pdphy-supply: false
+    else:
+      properties:
+        reg:
+          maxItems: 2
+        interrupts:
+          minItems: 16
+        interrupt-names:
+          maxItems: 16
+      required:
+        - vdd-pdphy-supply
 
 additionalProperties: false
 
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-02-07  9:54   ` Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 4/6] arm64: dts: qcom: pmi632: define USB-C related blocks Dmitry Baryshkov
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Luca Weiss
The PMI632 PMIC support Type-C port handling, but lacks USB
PowerDelivery support. The TCPM requires all callbacks to be provided
by the implementation. Implement a special, 'stub' Qcom PD PHY
implementation to enable the PMI632 support.
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/usb/typec/tcpm/qcom/Makefile               |  3 +-
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 30 ++++++--
 .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h    |  2 +
 .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c   | 80 ++++++++++++++++++++++
 4 files changed, 107 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/typec/tcpm/qcom/Makefile b/drivers/usb/typec/tcpm/qcom/Makefile
index dc1e8832e197..cc23042b9487 100644
--- a/drivers/usb/typec/tcpm/qcom/Makefile
+++ b/drivers/usb/typec/tcpm/qcom/Makefile
@@ -3,4 +3,5 @@
 obj-$(CONFIG_TYPEC_QCOM_PMIC)		+= qcom_pmic_tcpm.o
 qcom_pmic_tcpm-y			+= qcom_pmic_typec.o \
 					   qcom_pmic_typec_port.o \
-					   qcom_pmic_typec_pdphy.o
+					   qcom_pmic_typec_pdphy.o \
+					   qcom_pmic_typec_pdphy_stub.o \
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
index 82e3f59ea471..e48412cdcb0f 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
@@ -42,7 +42,7 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
 	const struct pmic_typec_resources *res;
 	struct regmap *regmap;
 	struct device *bridge_dev;
-	u32 base[2];
+	u32 base;
 	int ret;
 
 	res = of_device_get_match_data(dev);
@@ -62,19 +62,29 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	ret = of_property_read_u32_array(np, "reg", base, 2);
+	ret = of_property_read_u32_index(np, "reg", 0, &base);
 	if (ret)
 		return ret;
 
 	ret = qcom_pmic_typec_port_probe(pdev, tcpm,
-					 res->port_res, regmap, base[0]);
+					 res->port_res, regmap, base);
 	if (ret)
 		return ret;
 
-	ret = qcom_pmic_typec_pdphy_probe(pdev, tcpm,
-					  res->pdphy_res, regmap, base[1]);
-	if (ret)
-		return ret;
+	if (res->pdphy_res) {
+		ret = of_property_read_u32_index(np, "reg", 1, &base);
+		if (ret)
+			return ret;
+
+		ret = qcom_pmic_typec_pdphy_probe(pdev, tcpm,
+						  res->pdphy_res, regmap, base);
+		if (ret)
+			return ret;
+	} else {
+		ret = qcom_pmic_typec_pdphy_stub_probe(pdev, tcpm);
+		if (ret)
+			return ret;
+	}
 
 	platform_set_drvdata(pdev, tcpm);
 
@@ -123,8 +133,14 @@ static const struct pmic_typec_resources pm8150b_typec_res = {
 	.port_res = &pm8150b_port_res,
 };
 
+static const struct pmic_typec_resources pmi632_typec_res = {
+	/* PD PHY not present */
+	.port_res = &pm8150b_port_res,
+};
+
 static const struct of_device_id qcom_pmic_typec_table[] = {
 	{ .compatible = "qcom,pm8150b-typec", .data = &pm8150b_typec_res },
+	{ .compatible = "qcom,pmi632-typec", .data = &pmi632_typec_res },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_pmic_typec_table);
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h
index 5f428e67ccfe..04dee20293cf 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h
@@ -31,5 +31,7 @@ int qcom_pmic_typec_pdphy_probe(struct platform_device *pdev,
 				const struct pmic_typec_pdphy_resources *res,
 				struct regmap *regmap,
 				u32 base);
+int qcom_pmic_typec_pdphy_stub_probe(struct platform_device *pdev,
+				     struct pmic_typec *tcpm);
 
 #endif /* __QCOM_PMIC_TYPEC_PDPHY_H__ */
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c
new file mode 100644
index 000000000000..df79059cda67
--- /dev/null
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2024, Linaro Ltd. All rights reserved.
+ */
+
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
+#include <linux/usb/pd.h>
+#include <linux/usb/tcpm.h>
+#include "qcom_pmic_typec.h"
+#include "qcom_pmic_typec_pdphy.h"
+
+static int qcom_pmic_typec_pdphy_stub_pd_transmit(struct tcpc_dev *tcpc,
+						  enum tcpm_transmit_type type,
+						  const struct pd_message *msg,
+						  unsigned int negotiated_rev)
+{
+	struct pmic_typec *tcpm = tcpc_to_tcpm(tcpc);
+	struct device *dev = tcpm->dev;
+
+	dev_dbg(dev, "pdphy_transmit: type=%d\n", type);
+
+	tcpm_pd_transmit_complete(tcpm->tcpm_port,
+				  TCPC_TX_SUCCESS);
+
+	return 0;
+}
+
+static int qcom_pmic_typec_pdphy_stub_set_pd_rx(struct tcpc_dev *tcpc, bool on)
+{
+	struct pmic_typec *tcpm = tcpc_to_tcpm(tcpc);
+	struct device *dev = tcpm->dev;
+
+	dev_dbg(dev, "set_pd_rx: %s\n", on ? "on" : "off");
+
+	return 0;
+}
+
+static int qcom_pmic_typec_pdphy_stub_set_roles(struct tcpc_dev *tcpc, bool attached,
+						enum typec_role power_role,
+						enum typec_data_role data_role)
+{
+	struct pmic_typec *tcpm = tcpc_to_tcpm(tcpc);
+	struct device *dev = tcpm->dev;
+
+	dev_dbg(dev, "pdphy_set_roles: data_role_host=%d power_role_src=%d\n",
+		data_role, power_role);
+
+	return 0;
+}
+
+static int qcom_pmic_typec_pdphy_stub_start(struct pmic_typec *tcpm,
+					    struct tcpm_port *tcpm_port)
+{
+	return 0;
+}
+
+static void qcom_pmic_typec_pdphy_stub_stop(struct pmic_typec *tcpm)
+{
+}
+
+int qcom_pmic_typec_pdphy_stub_probe(struct platform_device *pdev,
+				     struct pmic_typec *tcpm)
+{
+	tcpm->tcpc.set_pd_rx = qcom_pmic_typec_pdphy_stub_set_pd_rx;
+	tcpm->tcpc.set_roles = qcom_pmic_typec_pdphy_stub_set_roles;
+	tcpm->tcpc.pd_transmit = qcom_pmic_typec_pdphy_stub_pd_transmit;
+
+	tcpm->pdphy_start = qcom_pmic_typec_pdphy_stub_start;
+	tcpm->pdphy_stop = qcom_pmic_typec_pdphy_stub_stop;
+
+	return 0;
+}
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH v3 4/6] arm64: dts: qcom: pmi632: define USB-C related blocks
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2024-01-30 19:32 ` [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 5/6] arm64: dts: qcom: sm6115: drop pipe clock selection Dmitry Baryshkov
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Luca Weiss
Define VBUS regulator and the Type-C handling block as present on the
Quacomm PMI632 PMIC.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pmi632.dtsi | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi
index 4eb79e0ce40a..d6832f0b7b80 100644
--- a/arch/arm64/boot/dts/qcom/pmi632.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi
@@ -45,6 +45,36 @@ pmic@2 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pmi632_vbus: usb-vbus-regulator@1100 {
+			compatible = "qcom,pmi632-vbus-reg", "qcom,pm8150b-vbus-reg";
+			reg = <0x1100>;
+			status = "disabled";
+		};
+
+		pmi632_typec: typec@1500 {
+			compatible = "qcom,pmi632-typec";
+			reg = <0x1500>;
+			interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
+				     <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
+				     <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
+				     <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
+				     <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
+				     <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
+				     <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
+				     <0x2 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 = <&pmi632_vbus>;
+
+			status = "disabled";
+		};
+
 		pmi632_temp: temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH v3 5/6] arm64: dts: qcom: sm6115: drop pipe clock selection
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2024-01-30 19:32 ` [PATCH v3 4/6] arm64: dts: qcom: pmi632: define USB-C related blocks Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-01-30 19:32 ` [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Dmitry Baryshkov
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Vladimir Zapolskiy, Luca Weiss
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Stop selecting UTMI clock as the USB3 PIPE clock. This setting is
incompatible with the USB host working in USB3 (SuperSpeed) mode.
While we are at it, also drop the default setting for the port speed.
Fixes: 9dd5f6dba729 ("arm64: dts: qcom: sm6115: Add USB SS qmp phy node")
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
[DB: fixed commit message, dropped dr_mode setting]
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ----
 arch/arm64/boot/dts/qcom/sm6115.dtsi     | 1 -
 2 files changed, 5 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index 7c19f874fa71..52f31f3166c2 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -607,10 +607,6 @@ &usb {
 	status = "okay";
 };
 
-&usb_dwc3 {
-	maximum-speed = "super-speed";
-};
-
 &usb_hsphy {
 	vdd-supply = <&vreg_l4a_0p9>;
 	vdda-pll-supply = <&vreg_l12a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index e71cbdef7784..e151b874eaf3 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -1606,7 +1606,6 @@ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>,
 			interconnect-names = "usb-ddr",
 					     "apps-usb";
 
-			qcom,select-utmi-as-pipe-clk;
 			status = "disabled";
 
 			usb_dwc3: usb@4e00000 {
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2024-01-30 19:32 ` [PATCH v3 5/6] arm64: dts: qcom: sm6115: drop pipe clock selection Dmitry Baryshkov
@ 2024-01-30 19:32 ` Dmitry Baryshkov
  2024-02-09 21:25   ` Konrad Dybcio
  2024-01-31  7:49 ` [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Luca Weiss
  2024-02-09 23:25 ` (subset) " Bjorn Andersson
  7 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 19:32 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Dmitry Baryshkov, Luca Weiss
Plug in USB-C related bits and pieces to enable USB role switching and
USB-C orientation handling for the Qualcomm RB2 board.
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 50 ++++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6115.dtsi     | 43 +++++++++++++++++++++++++++
 2 files changed, 93 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index 52f31f3166c2..696d6d43c56b 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -6,8 +6,10 @@
 /dts-v1/;
 
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/usb/pd.h>
 #include "sm4250.dtsi"
 #include "pm6125.dtsi"
+#include "pmi632.dtsi"
 
 / {
 	model = "Qualcomm Technologies, Inc. QRB4210 RB2";
@@ -256,6 +258,46 @@ kypd_vol_up_n: kypd-vol-up-n-state {
 	};
 };
 
+&pmi632_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>;
+				pmi632_hs_in: endpoint {
+					remote-endpoint = <&usb_dwc3_hs>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				pmi632_ss_in: endpoint {
+					remote-endpoint = <&usb_qmpphy_out>;
+				};
+			};
+		};
+	};
+};
+
+&pmi632_vbus {
+	regulator-min-microamp = <500000>;
+	regulator-max-microamp = <3000000>;
+	status = "okay";
+};
+
 &pon_pwrkey {
 	status = "okay";
 };
@@ -607,6 +649,10 @@ &usb {
 	status = "okay";
 };
 
+&usb_dwc3_hs {
+	remote-endpoint = <&pmi632_hs_in>;
+};
+
 &usb_hsphy {
 	vdd-supply = <&vreg_l4a_0p9>;
 	vdda-pll-supply = <&vreg_l12a_1p8>;
@@ -622,6 +668,10 @@ &usb_qmpphy {
 	status = "okay";
 };
 
+&usb_qmpphy_out {
+	remote-endpoint = <&pmi632_ss_in>;
+};
+
 &wifi {
 	vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>;
 	vdd-1.8-xo-supply = <&vreg_l16a_1p3>;
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index e151b874eaf3..dd3d97ef5cc7 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -879,8 +879,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 {
@@ -1620,6 +1641,28 @@ usb_dwc3: usb@4e00000 {
 				snps,has-lpm-erratum;
 				snps,hird-threshold = /bits/ 8 <0x10>;
 				snps,usb3_lpm_capable;
+
+				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>;
+						};
+					};
+				};
 			};
 		};
 
-- 
2.39.2
^ permalink raw reply related	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2024-01-30 19:32 ` [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Dmitry Baryshkov
@ 2024-01-31  7:49 ` Luca Weiss
  2024-01-31  7:50   ` Dmitry Baryshkov
  2024-02-09 23:25 ` (subset) " Bjorn Andersson
  7 siblings, 1 reply; 15+ messages in thread
From: Luca Weiss @ 2024-01-31  7:49 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,
	Guenter Roeck, Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Krzysztof Kozlowski, Vladimir Zapolskiy
On Tue Jan 30, 2024 at 8:32 PM CET, Dmitry Baryshkov wrote:
> The Qualcomm PMI632 PMIC (found on Qualcomm Robotics RB2 platform)
> doesn't support USB Power Delivery. However this PMIC still supports
> handling of the Type-C port (orientation detection, etc). Reuse exiting
> qcom-pmic-typec driver to support Type-C related functionality of this
> PMIC. Use this to enable USB-C connector support on the RB2 platform.
Hi Dmitry,
In case you send a new revision you can drop my Tested-by on the RB2
patches since it's a different platform, and the tag on the dt-bindings
patches also don't make too much sense I think?
Thanks!
Regards
Luca
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Changes in v3:
> - Added constraints to qcom,pmic-typec / reg property (Krzysztof)
> - Dropped merged TCPM and Qualcomm PHY patches
> - Link to v2: https://lore.kernel.org/r/20240113-pmi632-typec-v2-0-182d9aa0a5b3@linaro.org
>
> Changes in v2:
> - Split qcom_pmic_typec_pdphy_set_roles() changes to separate patch
>   (Konrad)
> - Simplified devm_kzalloc / sizeof() argument (Konrad)
> - Made start / stop callbacks mandatory (Bryan)
> - Reworked Type-C port handling into a backend similar to PD PHY (Bryan)
> - Made more qcom-pmic-typec data static const (Bryan)
> - Squashed usbc PHY single-lane removal patch (Konrad)
> - Further usbc PHY cleanup (Konrad)
> - Fixed order of DT properties in pmi632.dtsi (Konrad)
> - Instead of specifying bogus PDOs for the port, specify pd-disable and
>   typec-power-opmode properties for the connector
> - Moved orientation-switch / usb-dual-role properties to sm6115.dtsi
>   (Konrad)
> - Linked usb_dwc3_ss and usb_qmpphy_usb_ss_in
> - Link to v1: https://lore.kernel.org/r/20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org
>
> ---
> Dmitry Baryshkov (5):
>       dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632
>       dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block
>       usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
>       arm64: dts: qcom: pmi632: define USB-C related blocks
>       arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
>
> Vladimir Zapolskiy (1):
>       arm64: dts: qcom: sm6115: drop pipe clock selection
>
>  .../regulator/qcom,usb-vbus-regulator.yaml         |  9 ++-
>  .../devicetree/bindings/usb/qcom,pmic-typec.yaml   | 32 ++++++++-
>  arch/arm64/boot/dts/qcom/pmi632.dtsi               | 30 ++++++++
>  arch/arm64/boot/dts/qcom/qrb4210-rb2.dts           | 50 +++++++++++++-
>  arch/arm64/boot/dts/qcom/sm6115.dtsi               | 44 +++++++++++-
>  drivers/usb/typec/tcpm/qcom/Makefile               |  3 +-
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 30 ++++++--
>  .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h    |  2 +
>  .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c   | 80 ++++++++++++++++++++++
>  9 files changed, 266 insertions(+), 14 deletions(-)
> ---
> base-commit: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52
> change-id: 20240112-pmi632-typec-4c7533092387
>
> Best regards,
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC
  2024-01-31  7:49 ` [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Luca Weiss
@ 2024-01-31  7:50   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-31  7:50 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, Guenter Roeck,
	Heikki Krogerus, linux-arm-msm, linux-kernel, devicetree,
	linux-usb, Krzysztof Kozlowski, Vladimir Zapolskiy
On Wed, 31 Jan 2024 at 09:49, Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> On Tue Jan 30, 2024 at 8:32 PM CET, Dmitry Baryshkov wrote:
> > The Qualcomm PMI632 PMIC (found on Qualcomm Robotics RB2 platform)
> > doesn't support USB Power Delivery. However this PMIC still supports
> > handling of the Type-C port (orientation detection, etc). Reuse exiting
> > qcom-pmic-typec driver to support Type-C related functionality of this
> > PMIC. Use this to enable USB-C connector support on the RB2 platform.
>
> Hi Dmitry,
>
> In case you send a new revision you can drop my Tested-by on the RB2
> patches since it's a different platform, and the tag on the dt-bindings
> patches also don't make too much sense I think?
Ack, I will. But I hope there will be no next revision.
>
> Thanks!
>
> Regards
> Luca
>
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > Changes in v3:
> > - Added constraints to qcom,pmic-typec / reg property (Krzysztof)
> > - Dropped merged TCPM and Qualcomm PHY patches
> > - Link to v2: https://lore.kernel.org/r/20240113-pmi632-typec-v2-0-182d9aa0a5b3@linaro.org
> >
> > Changes in v2:
> > - Split qcom_pmic_typec_pdphy_set_roles() changes to separate patch
> >   (Konrad)
> > - Simplified devm_kzalloc / sizeof() argument (Konrad)
> > - Made start / stop callbacks mandatory (Bryan)
> > - Reworked Type-C port handling into a backend similar to PD PHY (Bryan)
> > - Made more qcom-pmic-typec data static const (Bryan)
> > - Squashed usbc PHY single-lane removal patch (Konrad)
> > - Further usbc PHY cleanup (Konrad)
> > - Fixed order of DT properties in pmi632.dtsi (Konrad)
> > - Instead of specifying bogus PDOs for the port, specify pd-disable and
> >   typec-power-opmode properties for the connector
> > - Moved orientation-switch / usb-dual-role properties to sm6115.dtsi
> >   (Konrad)
> > - Linked usb_dwc3_ss and usb_qmpphy_usb_ss_in
> > - Link to v1: https://lore.kernel.org/r/20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org
> >
> > ---
> > Dmitry Baryshkov (5):
> >       dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632
> >       dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block
> >       usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
> >       arm64: dts: qcom: pmi632: define USB-C related blocks
> >       arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
> >
> > Vladimir Zapolskiy (1):
> >       arm64: dts: qcom: sm6115: drop pipe clock selection
> >
> >  .../regulator/qcom,usb-vbus-regulator.yaml         |  9 ++-
> >  .../devicetree/bindings/usb/qcom,pmic-typec.yaml   | 32 ++++++++-
> >  arch/arm64/boot/dts/qcom/pmi632.dtsi               | 30 ++++++++
> >  arch/arm64/boot/dts/qcom/qrb4210-rb2.dts           | 50 +++++++++++++-
> >  arch/arm64/boot/dts/qcom/sm6115.dtsi               | 44 +++++++++++-
> >  drivers/usb/typec/tcpm/qcom/Makefile               |  3 +-
> >  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 30 ++++++--
> >  .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h    |  2 +
> >  .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c   | 80 ++++++++++++++++++++++
> >  9 files changed, 266 insertions(+), 14 deletions(-)
> > ---
> > base-commit: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52
> > change-id: 20240112-pmi632-typec-4c7533092387
> >
> > Best regards,
>
-- 
With best wishes
Dmitry
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block
  2024-01-30 19:32 ` [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block Dmitry Baryshkov
@ 2024-02-02 17:35   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2024-02-02 17:35 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Bryan O'Donoghue,
	linux-kernel, Rob Herring, Conor Dooley, linux-arm-msm,
	Mark Brown, devicetree, linux-usb, Luca Weiss, Bjorn Andersson,
	Wesley Cheng, Heikki Krogerus, Guenter Roeck, Konrad Dybcio,
	Liam Girdwood
On Tue, 30 Jan 2024 21:32:55 +0200, Dmitry Baryshkov wrote:
> The PMI632 PMIC has the same Type-C register block as the PM8150B.
> However this PMIC doesn't support USB Power Delivery. As such it doesn't
> have the second region used by the existing pm8150b bindings. Add if
> clauses to handle the PMI632 usecase.
> 
> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/usb/qcom,pmic-typec.yaml   | 32 +++++++++++++++++++++-
>  1 file changed, 31 insertions(+), 1 deletion(-)
> 
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
  2024-01-30 19:32 ` [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC Dmitry Baryshkov
@ 2024-02-07  9:54   ` Dmitry Baryshkov
  2024-02-08 11:54     ` Heikki Krogerus
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-02-07  9:54 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb, Luca Weiss
On Tue, 30 Jan 2024 at 21:33, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> The PMI632 PMIC support Type-C port handling, but lacks USB
> PowerDelivery support. The TCPM requires all callbacks to be provided
> by the implementation. Implement a special, 'stub' Qcom PD PHY
> implementation to enable the PMI632 support.
>
> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Heikki, Gunter, Gret, is there anything left on my side to get these patches in?
> ---
>  drivers/usb/typec/tcpm/qcom/Makefile               |  3 +-
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 30 ++++++--
>  .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h    |  2 +
>  .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c   | 80 ++++++++++++++++++++++
>  4 files changed, 107 insertions(+), 8 deletions(-)
-- 
With best wishes
Dmitry
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
  2024-02-07  9:54   ` Dmitry Baryshkov
@ 2024-02-08 11:54     ` Heikki Krogerus
  2024-02-08 13:05       ` Dmitry Baryshkov
  0 siblings, 1 reply; 15+ messages in thread
From: Heikki Krogerus @ 2024-02-08 11:54 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman, Guenter Roeck,
	linux-arm-msm, linux-kernel, devicetree, linux-usb, Luca Weiss
On Wed, Feb 07, 2024 at 11:54:50AM +0200, Dmitry Baryshkov wrote:
> On Tue, 30 Jan 2024 at 21:33, Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > The PMI632 PMIC support Type-C port handling, but lacks USB
> > PowerDelivery support. The TCPM requires all callbacks to be provided
> > by the implementation. Implement a special, 'stub' Qcom PD PHY
> > implementation to enable the PMI632 support.
> >
> > Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> 
> Heikki, Gunter, Gret, is there anything left on my side to get these patches in?
Nothing from me. Do you want Greg to pick these?
thanks,
-- 
heikki
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC
  2024-02-08 11:54     ` Heikki Krogerus
@ 2024-02-08 13:05       ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-02-08 13:05 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman, Guenter Roeck,
	linux-arm-msm, linux-kernel, devicetree, linux-usb, Luca Weiss
On Thu, 8 Feb 2024 at 13:54, Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
>
> On Wed, Feb 07, 2024 at 11:54:50AM +0200, Dmitry Baryshkov wrote:
> > On Tue, 30 Jan 2024 at 21:33, Dmitry Baryshkov
> > <dmitry.baryshkov@linaro.org> wrote:
> > >
> > > The PMI632 PMIC support Type-C port handling, but lacks USB
> > > PowerDelivery support. The TCPM requires all callbacks to be provided
> > > by the implementation. Implement a special, 'stub' Qcom PD PHY
> > > implementation to enable the PMI632 support.
> > >
> > > Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > > Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > > Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >
> > Heikki, Gunter, Gret, is there anything left on my side to get these patches in?
>
> Nothing from me. Do you want Greg to pick these?
Yes, please.
-- 
With best wishes
Dmitry
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
  2024-01-30 19:32 ` [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Dmitry Baryshkov
@ 2024-02-09 21:25   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2024-02-09 21:25 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, Guenter Roeck,
	Heikki Krogerus
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb, Luca Weiss
On 30.01.2024 20:32, Dmitry Baryshkov wrote:
> Plug in USB-C related bits and pieces to enable USB role switching and
> USB-C orientation handling for the Qualcomm RB2 board.
> 
> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: (subset) [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC
  2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
                   ` (6 preceding siblings ...)
  2024-01-31  7:49 ` [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Luca Weiss
@ 2024-02-09 23:25 ` Bjorn Andersson
  7 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2024-02-09 23:25 UTC (permalink / raw)
  To: Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
	Bryan O'Donoghue, Greg Kroah-Hartman, Guenter Roeck,
	Heikki Krogerus, Dmitry Baryshkov
  Cc: linux-arm-msm, linux-kernel, devicetree, linux-usb,
	Krzysztof Kozlowski, Luca Weiss, Vladimir Zapolskiy
On Tue, 30 Jan 2024 21:32:53 +0200, Dmitry Baryshkov wrote:
> The Qualcomm PMI632 PMIC (found on Qualcomm Robotics RB2 platform)
> doesn't support USB Power Delivery. However this PMIC still supports
> handling of the Type-C port (orientation detection, etc). Reuse exiting
> qcom-pmic-typec driver to support Type-C related functionality of this
> PMIC. Use this to enable USB-C connector support on the RB2 platform.
> 
> 
> [...]
Applied, thanks!
[4/6] arm64: dts: qcom: pmi632: define USB-C related blocks
      commit: f69b3e40f46e8cf568809eb05a2e07bfea45b672
[5/6] arm64: dts: qcom: sm6115: drop pipe clock selection
      commit: 7e3a1f6470f7243c81156d2ead60f87da1184225
[6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
      commit: a06a2f12f9e2fa9628a942efd916cf388b19c6ce
Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply	[flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-02-09 23:25 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 19:32 [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
2024-01-30 19:32 ` [PATCH v3 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Dmitry Baryshkov
2024-01-30 19:32 ` [PATCH v3 2/6] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block Dmitry Baryshkov
2024-02-02 17:35   ` Rob Herring
2024-01-30 19:32 ` [PATCH v3 3/6] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC Dmitry Baryshkov
2024-02-07  9:54   ` Dmitry Baryshkov
2024-02-08 11:54     ` Heikki Krogerus
2024-02-08 13:05       ` Dmitry Baryshkov
2024-01-30 19:32 ` [PATCH v3 4/6] arm64: dts: qcom: pmi632: define USB-C related blocks Dmitry Baryshkov
2024-01-30 19:32 ` [PATCH v3 5/6] arm64: dts: qcom: sm6115: drop pipe clock selection Dmitry Baryshkov
2024-01-30 19:32 ` [PATCH v3 6/6] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Dmitry Baryshkov
2024-02-09 21:25   ` Konrad Dybcio
2024-01-31  7:49 ` [PATCH v3 0/6] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Luca Weiss
2024-01-31  7:50   ` Dmitry Baryshkov
2024-02-09 23:25 ` (subset) " Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).