From: Vignesh Viswanathan <vignesh.viswanathan@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
mr.nuke.me@gmail.com, andersson@kernel.org,
mathieu.poirier@linaro.org, linux-kernel@vger.kernel.org
Cc: krzk+dt@kernel.org, Philipp Zabel <p.zabel@pengutronix.de>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
varadarajan.narayanan@oss.qualcomm.com
Subject: Re: [PATCH 6/9] remoteproc: qcom_q6v5_wcss: support IPQ9574
Date: Wed, 7 Jan 2026 23:55:16 +0530 [thread overview]
Message-ID: <21468f66-56df-43ea-99c2-7257d8d6bb7c@oss.qualcomm.com> (raw)
In-Reply-To: <f9adaaa2-1672-4246-8139-93f9c220530a@oss.qualcomm.com>
On 1/7/2026 6:56 PM, Konrad Dybcio wrote:
> On 1/5/26 5:09 PM, mr.nuke.me@gmail.com wrote:
>>
>>
>> On 12/29/25 6:35 AM, Konrad Dybcio wrote:
>>> On 12/23/25 9:21 PM, Alex G. wrote:
>>>> On Friday, December 19, 2025 7:20:04 AM CST Konrad Dybcio wrote:
>>>>> On 12/19/25 5:34 AM, Alexandru Gagniuc wrote:
>>>>>> Q6 based firmware loading is also present on IPQ9574, when coupled
>>>>>> with a wifi-6 device, such as QCN5024. Populate driver data for
>>>>>> IPQ9574 with values from the downstream 5.4 kerrnel.
>>>>>>
>>>>>> Add the new sequences for the WCSS reset and stop. The downstream
>>>>>> 5.4 kernel calls these "Q6V7", so keep the name. This is still worth
>>>>>> using with the "q6v5" driver because all other parts of the driver
>>>>>> can be seamlessly reused.
>>>>>>
>>>>>> The IPQ9574 uses two sets of clocks. the first, dubbed "q6_clocks"
>>>>>> must be enabled before the Q6 is started by writing the Q6SS_RST_EVB
>>>>>> register. The second set of clocks, "clks" should only be enabled
>>>>>> after the Q6 is placed out of reset. Otherwise, the host CPU core that
>>>>>> tries to start the remoteproc will hang.
>>>>>>
>>>>>> The downstream kernel had a funny comment, "Pray god and wait for
>>>>>> reset to complete", which I decided to keep for entertainment value.
>>>>>>
>>>>>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>>>>>> ---
>>>>>
>>>>> [...]
>>>>>
>>>>>> @@ -128,6 +137,12 @@ struct q6v5_wcss {
>>>>>>
>>>>>> struct clk *qdsp6ss_xo_cbcr;
>>>>>> struct clk *qdsp6ss_core_gfmux;
>>>>>> struct clk *lcc_bcr_sleep;
>>>>>>
>>>>>> + struct clk_bulk_data *clks;
>>>>>> + /* clocks that must be started before the Q6 is booted */
>>>>>> + struct clk_bulk_data *q6_clks;
>>>>>
>>>>> "pre_boot_clks" or something along those lines?
>>>>
>>>> I like "pre_boot_clocks".
>>>>
>>>>> In general i'm not super stoked to see another platform where manual and
>>>>> through-TZ bringup of remoteprocs is supposed to be supported in parallel..
>>>>>
>>>>> Are you sure your firmware doesn't allow you to just do a simple
>>>>> qcom_scm_pas_auth_and_reset() like in the multipd series?
>>>>
>>>> I am approaching this from the perspective of an aftermarket OS, like OpenWRT.
>>>> I don't know if the firmware will do the right thing. I can mitigate this for
>>>> OS-loaded firmware, like ath11k 16/m3 firmware, because I can test the driver
>>>> and firmware together. I can't do that for bootloader-loaded firmware, so I try
>>>> to depend on it as little as possible. I hope that native remoterproc loading
>>>> for IPQ9574 will be allowed.
>>>
>>> These are two parallel questions. I didn't even know that the bootloader
>>> preloaded firmware on these platforms (are you sure that's the case?)
>>>
>>> qcom_scm_pas_auth_and_reset() is usually preceded by qcom_mdt_pas_init() +
>>> qcom_mdt_load_no_init() where *you* supply the loadable firmware for the
>>> remote processor.
>>
>> What I mean is that the init sequence is implemented in the trustzone firmware which is loaded at boot time. Irrespective of what Q6 and M3 firmware I supply, if trustzone doesn't cooperate, I can't start the remoteproc. I don't have that problem when the init sequence is implemented in the kernel.
>
> The TZ will always "cooperate" in the sense that if you supply a valid set of
> loadable firmware files and allocate a chunk of memory, it will power up the
> remote processors. I wouldn't imagine any software release would have ever
> been approved with this not working (given the SCM call is marked available).
>
> It may also be that you have something else in mind, but I didn't quite catch
> your concern.
>
>>> The init sequence provided by this interface will be at worst identical to
>>> what you're proposing here (except abstracted out), and at best containing
>>> some fixes and/or workarounds that may be necessary.
>>
>> I think this portrays the TZ path as somehow superior. That's not how things work in my use casee.
>
> Indeed the sequence baked into the TZ is generally to be considered
> authoritative.
>
>> The bootloader/FW versions depends on when and who made the device. So while the newest TZ from upstream may have the latest fixes, I have no guarantee that they will be present on a given device at runtime. The best solution I found to get consistent behavior across devices is to do these sequences from the kernel. Is there something incomplete in my init sequence that I can fix?
>
> Because of the complexity of these systems, it's absolutely not inconceivable
> that a fix/workaround is only necessary/desired when coupled with a specific
> TZ (or other proprietary component, such as RPMh) firmware version (because
> many HW settings are co-dependent).
>
> I can not answer your last question.
>
>> > Please try using PAS and see if that works.
>>
>> I found the v6 of the multipd series [1]. It needed some minor adjustments to compile. I went as far as loading the Q6 firmware and starting the remoteproc without error. I did not test any further.
>
> Please give it a shot.
>
> Bjorn, Vignesh, do we see the multipd series going anywhere? It's been
> last posted in 2023..
Hi Konrad,
multipd series was dropped and replaced with WCSS secure PIL driver [1] which is
currently in v9. I see that except the actual driver itself, patch 3/6 in
the above series, other patches in this series has a R-b tag.
Once this gets reviewed, it should enable secure PIL loading using the TZ interface
for WCSS remoteprocs in IPQ5018/IPQ5332/IPQ9574.
[1] https://lore.kernel.org/linux-remoteproc/20260106105412.3529898-1-varadarajan.narayanan@oss.qualcomm.com/T/#t
>
> Konrad
next prev parent reply other threads:[~2026-01-07 18:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 4:34 [PATCH 1/9] dt-bindings: remoteproc: qcom,ipq8074-wcss-pil: convert to DT schema Alexandru Gagniuc
2025-12-19 4:34 ` [PATCH 2/9] dt-bindings: remoteproc: qcom: add IPQ9574 image loader Alexandru Gagniuc
2025-12-19 5:37 ` Rob Herring (Arm)
2025-12-19 14:44 ` Rob Herring
2025-12-20 8:54 ` Krzysztof Kozlowski
2025-12-23 19:45 ` Alex G.
2025-12-20 8:56 ` Krzysztof Kozlowski
2025-12-19 4:34 ` [PATCH 3/9] dt-bindings: clock: gcc-ipq9574: add wcss remoteproc clocks Alexandru Gagniuc
2025-12-19 4:34 ` [PATCH 4/9] arm64: dts: qcom: ipq9574: add wcss remoteproc nodes Alexandru Gagniuc
2025-12-19 13:43 ` Konrad Dybcio
2025-12-19 4:34 ` [PATCH 5/9] clk: qcom: gcc-ipq9574: add wcss remoteproc clocks Alexandru Gagniuc
2025-12-19 4:34 ` [PATCH 6/9] remoteproc: qcom_q6v5_wcss: support IPQ9574 Alexandru Gagniuc
2025-12-19 13:20 ` Konrad Dybcio
2025-12-23 20:21 ` Alex G.
2025-12-24 9:44 ` Vignesh Viswanathan
2025-12-24 17:36 ` Alex G.
2025-12-29 12:35 ` Konrad Dybcio
2026-01-05 16:09 ` mr.nuke.me
2026-01-05 17:57 ` Vignesh Viswanathan
2026-01-07 13:26 ` Konrad Dybcio
2026-01-07 18:25 ` Vignesh Viswanathan [this message]
2025-12-19 4:34 ` [PATCH 7/9] remoteproc: qcom_q6v5_wcss: support m3 firmware Alexandru Gagniuc
2025-12-19 13:29 ` Konrad Dybcio
2025-12-23 20:35 ` Alex G.
2025-12-29 12:37 ` Konrad Dybcio
2026-01-05 15:23 ` mr.nuke.me
2026-01-05 18:00 ` Vignesh Viswanathan
2026-01-07 11:55 ` Konrad Dybcio
2025-12-19 4:34 ` [PATCH 8/9] remoteproc: qcom_q6v5_wcss: drop unused clocks from q6v5 struct Alexandru Gagniuc
2025-12-19 13:31 ` Konrad Dybcio
2025-12-19 4:34 ` [PATCH 9/9] remoteproc: qcom_q6v5_wcss: use bulk clk API for q6 clocks in QCS404 Alexandru Gagniuc
2025-12-19 14:52 ` [PATCH 1/9] dt-bindings: remoteproc: qcom,ipq8074-wcss-pil: convert to DT schema Krzysztof Kozlowski
2025-12-20 18:40 ` Alex G.
2025-12-19 16:49 ` Rob Herring
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=21468f66-56df-43ea-99c2-7257d8d6bb7c@oss.qualcomm.com \
--to=vignesh.viswanathan@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mr.nuke.me@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=varadarajan.narayanan@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