[PATCH RFT] clk: qcom: gcc-ipq5018: assert SYS, RX and TX with the UNIPHY soft reset

From: Julius Bairaktaris

Date: Sun Nov 29 2026 - 18:56:33 EST


From: George Moussalem <george.moussalem@xxxxxxxxxxx>

GCC_UNIPHY_SOFT_RESET is mapped to bit 0 of 0x56104, which is the bit
of GCC_UNIPHY_AHB_ARES. A consumer that asserts the soft reset of the
UNIPHY therefore resets its AHB interface and leaves the SYS, RX and TX
resets alone.

The soft reset is the combination of SYS (bit 1), RX (bit 4) and TX
(bit 5), the same bits that GCC_UNIPHY1_SOFT_RESET uses on IPQ8074 and
IPQ6018 for the UNIPHY at this register offset. Set that bitmask.

Fixes: e3fdbef1bab8 ("clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018")
Signed-off-by: George Moussalem <george.moussalem@xxxxxxxxxxx>
[julius: reworded the commit message, used GENMASK() as gcc-ipq8074 does]
Signed-off-by: Julius Bairaktaris <julius@xxxxxxxxxxxxxx>
---

Notes:
RFT: a run on an IPQ5018 board whose UNIPHY consumer asserts
GCC_UNIPHY_SOFT_RESET is welcome. OpenWrt's qualcommax target carries
this change as a local patch (from George), and its IPQ5018 UNIPHY PCS
node references this reset; I came across it while moving that target
to 7.4.

qcom_reset_set_assert() uses .bitmask when it is set and BIT(.bit)
otherwise, so the entry as it is today toggles bit 0 only, the same bit
as GCC_UNIPHY_AHB_ARES two lines above.

I used Claude (Anthropic) to help write these patches.

drivers/clk/qcom/gcc-ipq5018.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c
index 37ccdc44a8..d081c4d8b4 100644
--- a/drivers/clk/qcom/gcc-ipq5018.c
+++ b/drivers/clk/qcom/gcc-ipq5018.c
@@ -3653,7 +3653,7 @@ static const struct qcom_reset_map gcc_ipq5018_resets[] = {
[GCC_UNIPHY_SYS_ARES] = { 0x56104, 1 },
[GCC_UNIPHY_RX_ARES] = { 0x56104, 4 },
[GCC_UNIPHY_TX_ARES] = { 0x56104, 5 },
- [GCC_UNIPHY_SOFT_RESET] = {0x56104, 0 },
+ [GCC_UNIPHY_SOFT_RESET] = { .reg = 0x56104, .bitmask = GENMASK(5, 4) | BIT(1) },
[GCC_USB0_BCR] = { 0x3e070, 0 },
[GCC_USB0_PHY_BCR] = { 0x3e034, 0 },
[GCC_WCSS_BCR] = { 0x18000, 0 },

base-commit: ef922b721a5e99348fc1f5801fdeb427ee14ee9f
--
2.53.0