Skip to contentSkip to conversation

Add LPASS VA CSR HeartBeat pulse clock support

PATCH Superseded Sarath Ganapathiraju 3 participants 7 messages Aug 6 – Aug 21

Subsystems (4)

v5 of 16 Superseded Latest is v16 →

lore
Share & tools
lore
#0 lore raw

v5 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 v5:
- Add explicit ARM64 Kconfig gating and Qualcomm default-module policy
for QCOM_CLK_LPASS_HEARTBEAT_PULSE to align with nearby qcom clock
entries (sashiko-bot).
- Link to v4: https://patch.msgid.link/[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                           |  14 ++
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/lpass-va-csr.c                    | 148 +++++++++++++++++++++
 4 files changed, 214 insertions(+)

---
base-commit: 1701fda2f58e345c050f4309971bdc07cd6146ba
change-id: 20260805-master-20260805-sync-d892f9d7a2e0

Best regards,

Signature · 1 line
Sarath Ganapathiraju <[email protected]>
#1 lore raw

PATCH v5 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
new file mode 100644
index 000000000000..9935173d8bee
@@ -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
maintainer
#2 lore raw

Re: [PATCH v5 1/2] dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock

Quoted 4 lines · On Thu, Aug 06, 2026 at 08:21:36PM +0530, Sarath Ganapathiraju via B4 Relay…

From: Sarath Ganapathiraju <[email protected]>

Add a binding for the Qualcomm LPASS VA CSR rate generator node that exposes the lpass_heartbeat_pulse clock on hawi.

Hawi is a proper noun, so it should always be written with capital 'H'.

Quoted 55 lines

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 +38 -0
new file mode 100644
index 000000000000..9935173d8bee
@@ -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

Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml line 48

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml new file +10 -0
+
+examples:
+  - |
+    soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      clock-controller@7eed000 {
+        compatible = "qcom,hawi-lpass-va-csr";
+        reg = <0x0 0x07eed000 0x0 0x14>;

The two 0x0 cells are just there in the normal dtsi because we need address- and size-cells of 2. But you don't need that in your example.

If you change this to <0x07eed000 0x14> you can drop the address/size-cells and the whole soc {} level from the example.

That said, is this really a 20 byte large IP-block? Or is this part of some larger function? Will we have overlapping/conflicting mappings of this block?

Regards,
Bjorn

Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml new file +3 -0
+        #clock-cells = <0>;
+      };
+    };
Signature · 2 lines
-- 
2.34.1
#3 lore raw

Re: [PATCH v5 1/2] dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock

Quoted 5 lines · Bjorn Andersson
Quoted 4 lines · On Thu, Aug 06, 2026 at 08:21:36PM +0530, Sarath Ganapathiraju via B4 Relay…

From: Sarath Ganapathiraju <[email protected]>

Add a binding for the Qualcomm LPASS VA CSR rate generator node that exposes the lpass_heartbeat_pulse clock on hawi.

[...]

Quoted 13 lines

Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml line 48

Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml new file +9 -0
+examples:
+  - |
+    soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      clock-controller@7eed000 {
+        compatible = "qcom,hawi-lpass-va-csr";
+        reg = <0x0 0x07eed000 0x0 0x14>;

The two 0x0 cells are just there in the normal dtsi because we need address- and size-cells of 2. But you don't need that in your example.

Quoted 7 lines

If you change this to <0x07eed000 0x14> you can drop the address/size-cells and the whole soc {} level from the example.

That said, is this really a 20 byte large IP-block? Or is this part of some larger function? Will we have overlapping/conflicting mappings of this block?

I raised a similar concern, but it seems my concern was misunderstood

https://lore.kernel.org/linux-arm-msm/[email protected]/

I think we should still cover the full register space

Konrad

#4 lore raw

Re: [PATCH v5 1/2] dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock

Quoted 1 line · Konrad Dybcio

I raised a similar concern, but it seems my concern was misunderstood

Thanks for clarifying.

Quoted 1 line

I think we should still cover the full register space

I had narrowed the example to the rate generator subrange while trying to avoid claiming unrelated registers, but I understand your point that the binding should still describe the full VA CSR register block.

I will keep the full VA CSR window in the next revision and make the binding text explicit that the clock provider currently uses the rate generator registers within that block. The driver will continue to access only the rate generator offsets needed for the heartbeat pulse clock.

Thanks,
Sarath

#5 lore raw

Re: [PATCH v5 1/2] dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock

In reply to Bjorn Andersson
Quoted 1 line · Bjorn Andersson

Hawi is a proper noun, so it should always be written with capital 'H'.

Ack, will update.

Quoted 2 lines

If you change this to <0x07eed000 0x14> you can drop the address/size-cells and the whole soc {} level from the example.

I will drop the unnecessary soc wrapper and the explicit 2-cell address/size setup from the example.

Quoted 3 lines

That said, is this really a 20 byte large IP-block? Or is this part of some larger function? Will we have overlapping/conflicting mappings of this block?

Konrad clarified that the binding should still cover the full VA CSR register space. I will keep the full VA CSR window in the binding and clarify the description so it is clear that the current driver only programs the rate generator registers inside that VA CSR block.

Thanks,
Sarath

#6 lore raw

PATCH v5 2/2 clk: qcom: Add LPASS VA CSR heartbeat pulse clock

In reply to Sarath Ganapathiraju

The 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        |  14 ++++
 drivers/clk/qcom/Makefile       |   1 +
 drivers/clk/qcom/lpass-va-csr.c | 148 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 163 insertions(+)
drivers/clk/qcom/Kconfig +14 -0
index d1fc9bf87126..756f6ed727d0 100644
@@ -2040,6 +2040,20 @@ 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
+	depends on ARM64 || COMPILE_TEST
+	select REGMAP_MMIO
+	default m if ARCH_QCOM
+	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
index daf25d583be2..8d3e3381bc29 100644
@@ -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