2023-05-12 12:40:18

by Taniya Das

[permalink] [raw]
Subject: [PATCH V2 0/5] Add GCC and RPMHCC support for sdx75

This series of patches extends the invert logic for branch2 clocks and adds
GCC, RPMH clocks devicetree bindings and driver support for SDX75 platform.

Imran Shaik (5):
clk: qcom: branch: Extend the invert logic for branch2 clocks
dt-bindings: clock: qcom: Add GCC clocks for SDX75
dt-bindings: clock: qcom: Add RPMHCC for SDX75
clk: qcom: rpmh: Add RPMH clocks support for SDX75
clk: qcom: Add GCC driver support for SDX75

.../bindings/clock/qcom,rpmhcc.yaml | 1 +
.../bindings/clock/qcom,sdx75-gcc.yaml | 65 +
drivers/clk/qcom/Kconfig | 8 +
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/clk-branch.c | 6 +-
drivers/clk/qcom/clk-rpmh.c | 19 +
drivers/clk/qcom/gcc-sdx75.c | 2970 +++++++++++++++++
include/dt-bindings/clock/qcom,sdx75-gcc.h | 193 ++
8 files changed, 3260 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/qcom,sdx75-gcc.yaml
create mode 100644 drivers/clk/qcom/gcc-sdx75.c
create mode 100644 include/dt-bindings/clock/qcom,sdx75-gcc.h

--
2.17.1



2023-05-12 12:40:47

by Taniya Das

[permalink] [raw]
Subject: [PATCH V2 3/5] dt-bindings: clock: qcom: Add RPMHCC for SDX75

From: Imran Shaik <[email protected]>

Add compatible string for qcom RPMHCC for SDX75 platform.

Signed-off-by: Imran Shaik <[email protected]>
Signed-off-by: Taniya Das <[email protected]>
---
Changes since V1:
- Newly added.

Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
index d5a250b7c2af..267cf8c26823 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
@@ -27,6 +27,7 @@ properties:
- qcom,sdm845-rpmh-clk
- qcom,sdx55-rpmh-clk
- qcom,sdx65-rpmh-clk
+ - qcom,sdx75-rpmh-clk
- qcom,sm6350-rpmh-clk
- qcom,sm8150-rpmh-clk
- qcom,sm8250-rpmh-clk
--
2.17.1


2023-05-12 12:42:21

by Taniya Das

[permalink] [raw]
Subject: [PATCH V2 1/5] clk: qcom: branch: Extend the invert logic for branch2 clocks

From: Imran Shaik <[email protected]>

Add support to handle the invert logic for branch2 clocks.
Invert branch halt would indicate the clock ON when CLK_OFF
bit is '1' and OFF when CLK_OFF bit is '0'.

Signed-off-by: Imran Shaik <[email protected]>
Signed-off-by: Taniya Das <[email protected]>
---
Changes since v1:
- Removed the multiple returns from inside clk_branch2_check_halt.

drivers/clk/qcom/clk-branch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
index ca896ebf7e1b..fc4735f74f0f 100644
--- a/drivers/clk/qcom/clk-branch.c
+++ b/drivers/clk/qcom/clk-branch.c
@@ -43,6 +43,7 @@ static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling)
{
u32 val;
u32 mask;
+ bool invert = (br->halt_check == BRANCH_HALT_ENABLE);

mask = CBCR_NOC_FSM_STATUS;
mask |= CBCR_CLK_OFF;
@@ -51,11 +52,10 @@ static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling)

if (enabling) {
val &= mask;
- return (val & CBCR_CLK_OFF) == 0 ||
+ return (val & CBCR_CLK_OFF) == (invert ? CBCR_CLK_OFF : 0) ||
FIELD_GET(CBCR_NOC_FSM_STATUS, val) == FSM_STATUS_ON;
- } else {
- return val & CBCR_CLK_OFF;
}
+ return (val & CBCR_CLK_OFF) == (invert ? 0 : CBCR_CLK_OFF);
}

static int clk_branch_wait(const struct clk_branch *br, bool enabling,
--
2.17.1


2023-05-12 17:32:17

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH V2 3/5] dt-bindings: clock: qcom: Add RPMHCC for SDX75

On 12/05/2023 14:23, Taniya Das wrote:
> From: Imran Shaik <[email protected]>
>
> Add compatible string for qcom RPMHCC for SDX75 platform.
>
> Signed-off-by: Imran Shaik <[email protected]>
> Signed-off-by: Taniya Das <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-05-25 05:42:19

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH V2 0/5] Add GCC and RPMHCC support for sdx75

On Fri, 12 May 2023 17:53:42 +0530, Taniya Das wrote:
> This series of patches extends the invert logic for branch2 clocks and adds
> GCC, RPMH clocks devicetree bindings and driver support for SDX75 platform.
>
> Imran Shaik (5):
> clk: qcom: branch: Extend the invert logic for branch2 clocks
> dt-bindings: clock: qcom: Add GCC clocks for SDX75
> dt-bindings: clock: qcom: Add RPMHCC for SDX75
> clk: qcom: rpmh: Add RPMH clocks support for SDX75
> clk: qcom: Add GCC driver support for SDX75
>
> [...]

Applied, thanks!

[1/5] clk: qcom: branch: Extend the invert logic for branch2 clocks
commit: 9092d1083a6253757c7f9449340173443c81768c
[3/5] dt-bindings: clock: qcom: Add RPMHCC for SDX75
commit: 379d72721bc4308fbc038e9858b7d2e9191725b5
[4/5] clk: qcom: rpmh: Add RPMH clocks support for SDX75
commit: 1c2360ff58162ab3a91c619ab8172c0061174151
[5/5] clk: qcom: Add GCC driver support for SDX75
commit: 108cdc09b2dea5110533bba495b6953ca9c7c2a9

Best regards,
--
Bjorn Andersson <[email protected]>