From: Konrad Dybcio <hidden> Date: 2023-08-25 18:14:34
This series brings support for the LPASS clock controllers on the SM6115
and similar. It provides resets that need to be toggled as part of
soundwire bringup routines.
Signed-off-by: Konrad Dybcio <redacted>
---
Konrad Dybcio (3):
dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller
clk: qcom: reset: Increase max reset delay
clk: qcom: Add SM6115 LPASSCC
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 53 ++++++++++++++
drivers/clk/qcom/Kconfig | 9 +++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 84 ++++++++++++++++++++++
drivers/clk/qcom/reset.h | 2 +-
include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++
6 files changed, 163 insertions(+), 1 deletion(-)
---
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
change-id: 20230825-topic-6115_lpasscc-02a4f5793acd
Best regards,
--
Konrad Dybcio [off-list ref]
From: Konrad Dybcio <hidden> Date: 2023-08-25 18:15:05
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add bindings for it.
Signed-off-by: Konrad Dybcio <redacted>
---
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 53 ++++++++++++++++++++++
include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
2 files changed, 68 insertions(+)
From: Konrad Dybcio <hidden> Date: 2023-08-25 18:15:06
u8 limits us to 255 microseconds of delay. Promote the delay variable to
u16 to hold bigger values.
Signed-off-by: Konrad Dybcio <redacted>
---
drivers/clk/qcom/reset.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Konrad Dybcio <hidden> Date: 2023-08-25 18:15:06
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add the required code to support them.
Signed-off-by: Konrad Dybcio <redacted>
---
drivers/clk/qcom/Kconfig | 9 +++++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 84 +++++++++++++++++++++++++++++++++++++++
3 files changed, 94 insertions(+)
From: Krzysztof Kozlowski <hidden> Date: 2023-08-26 09:23:16
On 25/08/2023 20:13, Konrad Dybcio wrote:
quoted hunk
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add the required code to support them.
Signed-off-by: Konrad Dybcio <redacted>
---
drivers/clk/qcom/Kconfig | 9 +++++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 84 +++++++++++++++++++++++++++++++++++++++
3 files changed, 94 insertions(+)
Everything here is almost the same as sc8280xp one, so this should be
added to sc8280xp. You cut some boilerplate and additional driver.
Best regards,
Krzysztof
From: Krzysztof Kozlowski <hidden> Date: 2023-08-26 09:29:54
On 25/08/2023 20:13, Konrad Dybcio wrote:
quoted hunk
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add bindings for it.
Signed-off-by: Konrad Dybcio <redacted>
---
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 53 ++++++++++++++++++++++
include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
2 files changed, 68 insertions(+)
@@ -0,0 +1,53 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/clock/qcom,sm6115-lpasscc.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Qualcomm LPASS Core & Audio Clock Controller on SM6115
Everything here looks the same as sc8280xp, so this could be just added
there as enum. The overall LPASS block version is different, but the
resets/clock controller look similar, doesn't it?
From: Konrad Dybcio <hidden> Date: 2023-08-26 09:41:40
On 26.08.2023 11:28, Krzysztof Kozlowski wrote:
On 25/08/2023 20:13, Konrad Dybcio wrote:
quoted
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add bindings for it.
Signed-off-by: Konrad Dybcio <redacted>
---
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 53 ++++++++++++++++++++++
include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
2 files changed, 68 insertions(+)
@@ -0,0 +1,53 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/clock/qcom,sm6115-lpasscc.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Qualcomm LPASS Core & Audio Clock Controller on SM6115
Everything here looks the same as sc8280xp, so this could be just added
there as enum. The overall LPASS block version is different, but the
resets/clock controller look similar, doesn't it?
I think the 6115 cc block is a bit different, 8280 has more swr
hosts. Maybe Srini would know more.
[...]
Also second example is not really needed. The difference is only in the
compatible.
From: Krzysztof Kozlowski <hidden> Date: 2023-08-26 09:47:00
On 26/08/2023 11:39, Konrad Dybcio wrote:
On 26.08.2023 11:28, Krzysztof Kozlowski wrote:
quoted
On 25/08/2023 20:13, Konrad Dybcio wrote:
quoted
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add bindings for it.
Signed-off-by: Konrad Dybcio <redacted>
---
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 53 ++++++++++++++++++++++
include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
2 files changed, 68 insertions(+)
@@ -0,0 +1,53 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/clock/qcom,sm6115-lpasscc.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Qualcomm LPASS Core & Audio Clock Controller on SM6115
Everything here looks the same as sc8280xp, so this could be just added
there as enum. The overall LPASS block version is different, but the
resets/clock controller look similar, doesn't it?
I think the 6115 cc block is a bit different, 8280 has more swr
hosts. Maybe Srini would know more.
Indeed, looking at downstream DTS this is closer to SM8250 and SM8350
than SC8280xp, with some interesting differences. But if you bring it
up, you also might fix SM8350, to which I looked a bit but then gave up.
Anyway, with the example staying or removed:
Reviewed-by: Krzysztof Kozlowski <redacted>
Best regards,
Krzysztof
On Sat, 26 Aug 2023 at 12:23, Krzysztof Kozlowski
[off-list ref] wrote:
On 25/08/2023 20:13, Konrad Dybcio wrote:
quoted
SM6115 (and its derivatives or similar SoCs) have a LPASS clock
controller block which provides audio-related resets.
Add the required code to support them.
Signed-off-by: Konrad Dybcio <redacted>
---
drivers/clk/qcom/Kconfig | 9 +++++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 84 +++++++++++++++++++++++++++++++++++++++
3 files changed, 94 insertions(+)
Everything here is almost the same as sc8280xp one, so this should be
added to sc8280xp. You cut some boilerplate and additional driver.
We have been there. It quickly becomes a nightmare to maintain.
Consider dispcc-sm8250.c
But I agree with you, this code looks too similar. If we expect more
similar lpasscc drivers, which provide no clocks, just several resets,
maybe we can create a common generic wrapper and make resets lists
corresponding driver data?
--
With best wishes
Dmitry
Everything here is almost the same as sc8280xp one, so this should be
added to sc8280xp. You cut some boilerplate and additional driver.
We have been there. It quickly becomes a nightmare to maintain.
Consider dispcc-sm8250.c
Because too much was added. I do not propose to keep all resets here.
But I agree with you, this code looks too similar. If we expect more
similar lpasscc drivers, which provide no clocks, just several resets,
maybe we can create a common generic wrapper and make resets lists
corresponding driver data?
Everything here is almost the same as sc8280xp one, so this should be
added to sc8280xp. You cut some boilerplate and additional driver.
We have been there. It quickly becomes a nightmare to maintain.
Consider dispcc-sm8250.c
Because too much was added. I do not propose to keep all resets here.
quoted
But I agree with you, this code looks too similar. If we expect more
similar lpasscc drivers, which provide no clocks, just several resets,
maybe we can create a common generic wrapper and make resets lists
corresponding driver data?
This would also work.
Sounds like a good idea until somebody at qualcomm decides to add
support for bypassing adsp that only works on chromebooks that may get
cancelled or super secret internal devboards and the driver will gain
support for clocks..
But I guess that person will have to worry about squaring this out.
Konrad