* [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC
@ 2026-06-05 11:26 Imran Shaik
2026-06-05 11:26 ` [PATCH 1/4] clk: qcom: common: Register reset controller only when resets are present Imran Shaik
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Imran Shaik @ 2026-06-05 11:26 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney,
Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
linux-kernel, devicetree, Imran Shaik
This series adds support for the Audio Core Clock Controller (AUDIOCORECC)
on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs
across variants based on Audio subsystem enablement as follows:
CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS
CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem
IQS: no clocks/resets needed; no soundwire codecs
To handle these requirements, variant-specific compatibles are introduced.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
Imran Shaik (4):
clk: qcom: common: Register reset controller only when resets are present
dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller
clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC
arm64: dts: qcom: shikra: Add support for AudioCoreCC node
.../bindings/clock/qcom,shikra-audiocorecc.yaml | 62 ++
arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts | 4 +
arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts | 5 +
arch/arm64/boot/dts/qcom/shikra.dtsi | 13 +
drivers/clk/qcom/Kconfig | 10 +
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/audiocorecc-shikra.c | 813 +++++++++++++++++++++
drivers/clk/qcom/common.c | 24 +-
.../dt-bindings/clock/qcom,shikra-audiocorecc.h | 49 ++
9 files changed, 970 insertions(+), 11 deletions(-)
---
base-commit: c1ecb239fa3456529a32255359fc78b69eb9d847
change-id: 20260605-shikra-audiocorecc-85efef073474
prerequisite-change-id: 20260429-shikra-gcc-rpmcc-clks-2094edfff3b0:v4
prerequisite-patch-id: 5a0fbdd458785da2d0e850c851a05046672ecadf
prerequisite-patch-id: 197da6bcb15cadc47869dba88c8020987b25c335
prerequisite-patch-id: a64476b2ba6e0f2a55928baf72ec32672ee0123c
prerequisite-patch-id: 350db4f4bcdfc0fad9ed57cd5b1723f85ad44f5d
prerequisite-change-id: 20260511-shikra-dt-d75d97454646:v4
prerequisite-patch-id: 3a689e8dda5fd2755b689d94d095806b3f2e6eed
prerequisite-patch-id: 2acc300a68ed8c5364fb5f2f7d28fc0d56ab07bf
prerequisite-patch-id: 2357cac636e019eaf14d6a493a1c72bca56fe405
prerequisite-patch-id: 2885f299e711582da312ca9d13983d296a3dd5dc
prerequisite-patch-id: 91af5f3c01e766a53ce8de69aa21847a2d6bbbf8
Best regards,
--
Imran Shaik <imran.shaik@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH 1/4] clk: qcom: common: Register reset controller only when resets are present 2026-06-05 11:26 [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik @ 2026-06-05 11:26 ` Imran Shaik 2026-06-05 11:26 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller Imran Shaik ` (2 subsequent siblings) 3 siblings, 0 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-05 11:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree, Imran Shaik Some clock controller descriptors do not provide any reset lines. Avoid registering a reset controller when desc->num_resets is zero by making the registration conditional. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- drivers/clk/qcom/common.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index eec369d2173b5ce24bc1ca860d2ac1bbdce04524..be9b6ebb2fffde05e3f209571c53b601d823d479 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -359,17 +359,19 @@ int qcom_cc_really_probe(struct device *dev, qcom_cc_clk_regs_configure(dev, desc->driver_data, regmap); } - reset = &cc->reset; - reset->rcdev.of_node = dev->of_node; - reset->rcdev.ops = &qcom_reset_ops; - reset->rcdev.owner = dev->driver->owner; - reset->rcdev.nr_resets = desc->num_resets; - reset->regmap = regmap; - reset->reset_map = desc->resets; - - ret = devm_reset_controller_register(dev, &reset->rcdev); - if (ret) - goto put_rpm; + if (desc->num_resets) { + reset = &cc->reset; + reset->rcdev.of_node = dev->of_node; + reset->rcdev.ops = &qcom_reset_ops; + reset->rcdev.owner = dev->driver->owner; + reset->rcdev.nr_resets = desc->num_resets; + reset->regmap = regmap; + reset->reset_map = desc->resets; + + ret = devm_reset_controller_register(dev, &reset->rcdev); + if (ret) + goto put_rpm; + } if (desc->gdscs && desc->num_gdscs) { scd = devm_kzalloc(dev, sizeof(*scd), GFP_KERNEL); -- 2.34.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller 2026-06-05 11:26 [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-05 11:26 ` [PATCH 1/4] clk: qcom: common: Register reset controller only when resets are present Imran Shaik @ 2026-06-05 11:26 ` Imran Shaik 2026-06-07 11:18 ` Dmitry Baryshkov 2026-06-08 10:49 ` Krzysztof Kozlowski 2026-06-05 11:26 ` [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-05 11:26 ` [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node Imran Shaik 3 siblings, 2 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-05 11:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree, Imran Shaik Add device tree bindings for the Audio Core Clock Controller (AUDIOCORECC) on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs across variants based on Audio subsystem enablement as follows: CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem IQS: no clocks/resets needed; no SoundWire codecs To handle these requirements, variant-specific compatibles are introduced. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- .../bindings/clock/qcom,shikra-audiocorecc.yaml | 62 ++++++++++++++++++++++ .../dt-bindings/clock/qcom,shikra-audiocorecc.h | 49 +++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,shikra-audiocorecc.yaml b/Documentation/devicetree/bindings/clock/qcom,shikra-audiocorecc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2ed1d9d871175ff868584cfd606e14c5779f1766 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,shikra-audiocorecc.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,shikra-audiocorecc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio Core Clock & Reset Controller for Qualcomm Shikra SoC + +maintainers: + - Imran Shaik <imran.shaik@oss.qualcomm.com> + +description: | + Audio core clock control module provides the clocks and resets + on Qualcomm Shikra SoC platform. + + See also: + - include/dt-bindings/clock/qcom,shikra-audiocorecc.h + +properties: + compatible: + enum: + - qcom,shikra-cqm-audiocorecc + - qcom,shikra-cqs-audiocorecc + + clocks: + items: + - description: Board XO source + - description: Board sleep clock + - description: Audio ref clock source + + reg: + maxItems: 2 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + - '#reset-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,rpmcc.h> + #include <dt-bindings/clock/qcom,shikra-gcc.h> + clock-controller@a0a0000 { + compatible = "qcom,shikra-cqm-audiocorecc"; + reg = <0x0a0a0000 0x10000>, + <0x0a0b4000 0x1000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&sleep_clk>, + <&aud_ref_clk_src>; + #clock-cells = <1>; + #reset-cells = <1>; + }; +... diff --git a/include/dt-bindings/clock/qcom,shikra-audiocorecc.h b/include/dt-bindings/clock/qcom,shikra-audiocorecc.h new file mode 100644 index 0000000000000000000000000000000000000000..3052feb627ff3dc8beb405534ff94bf75525fcb2 --- /dev/null +++ b/include/dt-bindings/clock/qcom,shikra-audiocorecc.h @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_AUDIO_CORE_CC_SHIKRA_H +#define _DT_BINDINGS_CLK_QCOM_AUDIO_CORE_CC_SHIKRA_H + +/* AUDIO_CORE_CC clocks */ +#define AUDIO_CORE_CC_DIG_PLL_OUT_AUX 0 +#define AUDIO_CORE_CC_DIG_PLL_OUT_AUX2 1 +#define AUDIO_CORE_CC_DIG_PLL 2 +#define AUDIO_CORE_CC_AIF_IF0_CLK_SRC 3 +#define AUDIO_CORE_CC_AIF_IF0_EBIT_CLK 4 +#define AUDIO_CORE_CC_AIF_IF0_IBIT_CLK 5 +#define AUDIO_CORE_CC_AIF_IF1_CLK_SRC 6 +#define AUDIO_CORE_CC_AIF_IF1_EBIT_CLK 7 +#define AUDIO_CORE_CC_AIF_IF1_IBIT_CLK 8 +#define AUDIO_CORE_CC_AIF_IF2_CLK_SRC 9 +#define AUDIO_CORE_CC_AIF_IF2_EBIT_CLK 10 +#define AUDIO_CORE_CC_AIF_IF2_IBIT_CLK 11 +#define AUDIO_CORE_CC_AIF_IF3_CLK_SRC 12 +#define AUDIO_CORE_CC_AIF_IF3_EBIT_CLK 13 +#define AUDIO_CORE_CC_AIF_IF3_IBIT_CLK 14 +#define AUDIO_CORE_CC_AUD_DMA_CLK 15 +#define AUDIO_CORE_CC_AUD_DMA_CLK_SRC 16 +#define AUDIO_CORE_CC_AUD_DMA_MEM_CLK 17 +#define AUDIO_CORE_CC_BUS_CLK 18 +#define AUDIO_CORE_CC_BUS_CLK_SRC 19 +#define AUDIO_CORE_CC_CDIV_TX_MCLK_DIV_CLK_SRC 20 +#define AUDIO_CORE_CC_EXT_MCLKA_CLK_SRC 21 +#define AUDIO_CORE_CC_EXT_MCLKA_OUT_CLK 22 +#define AUDIO_CORE_CC_EXT_MCLKB_CLK_SRC 23 +#define AUDIO_CORE_CC_EXT_MCLKB_OUT_CLK 24 +#define AUDIO_CORE_CC_IM_SLEEP_CLK 25 +#define AUDIO_CORE_CC_LPAIF_PCMOE_CLK 26 +#define AUDIO_CORE_CC_LPAIF_PCMOE_CLK_SRC 27 +#define AUDIO_CORE_CC_RX_MCLK_2X_CLK 28 +#define AUDIO_CORE_CC_RX_MCLK_CLK 29 +#define AUDIO_CORE_CC_SAMPLING_CLK 30 +#define AUDIO_CORE_CC_TX_MCLK_2X_CLK 31 +#define AUDIO_CORE_CC_TX_MCLK_CLK 32 +#define AUDIO_CORE_CC_TX_MCLK_RCG_CLK_SRC 33 + +/* AUDIO_CORE_CC resets */ +#define AUDIO_CORE_CSR_RX_SWR_CGCR 0 +#define AUDIO_CORE_CSR_TX_SWR_CGCR 1 + +#endif -- 2.34.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller 2026-06-05 11:26 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller Imran Shaik @ 2026-06-07 11:18 ` Dmitry Baryshkov 2026-06-29 5:21 ` Imran Shaik 2026-06-08 10:49 ` Krzysztof Kozlowski 1 sibling, 1 reply; 14+ messages in thread From: Dmitry Baryshkov @ 2026-06-07 11:18 UTC (permalink / raw) To: Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On Fri, Jun 05, 2026 at 04:56:31PM +0530, Imran Shaik wrote: > Add device tree bindings for the Audio Core Clock Controller (AUDIOCORECC) > on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs > across variants based on Audio subsystem enablement as follows: > > CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS > CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem What does it mean? How does CQS play audio? What does 'audio on APPS' mean? > IQS: no clocks/resets needed; no SoundWire codecs > > To handle these requirements, variant-specific compatibles are introduced. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- > .../bindings/clock/qcom,shikra-audiocorecc.yaml | 62 ++++++++++++++++++++++ > .../dt-bindings/clock/qcom,shikra-audiocorecc.h | 49 +++++++++++++++++ > 2 files changed, 111 insertions(+) > -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller 2026-06-07 11:18 ` Dmitry Baryshkov @ 2026-06-29 5:21 ` Imran Shaik 0 siblings, 0 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-29 5:21 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 07-06-2026 04:48 pm, Dmitry Baryshkov wrote: > On Fri, Jun 05, 2026 at 04:56:31PM +0530, Imran Shaik wrote: >> Add device tree bindings for the Audio Core Clock Controller (AUDIOCORECC) >> on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs >> across variants based on Audio subsystem enablement as follows: >> >> CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS >> CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem > > What does it mean? How does CQS play audio? What does 'audio on APPS' > mean? > In the CQM variant, the QAIF driver runs on HLOS, hence both AudioCoreCC clocks and resets are required to be supported on HLOS. In the CQS variant, the QAIF driver runs on the Modem side, and the required clocks are handled on Modem, so from HLOS only resets are needed. I will update the cover letter with these details in the next series. Thanks, Imran >> IQS: no clocks/resets needed; no SoundWire codecs >> >> To handle these requirements, variant-specific compatibles are introduced. >> >> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >> --- >> .../bindings/clock/qcom,shikra-audiocorecc.yaml | 62 ++++++++++++++++++++++ >> .../dt-bindings/clock/qcom,shikra-audiocorecc.h | 49 +++++++++++++++++ >> 2 files changed, 111 insertions(+) >> > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller 2026-06-05 11:26 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller Imran Shaik 2026-06-07 11:18 ` Dmitry Baryshkov @ 2026-06-08 10:49 ` Krzysztof Kozlowski 2026-06-29 5:28 ` Imran Shaik 1 sibling, 1 reply; 14+ messages in thread From: Krzysztof Kozlowski @ 2026-06-08 10:49 UTC (permalink / raw) To: Imran Shaik Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On Fri, Jun 05, 2026 at 04:56:31PM +0530, Imran Shaik wrote: > Add device tree bindings for the Audio Core Clock Controller (AUDIOCORECC) > on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs > across variants based on Audio subsystem enablement as follows: > > CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS > CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem > IQS: no clocks/resets needed; no SoundWire codecs > > To handle these requirements, variant-specific compatibles are introduced. No. These are the same devices. You do not get different compatibles. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller 2026-06-08 10:49 ` Krzysztof Kozlowski @ 2026-06-29 5:28 ` Imran Shaik 0 siblings, 0 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-29 5:28 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 08-06-2026 04:19 pm, Krzysztof Kozlowski wrote: > On Fri, Jun 05, 2026 at 04:56:31PM +0530, Imran Shaik wrote: >> Add device tree bindings for the Audio Core Clock Controller (AUDIOCORECC) >> on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs >> across variants based on Audio subsystem enablement as follows: >> >> CQM (qcom,shikra-cqm-audiocorecc): need clocks and resets; audio on APPS >> CQS (qcom,shikra-cqs-audiocorecc): need resets only; audio on Modem >> IQS: no clocks/resets needed; no SoundWire codecs >> >> To handle these requirements, variant-specific compatibles are introduced. > > No. These are the same devices. You do not get different compatibles. > As Konrad suggested in DT patch, I will split the audiocorecc and audiocorecc_csr nodes separately as the clocks and resets reside in two different register spaces. This will help to handle the CQM/CQS variants requirements without the variant specific compatibles. > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC 2026-06-05 11:26 [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-05 11:26 ` [PATCH 1/4] clk: qcom: common: Register reset controller only when resets are present Imran Shaik 2026-06-05 11:26 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller Imran Shaik @ 2026-06-05 11:26 ` Imran Shaik 2026-06-11 11:22 ` Konrad Dybcio 2026-06-11 11:27 ` Konrad Dybcio 2026-06-05 11:26 ` [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node Imran Shaik 3 siblings, 2 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-05 11:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree, Imran Shaik Add support for Audio Core Clock Controller (AUDIOCORECC) on Qualcomm Shikra SoC. The AUDIOCORECC clocks and resets support differs based on Audio subsystem enablement. In the CQM variant, both clocks and resets are required as Audio is on APPS, while in the CQS variant only reset control is required since Audio is handled on Modem. Handle these requirements using variant specific compatibles. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/audiocorecc-shikra.c | 813 ++++++++++++++++++++++++++++++++++ 3 files changed, 824 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 72e172ee0e6eaeccf709c0110e1d24fb555d894d..08e10feeaffa9a05daed5a2c5db8cb9f5eff76f3 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -155,6 +155,16 @@ config CLK_NORD_GCC SPI, I2C, USB, SD/UFS, PCIe etc. The clock controller is a combination of GCC, SE_GCC, NE_GCC and NW_GCC. +config CLK_SHIKRA_AUDIOCORECC + tristate "Shikra Audio Core Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_SHIKRA_GCC + default m if ARCH_QCOM + help + Support for the Audio Core clock controller on Qualcomm Shikra devices. + Say Y if you want to use AudioCoreCC clocks required to support audio + devices and it's functionality. + config CLK_SHIKRA_GCC tristate "Shikra Global Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index 910add09b3b2fe64bb21a18f4e1e445a702e283b..c03cd721bb8d2736d1bb5e6249dfc27e3af7cb48 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_CLK_KAANAPALI_TCSRCC) += tcsrcc-kaanapali.o obj-$(CONFIG_CLK_KAANAPALI_VIDEOCC) += videocc-kaanapali.o obj-$(CONFIG_CLK_NORD_GCC) += gcc-nord.o negcc-nord.o nwgcc-nord.o segcc-nord.o obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o +obj-$(CONFIG_CLK_SHIKRA_AUDIOCORECC) += audiocorecc-shikra.o obj-$(CONFIG_CLK_SHIKRA_GCC) += gcc-shikra.o obj-$(CONFIG_CLK_X1E80100_CAMCC) += camcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o diff --git a/drivers/clk/qcom/audiocorecc-shikra.c b/drivers/clk/qcom/audiocorecc-shikra.c new file mode 100644 index 0000000000000000000000000000000000000000..a6756076e6421b35b424060f2f8e881403e65813 --- /dev/null +++ b/drivers/clk/qcom/audiocorecc-shikra.c @@ -0,0 +1,813 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include <linux/clk-provider.h> +#include <linux/mod_devicetable.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> + +#include <dt-bindings/clock/qcom,shikra-audiocorecc.h> + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-pll.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "common.h" +#include "reset.h" + +enum { + DT_BI_TCXO, + DT_SLEEP_CLK, + DT_AUD_REF_CLK_SRC, +}; + +enum { + P_AUD_REF_CLK_SRC, + P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, + P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, + P_BI_TCXO, + P_SLEEP_CLK, +}; + +static const struct pll_vco spark_vco[] = { + { 500000000, 1000000000, 2 }, +}; + +/* 614.4 MHz Configuration */ +static const struct alpha_pll_config audio_core_cc_dig_pll_config = { + .l = 0x20, + .alpha = 0x0, + .vco_val = BIT(21), + .post_div_val = 0x28100, + .post_div_mask = GENMASK(17, 8), + .vco_mask = GENMASK(21, 20), + .main_output_mask = BIT(0), + .aux_output_mask = BIT(1), + .aux2_output_mask = BIT(2), + .config_ctl_val = 0x4001055b, + .test_ctl_hi_val = 0x1, + .test_ctl_hi_mask = 0x1, +}; + +static struct clk_alpha_pll audio_core_cc_dig_pll = { + .offset = 0x0, + .config = &audio_core_cc_dig_pll_config, + .vco_table = spark_vco, + .num_vco = ARRAY_SIZE(spark_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], + .clkr = { + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_dig_pll", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_fixed_ops, + }, + }, +}; + +static struct clk_fixed_factor audio_core_cc_dig_pll_out_aux = { + .mult = 1, + .div = 5, + .hw.init = &(struct clk_init_data) { + .name = "audio_core_cc_dig_pll_out_aux", + .parent_data = &(const struct clk_parent_data) { + .hw = &audio_core_cc_dig_pll.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_fixed_factor audio_core_cc_dig_pll_out_aux2 = { + .mult = 1, + .div = 2, + .hw.init = &(struct clk_init_data) { + .name = "audio_core_cc_dig_pll_out_aux2", + .parent_data = &(const struct clk_parent_data) { + .hw = &audio_core_cc_dig_pll.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_fixed_factor_ops, + }, +}; + +static const struct parent_map audio_core_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, + { P_AUD_REF_CLK_SRC, 1 }, + { P_SLEEP_CLK, 2 }, + { P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 4 }, + { P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 6 }, +}; + +static const struct clk_parent_data audio_core_cc_parent_data_0[] = { + { .index = DT_BI_TCXO }, + { .index = DT_AUD_REF_CLK_SRC }, + { .index = DT_SLEEP_CLK }, + { .hw = &audio_core_cc_dig_pll_out_aux.hw }, + { .hw = &audio_core_cc_dig_pll_out_aux2.hw }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_aif_if0_clk_src[] = { + F(240000, P_BI_TCXO, 10, 1, 8), + F(256000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 32), + F(512000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 16), + F(768000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 16), + F(1024000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 8), + F(1536000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 8), + F(2048000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 4), + F(3072000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 4), + F(4096000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 2), + F(6144000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 2), + F(8192000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 0, 0), + F(9600000, P_BI_TCXO, 2, 0, 0), + F(12288000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 0, 0), + F(19200000, P_BI_TCXO, 1, 0, 0), + F(24576000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 5, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_aif_if0_clk_src = { + .cmd_rcgr = 0x104c, + .mnd_width = 16, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if0_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 audio_core_cc_aif_if1_clk_src = { + .cmd_rcgr = 0x10b0, + .mnd_width = 16, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if1_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 audio_core_cc_aif_if2_clk_src = { + .cmd_rcgr = 0x1114, + .mnd_width = 16, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if2_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_aif_if3_clk_src[] = { + F(240000, P_BI_TCXO, 10, 1, 8), + F(256000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 32), + F(512000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 16), + F(768000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 16), + F(1024000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 8), + F(1536000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 8), + F(2048000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 4), + F(3072000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 4), + F(4096000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 1, 2), + F(6144000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 1, 2), + F(8192000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 15, 0, 0), + F(9600000, P_BI_TCXO, 2, 0, 0), + F(12288000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 10, 0, 0), + F(19200000, P_BI_TCXO, 1, 0, 0), + F(24576000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 5, 0, 0), + F(49152000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 2.5, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_aif_if3_clk_src = { + .cmd_rcgr = 0x1178, + .mnd_width = 16, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if3_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if3_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_aud_dma_clk_src[] = { + F(102400000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 3, 0, 0), + F(153600000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 2, 0, 0), + F(307200000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 1, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_aud_dma_clk_src = { + .cmd_rcgr = 0x1028, + .mnd_width = 0, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aud_dma_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aud_dma_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_bus_clk_src[] = { + F(38400000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 8, 0, 0), + F(76800000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX2, 4, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_bus_clk_src = { + .cmd_rcgr = 0x1008, + .mnd_width = 0, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_bus_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_bus_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 audio_core_cc_ext_mclka_clk_src = { + .cmd_rcgr = 0x123c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_ext_mclka_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_rcg2 audio_core_cc_ext_mclkb_clk_src = { + .cmd_rcgr = 0x125c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_aif_if0_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_ext_mclkb_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_lpaif_pcmoe_clk_src[] = { + F(9600000, P_BI_TCXO, 2, 0, 0), + F(15360000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 8, 0, 0), + F(30720000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 4, 0, 0), + F(61440000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 2, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_lpaif_pcmoe_clk_src = { + .cmd_rcgr = 0x12ac, + .mnd_width = 8, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_lpaif_pcmoe_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_lpaif_pcmoe_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_audio_core_cc_tx_mclk_rcg_clk_src[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(24576000, P_AUDIO_CORE_CC_DIG_PLL_OUT_AUX, 5, 0, 0), + { } +}; + +static struct clk_rcg2 audio_core_cc_tx_mclk_rcg_clk_src = { + .cmd_rcgr = 0x127c, + .mnd_width = 8, + .hid_width = 5, + .parent_map = audio_core_cc_parent_map_0, + .freq_tbl = ftbl_audio_core_cc_tx_mclk_rcg_clk_src, + .hw_clk_ctrl = true, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_tx_mclk_rcg_clk_src", + .parent_data = audio_core_cc_parent_data_0, + .num_parents = ARRAY_SIZE(audio_core_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static struct clk_regmap_div audio_core_cc_cdiv_tx_mclk_div_clk_src = { + .reg = 0x129c, + .shift = 0, + .width = 4, + .clkr.hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_cdiv_tx_mclk_div_clk_src", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_tx_mclk_rcg_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_regmap_div_ro_ops, + }, +}; + +static struct clk_branch audio_core_cc_aif_if0_ebit_clk = { + .halt_reg = 0x1068, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1068, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if0_ebit_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if0_ibit_clk = { + .halt_reg = 0x1064, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1064, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if0_ibit_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aif_if0_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if1_ebit_clk = { + .halt_reg = 0x10cc, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x10cc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if1_ebit_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if1_ibit_clk = { + .halt_reg = 0x10c8, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x10c8, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if1_ibit_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aif_if1_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if2_ebit_clk = { + .halt_reg = 0x1130, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1130, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if2_ebit_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if2_ibit_clk = { + .halt_reg = 0x112c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x112c, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if2_ibit_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aif_if2_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if3_ebit_clk = { + .halt_reg = 0x1194, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1194, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if3_ebit_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aif_if3_ibit_clk = { + .halt_reg = 0x1190, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1190, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aif_if3_ibit_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aif_if3_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aud_dma_clk = { + .halt_reg = 0x1040, + .halt_check = BRANCH_HALT, + .hwcg_reg = 0x1040, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x1040, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aud_dma_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aud_dma_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_aud_dma_mem_clk = { + .halt_reg = 0x1044, + .halt_check = BRANCH_HALT, + .hwcg_reg = 0x1044, + .hwcg_bit = 1, + .clkr = { + .enable_reg = 0x1044, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_aud_dma_mem_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_aud_dma_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_bus_clk = { + .halt_reg = 0x1020, + .halt_check = BRANCH_HALT_VOTED, + .clkr = { + .enable_reg = 0x1020, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_bus_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_bus_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_aon_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_ext_mclka_out_clk = { + .halt_reg = 0x1254, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1254, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_ext_mclka_out_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_ext_mclka_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_ext_mclkb_out_clk = { + .halt_reg = 0x1274, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1274, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_ext_mclkb_out_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_ext_mclkb_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_im_sleep_clk = { + .halt_reg = 0x12cc, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x12cc, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_im_sleep_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_lpaif_pcmoe_clk = { + .halt_reg = 0x12c4, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x12c4, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_lpaif_pcmoe_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_lpaif_pcmoe_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_rx_mclk_2x_clk = { + .halt_reg = 0x1298, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1298, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_rx_mclk_2x_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_tx_mclk_rcg_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_rx_mclk_clk = { + .halt_reg = 0x12a4, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x12a4, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_rx_mclk_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_cdiv_tx_mclk_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_sampling_clk = { + .halt_reg = 0x1000, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1000, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_sampling_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_tx_mclk_2x_clk = { + .halt_reg = 0x1294, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1294, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_tx_mclk_2x_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_tx_mclk_rcg_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch audio_core_cc_tx_mclk_clk = { + .halt_reg = 0x12a0, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x12a0, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "audio_core_cc_tx_mclk_clk", + .parent_hws = (const struct clk_hw*[]) { + &audio_core_cc_cdiv_tx_mclk_div_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_hw *audio_core_cc_shikra_hws[] = { + [AUDIO_CORE_CC_DIG_PLL_OUT_AUX] = &audio_core_cc_dig_pll_out_aux.hw, + [AUDIO_CORE_CC_DIG_PLL_OUT_AUX2] = &audio_core_cc_dig_pll_out_aux2.hw, +}; + +static struct clk_regmap *audio_core_cc_shikra_clocks[] = { + [AUDIO_CORE_CC_AIF_IF0_CLK_SRC] = &audio_core_cc_aif_if0_clk_src.clkr, + [AUDIO_CORE_CC_AIF_IF0_EBIT_CLK] = &audio_core_cc_aif_if0_ebit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF0_IBIT_CLK] = &audio_core_cc_aif_if0_ibit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF1_CLK_SRC] = &audio_core_cc_aif_if1_clk_src.clkr, + [AUDIO_CORE_CC_AIF_IF1_EBIT_CLK] = &audio_core_cc_aif_if1_ebit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF1_IBIT_CLK] = &audio_core_cc_aif_if1_ibit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF2_CLK_SRC] = &audio_core_cc_aif_if2_clk_src.clkr, + [AUDIO_CORE_CC_AIF_IF2_EBIT_CLK] = &audio_core_cc_aif_if2_ebit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF2_IBIT_CLK] = &audio_core_cc_aif_if2_ibit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF3_CLK_SRC] = &audio_core_cc_aif_if3_clk_src.clkr, + [AUDIO_CORE_CC_AIF_IF3_EBIT_CLK] = &audio_core_cc_aif_if3_ebit_clk.clkr, + [AUDIO_CORE_CC_AIF_IF3_IBIT_CLK] = &audio_core_cc_aif_if3_ibit_clk.clkr, + [AUDIO_CORE_CC_AUD_DMA_CLK] = &audio_core_cc_aud_dma_clk.clkr, + [AUDIO_CORE_CC_AUD_DMA_CLK_SRC] = &audio_core_cc_aud_dma_clk_src.clkr, + [AUDIO_CORE_CC_AUD_DMA_MEM_CLK] = &audio_core_cc_aud_dma_mem_clk.clkr, + [AUDIO_CORE_CC_BUS_CLK] = &audio_core_cc_bus_clk.clkr, + [AUDIO_CORE_CC_BUS_CLK_SRC] = &audio_core_cc_bus_clk_src.clkr, + [AUDIO_CORE_CC_CDIV_TX_MCLK_DIV_CLK_SRC] = &audio_core_cc_cdiv_tx_mclk_div_clk_src.clkr, + [AUDIO_CORE_CC_DIG_PLL] = &audio_core_cc_dig_pll.clkr, + [AUDIO_CORE_CC_EXT_MCLKA_CLK_SRC] = &audio_core_cc_ext_mclka_clk_src.clkr, + [AUDIO_CORE_CC_EXT_MCLKA_OUT_CLK] = &audio_core_cc_ext_mclka_out_clk.clkr, + [AUDIO_CORE_CC_EXT_MCLKB_CLK_SRC] = &audio_core_cc_ext_mclkb_clk_src.clkr, + [AUDIO_CORE_CC_EXT_MCLKB_OUT_CLK] = &audio_core_cc_ext_mclkb_out_clk.clkr, + [AUDIO_CORE_CC_IM_SLEEP_CLK] = &audio_core_cc_im_sleep_clk.clkr, + [AUDIO_CORE_CC_LPAIF_PCMOE_CLK] = &audio_core_cc_lpaif_pcmoe_clk.clkr, + [AUDIO_CORE_CC_LPAIF_PCMOE_CLK_SRC] = &audio_core_cc_lpaif_pcmoe_clk_src.clkr, + [AUDIO_CORE_CC_RX_MCLK_2X_CLK] = &audio_core_cc_rx_mclk_2x_clk.clkr, + [AUDIO_CORE_CC_RX_MCLK_CLK] = &audio_core_cc_rx_mclk_clk.clkr, + [AUDIO_CORE_CC_SAMPLING_CLK] = &audio_core_cc_sampling_clk.clkr, + [AUDIO_CORE_CC_TX_MCLK_2X_CLK] = &audio_core_cc_tx_mclk_2x_clk.clkr, + [AUDIO_CORE_CC_TX_MCLK_CLK] = &audio_core_cc_tx_mclk_clk.clkr, + [AUDIO_CORE_CC_TX_MCLK_RCG_CLK_SRC] = &audio_core_cc_tx_mclk_rcg_clk_src.clkr, +}; + +static struct clk_alpha_pll *audio_core_cc_shikra_plls[] = { + &audio_core_cc_dig_pll, +}; + +static const struct regmap_config audio_core_cc_shikra_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x305c, + .fast_io = true, +}; + +static const struct qcom_reset_map audio_core_cc_shikra_resets[] = { + [AUDIO_CORE_CSR_RX_SWR_CGCR] = { 0x1c }, + [AUDIO_CORE_CSR_TX_SWR_CGCR] = { 0x30 }, +}; + +static const struct regmap_config audio_core_cc_shikra_reset_regmap_config = { + .name = "audio_core_cc_shikra_reset", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .max_register = 0x34, +}; + +static const struct qcom_cc_driver_data audio_core_cc_shikra_driver_data = { + .alpha_plls = audio_core_cc_shikra_plls, + .num_alpha_plls = ARRAY_SIZE(audio_core_cc_shikra_plls), +}; + +static const struct qcom_cc_desc audio_core_cc_shikra_reset_desc = { + .config = &audio_core_cc_shikra_reset_regmap_config, + .resets = audio_core_cc_shikra_resets, + .num_resets = ARRAY_SIZE(audio_core_cc_shikra_resets), +}; + +static const struct qcom_cc_desc audio_core_cc_shikra_desc = { + .config = &audio_core_cc_shikra_regmap_config, + .clk_hws = audio_core_cc_shikra_hws, + .num_clk_hws = ARRAY_SIZE(audio_core_cc_shikra_hws), + .clks = audio_core_cc_shikra_clocks, + .num_clks = ARRAY_SIZE(audio_core_cc_shikra_clocks), + .driver_data = &audio_core_cc_shikra_driver_data, +}; + +static const struct of_device_id audio_core_cc_shikra_match_table[] = { + { .compatible = "qcom,shikra-cqm-audiocorecc" }, + { .compatible = "qcom,shikra-cqs-audiocorecc" }, + { } +}; +MODULE_DEVICE_TABLE(of, audio_core_cc_shikra_match_table); + +static int audio_core_cc_shikra_probe(struct platform_device *pdev) +{ + int ret; + + ret = qcom_cc_probe_by_index(pdev, 1, &audio_core_cc_shikra_reset_desc); + if (ret) + return ret; + + if (device_is_compatible(&pdev->dev, "qcom,shikra-cqs-audiocorecc")) + return 0; + + return qcom_cc_probe(pdev, &audio_core_cc_shikra_desc); +} + +static struct platform_driver audio_core_cc_shikra_driver = { + .probe = audio_core_cc_shikra_probe, + .driver = { + .name = "audiocorecc-shikra", + .of_match_table = audio_core_cc_shikra_match_table, + }, +}; + +module_platform_driver(audio_core_cc_shikra_driver); + +MODULE_DESCRIPTION("QTI AUDIOCORECC Shikra Driver"); +MODULE_LICENSE("GPL"); -- 2.34.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC 2026-06-05 11:26 ` [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik @ 2026-06-11 11:22 ` Konrad Dybcio 2026-06-11 11:27 ` Konrad Dybcio 1 sibling, 0 replies; 14+ messages in thread From: Konrad Dybcio @ 2026-06-11 11:22 UTC (permalink / raw) To: Imran Shaik, Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 6/5/26 1:26 PM, Imran Shaik wrote: > Add support for Audio Core Clock Controller (AUDIOCORECC) on Qualcomm > Shikra SoC. The AUDIOCORECC clocks and resets support differs based on > Audio subsystem enablement. In the CQM variant, both clocks and resets > are required as Audio is on APPS, while in the CQS variant only reset > control is required since Audio is handled on Modem. Handle these > requirements using variant specific compatibles. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- [...] > +static int audio_core_cc_shikra_probe(struct platform_device *pdev) > +{ > + int ret; > + > + ret = qcom_cc_probe_by_index(pdev, 1, &audio_core_cc_shikra_reset_desc); > + if (ret) > + return ret; > + > + if (device_is_compatible(&pdev->dev, "qcom,shikra-cqs-audiocorecc")) > + return 0; > + > + return qcom_cc_probe(pdev, &audio_core_cc_shikra_desc); > +} If the clock list is complete and you pinky-promise to never extend it, we can simply go with a single compatible and use protected-clocks in DT to avoid accessing any of these registers (sorta like kodiak GCC), removing the complexity Konrad ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC 2026-06-05 11:26 ` [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-11 11:22 ` Konrad Dybcio @ 2026-06-11 11:27 ` Konrad Dybcio 2026-06-29 5:19 ` Imran Shaik 1 sibling, 1 reply; 14+ messages in thread From: Konrad Dybcio @ 2026-06-11 11:27 UTC (permalink / raw) To: Imran Shaik, Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 6/5/26 1:26 PM, Imran Shaik wrote: > Add support for Audio Core Clock Controller (AUDIOCORECC) on Qualcomm > Shikra SoC. The AUDIOCORECC clocks and resets support differs based on > Audio subsystem enablement. In the CQM variant, both clocks and resets > are required as Audio is on APPS, while in the CQS variant only reset > control is required since Audio is handled on Modem. Handle these > requirements using variant specific compatibles. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- [...] > +static const struct qcom_reset_map audio_core_cc_shikra_resets[] = { > + [AUDIO_CORE_CSR_RX_SWR_CGCR] = { 0x1c }, > + [AUDIO_CORE_CSR_TX_SWR_CGCR] = { 0x30 }, So these are not "real resets", but for the sake of existing art, we can keep pretending they are bit 1 is HW_CTL (1->hw controlled) and bit 0 is taken into account only if 1 is cleared existing drivers toggle the HW_CTRL bit (meaning it's an maybe-on/surely-on switch rather than off/on).. do we need to rectify that somehow? Konrad ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC 2026-06-11 11:27 ` Konrad Dybcio @ 2026-06-29 5:19 ` Imran Shaik 0 siblings, 0 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-29 5:19 UTC (permalink / raw) To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 11-06-2026 04:57 pm, Konrad Dybcio wrote: > On 6/5/26 1:26 PM, Imran Shaik wrote: >> Add support for Audio Core Clock Controller (AUDIOCORECC) on Qualcomm >> Shikra SoC. The AUDIOCORECC clocks and resets support differs based on >> Audio subsystem enablement. In the CQM variant, both clocks and resets >> are required as Audio is on APPS, while in the CQS variant only reset >> control is required since Audio is handled on Modem. Handle these >> requirements using variant specific compatibles. >> >> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >> --- > > [...] > >> +static const struct qcom_reset_map audio_core_cc_shikra_resets[] = { >> + [AUDIO_CORE_CSR_RX_SWR_CGCR] = { 0x1c }, >> + [AUDIO_CORE_CSR_TX_SWR_CGCR] = { 0x30 }, > My bad, this also should be controlling the BIT(1) only from SW side, similar to existing drivers. I will update in the next series. > So these are not "real resets", but for the sake of existing art, we > can keep pretending they are > > bit 1 is HW_CTL (1->hw controlled) and bit 0 is taken into account only > if 1 is cleared > > existing drivers toggle the HW_CTRL bit (meaning it's an > maybe-on/surely-on switch rather than off/on).. do we need to rectify > that somehow? > No changes are needed to the existing logic, as Audio SW only needs to control the HW_CTL bit. By default (PoR), HW_CTL is asserted, so the CGCRs are controlled by hardware. For the audio use case, where HW gating isn’t required, software de-asserts HW_CTL, after which control shifts to bit 0 (set to 1 by default). Thanks, Imran ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node 2026-06-05 11:26 [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik ` (2 preceding siblings ...) 2026-06-05 11:26 ` [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik @ 2026-06-05 11:26 ` Imran Shaik 2026-06-11 11:25 ` Konrad Dybcio 3 siblings, 1 reply; 14+ messages in thread From: Imran Shaik @ 2026-06-05 11:26 UTC (permalink / raw) To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree, Imran Shaik Add support for Audio Core Clock Controller (AudioCoreCC) node on Qualcomm Shikra SoC. The CQM variant requires both clock and reset support, while the CQS variant requires only reset support. Update the respective device tree variants to enable and override the node as per variant requirements. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts | 4 ++++ arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts | 5 +++++ arch/arm64/boot/dts/qcom/shikra.dtsi | 13 +++++++++++++ 3 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts index 0a52ab9b7a4c34d371f5ac23efe59d1c9d2723f4..0883c480bfbc80d7bead966b9ba932dee8a77bbf 100644 --- a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts +++ b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts @@ -23,6 +23,10 @@ chosen { }; }; +&audiocorecc { + status = "okay"; +}; + &sdhc_1 { vmmc-supply = <&pm4125_l20>; vqmmc-supply = <&pm4125_l14>; diff --git a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts index b3f19a64d7aed3121ef092df684b19a4de39b497..b5e3d573868a836ad5e5e8eb3024cb5fb71dbb4e 100644 --- a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts +++ b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts @@ -23,6 +23,11 @@ chosen { }; }; +&audiocorecc { + compatible = "qcom,shikra-cqs-audiocorecc"; + status = "okay"; +}; + &sdhc_1 { vmmc-supply = <&pm4125_l20>; vqmmc-supply = <&pm4125_l14>; diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi index a4334d99c1f35ee851ca8266ec37d4a200a07ee5..f15757d52af04d8cb5540354a239127cb0d174a3 100644 --- a/arch/arm64/boot/dts/qcom/shikra.dtsi +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi @@ -4,6 +4,7 @@ */ #include <dt-bindings/clock/qcom,rpmcc.h> +#include <dt-bindings/clock/qcom,shikra-audiocorecc.h> #include <dt-bindings/clock/qcom,shikra-gcc.h> #include <dt-bindings/interconnect/qcom,icc.h> #include <dt-bindings/interconnect/qcom,rpm-icc.h> @@ -640,6 +641,18 @@ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>, }; }; + audiocorecc: clock-controller@a0a0000 { + compatible = "qcom,shikra-cqm-audiocorecc"; + reg = <0x0 0x0a0a0000 0x0 0x10000>, + <0x0 0x0a0b4000 0x0 0x1000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&sleep_clk>, + <0>; + #clock-cells = <1>; + #reset-cells = <1>; + status = "disabled"; + }; + sram@c11e000 { compatible = "qcom,shikra-imem", "mmio-sram"; reg = <0x0 0x0c11e000 0x0 0x1000>; -- 2.34.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node 2026-06-05 11:26 ` [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node Imran Shaik @ 2026-06-11 11:25 ` Konrad Dybcio 2026-06-29 5:20 ` Imran Shaik 0 siblings, 1 reply; 14+ messages in thread From: Konrad Dybcio @ 2026-06-11 11:25 UTC (permalink / raw) To: Imran Shaik, Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 6/5/26 1:26 PM, Imran Shaik wrote: > Add support for Audio Core Clock Controller (AudioCoreCC) node on Qualcomm > Shikra SoC. The CQM variant requires both clock and reset support, while > the CQS variant requires only reset support. Update the respective device > tree variants to enable and override the node as per variant requirements. > > Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> > --- > arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts | 4 ++++ > arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts | 5 +++++ > arch/arm64/boot/dts/qcom/shikra.dtsi | 13 +++++++++++++ > 3 files changed, 22 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts > index 0a52ab9b7a4c34d371f5ac23efe59d1c9d2723f4..0883c480bfbc80d7bead966b9ba932dee8a77bbf 100644 > --- a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts > +++ b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts > @@ -23,6 +23,10 @@ chosen { > }; > }; > > +&audiocorecc { > + status = "okay"; > +}; > + > &sdhc_1 { > vmmc-supply = <&pm4125_l20>; > vqmmc-supply = <&pm4125_l14>; > diff --git a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts > index b3f19a64d7aed3121ef092df684b19a4de39b497..b5e3d573868a836ad5e5e8eb3024cb5fb71dbb4e 100644 > --- a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts > +++ b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts > @@ -23,6 +23,11 @@ chosen { > }; > }; > > +&audiocorecc { > + compatible = "qcom,shikra-cqs-audiocorecc"; > + status = "okay"; > +}; > + > &sdhc_1 { > vmmc-supply = <&pm4125_l20>; > vqmmc-supply = <&pm4125_l14>; > diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi > index a4334d99c1f35ee851ca8266ec37d4a200a07ee5..f15757d52af04d8cb5540354a239127cb0d174a3 100644 > --- a/arch/arm64/boot/dts/qcom/shikra.dtsi > +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi > @@ -4,6 +4,7 @@ > */ > > #include <dt-bindings/clock/qcom,rpmcc.h> > +#include <dt-bindings/clock/qcom,shikra-audiocorecc.h> > #include <dt-bindings/clock/qcom,shikra-gcc.h> > #include <dt-bindings/interconnect/qcom,icc.h> > #include <dt-bindings/interconnect/qcom,rpm-icc.h> > @@ -640,6 +641,18 @@ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>, > }; > }; > > + audiocorecc: clock-controller@a0a0000 { > + compatible = "qcom,shikra-cqm-audiocorecc"; > + reg = <0x0 0x0a0a0000 0x0 0x10000>, This is called AUDIO_CORE_CC where seemingly all the clocks live > + <0x0 0x0a0b4000 0x0 0x1000>; and this is called AUDIO_CORE_CSR where seemingly all the resets live so it would make sense to split them Konrad ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node 2026-06-11 11:25 ` Konrad Dybcio @ 2026-06-29 5:20 ` Imran Shaik 0 siblings, 0 replies; 14+ messages in thread From: Imran Shaik @ 2026-06-29 5:20 UTC (permalink / raw) To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd, Brian Masney, Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk, linux-kernel, devicetree On 11-06-2026 04:55 pm, Konrad Dybcio wrote: > On 6/5/26 1:26 PM, Imran Shaik wrote: >> Add support for Audio Core Clock Controller (AudioCoreCC) node on Qualcomm >> Shikra SoC. The CQM variant requires both clock and reset support, while >> the CQS variant requires only reset support. Update the respective device >> tree variants to enable and override the node as per variant requirements. >> >> Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com> >> --- >> arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts | 5 +++++ >> arch/arm64/boot/dts/qcom/shikra.dtsi | 13 +++++++++++++ >> 3 files changed, 22 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts >> index 0a52ab9b7a4c34d371f5ac23efe59d1c9d2723f4..0883c480bfbc80d7bead966b9ba932dee8a77bbf 100644 >> --- a/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts >> +++ b/arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts >> @@ -23,6 +23,10 @@ chosen { >> }; >> }; >> >> +&audiocorecc { >> + status = "okay"; >> +}; >> + >> &sdhc_1 { >> vmmc-supply = <&pm4125_l20>; >> vqmmc-supply = <&pm4125_l14>; >> diff --git a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts >> index b3f19a64d7aed3121ef092df684b19a4de39b497..b5e3d573868a836ad5e5e8eb3024cb5fb71dbb4e 100644 >> --- a/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts >> +++ b/arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts >> @@ -23,6 +23,11 @@ chosen { >> }; >> }; >> >> +&audiocorecc { >> + compatible = "qcom,shikra-cqs-audiocorecc"; >> + status = "okay"; >> +}; >> + >> &sdhc_1 { >> vmmc-supply = <&pm4125_l20>; >> vqmmc-supply = <&pm4125_l14>; >> diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi >> index a4334d99c1f35ee851ca8266ec37d4a200a07ee5..f15757d52af04d8cb5540354a239127cb0d174a3 100644 >> --- a/arch/arm64/boot/dts/qcom/shikra.dtsi >> +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi >> @@ -4,6 +4,7 @@ >> */ >> >> #include <dt-bindings/clock/qcom,rpmcc.h> >> +#include <dt-bindings/clock/qcom,shikra-audiocorecc.h> >> #include <dt-bindings/clock/qcom,shikra-gcc.h> >> #include <dt-bindings/interconnect/qcom,icc.h> >> #include <dt-bindings/interconnect/qcom,rpm-icc.h> >> @@ -640,6 +641,18 @@ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>, >> }; >> }; >> >> + audiocorecc: clock-controller@a0a0000 { >> + compatible = "qcom,shikra-cqm-audiocorecc"; >> + reg = <0x0 0x0a0a0000 0x0 0x10000>, > > This is called AUDIO_CORE_CC where seemingly all the clocks live > >> + <0x0 0x0a0b4000 0x0 0x1000>; > > and this is called AUDIO_CORE_CSR where seemingly all the resets live > > so it would make sense to split them Yes, the clocks and resets reside in different register spaces, I will split them into two different nodes as suggested. This will help to handle the CQM/CQS variants requirements more cleanly. Thanks, Imran ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-06-29 5:28 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-05 11:26 [PATCH 0/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-05 11:26 ` [PATCH 1/4] clk: qcom: common: Register reset controller only when resets are present Imran Shaik 2026-06-05 11:26 ` [PATCH 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra Audio Core Clock Controller Imran Shaik 2026-06-07 11:18 ` Dmitry Baryshkov 2026-06-29 5:21 ` Imran Shaik 2026-06-08 10:49 ` Krzysztof Kozlowski 2026-06-29 5:28 ` Imran Shaik 2026-06-05 11:26 ` [PATCH 3/4] clk: qcom: Add Audio Core clock controller support on Qualcomm Shikra SoC Imran Shaik 2026-06-11 11:22 ` Konrad Dybcio 2026-06-11 11:27 ` Konrad Dybcio 2026-06-29 5:19 ` Imran Shaik 2026-06-05 11:26 ` [PATCH 4/4] arm64: dts: qcom: shikra: Add support for AudioCoreCC node Imran Shaik 2026-06-11 11:25 ` Konrad Dybcio 2026-06-29 5:20 ` Imran Shaik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox