Enable USB High-Speed support for QCS615
cover Enable USB High-Speed support for QCS615
This series enables USB High-Speed functionality on QCS615 by adding missing clock support and QUSB2 PHY support.
---
Changes in v3:
- Implemented GCC_USB3_PRIM_CLKREF_CLK in clock driver instead of
using device tree override (addressing review feedback)
- Dropped the device tree override patch from v2
- Link to v2: https://lore.kernel.org/u-boot/[email protected]/
Changes in v2:
- Updated to the reference commit for the QCS615 QUSB2 PHY support
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---
Balaji Selvanathan (3):
clk: qcom: qcs615: Add GCC_USB3_PRIM_CLKREF_CLK support
clk: qcom: qcs615: Add GCC_AHB2PHY_WEST_CLK clock support
phy: qcom: qusb2: Add QCS615 QUSB2 PHY support
drivers/clk/qcom/clock-qcs615.c | 2 ++ drivers/phy/qcom/phy-qcom-qusb2.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+)
---
base-commit: fd53b78a796335fe3d9f85637657a93991b708a6
change-id: 20260213-talos_usb-cc965d78decb
Best regards,
Signature · 1 line
Balaji Selvanathan <[email protected]>
PATCH 1/3 clk: qcom: qcs615: Add GCC_USB3_PRIM_CLKREF_CLK support
Add support for GCC_USB3_PRIM_CLKREF_CLK to the QCS615 clock driver. This clock is referenced in the device tree USB node but was not implemented in U-Boot, causing "Clock 152 not found" warnings during fastboot run.
---
Changes in v3:
- Add support for GCC_USB3_PRIM_CLKREF_CLK to the QCS615 clock driver.
- Removed the logic of removing GCC_USB3_PRIM_CLKREF_CLK from DTS node
Changes in v2:
- No changes in v2
--- drivers/clk/qcom/clock-qcs615.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/clock-qcs615.c +1 -0
@@ -66,6 +66,7 @@ static const struct gate_clk qcs615_clks[] = {GATE_CLK (GCC_USB3_PRIM_PHY_AUX_CLK ,0xf050 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_PHY_COM_AUX_CLK ,0xf054 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_PHY_PIPE_CLK ,0xf058 ,BIT (0 )), +GATE_CLK (GCC_USB3_PRIM_CLKREF_CLK ,0x8c014 ,BIT (0 )),GATE_CLK (GCC_QUPV3_WRAP0_S0_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S0_CLK_ENA_BIT ),GATE_CLK (GCC_QUPV3_WRAP0_S1_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S1_CLK_ENA_BIT ), GATE_CLK(GCC_QUPV3_WRAP0_S2_CLK, 0x5200c, GCC_QUPV3_WRAP0_S2_CLK_ENA_BIT),
Signature · 1 line
2.34.1
Re: [PATCH 1/3] clk: qcom: qcs615: Add GCC_USB3_PRIM_CLKREF_CLK support
Quoted 11 lines · Balaji Selvanathan
Add support for
GCC_USB3_PRIM_CLKREF_CLKto the QCS615 clock driver. This clock is referenced in the device tree USB node but was not implemented in U-Boot, causing "Clock 152 not found" warnings during fastboot run.Signed-off-by Balaji Selvanathan <[email protected]>---
Changes in v3:
- Add support forGCC_USB3_PRIM_CLKREF_CLKto the QCS615 clock driver.
- Removed the logic of removingGCC_USB3_PRIM_CLKREF_CLKfrom DTS node
Quoted 6 lines
Changes in v2:
- No changes in v2--- drivers/clk/qcom/clock-qcs615.c | 1 + 1 file changed, 1 insertion(+)
-Sumit
Quoted 16 lines
drivers/clk/qcom/clock-qcs615.c +1
-0@@ -66,6 +66,7 @@ static const struct gate_clk qcs615_clks[] = {GATE_CLK (GCC_USB3_PRIM_PHY_AUX_CLK ,0xf050 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_PHY_COM_AUX_CLK ,0xf054 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_PHY_PIPE_CLK ,0xf058 ,BIT (0 )), +GATE_CLK (GCC_USB3_PRIM_CLKREF_CLK ,0x8c014 ,BIT (0 )),GATE_CLK (GCC_QUPV3_WRAP0_S0_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S0_CLK_ENA_BIT ),GATE_CLK (GCC_QUPV3_WRAP0_S1_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S1_CLK_ENA_BIT ), GATE_CLK(GCC_QUPV3_WRAP0_S2_CLK, 0x5200c, GCC_QUPV3_WRAP0_S2_CLK_ENA_BIT),Signature · 2 lines
-- 2.34.1
PATCH 2/3 clk: qcom: qcs615: Add GCC_AHB2PHY_WEST_CLK clock support
In reply to Balaji SelvanathanAdd GCC_AHB2PHY_WEST_CLK gate clock definition to the QCS615 clock driver. This clock is required for proper PHY operation and eliminates clock-related warnings during USB initialization.
---
Changes in v3:
- No changes in v3
Changes in v2:
- No changes in v2
--- drivers/clk/qcom/clock-qcs615.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/clock-qcs615.c +1 -0
@@ -67,6 +67,7 @@ static const struct gate_clk qcs615_clks[] = {GATE_CLK (GCC_USB3_PRIM_PHY_COM_AUX_CLK ,0xf054 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_PHY_PIPE_CLK ,0xf058 ,BIT (0 )),GATE_CLK (GCC_USB3_PRIM_CLKREF_CLK ,0x8c014 ,BIT (0 )), +GATE_CLK (GCC_AHB2PHY_WEST_CLK ,0x6a004 ,BIT (0 )),GATE_CLK (GCC_QUPV3_WRAP0_S0_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S0_CLK_ENA_BIT ),GATE_CLK (GCC_QUPV3_WRAP0_S1_CLK ,0x5200c ,GCC_QUPV3_WRAP0_S1_CLK_ENA_BIT ), GATE_CLK(GCC_QUPV3_WRAP0_S2_CLK, 0x5200c, GCC_QUPV3_WRAP0_S2_CLK_ENA_BIT),
Signature · 1 line
2.34.1
PATCH 3/3 phy: qcom: qusb2: Add QCS615 QUSB2 PHY support
In reply to Balaji SelvanathanAdd support for QCS615 QUSB2 PHY by introducing platform-specific initialization table and register layout. The implementation reuses the IPQ6018 register layout and defines QCS615-specific tuning parameters for proper USB PHY operation.
Taken from Linux commit 8adbf20e0502 ("phy: qcom-qusb2: Add support for QCS615")
---
Changes in v3:
- No changes in v3
Changes in v2:
- Updated to the reference commit for the QCS615 QUSB2 PHY support
--- drivers/phy/qcom/phy-qcom-qusb2.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +38 -0
@@ -176,6 +176,19 @@ static const unsigned int sm6115_regs_layout[] = { [QUSB2PHY_PORT_POWERDOWN] = 0xb4, [QUSB2PHY_INTR_CTRL] = 0xbc, }; +static const unsigned int ipq6018_regs_layout[] = { + [QUSB2PHY_PLL_STATUS ] =0x38 , + [QUSB2PHY_PORT_TUNE1 ] =0x80 , + [QUSB2PHY_PORT_TUNE2 ] =0x84 , + [QUSB2PHY_PORT_TUNE3 ] =0x88 , + [QUSB2PHY_PORT_TUNE4 ] =0x8C , + [QUSB2PHY_PORT_TUNE5 ] =0x90 , + [QUSB2PHY_PORT_TEST1 ] =0x98 , + [QUSB2PHY_PORT_TEST2 ] =0x9C , + [QUSB2PHY_PORT_POWERDOWN ] =0xB4 , + [QUSB2PHY_INTR_CTRL ] =0xBC , +}; +static const struct qusb2_phy_init_tbl msm8996_init_tbl[] = {QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE1 ,0xf8 ),QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE2 ,0xb3 ),
@@ -189,6 +202,19 @@ static const struct qusb2_phy_init_tbl msm8996_init_tbl[] = { QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00), }; +static const struct qusb2_phy_init_tbl qcs615_init_tbl[] = { +QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE1 ,0xc8 ), +QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE2 ,0xb3 ), +QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE3 ,0x83 ), +QUSB2_PHY_INIT_CFG_L (QUSB2PHY_PORT_TUNE4 ,0xc0 ), +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_TEST2 ,0x14 ), +QUSB2_PHY_INIT_CFG (QUSB2PHY_PLL_AUTOPGM_CTL1 ,0x9f ), +QUSB2_PHY_INIT_CFG (QUSB2PHY_PLL_PWR_CTRL ,0x00 ), +}; +static const struct qusb2_phy_init_tbl qusb2_v2_init_tbl[] = {QUSB2_PHY_INIT_CFG (QUSB2PHY_PLL_ANALOG_CONTROLS_TWO ,0x03 ),QUSB2_PHY_INIT_CFG (QUSB2PHY_PLL_CLOCK_INVERTERS ,0x7c ),
@@ -260,6 +286,16 @@ static const struct qusb2_phy_cfg sdm660_phy_cfg = { .autoresume_en = BIT(3), }; +static const struct qusb2_phy_cfg qcs615_phy_cfg = { + .tbl = qcs615_init_tbl, + .tbl_num =ARRAY_SIZE (qcs615_init_tbl), + .regs = ipq6018_regs_layout, + + .disable_ctrl = (CLAMP_N_EN |FREEZIO_N |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),
@@ -467,6 +503,8 @@ static const struct udevice_id qusb2phy_ids[] = { { .compatible = "qcom,qusb2-phy" }, { .compatible = "qcom,qcm2290-qusb2-phy", .data = (ulong)&sm6115_phy_cfg }, + { .compatible = "qcom,qcs615-qusb2-phy", + .data = (ulong)&qcs615_phy_cfg }, { .compatible = "qcom,sdm660-qusb2-phy", .data = (ulong)&sdm660_phy_cfg }, { .compatible = "qcom,sm6115-qusb2-phy",
Signature · 1 line
2.34.1
Re: [PATCH 3/3] phy: qcom: qusb2: Add QCS615 QUSB2 PHY support
Quoted 10 lines · Balaji Selvanathan
Add support for QCS615 QUSB2 PHY by introducing platform-specific initialization table and register layout. The implementation reuses the IPQ6018 register layout and defines QCS615-specific tuning parameters for proper USB PHY operation.
Taken from Linux commit
8adbf20e0502("phy: qcom-qusb2: Add support for QCS615")Signed-off-by Balaji Selvanathan <[email protected]>Reviewed-by Sumit Garg <[email protected]>Reviewed-by Neil Armstrong <[email protected]>
S-o-b should be after R-b.
-Varada
Hi Casey,
Request to pick up this series in qcom-next.
Thanks,
Balaji
Quoted 30 lines · Balaji Selvanathan
This series enables USB High-Speed functionality on QCS615 by adding missing clock support and QUSB2 PHY support.
---
Changes in v3:
- ImplementedGCC_USB3_PRIM_CLKREF_CLKin clock driver instead of
using device tree override (addressing review feedback)
- Dropped the device tree override patch from v2
- Link to v2: https://lore.kernel.org/u-boot/[email protected]/Changes in v2:
- Updated to the reference commit for the QCS615 QUSB2 PHY support
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/Signed-off-by Balaji Selvanathan <[email protected]>---
Balaji Selvanathan (3):
clk: qcom: qcs615: AddGCC_USB3_PRIM_CLKREF_CLKsupport
clk: qcom: qcs615: AddGCC_AHB2PHY_WEST_CLKclock support
phy: qcom: qusb2: Add QCS615 QUSB2 PHY supportdrivers/clk/qcom/clock-qcs615.c | 2 ++ drivers/phy/qcom/phy-qcom-qusb2.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+)---
base-commit:fd53b78a796335fe3d9f85637657a93991b708a6
change-id: 20260213-talos_usb-cc965d78decbBest regards,
Casey Connolly
AppliedQuoted 3 lines · Balaji Selvanathan
This series enables USB High-Speed functionality on QCS615 by adding missing clock support and QUSB2 PHY support.
Applied, thanks!
[1/3] clk: qcom: qcs615: Add GCC_USB3_PRIM_CLKREF_CLK support
https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/c4f40d092590 [2/3] clk: qcom: qcs615: Add GCC_AHB2PHY_WEST_CLK clock support https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/c4169dfa1dcc [3/3] phy: qcom: qusb2: Add QCS615 QUSB2 PHY support https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/0f265c20a56f
Best regards,
Signature · 1 line
// Casey (she/they)