* [PATCH v3 0/6] Enable IPQ5424 USB support
@ 2024-11-14 7:47 Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 1/6] dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible Varadarajan Narayanan
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
can connect to either of USB2.0 or USB3.0 phy and operate in the
respective mode.
v3: Added reviewed-by to one of the patches
dts: regulator node names changed
v2: Added acked-by and reviewed-by to few of the patches
Changed uppercase hex digits to lowercase
dts: add more interrupts & quirks as suggested in the review
Varadarajan Narayanan (6):
dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible
phy: qcom-qusb2: add QUSB2 support for IPQ5424
dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY
phy: qcom: qmp: Enable IPQ5424 support
dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings
arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
.../bindings/phy/qcom,qusb2-phy.yaml | 1 +
.../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 2 +
.../devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +
drivers/phy/qualcomm/phy-qcom-qusb2.c | 28 +++
7 files changed, 260 insertions(+)
base-commit: 28955f4fa2823e39f1ecfb3a37a364563527afbc
--
2.34.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 1/6] dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 2/6] phy: qcom-qusb2: add QUSB2 support for IPQ5424 Varadarajan Narayanan
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
Cc: Conor Dooley
Document the compatible string used for the qusb2 phy in IPQ5424.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v2: Add 'Acked-by: Conor Dooley'
---
Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
index 4aed4b5d65ec..39851ba9de43 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -18,6 +18,7 @@ properties:
oneOf:
- items:
- enum:
+ - qcom,ipq5424-qusb2-phy
- qcom,ipq6018-qusb2-phy
- qcom,ipq8074-qusb2-phy
- qcom,ipq9574-qusb2-phy
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 2/6] phy: qcom-qusb2: add QUSB2 support for IPQ5424
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 1/6] dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 3/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY Varadarajan Narayanan
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
Add the phy init sequence for the Super Speed ports found
on IPQ5424.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v3: Added 'Reviewed-by: Dmitry Baryshkov'
v2: Change uppercase hexdigits to lowercase
---
drivers/phy/qualcomm/phy-qcom-qusb2.c | 28 +++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index c52655a383ce..2d8fe9bc40f9 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -151,6 +151,21 @@ static const struct qusb2_phy_init_tbl ipq6018_init_tbl[] = {
QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9F),
};
+static const struct qusb2_phy_init_tbl ipq5424_init_tbl[] = {
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL, 0x14),
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0x00),
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x53),
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0xc3),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL2, 0x21),
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE5, 0x00),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
+ QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TEST, 0x80),
+ QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9f),
+};
+
static const unsigned int ipq6018_regs_layout[] = {
[QUSB2PHY_PLL_STATUS] = 0x38,
[QUSB2PHY_PORT_TUNE1] = 0x80,
@@ -331,6 +346,16 @@ static const struct qusb2_phy_cfg ipq6018_phy_cfg = {
.autoresume_en = BIT(0),
};
+static const struct qusb2_phy_cfg ipq5424_phy_cfg = {
+ .tbl = ipq5424_init_tbl,
+ .tbl_num = ARRAY_SIZE(ipq5424_init_tbl),
+ .regs = ipq6018_regs_layout,
+
+ .disable_ctrl = POWER_DOWN,
+ .mask_core_ready = PLL_LOCKED,
+ .autoresume_en = BIT(0),
+};
+
static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
.tbl = qusb2_v2_init_tbl,
.tbl_num = ARRAY_SIZE(qusb2_v2_init_tbl),
@@ -905,6 +930,9 @@ static const struct phy_ops qusb2_phy_gen_ops = {
static const struct of_device_id qusb2_phy_of_match_table[] = {
{
+ .compatible = "qcom,ipq5424-qusb2-phy",
+ .data = &ipq5424_phy_cfg,
+ }, {
.compatible = "qcom,ipq6018-qusb2-phy",
.data = &ipq6018_phy_cfg,
}, {
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 3/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 1/6] dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 2/6] phy: qcom-qusb2: add QUSB2 support for IPQ5424 Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support Varadarajan Narayanan
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
Cc: Conor Dooley
Add dt-bindings for USB3 PHY found on Qualcomm IPQ5424
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v2: Add 'Acked-by: Conor Dooley'
---
.../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
index baf5134ea3d8..a1b55168e050 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
@@ -16,6 +16,7 @@ description:
properties:
compatible:
enum:
+ - qcom,ipq5424-qmp-usb3-phy
- qcom,ipq6018-qmp-usb3-phy
- qcom,ipq8074-qmp-usb3-phy
- qcom,ipq9574-qmp-usb3-phy
@@ -89,6 +90,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,ipq5424-qmp-usb3-phy
- qcom,ipq6018-qmp-usb3-phy
- qcom,ipq8074-qmp-usb3-phy
- qcom,ipq9574-qmp-usb3-phy
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
` (2 preceding siblings ...)
2024-11-14 7:47 ` [PATCH v3 3/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 12:47 ` Konrad Dybcio
2024-11-14 7:47 ` [PATCH v3 5/6] dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424 Varadarajan Narayanan
5 siblings, 1 reply; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
Enable QMP USB3 phy support for IPQ5424 SoC.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v2: Add 'Reviewed-by: Dmitry Baryshkov'
---
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index acd6075bf6d9..f43823539a3b 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2298,6 +2298,9 @@ static int qmp_usb_probe(struct platform_device *pdev)
static const struct of_device_id qmp_usb_of_match_table[] = {
{
+ .compatible = "qcom,ipq5424-qmp-usb3-phy",
+ .data = &ipq9574_usb3phy_cfg,
+ }, {
.compatible = "qcom,ipq6018-qmp-usb3-phy",
.data = &ipq6018_usb3phy_cfg,
}, {
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 5/6] dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
` (3 preceding siblings ...)
2024-11-14 7:47 ` [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424 Varadarajan Narayanan
5 siblings, 0 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
Cc: Conor Dooley
Update dt-bindings to add IPQ5424 to USB DWC3 controller list.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v2: Add 'Acked-by: Conor Dooley'
---
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index 935e204b607b..2622a1f3bcab 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -16,6 +16,7 @@ properties:
- qcom,ipq4019-dwc3
- qcom,ipq5018-dwc3
- qcom,ipq5332-dwc3
+ - qcom,ipq5424-dwc3
- qcom,ipq6018-dwc3
- qcom,ipq8064-dwc3
- qcom,ipq8074-dwc3
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
` (4 preceding siblings ...)
2024-11-14 7:47 ` [PATCH v3 5/6] dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings Varadarajan Narayanan
@ 2024-11-14 7:47 ` Varadarajan Narayanan
2024-11-14 13:28 ` Dmitry Baryshkov
5 siblings, 1 reply; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-14 7:47 UTC (permalink / raw)
To: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, dmitry.baryshkov, mantas, quic_kbajaj, quic_kriskura,
quic_rohiagar, abel.vesa, quic_varada, quic_wcheng, linux-arm-msm,
linux-phy, devicetree, linux-kernel, linux-usb
The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
can connect to either of USB2.0 or USB3.0 phy and operate in the
respective mode.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v3: Regulator node names, labels and 'regulator-name' changed per review suggestions
Stray newline removed
v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node
Add u1/u2-entry quirks to usb@8a00000 node
---
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++
2 files changed, 225 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index d4d31026a026..859e15befb3f 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -16,12 +16,70 @@ / {
aliases {
serial0 = &uart1;
};
+
+ vreg_misc_3p3: regulator-3300000 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "usb_hs_vdda_3p3";
+ };
+
+ vreg_misc_1p8: regulator-1800000 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "vdda_1p8_usb";
+ };
+
+ vreg_misc_0p925: regulator-0925000 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <925000>;
+ regulator-max-microvolt = <925000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "vdd_core_usb";
+ };
+};
+
+&dwc_0 {
+ dr_mode = "host";
+};
+
+&dwc_1 {
+ dr_mode = "host";
+};
+
+&qusb_phy_0 {
+ vdd-supply = <&vreg_misc_0p925>;
+ vdda-pll-supply = <&vreg_misc_1p8>;
+ vdda-phy-dpdm-supply = <&vreg_misc_3p3>;
+
+ status = "okay";
+};
+
+&qusb_phy_1 {
+ vdd-supply = <&vreg_misc_0p925>;
+ vdda-pll-supply = <&vreg_misc_1p8>;
+ vdda-phy-dpdm-supply = <&vreg_misc_3p3>;
+
+ status = "okay";
};
&sleep_clk {
clock-frequency = <32000>;
};
+&ssphy_0 {
+ vdda-pll-supply = <&vreg_misc_1p8>;
+ vdda-phy-supply = <&vreg_misc_0p925>;
+
+ status = "okay";
+};
+
&tlmm {
sdc_default_state: sdc-default-state {
clk-pins {
@@ -53,6 +111,14 @@ &uart1 {
status = "okay";
};
+&usb2 {
+ status = "okay";
+};
+
+&usb3 {
+ status = "okay";
+};
+
&xo_board {
clock-frequency = <24000000>;
};
diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index 5e219f900412..f8afd6f0412d 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -233,6 +233,165 @@ intc: interrupt-controller@f200000 {
msi-controller;
};
+ qusb_phy_1: phy@71000 {
+ compatible = "qcom,ipq5424-qusb2-phy";
+ reg = <0 0x00071000 0 0x180>;
+ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
+ <&xo_board>;
+ clock-names = "cfg_ahb", "ref";
+
+ resets = <&gcc GCC_QUSB2_1_PHY_BCR>;
+ status = "disabled";
+ };
+
+ usb2: usb2@1e00000 {
+ compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
+ reg = <0 0x01ef8800 0 0x400>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ clocks = <&gcc GCC_USB1_MASTER_CLK>,
+ <&gcc GCC_USB1_SLEEP_CLK>,
+ <&gcc GCC_USB1_MOCK_UTMI_CLK>,
+ <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_CNOC_USB_CLK>;
+
+ clock-names = "core",
+ "sleep",
+ "mock_utmi",
+ "iface",
+ "cfg_noc";
+
+ assigned-clocks = <&gcc GCC_USB1_MASTER_CLK>,
+ <&gcc GCC_USB1_MOCK_UTMI_CLK>;
+ assigned-clock-rates = <200000000>,
+ <24000000>;
+
+ interrupts-extended = <&intc GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "pwr_event",
+ "qusb2_phy",
+ "dm_hs_phy_irq",
+ "dp_hs_phy_irq";
+
+ resets = <&gcc GCC_USB1_BCR>;
+ qcom,select-utmi-as-pipe-clk;
+ status = "disabled";
+
+ dwc_1: usb@1e00000 {
+ compatible = "snps,dwc3";
+ reg = <0 0x01e00000 0 0xe000>;
+ clocks = <&gcc GCC_USB1_MOCK_UTMI_CLK>;
+ clock-names = "ref";
+ interrupts = <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&qusb_phy_1>;
+ phy-names = "usb2-phy";
+ tx-fifo-resize;
+ snps,is-utmi-l1-suspend;
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ };
+ };
+
+ qusb_phy_0: phy@7b000 {
+ compatible = "qcom,ipq5424-qusb2-phy";
+ reg = <0 0x0007b000 0 0x180>;
+ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&xo_board>;
+ clock-names = "cfg_ahb", "ref";
+
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
+ status = "disabled";
+ };
+
+ ssphy_0: phy@7d000 {
+ compatible = "qcom,ipq5424-qmp-usb3-phy";
+ reg = <0 0x0007d000 0 0xa00>;
+ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_USB0_AUX_CLK>,
+ <&xo_board>,
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_USB0_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+
+ resets = <&gcc GCC_USB0_PHY_BCR>,
+ <&gcc GCC_USB3PHY_0_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "usb0_pipe_clk";
+
+ status = "disabled";
+ };
+
+ usb3: usb3@8a00000 {
+ compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
+ reg = <0 0x08af8800 0 0x400>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ clocks = <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_USB0_SLEEP_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>,
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_CNOC_USB_CLK>;
+
+ clock-names = "core",
+ "sleep",
+ "mock_utmi",
+ "iface",
+ "cfg_noc";
+
+ assigned-clocks = <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ assigned-clock-rates = <200000000>,
+ <24000000>;
+
+ interrupts-extended = <&intc GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "pwr_event",
+ "qusb2_phy",
+ "dm_hs_phy_irq",
+ "dp_hs_phy_irq";
+
+ resets = <&gcc GCC_USB_BCR>;
+ status = "disabled";
+
+ dwc_0: usb@8a00000 {
+ compatible = "snps,dwc3";
+ reg = <0 0x08a00000 0 0xcd00>;
+ clocks = <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "ref";
+ interrupts = <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&qusb_phy_0>, <&ssphy_0>;
+ phy-names = "usb2-phy", "usb3-phy";
+ tx-fifo-resize;
+ snps,is-utmi-l1-suspend;
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ snps,dis-u1-entry-quirk;
+ snps,dis-u2-entry-quirk;
+ };
+ };
+
timer@f420000 {
compatible = "arm,armv7-timer-mem";
reg = <0 0xf420000 0 0x1000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support
2024-11-14 7:47 ` [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support Varadarajan Narayanan
@ 2024-11-14 12:47 ` Konrad Dybcio
2024-11-14 13:26 ` Dmitry Baryshkov
0 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2024-11-14 12:47 UTC (permalink / raw)
To: Varadarajan Narayanan, vkoul, kishon, robh, krzk+dt, conor+dt,
gregkh, andersson, konradybcio, dmitry.baryshkov, mantas,
quic_kbajaj, quic_kriskura, quic_rohiagar, abel.vesa, quic_wcheng,
linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb
On 14.11.2024 8:47 AM, Varadarajan Narayanan wrote:
> Enable QMP USB3 phy support for IPQ5424 SoC.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
> v2: Add 'Reviewed-by: Dmitry Baryshkov'
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index acd6075bf6d9..f43823539a3b 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -2298,6 +2298,9 @@ static int qmp_usb_probe(struct platform_device *pdev)
>
> static const struct of_device_id qmp_usb_of_match_table[] = {
> {
> + .compatible = "qcom,ipq5424-qmp-usb3-phy",
> + .data = &ipq9574_usb3phy_cfg,
> + }, {
If the software interface is the same, can this just use ipq9574 as a
fallback compatible?
Konrad
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support
2024-11-14 12:47 ` Konrad Dybcio
@ 2024-11-14 13:26 ` Dmitry Baryshkov
0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-11-14 13:26 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Varadarajan Narayanan, vkoul, kishon, robh, krzk+dt, conor+dt,
gregkh, andersson, konradybcio, mantas, quic_kbajaj,
quic_kriskura, quic_rohiagar, abel.vesa, quic_wcheng,
linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb
On Thu, 14 Nov 2024 at 14:47, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
> On 14.11.2024 8:47 AM, Varadarajan Narayanan wrote:
> > Enable QMP USB3 phy support for IPQ5424 SoC.
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> > v2: Add 'Reviewed-by: Dmitry Baryshkov'
> > ---
> > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> > index acd6075bf6d9..f43823539a3b 100644
> > --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> > @@ -2298,6 +2298,9 @@ static int qmp_usb_probe(struct platform_device *pdev)
> >
> > static const struct of_device_id qmp_usb_of_match_table[] = {
> > {
> > + .compatible = "qcom,ipq5424-qmp-usb3-phy",
> > + .data = &ipq9574_usb3phy_cfg,
> > + }, {
>
> If the software interface is the same, can this just use ipq9574 as a
> fallback compatible?
Generally I'd agree here, but as PHY tables include not just setup
values, but also platform and chip-specific tunes, I think it's better
to have multiple entries rather than having to cope with the possible
issues. The only "fallback" compatibles that we have are qcs615-ufs ->
sm6115-ufs and qcs8300-ufs -> sa8775p-ufs. Thus I think it's better to
stay within the single-compat model.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
2024-11-14 7:47 ` [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424 Varadarajan Narayanan
@ 2024-11-14 13:28 ` Dmitry Baryshkov
2024-11-15 5:16 ` Varadarajan Narayanan
0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-11-14 13:28 UTC (permalink / raw)
To: Varadarajan Narayanan
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, mantas, quic_kbajaj, quic_kriskura, quic_rohiagar,
abel.vesa, quic_wcheng, linux-arm-msm, linux-phy, devicetree,
linux-kernel, linux-usb
On Thu, 14 Nov 2024 at 09:48, Varadarajan Narayanan
<quic_varada@quicinc.com> wrote:
>
> The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
> can connect to either of USB2.0 or USB3.0 phy and operate in the
> respective mode.
>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
> v3: Regulator node names, labels and 'regulator-name' changed per review suggestions
> Stray newline removed
>
> v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node
> Add u1/u2-entry quirks to usb@8a00000 node
> ---
> arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++
> 2 files changed, 225 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> index d4d31026a026..859e15befb3f 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> @@ -16,12 +16,70 @@ / {
> aliases {
> serial0 = &uart1;
> };
> +
> + vreg_misc_3p3: regulator-3300000 {
Technically these names are correct. However they don't match the
approach that Qualcomm DT files have been using up to now.
You can compare your data with the output of `git grep :.regulator-
arch/arm64/boot/dts/qcom/`
> + compatible = "regulator-fixed";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + regulator-name = "usb_hs_vdda_3p3";
> + };
> +
> + vreg_misc_1p8: regulator-1800000 {
> + compatible = "regulator-fixed";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + regulator-name = "vdda_1p8_usb";
> + };
> +
> + vreg_misc_0p925: regulator-0925000 {
> + compatible = "regulator-fixed";
> + regulator-min-microvolt = <925000>;
> + regulator-max-microvolt = <925000>;
> + regulator-boot-on;
> + regulator-always-on;
> + regulator-name = "vdd_core_usb";
> + };
> +};
> +
> +&dwc_0 {
> + dr_mode = "host";
> +};
> +
> +&dwc_1 {
> + dr_mode = "host";
> +};
> +
> +&qusb_phy_0 {
> + vdd-supply = <&vreg_misc_0p925>;
> + vdda-pll-supply = <&vreg_misc_1p8>;
> + vdda-phy-dpdm-supply = <&vreg_misc_3p3>;
> +
> + status = "okay";
> +};
> +
> +&qusb_phy_1 {
> + vdd-supply = <&vreg_misc_0p925>;
> + vdda-pll-supply = <&vreg_misc_1p8>;
> + vdda-phy-dpdm-supply = <&vreg_misc_3p3>;
> +
> + status = "okay";
> };
>
> &sleep_clk {
> clock-frequency = <32000>;
> };
>
> +&ssphy_0 {
> + vdda-pll-supply = <&vreg_misc_1p8>;
> + vdda-phy-supply = <&vreg_misc_0p925>;
> +
> + status = "okay";
> +};
> +
> &tlmm {
> sdc_default_state: sdc-default-state {
> clk-pins {
> @@ -53,6 +111,14 @@ &uart1 {
> status = "okay";
> };
>
> +&usb2 {
> + status = "okay";
> +};
> +
> +&usb3 {
> + status = "okay";
> +};
> +
> &xo_board {
> clock-frequency = <24000000>;
> };
> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> index 5e219f900412..f8afd6f0412d 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> @@ -233,6 +233,165 @@ intc: interrupt-controller@f200000 {
> msi-controller;
> };
>
> + qusb_phy_1: phy@71000 {
> + compatible = "qcom,ipq5424-qusb2-phy";
> + reg = <0 0x00071000 0 0x180>;
> + #phy-cells = <0>;
> +
> + clocks = <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
> + <&xo_board>;
> + clock-names = "cfg_ahb", "ref";
> +
> + resets = <&gcc GCC_QUSB2_1_PHY_BCR>;
> + status = "disabled";
> + };
> +
> + usb2: usb2@1e00000 {
> + compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
> + reg = <0 0x01ef8800 0 0x400>;
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + clocks = <&gcc GCC_USB1_MASTER_CLK>,
> + <&gcc GCC_USB1_SLEEP_CLK>,
> + <&gcc GCC_USB1_MOCK_UTMI_CLK>,
> + <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
> + <&gcc GCC_CNOC_USB_CLK>;
> +
> + clock-names = "core",
> + "sleep",
> + "mock_utmi",
> + "iface",
> + "cfg_noc";
> +
> + assigned-clocks = <&gcc GCC_USB1_MASTER_CLK>,
> + <&gcc GCC_USB1_MOCK_UTMI_CLK>;
> + assigned-clock-rates = <200000000>,
> + <24000000>;
> +
> + interrupts-extended = <&intc GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "pwr_event",
> + "qusb2_phy",
> + "dm_hs_phy_irq",
> + "dp_hs_phy_irq";
> +
> + resets = <&gcc GCC_USB1_BCR>;
> + qcom,select-utmi-as-pipe-clk;
> + status = "disabled";
> +
> + dwc_1: usb@1e00000 {
> + compatible = "snps,dwc3";
> + reg = <0 0x01e00000 0 0xe000>;
> + clocks = <&gcc GCC_USB1_MOCK_UTMI_CLK>;
> + clock-names = "ref";
> + interrupts = <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>;
> + phys = <&qusb_phy_1>;
> + phy-names = "usb2-phy";
> + tx-fifo-resize;
> + snps,is-utmi-l1-suspend;
> + snps,hird-threshold = /bits/ 8 <0x0>;
> + snps,dis_u2_susphy_quirk;
> + snps,dis_u3_susphy_quirk;
> + };
> + };
> +
> + qusb_phy_0: phy@7b000 {
> + compatible = "qcom,ipq5424-qusb2-phy";
> + reg = <0 0x0007b000 0 0x180>;
> + #phy-cells = <0>;
> +
> + clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
> + <&xo_board>;
> + clock-names = "cfg_ahb", "ref";
> +
> + resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
> + status = "disabled";
> + };
> +
> + ssphy_0: phy@7d000 {
> + compatible = "qcom,ipq5424-qmp-usb3-phy";
> + reg = <0 0x0007d000 0 0xa00>;
> + #phy-cells = <0>;
> +
> + clocks = <&gcc GCC_USB0_AUX_CLK>,
> + <&xo_board>,
> + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
> + <&gcc GCC_USB0_PIPE_CLK>;
> + clock-names = "aux",
> + "ref",
> + "cfg_ahb",
> + "pipe";
> +
> + resets = <&gcc GCC_USB0_PHY_BCR>,
> + <&gcc GCC_USB3PHY_0_PHY_BCR>;
> + reset-names = "phy",
> + "phy_phy";
> +
> + #clock-cells = <0>;
> + clock-output-names = "usb0_pipe_clk";
> +
> + status = "disabled";
> + };
> +
> + usb3: usb3@8a00000 {
> + compatible = "qcom,ipq5424-dwc3", "qcom,dwc3";
> + reg = <0 0x08af8800 0 0x400>;
> +
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + clocks = <&gcc GCC_USB0_MASTER_CLK>,
> + <&gcc GCC_USB0_SLEEP_CLK>,
> + <&gcc GCC_USB0_MOCK_UTMI_CLK>,
> + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
> + <&gcc GCC_CNOC_USB_CLK>;
> +
> + clock-names = "core",
> + "sleep",
> + "mock_utmi",
> + "iface",
> + "cfg_noc";
> +
> + assigned-clocks = <&gcc GCC_USB0_MASTER_CLK>,
> + <&gcc GCC_USB0_MOCK_UTMI_CLK>;
> + assigned-clock-rates = <200000000>,
> + <24000000>;
> +
> + interrupts-extended = <&intc GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "pwr_event",
> + "qusb2_phy",
> + "dm_hs_phy_irq",
> + "dp_hs_phy_irq";
> +
> + resets = <&gcc GCC_USB_BCR>;
> + status = "disabled";
> +
> + dwc_0: usb@8a00000 {
> + compatible = "snps,dwc3";
> + reg = <0 0x08a00000 0 0xcd00>;
> + clocks = <&gcc GCC_USB0_MOCK_UTMI_CLK>;
> + clock-names = "ref";
> + interrupts = <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
> + phys = <&qusb_phy_0>, <&ssphy_0>;
> + phy-names = "usb2-phy", "usb3-phy";
> + tx-fifo-resize;
> + snps,is-utmi-l1-suspend;
> + snps,hird-threshold = /bits/ 8 <0x0>;
> + snps,dis_u2_susphy_quirk;
> + snps,dis_u3_susphy_quirk;
> + snps,dis-u1-entry-quirk;
> + snps,dis-u2-entry-quirk;
> + };
> + };
> +
> timer@f420000 {
> compatible = "arm,armv7-timer-mem";
> reg = <0 0xf420000 0 0x1000>;
> --
> 2.34.1
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
2024-11-14 13:28 ` Dmitry Baryshkov
@ 2024-11-15 5:16 ` Varadarajan Narayanan
2024-11-15 6:54 ` Dmitry Baryshkov
0 siblings, 1 reply; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-15 5:16 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, mantas, quic_kbajaj, quic_kriskura, quic_rohiagar,
abel.vesa, quic_wcheng, linux-arm-msm, linux-phy, devicetree,
linux-kernel, linux-usb
On Thu, Nov 14, 2024 at 03:28:36PM +0200, Dmitry Baryshkov wrote:
> On Thu, 14 Nov 2024 at 09:48, Varadarajan Narayanan
> <quic_varada@quicinc.com> wrote:
> >
> > The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
> > can connect to either of USB2.0 or USB3.0 phy and operate in the
> > respective mode.
> >
> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> > v3: Regulator node names, labels and 'regulator-name' changed per review suggestions
> > Stray newline removed
> >
> > v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node
> > Add u1/u2-entry quirks to usb@8a00000 node
> > ---
> > arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
> > arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++
> > 2 files changed, 225 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > index d4d31026a026..859e15befb3f 100644
> > --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > @@ -16,12 +16,70 @@ / {
> > aliases {
> > serial0 = &uart1;
> > };
> > +
> > + vreg_misc_3p3: regulator-3300000 {
>
> Technically these names are correct. However they don't match the
> approach that Qualcomm DT files have been using up to now.
> You can compare your data with the output of `git grep :.regulator-
> arch/arm64/boot/dts/qcom/`
Dmitry,
This name was suggested by Rob Herring [1]. Shall I rename them as follows
regulator-usb-3p3
regulator-usb-1p8
regulator-usb-0p925
Thanks
Varada
1 - https://lore.kernel.org/linux-arm-msm/20241113181138.GA1011553-robh@kernel.org/
> > + compatible = "regulator-fixed";
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > + regulator-boot-on;
> > + regulator-always-on;
> > + regulator-name = "usb_hs_vdda_3p3";
> > + };
> > +
> > + vreg_misc_1p8: regulator-1800000 {
> > + compatible = "regulator-fixed";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > + regulator-boot-on;
> > + regulator-always-on;
> > + regulator-name = "vdda_1p8_usb";
> > + };
> > +
> > + vreg_misc_0p925: regulator-0925000 {
> > + compatible = "regulator-fixed";
> > + regulator-min-microvolt = <925000>;
> > + regulator-max-microvolt = <925000>;
> > + regulator-boot-on;
> > + regulator-always-on;
> > + regulator-name = "vdd_core_usb";
> > + };
> > +};
[. . .]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
2024-11-15 5:16 ` Varadarajan Narayanan
@ 2024-11-15 6:54 ` Dmitry Baryshkov
2024-11-18 5:31 ` Varadarajan Narayanan
0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-11-15 6:54 UTC (permalink / raw)
To: Varadarajan Narayanan
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, mantas, quic_kbajaj, quic_kriskura, quic_rohiagar,
abel.vesa, quic_wcheng, linux-arm-msm, linux-phy, devicetree,
linux-kernel, linux-usb
On Fri, Nov 15, 2024 at 10:46:10AM +0530, Varadarajan Narayanan wrote:
> On Thu, Nov 14, 2024 at 03:28:36PM +0200, Dmitry Baryshkov wrote:
> > On Thu, 14 Nov 2024 at 09:48, Varadarajan Narayanan
> > <quic_varada@quicinc.com> wrote:
> > >
> > > The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
> > > can connect to either of USB2.0 or USB3.0 phy and operate in the
> > > respective mode.
> > >
> > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > > ---
> > > v3: Regulator node names, labels and 'regulator-name' changed per review suggestions
> > > Stray newline removed
> > >
> > > v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node
> > > Add u1/u2-entry quirks to usb@8a00000 node
> > > ---
> > > arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
> > > arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++
> > > 2 files changed, 225 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > index d4d31026a026..859e15befb3f 100644
> > > --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > @@ -16,12 +16,70 @@ / {
> > > aliases {
> > > serial0 = &uart1;
> > > };
> > > +
> > > + vreg_misc_3p3: regulator-3300000 {
> >
> > Technically these names are correct. However they don't match the
> > approach that Qualcomm DT files have been using up to now.
> > You can compare your data with the output of `git grep :.regulator-
> > arch/arm64/boot/dts/qcom/`
>
> Dmitry,
>
> This name was suggested by Rob Herring [1]. Shall I rename them as follows
>
> regulator-usb-3p3
> regulator-usb-1p8
> regulator-usb-0p925
I'd say so. Rob clearly stated that this is not a strict rule. It's
always better to follow the customs of the particular platform, it helps
other developers. Also in _many_ cases just defining the voltage is not
enough, usually there are multiple networks providing 0.925 V or 1.8 V.
>
> Thanks
> Varada
>
> 1 - https://lore.kernel.org/linux-arm-msm/20241113181138.GA1011553-robh@kernel.org/
>
> > > + compatible = "regulator-fixed";
> > > + regulator-min-microvolt = <3300000>;
> > > + regulator-max-microvolt = <3300000>;
> > > + regulator-boot-on;
> > > + regulator-always-on;
> > > + regulator-name = "usb_hs_vdda_3p3";
> > > + };
> > > +
> > > + vreg_misc_1p8: regulator-1800000 {
> > > + compatible = "regulator-fixed";
> > > + regulator-min-microvolt = <1800000>;
> > > + regulator-max-microvolt = <1800000>;
> > > + regulator-boot-on;
> > > + regulator-always-on;
> > > + regulator-name = "vdda_1p8_usb";
> > > + };
> > > +
> > > + vreg_misc_0p925: regulator-0925000 {
> > > + compatible = "regulator-fixed";
> > > + regulator-min-microvolt = <925000>;
> > > + regulator-max-microvolt = <925000>;
> > > + regulator-boot-on;
> > > + regulator-always-on;
> > > + regulator-name = "vdd_core_usb";
> > > + };
> > > +};
>
> [. . .]
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424
2024-11-15 6:54 ` Dmitry Baryshkov
@ 2024-11-18 5:31 ` Varadarajan Narayanan
0 siblings, 0 replies; 13+ messages in thread
From: Varadarajan Narayanan @ 2024-11-18 5:31 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: vkoul, kishon, robh, krzk+dt, conor+dt, gregkh, andersson,
konradybcio, mantas, quic_kbajaj, quic_kriskura, quic_rohiagar,
abel.vesa, quic_wcheng, linux-arm-msm, linux-phy, devicetree,
linux-kernel, linux-usb
On Fri, Nov 15, 2024 at 08:54:47AM +0200, Dmitry Baryshkov wrote:
> On Fri, Nov 15, 2024 at 10:46:10AM +0530, Varadarajan Narayanan wrote:
> > On Thu, Nov 14, 2024 at 03:28:36PM +0200, Dmitry Baryshkov wrote:
> > > On Thu, 14 Nov 2024 at 09:48, Varadarajan Narayanan
> > > <quic_varada@quicinc.com> wrote:
> > > >
> > > > The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0
> > > > can connect to either of USB2.0 or USB3.0 phy and operate in the
> > > > respective mode.
> > > >
> > > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > > > ---
> > > > v3: Regulator node names, labels and 'regulator-name' changed per review suggestions
> > > > Stray newline removed
> > > >
> > > > v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node
> > > > Add u1/u2-entry quirks to usb@8a00000 node
> > > > ---
> > > > arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++
> > > > arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++
> > > > 2 files changed, 225 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > > index d4d31026a026..859e15befb3f 100644
> > > > --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > > +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> > > > @@ -16,12 +16,70 @@ / {
> > > > aliases {
> > > > serial0 = &uart1;
> > > > };
> > > > +
> > > > + vreg_misc_3p3: regulator-3300000 {
> > >
> > > Technically these names are correct. However they don't match the
> > > approach that Qualcomm DT files have been using up to now.
> > > You can compare your data with the output of `git grep :.regulator-
> > > arch/arm64/boot/dts/qcom/`
> >
> > Dmitry,
> >
> > This name was suggested by Rob Herring [1]. Shall I rename them as follows
> >
> > regulator-usb-3p3
> > regulator-usb-1p8
> > regulator-usb-0p925
>
> I'd say so. Rob clearly stated that this is not a strict rule. It's
> always better to follow the customs of the particular platform, it helps
> other developers. Also in _many_ cases just defining the voltage is not
> enough, usually there are multiple networks providing 0.925 V or 1.8 V.
Dmitry,
Have posted v4 with above changes. Please review.
Thanks
Varada
> > 1 - https://lore.kernel.org/linux-arm-msm/20241113181138.GA1011553-robh@kernel.org/
> >
> > > > + compatible = "regulator-fixed";
> > > > + regulator-min-microvolt = <3300000>;
> > > > + regulator-max-microvolt = <3300000>;
> > > > + regulator-boot-on;
> > > > + regulator-always-on;
> > > > + regulator-name = "usb_hs_vdda_3p3";
> > > > + };
> > > > +
> > > > + vreg_misc_1p8: regulator-1800000 {
> > > > + compatible = "regulator-fixed";
> > > > + regulator-min-microvolt = <1800000>;
> > > > + regulator-max-microvolt = <1800000>;
> > > > + regulator-boot-on;
> > > > + regulator-always-on;
> > > > + regulator-name = "vdda_1p8_usb";
> > > > + };
> > > > +
> > > > + vreg_misc_0p925: regulator-0925000 {
> > > > + compatible = "regulator-fixed";
> > > > + regulator-min-microvolt = <925000>;
> > > > + regulator-max-microvolt = <925000>;
> > > > + regulator-boot-on;
> > > > + regulator-always-on;
> > > > + regulator-name = "vdd_core_usb";
> > > > + };
> > > > +};
> >
> > [. . .]
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-11-18 5:32 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 7:47 [PATCH v3 0/6] Enable IPQ5424 USB support Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 1/6] dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 2/6] phy: qcom-qusb2: add QUSB2 support for IPQ5424 Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 3/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 4/6] phy: qcom: qmp: Enable IPQ5424 support Varadarajan Narayanan
2024-11-14 12:47 ` Konrad Dybcio
2024-11-14 13:26 ` Dmitry Baryshkov
2024-11-14 7:47 ` [PATCH v3 5/6] dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings Varadarajan Narayanan
2024-11-14 7:47 ` [PATCH v3 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424 Varadarajan Narayanan
2024-11-14 13:28 ` Dmitry Baryshkov
2024-11-15 5:16 ` Varadarajan Narayanan
2024-11-15 6:54 ` Dmitry Baryshkov
2024-11-18 5:31 ` Varadarajan Narayanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox