2024-02-22 14:20:34

by Abel Vesa

[permalink] [raw]
Subject: [PATCH v3 0/4] arm64: dts: qcom: x1e80100: Add support for eUSB2 repeaters

The X1E80100 platform comes with a v7 SPMI arbiter, which means it
implements two separate buses. The boards using this platform come with
3 instances of SMB2360 PMIC which implement a eUSB2 repeater.

This patchset relies on the support added by this patchset:
https://lore.kernel.org/all/[email protected]/

To: Andy Gross <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Abel Vesa <[email protected]>

Changes in v3:
- Replaced the smb2360 dtsi with x1e80100-pmics dtsi, just like the sc8280xp.
- Changed the suffix of the pmics to _[0-2]
- Changed the compatible to platform specific one, per Krzysztof's request.
- Re-indexed the repeaters starting with 0 now.
- Added Konrad's R-b tag to both QCP and CRD specific patches.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Reworked the whole SPMI DT node layout
- Added the SPMI DT node
- Added patches for each board (QCP and CRD) that adds the repeater
nodes
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Abel Vesa (4):
arm64: dts: qcom: x1e80100: Add SPMI support
arm64: dts: qcom: x1e80100: Add dedicated pmic dtsi
arm64: dts: qcom: x1e80100-crd: Add repeater nodes
arm64: dts: qcom: x1e80100-qcp: Add repeater nodes

arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 22 ++++++++++++
arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 51 ++++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 22 ++++++++++++
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 42 +++++++++++++++++++++++
4 files changed, 137 insertions(+)
---
base-commit: 4893c639cc3659cefaa675bf1e59f4e7571afb5c
change-id: 20231201-x1e80100-dts-smb2360-0c7c25f2e0a7

Best regards,
--
Abel Vesa <[email protected]>



2024-02-22 14:20:45

by Abel Vesa

[permalink] [raw]
Subject: [PATCH v3 4/4] arm64: dts: qcom: x1e80100-qcp: Add repeater nodes

Include the PMIC dedicated file and add regulators to each one of
those 3 eUSB2 repeaters. Tie up the repeaters to their corresponding
USB HS PHY.

Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Abel Vesa <[email protected]>
---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
index e76d29053d79..35580ac3430d 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
@@ -9,6 +9,7 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>

#include "x1e80100.dtsi"
+#include "x1e80100-pmics.dtsi"

/ {
model = "Qualcomm Technologies, Inc. X1E80100 QCP";
@@ -491,6 +492,21 @@ &remoteproc_cdsp {
status = "okay";
};

+&smb2360_0_eusb2_repeater {
+ vdd18-supply = <&vreg_l3d_1p8>;
+ vdd3-supply = <&vreg_l2b_3p0>;
+};
+
+&smb2360_1_eusb2_repeater {
+ vdd18-supply = <&vreg_l3d_1p8>;
+ vdd3-supply = <&vreg_l14b_3p0>;
+};
+
+&smb2360_2_eusb2_repeater {
+ vdd18-supply = <&vreg_l3d_1p8>;
+ vdd3-supply = <&vreg_l8b_3p0>;
+};
+
&tlmm {
gpio-reserved-ranges = <33 3>, /* Unused */
<44 4>, /* SPI (TPM) */
@@ -513,6 +529,8 @@ &usb_1_ss0_hsphy {
vdd-supply = <&vreg_l2e_0p8>;
vdda12-supply = <&vreg_l3e_1p2>;

+ phys = <&smb2360_0_eusb2_repeater>;
+
status = "okay";
};

@@ -533,6 +551,8 @@ &usb_1_ss1_hsphy {
vdd-supply = <&vreg_l2e_0p8>;
vdda12-supply = <&vreg_l3e_1p2>;

+ phys = <&smb2360_1_eusb2_repeater>;
+
status = "okay";
};

@@ -553,6 +573,8 @@ &usb_1_ss2_hsphy {
vdd-supply = <&vreg_l2e_0p8>;
vdda12-supply = <&vreg_l3e_1p2>;

+ phys = <&smb2360_2_eusb2_repeater>;
+
status = "okay";
};


--
2.34.1


2024-02-22 14:20:47

by Abel Vesa

[permalink] [raw]
Subject: [PATCH v3 2/4] arm64: dts: qcom: x1e80100: Add dedicated pmic dtsi

Add dedicated file for x1e80100 PMICs, add the all 3 smb2360 PMIC nodes
with the eUSB2 repeater nodes.

Signed-off-by: Abel Vesa <[email protected]>
---
arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 51 ++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi
new file mode 100644
index 000000000000..04301f772fbd
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024, Linaro Limited
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+};
+
+&spmi_bus1 {
+ smb2360_0: pmic@7 {
+ compatible = "qcom,smb2360", "qcom,spmi-pmic";
+ reg = <0x7 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ smb2360_0_eusb2_repeater: phy@fd00 {
+ compatible = "qcom,smb2360-eusb2-repeater";
+ reg = <0xfd00>;
+ #phy-cells = <0>;
+ };
+ };
+
+ smb2360_1: pmic@a {
+ compatible = "qcom,smb2360", "qcom,spmi-pmic";
+ reg = <0xa SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ smb2360_1_eusb2_repeater: phy@fd00 {
+ compatible = "qcom,smb2360-eusb2-repeater";
+ reg = <0xfd00>;
+ #phy-cells = <0>;
+ };
+ };
+
+ smb2360_2: pmic@b {
+ compatible = "qcom,smb2360", "qcom,spmi-pmic";
+ reg = <0xb SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ smb2360_2_eusb2_repeater: phy@fd00 {
+ compatible = "qcom,smb2360-eusb2-repeater";
+ reg = <0xfd00>;
+ #phy-cells = <0>;
+ };
+ };
+};

--
2.34.1


2024-02-22 14:21:52

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] arm64: dts: qcom: x1e80100: Add dedicated pmic dtsi



On 2/22/24 15:19, Abel Vesa wrote:
> Add dedicated file for x1e80100 PMICs, add the all 3 smb2360 PMIC nodes
> with the eUSB2 repeater nodes.
>
> Signed-off-by: Abel Vesa <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 51 ++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi
> new file mode 100644
> index 000000000000..04301f772fbd
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi
> @@ -0,0 +1,51 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2024, Linaro Limited
> + */
> +
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> +/ {
> +};

This seems redundant

But otherwise lgtm

Konrad

2024-03-19 02:49:03

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v3 0/4] arm64: dts: qcom: x1e80100: Add support for eUSB2 repeaters


On Thu, 22 Feb 2024 16:19:18 +0200, Abel Vesa wrote:
> The X1E80100 platform comes with a v7 SPMI arbiter, which means it
> implements two separate buses. The boards using this platform come with
> 3 instances of SMB2360 PMIC which implement a eUSB2 repeater.
>
> This patchset relies on the support added by this patchset:
> https://lore.kernel.org/all/[email protected]/
>
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: x1e80100: Add SPMI support
commit: 53fdae5e086b699a66c6927395fa66c0116ec7ac
[2/4] arm64: dts: qcom: x1e80100: Add dedicated pmic dtsi
commit: 3298d47894b0f30a42a4f93c36dae4838f638dba
[3/4] arm64: dts: qcom: x1e80100-crd: Add repeater nodes
commit: 3930056f30d374967746876e01e8dca10fbc7ff9
[4/4] arm64: dts: qcom: x1e80100-qcp: Add repeater nodes
commit: 04124220d8ce77409a5fa8cdea75dc2be999c932

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