* [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller
@ 2024-12-12 0:25 Alexey Klimov
2024-12-12 0:25 ` [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 " Alexey Klimov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexey Klimov @ 2024-12-12 0:25 UTC (permalink / raw)
To: andersson, mturquette, sboyd, krzk+dt
Cc: konradybcio, konrad.dybcio, robh, conor+dt, srinivas.kandagatla,
linux-arm-msm, linux-clk, devicetree, linux-kernel
Updates from previous version:
-- no updates, just resend.
The same version as here: https://lore.kernel.org/linux-clk/20241101012247.216825-1-alexey.klimov@linaro.org/
just rebased and re-tested.
This is one of the required dependencies for audio support on sm6115 and
its derivatives SoCs. This was written by Konrad Dybcio, however his linaro
email is already invalid. Konrad suggested sending it as-is and keeping
him in c/c. Some updates may be still required, for instance the
maintainers line in DT bindings file.
This was tested on QRB4210 (Qualcomm RB2 board). The only changes from my
side were fixing compilation errors and small changes in commit messages.
This is second attempt and v2 as suggested.
Changes in v2:
-- added Reviewed-by tag to first patch;
-- removed the second example as suggested by Krzysztof in the first patch;
-- dropped patch "clk: qcom: reset: Increase max reset delay", the change
already landed.
URL to initial series by Konrad:
https://lore.kernel.org/linux-clk/20230825-topic-6115_lpasscc-v1-0-d4857be298e3@linaro.org/
URL to failed attempt to send it recently:
https://lore.kernel.org/linux-clk/20241017005800.1175419-1-alexey.klimov@linaro.org/
Konrad Dybcio (2):
dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller
clk: qcom: Add SM6115 LPASSCC
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 46 ++++++++++
drivers/clk/qcom/Kconfig | 9 ++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 85 +++++++++++++++++++
.../dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++
5 files changed, 156 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
create mode 100644 drivers/clk/qcom/lpasscc-sm6115.c
create mode 100644 include/dt-bindings/clock/qcom,sm6115-lpasscc.h
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller
2024-12-12 0:25 [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Alexey Klimov
@ 2024-12-12 0:25 ` Alexey Klimov
2024-12-12 7:00 ` Manikanta Mylavarapu
2024-12-12 0:25 ` [PATCH v2 RESEND 2/2] clk: qcom: Add SM6115 LPASSCC Alexey Klimov
2025-01-08 2:52 ` [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Bjorn Andersson
2 siblings, 1 reply; 5+ messages in thread
From: Alexey Klimov @ 2024-12-12 0:25 UTC (permalink / raw)
To: andersson, mturquette, sboyd, krzk+dt
Cc: konradybcio, konrad.dybcio, robh, conor+dt, srinivas.kandagatla,
linux-arm-msm, linux-clk, devicetree, linux-kernel
From: Konrad Dybcio <konrad.dybcio@linaro.org>
SM6115 (and its derivatives or similar SoCs) has an LPASS clock
controller block which provides audio-related resets.
Add bindings for it.
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[alexey.klimov] slightly changed the commit message
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
.../bindings/clock/qcom,sm6115-lpasscc.yaml | 46 +++++++++++++++++++
.../dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
2 files changed, 61 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
create mode 100644 include/dt-bindings/clock/qcom,sm6115-lpasscc.h
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
new file mode 100644
index 000000000000..247b6b0a9f5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.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
+
+maintainers:
+ - Konrad Dybcio <konrad.dybcio@linaro.org>
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+ Qualcomm LPASS core and audio clock controllers provide audio-related resets
+ on SM6115 and its derivatives.
+
+ See also::
+ include/dt-bindings/clock/qcom,sm6115-lpasscc.h
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm6115-lpassaudiocc
+ - qcom,sm6115-lpasscc
+
+ reg:
+ maxItems: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ lpass_audiocc: clock-controller@a6a9000 {
+ compatible = "qcom,sm6115-lpassaudiocc";
+ reg = <0x0a6a9000 0x1000>;
+ #reset-cells = <1>;
+ };
+...
diff --git a/include/dt-bindings/clock/qcom,sm6115-lpasscc.h b/include/dt-bindings/clock/qcom,sm6115-lpasscc.h
new file mode 100644
index 000000000000..799274517c9a
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,sm6115-lpasscc.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Linaro Ltd.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_LPASSCC_SM6115_H
+#define _DT_BINDINGS_CLK_QCOM_LPASSCC_SM6115_H
+
+/* LPASS CC */
+#define LPASS_SWR_TX_CONFIG_CGCR 0
+
+/* LPASS_AUDIO CC */
+#define LPASS_AUDIO_SWR_RX_CGCR 0
+
+#endif
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 RESEND 2/2] clk: qcom: Add SM6115 LPASSCC
2024-12-12 0:25 [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Alexey Klimov
2024-12-12 0:25 ` [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 " Alexey Klimov
@ 2024-12-12 0:25 ` Alexey Klimov
2025-01-08 2:52 ` [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Alexey Klimov @ 2024-12-12 0:25 UTC (permalink / raw)
To: andersson, mturquette, sboyd, krzk+dt
Cc: konradybcio, konrad.dybcio, robh, conor+dt, srinivas.kandagatla,
linux-arm-msm, linux-clk, devicetree, linux-kernel
From: Konrad Dybcio <konrad.dybcio@linaro.org>
SM6115 (and its derivatives or similar SoCs) has an LPASS clock
controller block which provides audio-related resets.
Add the required code to support them.
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[alexey.klimov] fixed compilation errors after rebase,
slightly changed the commit message
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
drivers/clk/qcom/Kconfig | 9 ++++
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/lpasscc-sm6115.c | 85 +++++++++++++++++++++++++++++++
3 files changed, 95 insertions(+)
create mode 100644 drivers/clk/qcom/lpasscc-sm6115.c
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index ef89d686cbc4..b2b53e09cc33 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -1230,6 +1230,15 @@ config SM_GPUCC_8650
Say Y if you want to support graphics controller devices and
functionality such as 3D graphics.
+config SM_LPASSCC_6115
+ tristate "SM6115 Low Power Audio Subsystem (LPASS) Clock Controller"
+ depends on ARM64 || COMPILE_TEST
+ select SM_GCC_6115
+ help
+ Support for the LPASS clock controller on SM6115 devices.
+ Say Y if you want to toggle LPASS-adjacent resets within
+ this clock controller to reset the LPASS subsystem.
+
config SM_TCSRCC_8550
tristate "SM8550 TCSR Clock Controller"
depends on ARM64 || COMPILE_TEST
diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
index b09dbdc210eb..cc435afcda37 100644
--- a/drivers/clk/qcom/Makefile
+++ b/drivers/clk/qcom/Makefile
@@ -154,6 +154,7 @@ obj-$(CONFIG_SM_GPUCC_8350) += gpucc-sm8350.o
obj-$(CONFIG_SM_GPUCC_8450) += gpucc-sm8450.o
obj-$(CONFIG_SM_GPUCC_8550) += gpucc-sm8550.o
obj-$(CONFIG_SM_GPUCC_8650) += gpucc-sm8650.o
+obj-$(CONFIG_SM_LPASSCC_6115) += lpasscc-sm6115.o
obj-$(CONFIG_SM_TCSRCC_8550) += tcsrcc-sm8550.o
obj-$(CONFIG_SM_TCSRCC_8650) += tcsrcc-sm8650.o
obj-$(CONFIG_SM_VIDEOCC_7150) += videocc-sm7150.o
diff --git a/drivers/clk/qcom/lpasscc-sm6115.c b/drivers/clk/qcom/lpasscc-sm6115.c
new file mode 100644
index 000000000000..8ffdab71b948
--- /dev/null
+++ b/drivers/clk/qcom/lpasscc-sm6115.c
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, 2023 Linaro Limited
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include <dt-bindings/clock/qcom,sm6115-lpasscc.h>
+
+#include "common.h"
+#include "reset.h"
+
+static const struct qcom_reset_map lpass_audiocc_sm6115_resets[] = {
+ [LPASS_AUDIO_SWR_RX_CGCR] = { .reg = 0x98, .bit = 1, .udelay = 500 },
+};
+
+static struct regmap_config lpass_audiocc_sm6115_regmap_config = {
+ .reg_bits = 32,
+ .reg_stride = 4,
+ .val_bits = 32,
+ .name = "lpass-audio-csr",
+ .max_register = 0x1000,
+};
+
+static const struct qcom_cc_desc lpass_audiocc_sm6115_reset_desc = {
+ .config = &lpass_audiocc_sm6115_regmap_config,
+ .resets = lpass_audiocc_sm6115_resets,
+ .num_resets = ARRAY_SIZE(lpass_audiocc_sm6115_resets),
+};
+
+static const struct qcom_reset_map lpasscc_sm6115_resets[] = {
+ [LPASS_SWR_TX_CONFIG_CGCR] = { .reg = 0x100, .bit = 1, .udelay = 500 },
+};
+
+static struct regmap_config lpasscc_sm6115_regmap_config = {
+ .reg_bits = 32,
+ .reg_stride = 4,
+ .val_bits = 32,
+ .name = "lpass-tcsr",
+ .max_register = 0x1000,
+};
+
+static const struct qcom_cc_desc lpasscc_sm6115_reset_desc = {
+ .config = &lpasscc_sm6115_regmap_config,
+ .resets = lpasscc_sm6115_resets,
+ .num_resets = ARRAY_SIZE(lpasscc_sm6115_resets),
+};
+
+static const struct of_device_id lpasscc_sm6115_match_table[] = {
+ {
+ .compatible = "qcom,sm6115-lpassaudiocc",
+ .data = &lpass_audiocc_sm6115_reset_desc,
+ }, {
+ .compatible = "qcom,sm6115-lpasscc",
+ .data = &lpasscc_sm6115_reset_desc,
+ },
+ { },
+};
+MODULE_DEVICE_TABLE(of, lpasscc_sm6115_match_table);
+
+static int lpasscc_sm6115_probe(struct platform_device *pdev)
+{
+ const struct qcom_cc_desc *desc = of_device_get_match_data(&pdev->dev);
+
+ return qcom_cc_probe_by_index(pdev, 0, desc);
+}
+
+static struct platform_driver lpasscc_sm6115_driver = {
+ .probe = lpasscc_sm6115_probe,
+ .driver = {
+ .name = "lpasscc-sm6115",
+ .of_match_table = lpasscc_sm6115_match_table,
+ },
+};
+
+module_platform_driver(lpasscc_sm6115_driver);
+
+MODULE_DESCRIPTION("QTI LPASSCC SM6115 Driver");
+MODULE_LICENSE("GPL");
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller
2024-12-12 0:25 ` [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 " Alexey Klimov
@ 2024-12-12 7:00 ` Manikanta Mylavarapu
0 siblings, 0 replies; 5+ messages in thread
From: Manikanta Mylavarapu @ 2024-12-12 7:00 UTC (permalink / raw)
To: Alexey Klimov, andersson, mturquette, sboyd, krzk+dt
Cc: konradybcio, konrad.dybcio, robh, conor+dt, srinivas.kandagatla,
linux-arm-msm, linux-clk, devicetree, linux-kernel
On 12/12/2024 5:55 AM, Alexey Klimov wrote:
> From: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> SM6115 (and its derivatives or similar SoCs) has an LPASS clock
> controller block which provides audio-related resets.
>
> Add bindings for it.
>
> Cc: Konrad Dybcio <konradybcio@kernel.org>
> Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> [alexey.klimov] slightly changed the commit message
> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
> ---
> .../bindings/clock/qcom,sm6115-lpasscc.yaml | 46 +++++++++++++++++++
> .../dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 ++++++
> 2 files changed, 61 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
> create mode 100644 include/dt-bindings/clock/qcom,sm6115-lpasscc.h
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
> new file mode 100644
> index 000000000000..247b6b0a9f5a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-lpasscc.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.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
> +
> +maintainers:
> + - Konrad Dybcio <konrad.dybcio@linaro.org>
Please check the mail id.
> + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> +
> +description: |
> + Qualcomm LPASS core and audio clock controllers provide audio-related resets
> + on SM6115 and its derivatives.
> +
> + See also::
> + include/dt-bindings/clock/qcom,sm6115-lpasscc.h
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,sm6115-lpassaudiocc
> + - qcom,sm6115-lpasscc
> +
> + reg:
> + maxItems: 1
> +
> + '#reset-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - '#reset-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + lpass_audiocc: clock-controller@a6a9000 {
> + compatible = "qcom,sm6115-lpassaudiocc";
> + reg = <0x0a6a9000 0x1000>;
> + #reset-cells = <1>;
> + };
> +...
> diff --git a/include/dt-bindings/clock/qcom,sm6115-lpasscc.h b/include/dt-bindings/clock/qcom,sm6115-lpasscc.h
> new file mode 100644
> index 000000000000..799274517c9a
> --- /dev/null
> +++ b/include/dt-bindings/clock/qcom,sm6115-lpasscc.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2023, Linaro Ltd.
> + */
Do we need to update the Copyright year?
Thanks & Regards,
Manikanta.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller
2024-12-12 0:25 [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Alexey Klimov
2024-12-12 0:25 ` [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 " Alexey Klimov
2024-12-12 0:25 ` [PATCH v2 RESEND 2/2] clk: qcom: Add SM6115 LPASSCC Alexey Klimov
@ 2025-01-08 2:52 ` Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2025-01-08 2:52 UTC (permalink / raw)
To: mturquette, sboyd, krzk+dt, Alexey Klimov
Cc: konradybcio, konrad.dybcio, robh, conor+dt, srinivas.kandagatla,
linux-arm-msm, linux-clk, devicetree, linux-kernel
On Thu, 12 Dec 2024 00:25:49 +0000, Alexey Klimov wrote:
> Updates from previous version:
> -- no updates, just resend.
> The same version as here: https://lore.kernel.org/linux-clk/20241101012247.216825-1-alexey.klimov@linaro.org/
> just rebased and re-tested.
>
> This is one of the required dependencies for audio support on sm6115 and
> its derivatives SoCs. This was written by Konrad Dybcio, however his linaro
> email is already invalid. Konrad suggested sending it as-is and keeping
> him in c/c. Some updates may be still required, for instance the
> maintainers line in DT bindings file.
>
> [...]
Applied, thanks!
[1/2] dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller
commit: 030de8eafdcbc3d6c087bddb5450aea2b29520e5
[2/2] clk: qcom: Add SM6115 LPASSCC
commit: b076b995e225b0e9c345b015a182352221334c3e
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-08 2:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 0:25 [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Alexey Klimov
2024-12-12 0:25 ` [PATCH v2 RESEND 1/2] dt-bindings: clock: Add Qualcomm SM6115 " Alexey Klimov
2024-12-12 7:00 ` Manikanta Mylavarapu
2024-12-12 0:25 ` [PATCH v2 RESEND 2/2] clk: qcom: Add SM6115 LPASSCC Alexey Klimov
2025-01-08 2:52 ` [PATCH v2 RESEND 0/2] Qualcomm sm6115 LPASS clock controller Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox