Add LPASS VA CSR HeartBeat pulse clock support
v4 cover Add LPASS VA CSR HeartBeat pulse clock support
The LPASS VA CSR block contains rate generator hardware that produces a HeartBeat Pulse (also known as RateGen Pulse). This pulse synchronizes the start of the DMAs and Codec Interfaces for the audio usecases and can serve as a periodic wakeup source for the DSP.
This series adds the DT binding and driver support to model this rate generator as a clock provider.
Patch 1 adds the YAML binding for the new qcom,hawi-lpass-va-csr clock provider node under Documentation/devicetree/bindings/clock/.
Patch 2 adds the lpass-va-csr driver under drivers/clk/qcom that registers the lpass_heartbeat_pulse clock and enables/disables the rate generator via regmap when the clock consumer requests it.
Changes in v4:
- Renamed the binding filename and schema ID to hawi-specific naming:
qcom,lpass-va-csr.yaml -> qcom,hawi-lpass-va-csr.yaml.
- Narrowed the DT example register window to the rate generator
registers only, and aligned the node name with the base address:
clock-controller@7eed000 with reg <0x0 0x07eed000 0x0 0x14>.
- Renamed Kconfig symbol QCOM_CLK_LPASS_VA_CSR to QCOM_CLK_LPASS_HEARTBEAT_PULSE.
- Added devm_pm_runtime_enable() in lpass-va-csr probe path.
- Dropped the qcom,lpass-va-macro binding extension patch - no in-tree
user yet; will be resubmitted with the hawi DTSI changes.
- Dropped sound/soc/codecs/Kconfig select wiring from this series to
keep it clock-only.
- Link to v3: https://lore.kernel.org/all/[email protected]/
---
Sarath Ganapathiraju (2):
dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock
clk: qcom: Add LPASS VA CSR heartbeat pulse clock
.../bindings/clock/qcom,hawi-lpass-va-csr.yaml | 51 +++++++ drivers/clk/qcom/Kconfig | 12 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpass-va-csr.c | 148 +++++++++++++++++++++ 4 files changed, 212 insertions(+)
---
base-commit: 0f6da28aab51b16762ed82e8fdeaa5042da45b08
change-id: 20260805-master-20260805-sync-d892f9d7a2e0
Best regards,
Signature · 1 line
Sarath Ganapathiraju <[email protected]>
PATCH v4 1/2 dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock
Add a binding for the Qualcomm LPASS VA CSR rate generator node that exposes the lpass_heartbeat_pulse clock on hawi.
The HeartBeat Pulse (also known as RateGen Pulse) synchronizes the start of the DMAs and Codec Interfaces for the audio usecase and can serve as a periodic wakeup source for the DSP.
--- .../bindings/clock/qcom,hawi-lpass-va-csr.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+)
Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml new file +51 -0
@@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,hawi-lpass-va-csr.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm LPASS VA CSR heartbeat pulse clock provider + +maintainers: + - Srinivas Kandagatla <[email protected]> + - Sarath Ganapathiraju <[email protected]> + +description: + The LPASS (Low Power Audio Subsystem) VA CSR block contains a rate + generator that produces a periodic HeartBeat Pulse, also known as + the RateGen Pulse. This pulse synchronizes the start of DMAs and + Codec Interfaces for audio usecases and can serve as a periodic + wakeup source for the DSP. + +properties: + compatible: + enum: + - qcom,hawi-lpass-va-csr + + reg: + maxItems: 1 + description: Address and size of the rate generator registers within + the VA CSR block. + + "#clock-cells": + const: 0 + +required: + - compatible + - reg + - "#clock-cells" + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@7eed000 { + compatible = "qcom,hawi-lpass-va-csr"; + reg = <0x0 0x07eed000 0x0 0x14>; + #clock-cells = <0>; + }; + };
Signature · 1 line
2.34.1
PATCH v4 2/2 clk: qcom: Add LPASS VA CSR heartbeat pulse clock
In reply to Sarath GanapathirajuThe HeartBeat Pulse (also known as RateGen Pulse) synchronizes the start of the DMAs and Codec Interfaces for the audio usecases and can serve as a periodic wakeup source for the DSP.
Add the LPASS VA CSR driver that models the rate generator as a clock provider so it is enabled and disabled automatically alongside the other clocks during runtime PM resume and suspend.
--- drivers/clk/qcom/Kconfig | 12 ++++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpass-va-csr.c | 148 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+)
drivers/clk/qcom/Kconfig +12 -0
@@ -2040,6 +2040,18 @@ config CLK_GFM_LPASS_SM8250 Support for the Glitch Free Mux (GFM) Low power audio subsystem (LPASS) clocks found on SM8250 SoCs. +config QCOM_CLK_LPASS_HEARTBEAT_PULSE + tristate "Qualcomm LPASS VA CSR heartbeat pulse clock provider" + depends on COMMON_CLK + select REGMAP_MMIO + help + Qualcomm LPASS VA CSR block contains the rate generator hardware + that produces the HeartBeat Pulse (also known as RateGen Pulse). + This driver models the rate generator as a clock provider so + that consumers can enable or disable it via the common clock + framework, and it can be used to synchronize the start of DMAs + and Codec Interfaces or as a periodic wakeup source for the DSP. + config SM_VIDEOCC_8450 tristate "SM8450 Video Clock Controller" depends on ARM64 || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
@@ -25,6 +25,7 @@ obj-$(CONFIG_CLK_ELIZA_DISPCC) += dispcc-eliza.o obj-$(CONFIG_CLK_ELIZA_GCC) += gcc-eliza.o obj-$(CONFIG_CLK_ELIZA_TCSRCC) += tcsrcc-eliza.o obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o +obj-$(CONFIG_QCOM_CLK_LPASS_HEARTBEAT_PULSE) += lpass-va-csr.o obj-$(CONFIG_CLK_GLYMUR_CAMCC) += camcc-glymur.o obj-$(CONFIG_CLK_GLYMUR_DISPCC) += dispcc-glymur.o obj-$(CONFIG_CLK_GLYMUR_EVACC) += evacc-glymur.o
drivers/clk/qcom/lpass-va-csr.c new file +148 -0
148 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v4 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Missing architecture dependencies in `QCOM_CLK_LPASS_HEARTBEAT_PULSE` Kconfig entry. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing architecture dependencies in QCOM_CLK_LPASS_HEARTBEAT_PULSE Kconfig entry. --
--- Patch [2]: [PATCH v4 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock --- commit f03b41ee3ba8e25df484407c379a0d86e064e1b4
Author: Sarath Ganapathiraju <[email protected]>
clk: qcom: Add LPASS VA CSR heartbeat pulse clock
This commit introduces the LPASS VA CSR driver to model the rate generator as a clock provider. It allows the HeartBeat Pulse to be enabled and disabled automatically alongside other clocks during runtime PM operations.
drivers/clk/qcom/Kconfig config CLK_GFM_LPASS_SM8250 · line 2046
Quoted 12 lines
drivers/clk/qcom/Kconfig +4
-0@@ -2040,6 +2040,18 @@ config CLK_GFM_LPASS_SM8250 Support for the Glitch Free Mux (GFM) Low power audio subsystem (LPASS) clocks found on SM8250 SoCs. +config QCOM_CLK_LPASS_HEARTBEAT_PULSE + tristate "Qualcomm LPASS VA CSR heartbeat pulse clock provider" + depends on COMMON_CLK + select REGMAP_MMIO
[Severity: Low]
Should this configuration depend on ARCH_QCOM or COMPILE_TEST?
Without architecture constraints, this SoC-specific clock driver is exposed in the configuration menu for all architectures. Adding a dependency on ARCH_QCOM || COMPILE_TEST would prevent this menuconfig pollution.
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2