2024-02-20 20:22:46

by Danila Tikhonov

[permalink] [raw]
Subject: [PATCH v2 0/2] arm64: dts: qcom: pm6150: Add typec support for PM6150

This series adds typec support for PM6150. Was tested on SM7150
(xiaomi-surya).

Changes in v2:
- Drop the patch 1 (from v1), since it has already been applied:
[1/3] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM6150
compatible (commit <ec29a4d9b7c7>)
- Add Reviewed-by: Krzysztof for patch 1
- Add Reviewed-by: Dmitry for patch 2
- Fix typo in commit msg for patch 2 (Quacomm/Qualcomm)
- Fix IRQ flags in patch 2 according PM8150B (Bryan && Dmitry)
- Link to v1:
https://lore.kernel.org/all/[email protected]/

To: "Bryan O'Donoghue" <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Dmitry Baryshkov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Danila Tikhonov <[email protected]>

Danila Tikhonov (2):
dt-bindings: usb: qcom,pmic-typec: Add support for the PM6150 PMIC
arm64: dts: qcom: pm6150: define USB-C related blocks

.../bindings/usb/qcom,pmic-typec.yaml | 11 +++--
arch/arm64/boot/dts/qcom/pm6150.dtsi | 46 +++++++++++++++++++
2 files changed, 54 insertions(+), 3 deletions(-)

--
2.43.2



2024-02-20 20:23:03

by Danila Tikhonov

[permalink] [raw]
Subject: [PATCH v2 2/2] arm64: dts: qcom: pm6150: define USB-C related blocks

Define VBUS regulator and the Type-C handling block as present on the
Qualcomm PM6150 PMIC.

Signed-off-by: Danila Tikhonov <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
---
arch/arm64/boot/dts/qcom/pm6150.dtsi | 46 ++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm6150.dtsi b/arch/arm64/boot/dts/qcom/pm6150.dtsi
index ddbaf7280b03..11158c2bd524 100644
--- a/arch/arm64/boot/dts/qcom/pm6150.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm6150.dtsi
@@ -63,6 +63,52 @@ pm6150_resin: resin {
};
};

+ pm6150_vbus: usb-vbus-regulator@1100 {
+ compatible = "qcom,pm6150-vbus-reg,
+ qcom,pm8150b-vbus-reg";
+ reg = <0x1100>;
+ status = "disabled";
+ };
+
+ pm6150_typec: typec@1500 {
+ compatible = "qcom,pm6150-typec,
+ qcom,pm8150b-typec";
+ reg = <0x1500>, <0x1700>;
+ 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>,
+ <0x0 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
+ <0x0 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";
+ status = "disabled";
+ };
+
pm6150_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
--
2.43.2


2024-02-20 21:04:50

by Danila Tikhonov

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: usb: qcom,pmic-typec: Add support for the PM6150 PMIC

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: Danila Tikhonov <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/usb/qcom,pmic-typec.yaml | 11 ++++++++---
1 file changed, 8 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..976d1732137b 100644
--- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
@@ -14,9 +14,14 @@ description:

properties:
compatible:
- enum:
- - qcom,pmi632-typec
- - qcom,pm8150b-typec
+ oneOf:
+ - enum:
+ - qcom,pmi632-typec
+ - qcom,pm8150b-typec
+ - items:
+ - enum:
+ - qcom,pm6150-typec
+ - const: qcom,pm8150b-typec

connector:
type: object
--
2.43.2


2024-03-19 02:49:22

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 0/2] arm64: dts: qcom: pm6150: Add typec support for PM6150


On Tue, 20 Feb 2024 23:21:45 +0300, Danila Tikhonov wrote:
> This series adds typec support for PM6150. Was tested on SM7150
> (xiaomi-surya).
>
> Changes in v2:
> - Drop the patch 1 (from v1), since it has already been applied:
> [1/3] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM6150
> compatible (commit <ec29a4d9b7c7>)
> - Add Reviewed-by: Krzysztof for patch 1
> - Add Reviewed-by: Dmitry for patch 2
> - Fix typo in commit msg for patch 2 (Quacomm/Qualcomm)
> - Fix IRQ flags in patch 2 according PM8150B (Bryan && Dmitry)
> - Link to v1:
> https://lore.kernel.org/all/[email protected]/
>
> [...]

Applied, thanks!

[2/2] arm64: dts: qcom: pm6150: define USB-C related blocks
commit: 601feafa7dad3a1de094ea524b6c2e1315a738d2

Best regards,
--
Bjorn Andersson <[email protected]>