Repository navigation
Nord: add ADSP1/2 remoteproc support - #1621
Salendarsingh Gaud (sgaud-quic) merged 15 commits into
Conversation
…bles Nord's HPASS audio subsystem has three QDSP6 instances, ADSP0/1/2, each with its own independent QDSP6SS block and its own Peripheral Authentication Service image. Add the compatible strings for the two that are not yet described. The instances are not interchangeable: the shared HPASS resources (CRM_COMMON clock/reset and the AG_NOC bridge) are owned by ADSP0, which initializes them before ADSP1/ADSP2 can boot. That asymmetry is inherent to each instance rather than to the board, so it is expressed by the compatible alone and needs no additional property. Link: https://lore.kernel.org/r/20261201070137.360878-2-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit 89249521c783d7ab15b44f057cd2ff9765b4b03c)
Some Qualcomm SoCs group multiple remote processors into a cluster (e.g. Nord's ADSP0/1/2, which share HPASS-domain PLLs, AG_NOC, RSCp and other resources owned by ADSP0). Firmware on these clusters cannot tolerate the peer-shutdown notifications that qcom_sysmon and qcom_glink_ssr send between independently started/stopped remote processors. Add an opaque cluster identifier to struct rproc so that those notification paths, which live in different subsystems (remoteproc and rpmsg), can recognize siblings in the same cluster and suppress notifications between them, without introducing a module dependency between the two subsystems. Link: https://lore.kernel.org/r/20261201070137.360878-3-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit 56f3bd9d8f00c3d6630ca040f3ca2d7a68816231)
…iblings Firmware on clustered remote processors (e.g. Nord's HPASS ADSP0/1/2) cannot handle the SSCTL peer-shutdown notification sysmon sends whenever a sibling in the same cluster starts or stops, and the QMI request instead times out. Skip sysmon_notify() when the notifying and the notified instance share the cluster identifier their owning rproc driver put in rproc->cluster. The suppression is done on the receiving side, so that a cluster member keeps notifying, and being notified by, remote processors outside its cluster. Instances whose rproc has no cluster set are completely unaffected. sysmon_start() also bypasses the notifier chain: once an instance is up, it walks sysmon_list and sends the newly started remote processor the state of every other instance that is already running. Apply the same check there, so that a member started after its siblings, as dependent members always are, isn't told about them either. Link: https://lore.kernel.org/r/20261201070137.360878-4-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit de7d4a27817a1dd5c9b13b737160c7ec72d7dc65)
…ter siblings Like qcom_sysmon's SSCTL notify, clustered remote processors (e.g. Nord's HPASS ADSP0/1/2) cannot handle the glink_ssr DO_CLEANUP broadcast sent to siblings whenever one of them starts or stops, leaving qcom_glink_ssr_notifier_call() to time out waiting for CLEANUP_DONE. Pass the stopping remoteproc's cluster identifier through qcom_glink_ssr_notify(), and plumb each edge's own cluster identifier down from the remoteproc that registers it, so that qcom_glink_ssr_notifier_call() can skip the DO_CLEANUP send when the sender and the receiving edge share a cluster. As in qcom_sysmon, the suppression is done on the receiving side, so that a cluster member keeps sending DO_CLEANUP to, and receiving it from, remote processors outside its cluster. Edges with no cluster set are unaffected. The receiving edge's identifier is carried in struct qcom_glink rather than looked up from the rproc that owns it, so that glink_ssr does not have to reach into struct remoteproc: RPMSG_QCOM_GLINK does not depend on REMOTEPROC, and the identifier is deliberately opaque to keep the two subsystems independent of each other. Link: https://lore.kernel.org/r/20261201070137.360878-5-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit 373cbd0b98938fa0602f5bdf7b9767acfeb4686f)
On Nord, ADSP0/1/2 share HPASS-domain resources (PLLs, AG_NOC, RSCp, CESTA, THROTTLE, QTMR) owned by ADSP0, and their firmware cannot tolerate one member being started or stopped independently of the others. Modeling that requires each PAS instance to know which other instances it is grouped with. None of the shared resources are visible to the OS: they are programmed by TZ on the owning DSP's behalf as part of authenticating and booting its image, and the AP has no clock, reset or interconnect handle on any of them. So the grouping cannot be expressed by having each member reference the shared providers and letting the clk, reset and ICC frameworks refcount them, as it would be for resources Linux drives itself. It also is not a board property, being fixed by the SoC's HPASS design, so it comes from the compatible. Add a small registry of clusters, keyed by a static per-cluster descriptor referenced from the qcom_pas_data of every member, and join it at probe. Which instance owns the shared resources is likewise inherent to the instance, and comes from the same descriptor. Publish the cluster in rproc->cluster, which is all sysmon and glink_ssr need to stop notifying siblings of each other's SSR events. The cluster is left only after rproc_del() has stopped this member, so that the suppression is still in effect for that stop, and is unwound on every probe error path, since a member freed while still linked into the cluster would be walked by its siblings. Instances whose descriptor names no cluster are completely unaffected: qcom_pas.cluster stays NULL for them. Link: https://lore.kernel.org/r/20261201070137.360878-6-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit aa50958d3decf915ab27310d32d052c7b6c6e8bb)
…t-first The cluster root owns the HPASS resources shared with its siblings and initializes them as part of its own boot, so ADSP1/ADSP2 can only cold boot once ADSP0 is up. Booting a dependent member first leaves it without the clocks, resets and NoC configuration it needs. Gate a dependent member's qcom_pas_start() on the root having started. The root being enabled in DT does not imply it has already bound, as probe order between the two is not guaranteed, so fail the boot if the root has not bound rather than dereferencing it. If the root has bound but is not running yet, wait briefly on a completion the root signals from its own qcom_pas_start(), so that a member racing the root through a restart does not fail outright. The completion is signaled by the root's successful start or attach, and only cleared again once the root's own qcom_pas_stop() runs. It starts out cleared, so that a dependent member cold booted alongside the root, e.g. with both auto-booting, still waits for it. A root that has crashed but whose recovery has not stopped it yet leaves the completion signaled, so a dependent member observing it fails on the root's RPROC_CRASHED state instead. The state check cannot be RPROC_RUNNING, as the root signals the completion from its ops->start, before the remoteproc core marks it running. The wait is bounded at 10 s, enough for a whole root boot, which may spend up to 5 s in qcom_q6v5_wait_for_start() alone. Link: https://lore.kernel.org/r/20261201070137.360878-7-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit 64fae3fc079ad71b29273887cd386bc8de026331)
… ADSP clusters The firmware of a Nord HPASS ADSP cluster cannot tolerate one member being stopped or restarted independently of the others: doing so leaves sysmon/glink_ssr notify requests to siblings timing out, and the whole cluster unable to recover without manually stopping all three and restarting them in dependency order. Coordinate an explicit stop or crash of any member across the whole cluster in two phases, since hardware testing showed that whichever member's PAS/TZ hardware power-off happens chronologically last always fails its own graceful shutdown ack (both the sysmon SSCTL QMI ack and the SMEM-bit/IRQ ack), regardless of whether that member is the cluster root. Phase 1 fans the stop out to every participant concurrently via a per-member work item and waits, at a barrier, for every participant to finish requesting and awaiting its own graceful ack while the whole cluster is still fully powered. Only once every participant has cleared the barrier does phase 2 let each of them proceed to its actual PAS/TZ hardware power-off, so no member is ever asking firmware to ack a shutdown after a sibling's hardware is already gone. The fan-out has to be deferred to a work item rather than calling rproc_shutdown() inline, because qcom_pas_stop() runs with the remoteproc core holding the stopping member's own rproc->lock, and reaching for a sibling's rproc->lock from inside that critical section would risk an ABBA deadlock against a concurrent operation on that sibling. Membership in a round is decided once, by qcom_pas_cluster_member_stops(), and recorded per member, so that the participant count and the two counters it seeds can never diverge. The crashed member that triggered the round is a participant even though its rproc->state is still RPROC_CRASHED -- the core only sets RPROC_OFFLINE after ops->stop() returns. So is a sibling that crashed concurrently: its own recovery drives it through qcom_pas_stop() and thus the barrier, and leaving it out would let it power off unsynchronized and start again while the root is still being torn down. Such a sibling is neither stopped by a work item, which would drop the power reference its recovery holds, nor restarted by the cascade, which would boot it twice. A participant whose work item does not get it into qcom_pas_stop() after all, because rproc_shutdown() only dropped one of several power references, or because the member is being removed and the work item was cancelled, is withdrawn from the round, so that the rest of the cluster is not left waiting for it. On a crash, cascade the stop the same way but also auto-restart the whole cluster root-first once every participant has fully powered off, reusing the root_booted completion to keep non-root members' qcom_pas_start() from racing ahead of the root's boot. The members to restart are marked when the round starts, and the cascade picks them one at a time under the cluster lock, as membership may change while it runs. An explicit stop leaves the ordered restart to users or higher-level policy. Instances whose descriptor names no cluster are completely unaffected, since qcom_pas.cluster stays NULL for them. Link: https://lore.kernel.org/r/20261201070137.360878-8-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit bea47eec1903247319bd408fd5cbd05e9b1a21bc)
Add support for the additional Hexagon ADSP cores on Nord, adsp1 and adsp2, which sit alongside the existing adsp0 in HPASS. The three form a cluster: TZ programs the resources they share while booting adsp0's image, so adsp0 has to boot first and none of the three can be stopped while another still runs. Point all three descriptors at a common cluster descriptor, marking adsp0 as the owner, which is what the cluster sequencing and coupled-stop code keys off. Link: https://lore.kernel.org/r/20261201070137.360878-9-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit bf5c88ed4d0ccf49f57ac066cb6d794a649de1ed)
Nord has three ADSP instances. Add labels for adsp1 and adsp2. Link: https://lore.kernel.org/r/20261201090219.414376-1-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit c26b598a79bed0057cec01da226d73d304c0fd2d)
Add device tree nodes to support ADSP1/2 which share HPASS clock/reset/NoC resources with ADSP0 and must boot after it. The cluster relationship and ADSP0's ownership of the shared resources are implied by the per-instance compatibles, so no additional property is needed. Link: https://lore.kernel.org/r/20261201091727.415871-2-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit ebbec70898520fb9e8313b762d5837b5bb8e0cd4)
Enable ADSP1 and ADSP2 remoteproc on the Nord RRD board. Link: https://lore.kernel.org/r/20261201091727.415871-3-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit babb1f09ab14792d712ebe2810cd05dc509ed47d)
…proc Enable ADSP1 and ADSP2 remoteproc on the Nord Ride Embedded board. Link: https://lore.kernel.org/r/20261201091727.415871-4-shengchao.guo@oss.qualcomm.com Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit d9f9a21cae22ac8d05e499098d763f9eaae4c1b2)
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
PR #1621 — validate-patchPR: #1621
Final Summary
|
PR #1621 — checker-log-analyzerPR: #1621
Detailed report: Full report
|
4bb95a9 to
d79f9a2
Compare
…erlay ADSP1 and ADSP2 remoteproc nodes are now enabled on Nord boards. When Linux boots at EL2 without the hypervisor, it owns the SMMU and has to describe the firmware streams of these remote processors as well, just like the ADSP, CDSPs and SoCCP already covered by the overlay. Add the iommus for ADSP1 (SID 0x0a08) and ADSP2 (SID 0x0a30) on apps_smmu_0. Link: https://lore.kernel.org/r/20261203-nord_soccp_el2_dt_change-v2-2-93a7dfcae3e0@oss.qualcomm.com Signed-off-by: Anurag Pateriya <anurag.pateriya@oss.qualcomm.com>
The RRD v1.1 board ships chip IQ10800MD-AD which has ADSP2 opted out. Disable ADSP2 remoteproc to get it working on this board. This caps ADSP number for all RRD boards including those with a chip that has ADSP2 available. A proper solution should be on the bootloader side to pass the correct DTB to kernel. Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> (cherry picked from commit 4474d1b07d65079b021a43b46a469032e9345440) Signed-off-by: Anurag Pateriya <anurag.pateriya@oss.qualcomm.com>
d79f9a2 to
a35675d
Compare
Test resultsWorkflow run: 47078071126 attempt 1 Known failures configured: 0
Test Matrix
|
a35675d to
8447606
Compare
PR #1621 — validate-patchPR: #1621
Final Summary
|
PR #1621 — checker-log-analyzerPR: #1621
Detailed report: Full report
|
When Linux runs at EL2 on Nord, the EL2 overlay assigns an SMMU stream ID to each Hexagon DSP through the iommus property. The binding does not document iommus and sets unevaluatedProperties: false, so dtbs_check rejects every enabled DSP node in the EL2 DTBs. Allow a single iommus entry for all Nord PAS remoteprocs. Fixes: 5b8a0dc ("dt-bindings: remoteproc: qcom,nord-pas: Document Nord PAS") Signed-off-by: Anurag Pateriya <anurag.pateriya@oss.qualcomm.com>
8447606 to
5e5fcc3
Compare
PR #1621 — validate-patchPR: #1621
Final Summary
|
PR #1621 — checker-log-analyzerPR: #1621
Detailed report: Full report
|
|
Boot validation Lava job : https://lava.infra.foundries.io/scheduler/job/659891 |
b096643
into
qualcomm-linux:qcom-7.3-es
Test resultsWorkflow run: 47133968951 attempt 1 Known failures configured: 0
Test Matrix
|
Test resultsWorkflow run: 47133735944 attempt 1 Known failures configured: 0
Test Matrix
|
Test resultsWorkflow run: 47142895679 attempt 1 Known failures configured: 0
Test Matrix
|
Test resultsWorkflow run: 47147329322 attempt 1 Known failures configured: 0
Test Matrix
|
LAVA Failed Case Triage SummaryPR: #1621 Job 308488 | SoC iq10-nordLAVA job: https://lava-oss.qualcomm.com/scheduler/job/308488 No failed cases detected from the LAVA results section. |
Backport of Shawn Guo's Nord ADSP1/2 series from kernel-topics early/hwe/nord-next (cherry-picked with -x).