From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: federico@izzo.pro, Srinivas Kandagatla <srini@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v2] slimbus: qcom-ngd-ctrl: fix ngd register base address
Date: Wed, 15 Jul 2026 12:42:43 +0200 [thread overview]
Message-ID: <53354eeb-21da-4a9d-868e-970a6c4331e5@oss.qualcomm.com> (raw)
In-Reply-To: <20260710-qcom-ngd-register-base-fix-v2-1-0bb247c954c9@izzo.pro>
On 7/10/26 12:28 PM, Federico Amedeo Izzo via B4 Relay wrote:
> From: Federico Amedeo Izzo <federico@izzo.pro>
>
> The slimbus controller register base was calculated using the
> controller ID and the register size, producing wrong results for ID > 1.
>
> The expression reduces to ngd->base = ctrl->base for controller with ID = 1;
> but for ID > 1 the other factors produce a wrong base address.
> This bug caused a crash while trying to bring-up the secondary
> slimbus controller (ID = 3) on oneplus-enchilada with sdm845.
SDM845 has 2 slimbus controllers:
AUD_SLIM @ 0x171c0000 (the currently described node in sdm845.dtsi)
QCA_SLIM @ 0x17240000 (the one you're trying to enable)
Each one of these controllers has 2 NGDs (indexed 1 and 2), located
at an offset of +0x1000 from the base of the controller and spaced
0x1000 apart from each other (i.e. the current calculation is right)
You do however need to pass the right ID to the QMI message, so the
bug is in this line:
req.instance = (ctrl->ngd->id >> 1);
This shouldn't be the same ID.
Downstream solves this using a `cell-index` property, which
represents the ordinal of the instance of a hw block, but that's
highly discouraged in dt-bindings nowadays. Instead, the recommended
way would be to introduce a struct like:
{ .base = 0x171c0000, .index = 1 },
{ .base = 0x17240000, .index = 3 },
However that would further need a sdm845-specific compatible to bind
the data to this specific SoC. I think we can introduce one without any
regressions (because the other slimbus controller is not yet described)
Konrad
prev parent reply other threads:[~2026-07-15 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 10:28 Federico Amedeo Izzo via B4 Relay
2026-07-15 10:42 ` Konrad Dybcio [this message]
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=53354eeb-21da-4a9d-868e-970a6c4331e5@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=federico@izzo.pro \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=srini@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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