kernel/qualcommax: Restore kernel files for v6.1
[openwrt/staging/stintel.git] / target / linux / qualcommax / patches-6.6 / 0010-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch
1 From da76cb63d04dc22ed32123b8c1d084c006d67bfb Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robimarko@gmail.com>
3 Date: Mon, 7 Nov 2022 14:29:01 +0100
4 Subject: [PATCH] clk: qcom: ipq8074: add missing networking resets
5
6 Downstream QCA 5.4 kernel defines networking resets which are not present
7 in the mainline kernel but are required for the networking drivers.
8
9 So, port the downstream resets and avoid using magic values for mask,
10 construct mask for resets which require multiple bits to be set/cleared.
11
12 Signed-off-by: Robert Marko <robimarko@gmail.com>
13 Signed-off-by: Bjorn Andersson <andersson@kernel.org>
14 Link: https://lore.kernel.org/r/20221107132901.489240-3-robimarko@gmail.com
15 ---
16 drivers/clk/qcom/gcc-ipq8074.c | 14 ++++++++++++++
17 1 file changed, 14 insertions(+)
18
19 --- a/drivers/clk/qcom/gcc-ipq8074.c
20 +++ b/drivers/clk/qcom/gcc-ipq8074.c
21 @@ -4665,6 +4665,20 @@ static const struct qcom_reset_map gcc_i
22 [GCC_PCIE1_AXI_SLAVE_ARES] = { 0x76040, 4 },
23 [GCC_PCIE1_AHB_ARES] = { 0x76040, 5 },
24 [GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
25 + [GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = GENMASK(19, 16) },
26 + [GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = GENMASK(13, 4) | BIT(1) },
27 + [GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
28 + [GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = GENMASK(5, 4) | BIT(1) },
29 + [GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
30 + [GCC_UNIPHY2_SOFT_RESET] = { .reg = 0x56204, .bitmask = GENMASK(5, 4) | BIT(1) },
31 + [GCC_UNIPHY2_XPCS_RESET] = { 0x56204, 2 },
32 + [GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = GENMASK(21, 20) },
33 + [GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = BIT(24) | GENMASK(1, 0) },
34 + [GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = BIT(25) | GENMASK(3, 2) },
35 + [GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = BIT(26) | GENMASK(5, 4) },
36 + [GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = BIT(27) | GENMASK(9, 8) },
37 + [GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = BIT(28) | GENMASK(11, 10) },
38 + [GCC_NSSPORT6_RESET] = { .reg = 0x68014, .bitmask = BIT(29) | GENMASK(13, 12) },
39 };
40
41 static struct gdsc *gcc_ipq8074_gdscs[] = {