From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, andersson@kernel.org,
konradybcio@kernel.org, sboyd@kernel.org
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, alexey.klimov@linaro.org,
r.mereu@arduino.cc, srini@kenrel.org
Subject: Re: [PATCH v2 1/5] clk: qcom: fix SM6115 lpasscc register offset
Date: Tue, 24 Feb 2026 13:20:38 +0100 [thread overview]
Message-ID: <f2819156-a1e9-4159-973e-3e3db5c20cbb@oss.qualcomm.com> (raw)
In-Reply-To: <20260223133950.221234-2-srinivas.kandagatla@oss.qualcomm.com>
On 2/23/26 2:39 PM, Srinivas Kandagatla wrote:
> For some reason we ended with incorrect register offset for soundwire tx
> controller reset and the regmap register max was also incorrect it was
> 0x1000 instead of 0x12000 which is full register range for this IP.
>
> This was somehow compenseated in DT reg property which got it working so
> far.
>
> Fix this by correcting the actual offset and max registers as per SoC
> documentation.
>
> Fixes: b076b995e225 ("clk: qcom: Add SM6115 LPASSCC")
> Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
> drivers/clk/qcom/lpasscc-sm6115.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/qcom/lpasscc-sm6115.c b/drivers/clk/qcom/lpasscc-sm6115.c
> index ac6d219233b4..47adf4de2cca 100644
> --- a/drivers/clk/qcom/lpasscc-sm6115.c
> +++ b/drivers/clk/qcom/lpasscc-sm6115.c
> @@ -35,7 +35,7 @@ static const struct qcom_cc_desc lpass_audiocc_sm6115_reset_desc = {
> };
>
> static const struct qcom_reset_map lpasscc_sm6115_resets[] = {
> - [LPASS_SWR_TX_CONFIG_CGCR] = { .reg = 0x100, .bit = 1, .udelay = 500 },
> + [LPASS_SWR_TX_CONFIG_CGCR] = { .reg = 0xc100, .bit = 1, .udelay = 500 },
So after taking a deeper dive, we currently define CGCR "resets" with bit(1)
The CGCRs ("Clock Gating Control Registers") have:
BIT(1) HW_CTL
BIT(0) CLK_ENABLE
so by ""asserting"" the resets, we really put the *clocks* in HW CTL mode
(that's why drivers/soundwire/qcom.c only ever calls reset_control_reset()
and during "configure"-type sequences)
I think for not making a mess out of backwards compatiblity, we could stay
with this model, but we should def write it down somewhere..
I don't know if we ever need to manually assert CLK_ENABLE from Linux.
Now, interestingly, msm-4.19 techpack/audio has this hunk:
/* SW workaround to gate hw_ctl for SWR version >=1.6 */
if (swrm->version >= SWRM_VERSION_1_6) {
if (swrm->swrm_hctl_reg) {
temp = ioread32(swrm->swrm_hctl_reg);
temp &= 0xFFFFFFFD;
iowrite32(temp, swrm->swrm_hctl_reg);
usleep_range(500, 505);
temp = ioread32(swrm->swrm_hctl_reg);
dev_dbg(swrm->dev, "%s: hctl_reg val: 0x%x\n",
__func__, temp);
}
}
which clears that hw_ctl bit
Konrad
next prev parent reply other threads:[~2026-02-24 12:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 13:39 [PATCH v2 0/5] arm64: dts: arduino-imola: add support for sound Srinivas Kandagatla
2026-02-23 13:39 ` [PATCH v2 1/5] clk: qcom: fix SM6115 lpasscc register offset Srinivas Kandagatla
2026-02-24 12:20 ` Konrad Dybcio [this message]
2026-02-23 13:39 ` [PATCH v2 2/5] dt-bindings: mfd: qcom,spmi-pmic: add compatibles for pm4124-codec Srinivas Kandagatla
2026-02-23 16:56 ` Rob Herring
2026-02-23 18:14 ` Srinivas Kandagatla
2026-02-23 13:39 ` [PATCH v2 3/5] arm64: dts: qcom: agatti: add LPASS devices Srinivas Kandagatla
2026-02-24 2:58 ` Dmitry Baryshkov
2026-02-24 12:24 ` Konrad Dybcio
2026-02-24 12:28 ` Konrad Dybcio
2026-05-15 8:29 ` Srinivas Kandagatla
2026-02-23 13:39 ` [PATCH v2 4/5] arm64: dts: arduino-imola: add support for sound Srinivas Kandagatla
2026-02-24 11:48 ` Konrad Dybcio
2026-02-23 13:39 ` [PATCH v2 5/5] arm64: defconfig: Enable configs for audio drivers on Arduino UnoQ Srinivas Kandagatla
2026-02-24 2:57 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2819156-a1e9-4159-973e-3e3db5c20cbb@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=alexey.klimov@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.mereu@arduino.cc \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=srini@kenrel.org \
--cc=srinivas.kandagatla@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox