From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796320565; b=MeLqjz/F3IiQhQUvcbLPeGX3LSnt8F27I7YV0b54dzIcAOLVNB9nVfKPcQk3drTGyd1H hX+5idoFsxy/bDU9kuZtBZwE4UdmUgrLki0W88Sv1z0IyIPkZt4bn1LL9WKHYdNUUXl2u +meovYTBWD6c7lKyMG1ykNHHg1v7JMlWeRVAEkkN8HY6Vu4hlq8tnCC7xZGfQ7/fMCpEb FUvZ49esxWEOA/H2J1GDXNw9icVx5M3P/vitOAWqAkPuyXGkQNj5E/XpRk9orN+VpYmHx s0jr1Fn6iBFX8ClKJ4zHJ9FFrefkkrxrRwfVJppFegA8YlQ0wQ0AP07fsvVBx4gWgtg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796320565; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=Wx+RX62hbYlcEg/Ogd5jkvMAoZDjUXhVVAsFNfEAgLk=; b=lt9SxCVhhrP4wku/e8mQQp1tfyOY3oB1rqS6atIlUaha5Xa3oBBotsPI8LCo/Zkzmhax lDsAmHWnXJXBi80scptxaxXUKkdElrBcnhZM+wtZkV3qkHRZ7ccw/5ppx7OTNhKmrQ+y1 iZxcvxKl4nGUuwDv6jErN71KjQEmncsXccdMYcwNdgEBtRV2srBQt7wfempDJ6daDsxSw AhuA5Re6hZvfuhcC9/4UTTiui9Ae5OrzfxFnJ9J9V61y//ixr+vP3MRNjWHU27dVno8OQ sVn8Ss+WM10UmxCQgEFllKAv1D8aC2jgvO/l92k+R/wzRHOhIAizmquaKkfjui4/7lw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IXGXOz5U; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74948606A683; Thu, 3 Dec 2026 17:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IXGXOz5U Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796320565; b=u+HzJ/i9nMceLpcf1fdrqnzUQrTMISiLLJO1x8TeyEBB2hJn3KaADElmqUe/UhNsjYjP xDpaFbmV3Nlk5wVXDehCjgHo7oOEVTfcHSDurJjM9Th5CdEKbpNipgn82KVQHMU5b9Ini IXMftEfj5pXs1P3EX5MXjIYYALc54pTCBkzXhbEklyv5o4T0l67Sd3KOY1Cc4qgcEmceT rMCFfdgM8Xg7oTAOT3HgxVGFibGN6PwKrwwcS73vH6UNEFz+2W+4USv4tci987a9wUGi7 6+yNQ4vzHqB5OEQHi9sgFZMKanKTzhY6C31lJdpH6V0HiSCO6zb6bHFaadefu1dCFaA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796320565; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=Wx+RX62hbYlcEg/Ogd5jkvMAoZDjUXhVVAsFNfEAgLk=; b=ttCnICPMHUpzy6BKDSKPi4s+SlnFtNvdf7PqYSCwrChb8MlAHEuPtJhWeYnloS3INRZ3 ger7bVNrQ9YyKk27EDG8gZImFloRbwZOoZxzRvXaDtN0JN5anFCCgbGDTXF8xsz0mAqzV f9sJV0jXsBO0Qvqn1bNkZ4VqNBgTWNIRSvMnIq98ThqwooKlBq/hGSG+N4JR3UC8xVUYB z4pffjDD21u5CMnkdaJQzOEwMGQHMLaA3RZVgdZ35k/Ia3+6L/HQu8T3lmg9xq+H8ZD+F KamxZK6jWEUkzt99qREtf8t2C0McbzAza390kI6Zwaj3xXDo9aB5MSsTEOg0EvsXfTQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0F17A1F00893; Thu, 3 Dec 2026 17:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796320565; bh=Wx+RX62hbYlcEg/Ogd5jkvMAoZDjUXhVVAsFNfEAgLk=; h=From:Subject:Date:To:Cc:Reply-To; b=IXGXOz5Ud1iU9nWnCmUQDx3rb10oZR50FQ2Pyfz0gl6FsLsbCwRJ5q2Rk4Ajr8YnT L91X4i8MkuNB6Ph4WPT/7NUo3oJ04R+I/HBNPXfOqN6qD3Y+leHHhL3UVKW7FBrjax ejfwHJMBPzqRsM3jhHX3CrNvMJzE/ArIwp70AQ3yBaDuVyf7buewOf166vKJlrGezd XUTMj87wdQpJuBd5NlIMLAxHYbcdRo35lXF2p+xPsYgQ+zjfl5Cp7QCM1h61xGvTu9 odkAuLKtGNSNo67wAteuj2IhYf9dMYSo2bjjfgjQJCv56usHFYlRyZdf8MO2yY5ZZ7 iV8Zzaw0X3qYA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 5FDA04FA94; Thu, 3 Dec 2026 17:55:52 +0000 (UTC) From: Sarath Ganapathiraju via B4 Relay Subject: [PATCH v16 0/2] Add LPASS VA CSR HeartBeat pulse clock support Date: Thu, 03 Dec 2026 23:25:19 +0530 Message-Id: <20261203-master-v16-0-f946e4c2686a@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAetEWsC/3XQS07DMBAG4KtUXpNqZhy/WHEPxMLxgwbRBuI0A lW5O3aREkuQjaWx5hv/nhtLYexDYo+HGxvD3Kd+uOQC5cOBuZO9vIam9/mCEZAEg6o52zSFsZG OlNJRKGssy80fY4j9133S88tvna7dW3BT0aXj1KdpGL/vT8269P0ZOusGGk3ckxMeDNinIaXj5 9W+u+F8PuaDldmzqTTpVZusKceKYKKxYHY0QsU5rBwhewRBoDonSIk9j6tHQNo8Fi8ATODBWcf 3PFWecPOUvem4jwKjR6/2PN98jrt5nr3vupY77ySE3fxt5an6f1vyI7noJW+59nteVL7enyj7V 61FQdIZr//xy7L8AJHcv450AgAA X-Change-ID: 20260917-master-6c2778f57a9a To: andersson@kernel.org, abelvesa@kernel.org, sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, srinivas.kandagatla@oss.qualcomm.com, sarath.ganapathiraju@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, prasad.kumpatla@oss.qualcomm.com, konrad.dybcio@oss.qualcomm.com, ajay.nandam@oss.qualcomm.com X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796320551; l=7955; i=sarath.ganapathiraju@oss.qualcomm.com; s=default; h=from:subject:message-id; bh=4i187DD87VnTfwgiyC9NR1wp05S/eChk9KBrienyGGs=; b=kvKDiJdfRptsOsBeg66Ry44814WNpPC7blPZ0otprwQkiFjI223Q4ZWRyhkcL7pMeWLJEymRw jjhRBeSpmAJAihMlFP4K4R7LtRCx7Qw8TF6n+vd6K6nwKLFI4vgtkZ0 X-Developer-Key: i=sarath.ganapathiraju@oss.qualcomm.com; a=ed25519; pk=4p2FWGXM+F2sir13Lu5stw5aKX5trUymK/ttESvgxQg= X-Endpoint-Received: by B4 Relay for sarath.ganapathiraju@oss.qualcomm.com/default with auth_id=870 X-Original-From: Sarath Ganapathiraju Reply-To: sarath.ganapathiraju@oss.qualcomm.com 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 v16: - Rebase the series on linux-next next-20261202. - Rename the registered heartbeat clock to lpass-heartbeat-pulse (Srinivas). - Move the match-data lookup after allocation and drop the unreachable missing match-data error path (Srinivas). - Use a shared runtime PM put error path after pm_runtime_resume_and_get() (Srinivas). - Add Srinivas and Prasad review and test tags from v15 patch replies. - Link to v15: https://patch.msgid.link/20261130-master-v15-0-274a1526c9d8@oss.qualcomm.com Changes in v15: - Rebase the series on linux-next next-20261127. - Drop Prasad's Reviewed-by and Tested-by tags from the individual patches because the tags were provided as a reply to the cover letter rather than the patch mails (Krzysztof). - No code changes. - Link to v14: https://patch.msgid.link/20261120-master-v14-0-112cfd63438d@oss.qualcomm.com Changes in v14: - Rebase the series on linux-next next-20261119. - Add Prasad's Reviewed-by and Tested-by tags. - Resolve the Makefile context against latest linux-next by keeping the new entry in the existing CONFIG_QCOM_CLK_* block; no functional driver changes. - Link to v13: https://patch.msgid.link/20261105-master-v13-0-dbb43cdc60e5@oss.qualcomm.com Changes in v13: - Rebase the series on linux-next next-20261104. - Create and populate the PM clock list before enabling runtime PM so runtime resume cannot touch VA CSR registers before the LPASS vote clocks are available (Sashiko). - Drop the regmap cache for the LPASS rate generator registers to avoid stale LPASS_RATE_GEN_CTRL state after LPASS register context loss (Sashiko). - Use runtime PM force suspend and resume for system sleep, and restore LPASS_RATE_GEN_CTRL on resume when the heartbeat clock was enabled before LPASS register context loss. - Link to v12: https://patch.msgid.link/20261021-master-v12-0-9b3df51fd1d7@oss.qualcomm.com Changes in v12: - Rebase the series on linux-next next-20261020. - Depend on PM_CLK so COMPILE_TEST builds cannot select the driver when pm_clk_suspend() and pm_clk_resume() are unavailable (Sashiko, LKP). - Link to v11: https://patch.msgid.link/20261012-master-v11-0-15009e3ecac3@oss.qualcomm.com Changes in v11: - Rebase the series on linux-next next-20261009. - Drop the custom heartbeat prepare/unprepare callbacks and rely on CCF provider runtime PM handling (Ajay). - Restore the rate generator counter and delay registers from the runtime resume callback after the LPASS vote clocks are enabled (Sashiko). - Add an of_device_get_match_data() NULL guard (Sashiko). - Link to v10: https://patch.msgid.link/20260930-master-v10-0-105207bc5275@oss.qualcomm.com Changes in v10: - Rebase the series on linux-next next-20260929. - Add clk_is_enabled_regmap() to report the heartbeat gate state for clk_disable_unused() (Sashiko). - Add Rob's Reviewed-by tag to the binding patch. - Link to v9: https://patch.msgid.link/20260928-master-v9-0-2277f09f9a09@oss.qualcomm.com Changes in v9: - Rebase the series on linux-next next-20260928. - Add runtime PM callbacks so the LPASS LPR and audio vote clocks are enabled by pm_runtime_resume_and_get() before touching VA CSR registers. - Keep the LPASS vote clocks enabled across heartbeat clock enable/disable register accesses by taking a runtime PM reference from the heartbeat clock prepare path. - Use synchronous runtime PM put on probe success and error paths. - Drop the one-use runtime PM error label while keeping synchronous puts (Konrad). - Wrap the runtime PM ops with pm_ptr() from HTML review. - Link to v8: https://patch.msgid.link/20260917-master-v8-0-823d2c5d090a@oss.qualcomm.com Changes in v8: - Rebase the series on linux-next next-20260916. - Require the LPASS LPR and audio vote clocks to access VA CSR register space safely. - Attach the DT vote clocks to runtime PM and resume the device before programming the rate generator registers. - Program the counter and delay registers once during probe. - Use qcom's simple regmap gate ops for the enable bit (Srinivas). - Drop the unreachable of_device_get_match_data() NULL check (Srinivas). - Drop stale Reviewed-by/Tested-by tags after the binding and driver changes. - Link to v7: https://patch.msgid.link/20260831-heartbeat-v7-next-20260828-v7-0-e3ffeac46a51@oss.qualcomm.com Changes in v7: - Rebase the series on linux-next next-20260828. - Add Prasad's Reviewed-by and Tested-by tags to patch 2. - Link to v6: https://patch.msgid.link/20260821-heartbeat-v6-next-20260821-send-v6-0-62c5df84ce21@oss.qualcomm.com Changes in v6: - Rebase the series on linux-next next-20260821. - Capitalize Hawi in binding text (Bjorn). - Simplify the binding example by removing the soc wrapper and two-cell address/size setup (Bjorn). - Keep the full VA CSR register window in the binding and describe it as the VA CSR register block after Konrad clarified the earlier register-range concern (Bjorn, Konrad). - Link to v5: https://patch.msgid.link/20260806-master-20260805-sync-v5-0-0ff42e9b6431@oss.qualcomm.com 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. - Link to v4: https://patch.msgid.link/20260805-master-20260805-sync-v4-0-dfbcbf427c2c@oss.qualcomm.com Changes in v4: - Rename the binding filename and schema ID to hawi-specific naming: qcom,lpass-va-csr.yaml -> qcom,hawi-lpass-va-csr.yaml (Krzysztof). - Rename Kconfig symbol QCOM_CLK_LPASS_VA_CSR to QCOM_CLK_LPASS_HEARTBEAT_PULSE (Konrad). - Add devm_pm_runtime_enable() in the lpass-va-csr probe path. - Drop the qcom,lpass-va-macro binding extension patch; it will be resubmitted with the Hawi DTSI changes. - Drop sound/soc/codecs/Kconfig select wiring to keep this series clock-only (Konrad). - Link to v3: https://lore.kernel.org/all/20260723-master-v3-0-3d67b79b0515@oss.qualcomm.com/ Changes in v3: - Move the qcom,lpass-va-csr binding under Documentation/devicetree/bindings/clock/ (Krzysztof). - Move the driver under drivers/clk/qcom/ (Krzysztof). - Improve the schema description and use generic clock-controller node naming (Krzysztof). - Use additionalProperties: false and keep compatibles sorted. Changes in v2: - Split the qcom,lpass-va-csr and qcom,lpass-va-macro bindings into separate patches. Changes in v1: - Initial version Signed-off-by: Sarath Ganapathiraju --- 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 | 62 ++++++ drivers/clk/qcom/Kconfig | 15 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpass-va-csr.c | 209 +++++++++++++++++++++ 4 files changed, 287 insertions(+) --- base-commit: 799dd936553182df5770dde7f38d94c8337df75a change-id: 20260917-master-6c2778f57a9a Best regards, -- Sarath Ganapathiraju