* [PATCH 2/3] dt-bindings: clock: qcom: ipq8074: add missing networking resets
2022-11-07 13:28 [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Robert Marko
@ 2022-11-07 13:29 ` Robert Marko
2022-11-08 11:13 ` Krzysztof Kozlowski
2022-11-07 13:29 ` [PATCH 3/3] clk: " Robert Marko
2022-12-02 20:58 ` (subset) [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Bjorn Andersson
2 siblings, 1 reply; 5+ messages in thread
From: Robert Marko @ 2022-11-07 13:29 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, mturquette, sboyd, robh+dt,
krzysztof.kozlowski+dt, linux-arm-msm, linux-clk, linux-kernel,
devicetree
Cc: Robert Marko
Add bindings for the missing networking resets found in IPQ8074 GCC.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
include/dt-bindings/clock/qcom,gcc-ipq8074.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/dt-bindings/clock/qcom,gcc-ipq8074.h b/include/dt-bindings/clock/qcom,gcc-ipq8074.h
index e4991d303708..f9ea55811104 100644
--- a/include/dt-bindings/clock/qcom,gcc-ipq8074.h
+++ b/include/dt-bindings/clock/qcom,gcc-ipq8074.h
@@ -367,6 +367,20 @@
#define GCC_PCIE1_AHB_ARES 129
#define GCC_PCIE1_AXI_MASTER_STICKY_ARES 130
#define GCC_PCIE0_AXI_SLAVE_STICKY_ARES 131
+#define GCC_PPE_FULL_RESET 132
+#define GCC_UNIPHY0_SOFT_RESET 133
+#define GCC_UNIPHY0_XPCS_RESET 134
+#define GCC_UNIPHY1_SOFT_RESET 135
+#define GCC_UNIPHY1_XPCS_RESET 136
+#define GCC_UNIPHY2_SOFT_RESET 137
+#define GCC_UNIPHY2_XPCS_RESET 138
+#define GCC_EDMA_HW_RESET 139
+#define GCC_NSSPORT1_RESET 140
+#define GCC_NSSPORT2_RESET 141
+#define GCC_NSSPORT3_RESET 142
+#define GCC_NSSPORT4_RESET 143
+#define GCC_NSSPORT5_RESET 144
+#define GCC_NSSPORT6_RESET 145
#define USB0_GDSC 0
#define USB1_GDSC 1
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] clk: qcom: ipq8074: add missing networking resets
2022-11-07 13:28 [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Robert Marko
2022-11-07 13:29 ` [PATCH 2/3] dt-bindings: clock: qcom: ipq8074: add missing networking resets Robert Marko
@ 2022-11-07 13:29 ` Robert Marko
2022-12-02 20:58 ` (subset) [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Robert Marko @ 2022-11-07 13:29 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, mturquette, sboyd, robh+dt,
krzysztof.kozlowski+dt, linux-arm-msm, linux-clk, linux-kernel,
devicetree
Cc: Robert Marko
Downstream QCA 5.4 kernel defines networking resets which are not present
in the mainline kernel but are required for the networking drivers.
So, port the downstream resets and avoid using magic values for mask,
construct mask for resets which require multiple bits to be set/cleared.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
drivers/clk/qcom/gcc-ipq8074.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c
index 42d185fe19c8..37d8a9f4105e 100644
--- a/drivers/clk/qcom/gcc-ipq8074.c
+++ b/drivers/clk/qcom/gcc-ipq8074.c
@@ -4826,6 +4826,20 @@ static const struct qcom_reset_map gcc_ipq8074_resets[] = {
[GCC_PCIE1_AXI_SLAVE_ARES] = { 0x76040, 4 },
[GCC_PCIE1_AHB_ARES] = { 0x76040, 5 },
[GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
+ [GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = GENMASK(19, 16) },
+ [GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = GENMASK(13, 4) | BIT(1) },
+ [GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
+ [GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = GENMASK(5, 4) | BIT(1) },
+ [GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
+ [GCC_UNIPHY2_SOFT_RESET] = { .reg = 0x56204, .bitmask = GENMASK(5, 4) | BIT(1) },
+ [GCC_UNIPHY2_XPCS_RESET] = { 0x56204, 2 },
+ [GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = GENMASK(21, 20) },
+ [GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = BIT(24) | GENMASK(1, 0) },
+ [GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = BIT(25) | GENMASK(3, 2) },
+ [GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = BIT(26) | GENMASK(5, 4) },
+ [GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = BIT(27) | GENMASK(9, 8) },
+ [GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = BIT(28) | GENMASK(11, 10) },
+ [GCC_NSSPORT6_RESET] = { .reg = 0x68014, .bitmask = BIT(29) | GENMASK(13, 12) },
};
static struct gdsc *gcc_ipq8074_gdscs[] = {
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: (subset) [PATCH 1/3] clk: qcom: reset: support resetting multiple bits
2022-11-07 13:28 [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Robert Marko
2022-11-07 13:29 ` [PATCH 2/3] dt-bindings: clock: qcom: ipq8074: add missing networking resets Robert Marko
2022-11-07 13:29 ` [PATCH 3/3] clk: " Robert Marko
@ 2022-12-02 20:58 ` Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2022-12-02 20:58 UTC (permalink / raw)
To: konrad.dybcio, robimarko, krzysztof.kozlowski+dt, robh+dt, sboyd,
devicetree, linux-arm-msm, agross, mturquette, linux-kernel,
linux-clk
On Mon, 7 Nov 2022 14:28:59 +0100, Robert Marko wrote:
> This patch adds the support for giving the complete bitmask
> in reset structure and reset operation will use this bitmask
> for all reset operations.
>
> Currently, reset structure only takes a single bit for each reset
> and then calculates the bitmask by using the BIT() macro.
>
> [...]
Applied, thanks!
[1/3] clk: qcom: reset: support resetting multiple bits
commit: 4a5210893625f89723ea210d7c630b730abb37ad
[2/3] dt-bindings: clock: qcom: ipq8074: add missing networking resets
commit: bb524058eb5635ee6ecbe3ef154d44088f7a2154
[3/3] clk: qcom: ipq8074: add missing networking resets
commit: ce520e312918bc8f02d1c6bd58b288c2eb2d23c0
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread