* [PATCH v4 1/7] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-11 6:19 ` Krzysztof Kozlowski
2026-03-10 10:03 ` [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common Jingyi Wang
` (5 subsequent siblings)
6 siblings, 1 reply; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang
Items in qcom,adsp.yaml have common clock and interrupt properties, move
these out of the allOf section to avoid list the compatible repeatly.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
.../devicetree/bindings/remoteproc/qcom,adsp.yaml | 64 +++++-----------------
1 file changed, 14 insertions(+), 50 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
index 16a245fe2738..a270834605da 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
@@ -32,6 +32,14 @@ properties:
reg:
maxItems: 1
+ clocks:
+ items:
+ - description: XO clock
+
+ clock-names:
+ items:
+ - const: xo
+
cx-supply: true
px-supply:
@@ -49,6 +57,12 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ maxItems: 5
+
+ interrupt-names:
+ maxItems: 5
+
required:
- compatible
- memory-region
@@ -57,56 +71,6 @@ unevaluatedProperties: false
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8226-adsp-pil
- - qcom,msm8953-adsp-pil
- - qcom,msm8974-adsp-pil
- - qcom,msm8996-adsp-pil
- - qcom,msm8996-slpi-pil
- - qcom,msm8998-adsp-pas
- - qcom,msm8998-slpi-pas
- - qcom,sdm660-adsp-pas
- - qcom,sdm660-cdsp-pas
- - qcom,sdm845-adsp-pas
- - qcom,sdm845-cdsp-pas
- - qcom,sdm845-slpi-pas
- then:
- properties:
- clocks:
- items:
- - description: XO clock
- clock-names:
- items:
- - const: xo
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8226-adsp-pil
- - qcom,msm8953-adsp-pil
- - qcom,msm8974-adsp-pil
- - qcom,msm8996-adsp-pil
- - qcom,msm8996-slpi-pil
- - qcom,msm8998-adsp-pas
- - qcom,msm8998-slpi-pas
- - qcom,sdm660-adsp-pas
- - qcom,sdm660-cdsp-pas
- - qcom,sdm845-adsp-pas
- - qcom,sdm845-cdsp-pas
- - qcom,sdm845-slpi-pas
- then:
- properties:
- interrupts:
- maxItems: 5
- interrupt-names:
- maxItems: 5
-
- if:
properties:
compatible:
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 1/7] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml
2026-03-10 10:03 ` [PATCH v4 1/7] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml Jingyi Wang
@ 2026-03-11 6:19 ` Krzysztof Kozlowski
0 siblings, 0 replies; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:19 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:17AM -0700, Jingyi Wang wrote:
> Items in qcom,adsp.yaml have common clock and interrupt properties, move
> these out of the allOf section to avoid list the compatible repeatly.
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 64 +++++-----------------
> 1 file changed, 14 insertions(+), 50 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
2026-03-10 10:03 ` [PATCH v4 1/7] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-11 6:31 ` Krzysztof Kozlowski
2026-03-13 1:38 ` Dmitry Baryshkov
2026-03-10 10:03 ` [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common Jingyi Wang
` (4 subsequent siblings)
6 siblings, 2 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang
Move interrupts and interrupt-names list out of pas-common since they
will be redefined differently for Kaanapali SoCCP.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
.../devicetree/bindings/remoteproc/qcom,adsp.yaml | 14 ++++++++++++--
.../bindings/remoteproc/qcom,milos-pas.yaml | 18 ++++++++++++++----
.../bindings/remoteproc/qcom,pas-common.yaml | 16 ++--------------
.../bindings/remoteproc/qcom,qcs404-pas.yaml | 14 ++++++++++++--
.../bindings/remoteproc/qcom,sa8775p-pas.yaml | 14 ++++++++++++--
.../bindings/remoteproc/qcom,sc7180-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sc8280xp-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sdx55-pas.yaml | 16 ++++++++++++++--
.../bindings/remoteproc/qcom,sm6115-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sm6350-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sm6375-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sm8150-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sm8350-pas.yaml | 20 ++++++++++++++++++++
.../bindings/remoteproc/qcom,sm8550-pas.yaml | 20 ++++++++++++++++++++
14 files changed, 226 insertions(+), 26 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
index a270834605da..16c35e15ee1b 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
@@ -58,10 +58,20 @@ properties:
description: Firmware name for the Hexagon core
interrupts:
- maxItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
interrupt-names:
- maxItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
required:
- compatible
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
index c47d97004b33..f8e1b2b8e782 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
@@ -33,12 +33,22 @@ properties:
- const: xo
interrupts:
- minItems: 6
- maxItems: 6
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
interrupt-names:
- minItems: 6
- maxItems: 6
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
qcom,qmp:
$ref: /schemas/types.yaml#/definitions/phandle
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
index 68c17bf18987..dc5a9981c12c 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
@@ -26,23 +26,11 @@ properties:
interrupts:
minItems: 5
- items:
- - description: Watchdog interrupt
- - description: Fatal interrupt
- - description: Ready interrupt
- - description: Handover interrupt
- - description: Stop acknowledge interrupt
- - description: Shutdown acknowledge interrupt
+ maxItems: 6
interrupt-names:
minItems: 5
- items:
- - const: wdog
- - const: fatal
- - const: ready
- - const: handover
- - const: stop-ack
- - const: shutdown-ack
+ maxItems: 6
iommus:
maxItems: 1
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
index ad45fd00ae34..5854b3d2041d 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
@@ -32,10 +32,20 @@ properties:
- const: xo
interrupts:
- maxItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
interrupt-names:
- maxItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
power-domains: false
power-domain-names: false
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
index 188a25194000..4c6d32b1031c 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
@@ -60,10 +60,20 @@ properties:
- description: Memory region for main Firmware authentication
interrupts:
- maxItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
interrupt-names:
- maxItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
required:
- compatible
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
index 66b455d0a8e3..cb0a61fc301d 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
@@ -48,6 +48,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
index 5dbda3a55047..c51010493bca 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
@@ -45,6 +45,26 @@ properties:
$ref: /schemas/types.yaml#/definitions/string
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
index 5d463272165f..381ece510b0f 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
@@ -30,10 +30,22 @@ properties:
- const: xo
interrupts:
- minItems: 6
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
interrupt-names:
- minItems: 6
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
power-domains:
items:
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
index eeb6a8aafeb9..987fac433fae 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
@@ -51,6 +51,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
index c1a3cc308bdb..53ffb1ccd199 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
@@ -45,6 +45,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
index 7286b2baa19f..6823a2a8d74e 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
@@ -39,6 +39,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
smd-edge: false
required:
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
index a8cddf7e2fe1..8a1fae095a3b 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
@@ -61,6 +61,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
index 6d09823153fc..4ea7518db537 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
@@ -55,6 +55,26 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
index b117c82b057b..d93e17fb5e89 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
@@ -72,6 +72,26 @@ properties:
- description: DSM Memory region 2
- description: Memory region for Qlink Logging
+ interrupts:
+ minItems: 5
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Shutdown acknowledge interrupt
+
+ interrupt-names:
+ minItems: 5
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: shutdown-ack
+
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common
2026-03-10 10:03 ` [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common Jingyi Wang
@ 2026-03-11 6:31 ` Krzysztof Kozlowski
2026-03-13 1:38 ` Dmitry Baryshkov
1 sibling, 0 replies; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:31 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:18AM -0700, Jingyi Wang wrote:
> Move interrupts and interrupt-names list out of pas-common since they
> will be redefined differently for Kaanapali SoCCP.
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,milos-pas.yaml | 18 ++++++++++++++----
> .../bindings/remoteproc/qcom,pas-common.yaml | 16 ++--------------
> .../bindings/remoteproc/qcom,qcs404-pas.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,sa8775p-pas.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,sc7180-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sc8280xp-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sdx55-pas.yaml | 16 ++++++++++++++--
> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm6350-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm6375-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8150-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8350-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8550-pas.yaml | 20 ++++++++++++++++++++
> 14 files changed, 226 insertions(+), 26 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common
2026-03-10 10:03 ` [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common Jingyi Wang
2026-03-11 6:31 ` Krzysztof Kozlowski
@ 2026-03-13 1:38 ` Dmitry Baryshkov
2026-03-19 4:37 ` Jingyi Wang
1 sibling, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-13 1:38 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:18AM -0700, Jingyi Wang wrote:
> Move interrupts and interrupt-names list out of pas-common since they
> will be redefined differently for Kaanapali SoCCP.
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,milos-pas.yaml | 18 ++++++++++++++----
> .../bindings/remoteproc/qcom,pas-common.yaml | 16 ++--------------
> .../bindings/remoteproc/qcom,qcs404-pas.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,sa8775p-pas.yaml | 14 ++++++++++++--
> .../bindings/remoteproc/qcom,sc7180-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sc8280xp-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sdx55-pas.yaml | 16 ++++++++++++++--
> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm6350-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm6375-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8150-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8350-pas.yaml | 20 ++++++++++++++++++++
> .../bindings/remoteproc/qcom,sm8550-pas.yaml | 20 ++++++++++++++++++++
> 14 files changed, 226 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
> index 66b455d0a8e3..cb0a61fc301d 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
> @@ -48,6 +48,26 @@ properties:
> maxItems: 1
> description: Firmware name for the Hexagon core
>
> + interrupts:
> + minItems: 5
Initially I stumled upon this (and dropped a note in the other email
that I noticed a problem with the series). This minItems looked like the
underspecified property, buf after checking it seems that this schema is
written in a way that covers DSPs having both 5 and 6 interrupts.
So... most likely the schemas for DSPs might be reworked / optimized to
cover modems separately from the other DSPs, but it's a separate topic.
Let's settle on the SoCCP topic first.
> + items:
> + - description: Watchdog interrupt
> + - description: Fatal interrupt
> + - description: Ready interrupt
> + - description: Handover interrupt
> + - description: Stop acknowledge interrupt
> + - description: Shutdown acknowledge interrupt
> +
> + interrupt-names:
> + minItems: 5
> + items:
> + - const: wdog
> + - const: fatal
> + - const: ready
> + - const: handover
> + - const: stop-ack
> + - const: shutdown-ack
> +
> required:
> - compatible
> - reg
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common
2026-03-13 1:38 ` Dmitry Baryshkov
@ 2026-03-19 4:37 ` Jingyi Wang
0 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 4:37 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On 3/13/2026 9:38 AM, Dmitry Baryshkov wrote:
> On Tue, Mar 10, 2026 at 03:03:18AM -0700, Jingyi Wang wrote:
>> Move interrupts and interrupt-names list out of pas-common since they
>> will be redefined differently for Kaanapali SoCCP.
>>
>> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
>> ---
>> .../devicetree/bindings/remoteproc/qcom,adsp.yaml | 14 ++++++++++++--
>> .../bindings/remoteproc/qcom,milos-pas.yaml | 18 ++++++++++++++----
>> .../bindings/remoteproc/qcom,pas-common.yaml | 16 ++--------------
>> .../bindings/remoteproc/qcom,qcs404-pas.yaml | 14 ++++++++++++--
>> .../bindings/remoteproc/qcom,sa8775p-pas.yaml | 14 ++++++++++++--
>> .../bindings/remoteproc/qcom,sc7180-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sc8280xp-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sdx55-pas.yaml | 16 ++++++++++++++--
>> .../bindings/remoteproc/qcom,sm6115-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sm6350-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sm6375-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sm8150-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sm8350-pas.yaml | 20 ++++++++++++++++++++
>> .../bindings/remoteproc/qcom,sm8550-pas.yaml | 20 ++++++++++++++++++++
>> 14 files changed, 226 insertions(+), 26 deletions(-)
>>
>
>
>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
>> index 66b455d0a8e3..cb0a61fc301d 100644
>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
>> @@ -48,6 +48,26 @@ properties:
>> maxItems: 1
>> description: Firmware name for the Hexagon core
>>
>> + interrupts:
>> + minItems: 5
Hi Dmitry,
>
> Initially I stumled upon this (and dropped a note in the other email
> that I noticed a problem with the series). This minItems looked like the
> underspecified property, buf after checking it seems that this schema is
> written in a way that covers DSPs having both 5 and 6 interrupts.
>
> So... most likely the schemas for DSPs might be reworked / optimized to
> cover modems separately from the other DSPs, but it's a separate topic.
> Let's settle on the SoCCP topic first.
>
Per my understanding, we can continue with the current change for soccp binding?
Thanks,
Jingyi
>> + items:
>> + - description: Watchdog interrupt
>> + - description: Fatal interrupt
>> + - description: Ready interrupt
>> + - description: Handover interrupt
>> + - description: Stop acknowledge interrupt
>> + - description: Shutdown acknowledge interrupt
>> +
>> + interrupt-names:
>> + minItems: 5
>> + items:
>> + - const: wdog
>> + - const: fatal
>> + - const: ready
>> + - const: handover
>> + - const: stop-ack
>> + - const: shutdown-ack
>> +
>> required:
>> - compatible
>> - reg
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
2026-03-10 10:03 ` [PATCH v4 1/7] dt-bindings: remoteproc: qcom: cleanup qcom,adsp.yaml Jingyi Wang
2026-03-10 10:03 ` [PATCH v4 2/7] dt-bindings: remoteproc: qcom: move interrupts and interrupt-names list out of pas-common Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-11 6:22 ` Krzysztof Kozlowski
2026-03-10 10:03 ` [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms Jingyi Wang
` (3 subsequent siblings)
6 siblings, 1 reply; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang
Kaanapali SoCCP will extend the list for smem properties, add SMEM
properties "qcom,smem-states" and "qcom,smem-state-names" to documents
that reference to pas-common and add maxItems constraints.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml | 8 ++++++++
.../devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml | 8 ++++++++
.../devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml | 8 ++++++++
Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 8 ++++++++
13 files changed, 104 insertions(+)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
index 16c35e15ee1b..7e8ecae8e6cb 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
@@ -73,6 +73,14 @@ properties:
- const: handover
- const: stop-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- memory-region
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
index f8e1b2b8e782..b24e6f6eaf37 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml
@@ -68,6 +68,14 @@ properties:
- description: Memory region for core Firmware authentication
- description: Memory region for Devicetree Firmware authentication
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
index 5854b3d2041d..bf9bf1af9ff1 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml
@@ -59,6 +59,14 @@ properties:
maxItems: 1
description: Firmware name for the Hexagon core
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
index 4c6d32b1031c..6cc2f4b700e0 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml
@@ -75,6 +75,14 @@ properties:
- const: handover
- const: stop-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
index cb0a61fc301d..b20780e5e26b 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
@@ -68,6 +68,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
index c51010493bca..86ae0ae4864b 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
@@ -65,6 +65,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
index 381ece510b0f..0b38194c0781 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml
@@ -71,6 +71,14 @@ properties:
$ref: /schemas/types.yaml#/definitions/string
description: Firmware name for the Hexagon core
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
index 987fac433fae..454ba82bd6f1 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml
@@ -71,6 +71,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
index 53ffb1ccd199..42e02c64347a 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml
@@ -65,6 +65,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
index 6823a2a8d74e..274f87880e2e 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6375-pas.yaml
@@ -61,6 +61,14 @@ properties:
smd-edge: false
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
index 8a1fae095a3b..5a7c5f8c92d1 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml
@@ -81,6 +81,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
index 4ea7518db537..72d0db5698c5 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml
@@ -75,6 +75,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
index d93e17fb5e89..f4832c2930ee 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
@@ -92,6 +92,14 @@ properties:
- const: stop-ack
- const: shutdown-ack
+ qcom,smem-states:
+ maxItems: 1
+ description: States used by the AP to signal the Hexagon core
+
+ qcom,smem-state-names:
+ maxItems: 1
+ description: The names of the state bits used for SMP2P output
+
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common
2026-03-10 10:03 ` [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common Jingyi Wang
@ 2026-03-11 6:22 ` Krzysztof Kozlowski
2026-03-19 4:38 ` Jingyi Wang
0 siblings, 1 reply; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:22 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:19AM -0700, Jingyi Wang wrote:
> Kaanapali SoCCP will extend the list for smem properties, add SMEM
> properties "qcom,smem-states" and "qcom,smem-state-names" to documents
> that reference to pas-common and add maxItems constraints.
This change is no-op. pas-common already defines all this.
This should be squashed with the change changing pas-common.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common
2026-03-11 6:22 ` Krzysztof Kozlowski
@ 2026-03-19 4:38 ` Jingyi Wang
0 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 4:38 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On 3/11/2026 2:22 PM, Krzysztof Kozlowski wrote:
> On Tue, Mar 10, 2026 at 03:03:19AM -0700, Jingyi Wang wrote:
>> Kaanapali SoCCP will extend the list for smem properties, add SMEM
>> properties "qcom,smem-states" and "qcom,smem-state-names" to documents
>> that reference to pas-common and add maxItems constraints.
>
> This change is no-op. pas-common already defines all this.
>
> This should be squashed with the change changing pas-common.
>
> Best regards,
> Krzysztof
>
Well noted.
Thanks,
Jingyi
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
` (2 preceding siblings ...)
2026-03-10 10:03 ` [PATCH v4 3/7] dt-bindings: remoteproc: qcom: Add smem properties in documents that reference to pas-common Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-11 2:04 ` Dmitry Baryshkov
2026-03-11 6:32 ` Krzysztof Kozlowski
2026-03-10 10:03 ` [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add() Jingyi Wang
` (2 subsequent siblings)
6 siblings, 2 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang
Document the component used to boot SoCCP on Kaanapali SoC and add
compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
.../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
.../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
2 files changed, 159 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,kaanapali-soccp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,kaanapali-soccp-pas.yaml
new file mode 100644
index 000000000000..ce18460a949f
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,kaanapali-soccp-pas.yaml
@@ -0,0 +1,154 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/remoteproc/qcom,kaanapali-soccp-pas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Kaanapali SoCCP Peripheral Authentication Service
+
+maintainers:
+ - Jingyi Wang <jingyi.wang@oss.qualcomm.com>
+
+description:
+ The SoC Control Processor (SoCCP) is a small RISC-V MCU that controls USB
+ Type-C, battery charging and various other functions on Qualcomm SoCs, somewhat
+ analogous to traditional PC Embedded Controllers. This document describes
+ the Peripheral Authentication Service that loads and boots firmware for SoCCP.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - qcom,glymur-soccp-pas
+ - const: qcom,kaanapali-soccp-pas
+ - enum:
+ - qcom,kaanapali-soccp-pas
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: XO clock
+
+ clock-names:
+ items:
+ - const: xo
+
+ power-domains:
+ items:
+ - description: CX power domain
+ - description: MX power domain
+
+ power-domain-names:
+ items:
+ - const: cx
+ - const: mx
+
+ firmware-name:
+ items:
+ - description: Firmware name of the SoC Control Processor
+ - description: Firmware name of the SoCCP Devicetree
+
+ memory-region:
+ items:
+ - description: Memory region for main Firmware authentication
+ - description: Memory region for Devicetree Firmware authentication
+
+ interrupts:
+ items:
+ - description: Watchdog interrupt
+ - description: Fatal interrupt
+ - description: Ready interrupt
+ - description: Handover interrupt
+ - description: Stop acknowledge interrupt
+ - description: Pong interrupt
+
+ interrupt-names:
+ items:
+ - const: wdog
+ - const: fatal
+ - const: ready
+ - const: handover
+ - const: stop-ack
+ - const: pong
+
+ qcom,smem-states:
+ minItems: 2
+ description: States used by the AP to signal the SoC Control Processor
+
+ qcom,smem-state-names:
+ minItems: 2
+ description: The names of the state bits used for SMP2P output
+
+required:
+ - compatible
+ - reg
+ - memory-region
+ - power-domains
+ - power-domain-names
+
+allOf:
+ - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/mailbox/qcom-ipcc.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+ #define IPCC_MPROC_SOCCP
+
+ remoteproc@d00000 {
+ compatible = "qcom,kaanapali-soccp-pas";
+ reg = <0x00d00000 0x200000>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ interrupts-extended = <&intc GIC_SPI 167 IRQ_TYPE_EDGE_RISING>,
+ <&soccp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&soccp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&soccp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&soccp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+ <&soccp_smp2p_in 9 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack",
+ "pong";
+
+ memory-region = <&soccp_mem>,
+ <&soccp_dtb_mem_mem>;
+
+ firmware-name = "qcom/kaanapali/soccp.mbn",
+ "qcom/kaanapali/soccp_dtb.mbn";
+
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MX>;
+ power-domain-names = "cx",
+ "mx";
+
+ qcom,smem-states = <&soccp_smp2p_out 0>,
+ <&soccp_smp2p_out 8>;
+ qcom,smem-state-names = "stop",
+ "ping";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_MPROC_SOCCP
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&ipcc IPCC_MPROC_SOCCP
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ label = "soccp";
+ qcom,remote-pid = <19>;
+
+ /* ... */
+ };
+ };
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
index dc5a9981c12c..e81ef400555a 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
@@ -46,13 +46,17 @@ properties:
qcom,smem-states:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: States used by the AP to signal the Hexagon core
+ minItems: 1
items:
- - description: Stop the modem
+ - description: Stop the remoteproc
+ - description: ping the remoteproc
qcom,smem-state-names:
description: The names of the state bits used for SMP2P output
+ minItems: 1
items:
- const: stop
+ - const: ping
smd-edge:
$ref: /schemas/remoteproc/qcom,smd-edge.yaml#
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-10 10:03 ` [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms Jingyi Wang
@ 2026-03-11 2:04 ` Dmitry Baryshkov
2026-03-11 6:26 ` Krzysztof Kozlowski
2026-03-11 6:32 ` Krzysztof Kozlowski
1 sibling, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-11 2:04 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
> Document the component used to boot SoCCP on Kaanapali SoC and add
> compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
> the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
> .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
> 2 files changed, 159 insertions(+), 1 deletion(-)
With all the changes to pas-common, what is being left in it? Would it
be easier to leave it as is for the traditional DSPs and copy necessary
functionality into the soccp schema?
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-11 2:04 ` Dmitry Baryshkov
@ 2026-03-11 6:26 ` Krzysztof Kozlowski
2026-03-12 4:53 ` Dmitry Baryshkov
0 siblings, 1 reply; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:26 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jingyi Wang, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Wed, Mar 11, 2026 at 04:04:09AM +0200, Dmitry Baryshkov wrote:
> On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
> > Document the component used to boot SoCCP on Kaanapali SoC and add
> > compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
> > the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
> >
> > Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> > ---
> > .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
> > .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
> > 2 files changed, 159 insertions(+), 1 deletion(-)
>
> With all the changes to pas-common, what is being left in it? Would it
You need place for definition of properties - smd/glink-edge and
qcom,smem-states. The latter is actually not properly defined in one
place, becuse there are bindings having it but not refencing
pas-common.
It can also define common order of interrupts, but as you pointed out
this does not work for this new device anymore.
> be easier to leave it as is for the traditional DSPs and copy necessary
> functionality into the soccp schema?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-11 6:26 ` Krzysztof Kozlowski
@ 2026-03-12 4:53 ` Dmitry Baryshkov
2026-03-12 16:08 ` Krzysztof Kozlowski
0 siblings, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-12 4:53 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jingyi Wang, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
gn Wed, Mar 11, 2026 at 07:26:38AM +0100, Krzysztof Kozlowski wrote:
> On Wed, Mar 11, 2026 at 04:04:09AM +0200, Dmitry Baryshkov wrote:
> > On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
> > > Document the component used to boot SoCCP on Kaanapali SoC and add
> > > compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
> > > the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
> > >
> > > Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> > > ---
> > > .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
> > > .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
> > > 2 files changed, 159 insertions(+), 1 deletion(-)
> >
> > With all the changes to pas-common, what is being left in it? Would it
>
> You need place for definition of properties - smd/glink-edge and
> qcom,smem-states. The latter is actually not properly defined in one
> place, becuse there are bindings having it but not refencing
> pas-common.
So do we for schemas definig smd-edge.
>
> It can also define common order of interrupts, but as you pointed out
> this does not work for this new device anymore.
Nor does it work for SocCP smem-states. I think that having such a
pas-common overcomplicates existing schema. What about splitting
qcom,dsp-common from qcom,pas-common with the latter keeping properties
that are common to existing DSP and SoCCP, while the former being used
only for DSPs?
>
> > be easier to leave it as is for the traditional DSPs and copy necessary
> > functionality into the soccp schema?
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-12 4:53 ` Dmitry Baryshkov
@ 2026-03-12 16:08 ` Krzysztof Kozlowski
2026-03-13 1:00 ` Dmitry Baryshkov
0 siblings, 1 reply; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-12 16:08 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jingyi Wang, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On 12/03/2026 05:53, Dmitry Baryshkov wrote:
> gn Wed, Mar 11, 2026 at 07:26:38AM +0100, Krzysztof Kozlowski wrote:
>> On Wed, Mar 11, 2026 at 04:04:09AM +0200, Dmitry Baryshkov wrote:
>>> On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
>>>> Document the component used to boot SoCCP on Kaanapali SoC and add
>>>> compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
>>>> the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
>>>>
>>>> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
>>>> ---
>>>> .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
>>>> .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
>>>> 2 files changed, 159 insertions(+), 1 deletion(-)
>>>
>>> With all the changes to pas-common, what is being left in it? Would it
>>
>> You need place for definition of properties - smd/glink-edge and
>> qcom,smem-states. The latter is actually not properly defined in one
>> place, becuse there are bindings having it but not refencing
>> pas-common.
>
> So do we for schemas definig smd-edge.
>
>>
>> It can also define common order of interrupts, but as you pointed out
>> this does not work for this new device anymore.
>
> Nor does it work for SocCP smem-states. I think that having such a
It only does not work in full constraints, but for defining the type it
works.
> pas-common overcomplicates existing schema. What about splitting
> qcom,dsp-common from qcom,pas-common with the latter keeping properties
> that are common to existing DSP and SoCCP, while the former being used
> only for DSPs?
>
What would be in the dsp-common then?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-12 16:08 ` Krzysztof Kozlowski
@ 2026-03-13 1:00 ` Dmitry Baryshkov
0 siblings, 0 replies; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-13 1:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jingyi Wang, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Thu, Mar 12, 2026 at 05:08:46PM +0100, Krzysztof Kozlowski wrote:
> On 12/03/2026 05:53, Dmitry Baryshkov wrote:
> > gn Wed, Mar 11, 2026 at 07:26:38AM +0100, Krzysztof Kozlowski wrote:
> >> On Wed, Mar 11, 2026 at 04:04:09AM +0200, Dmitry Baryshkov wrote:
> >>> On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
> >>>> Document the component used to boot SoCCP on Kaanapali SoC and add
> >>>> compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
> >>>> the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
> >>>>
> >>>> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> >>>> ---
> >>>> .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
> >>>> .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
> >>>> 2 files changed, 159 insertions(+), 1 deletion(-)
> >>>
> >>> With all the changes to pas-common, what is being left in it? Would it
> >>
> >> You need place for definition of properties - smd/glink-edge and
> >> qcom,smem-states. The latter is actually not properly defined in one
> >> place, becuse there are bindings having it but not refencing
> >> pas-common.
> >
> > So do we for schemas definig smd-edge.
> >
> >>
> >> It can also define common order of interrupts, but as you pointed out
> >> this does not work for this new device anymore.
> >
> > Nor does it work for SocCP smem-states. I think that having such a
>
> It only does not work in full constraints, but for defining the type it
> works.
>
> > pas-common overcomplicates existing schema. What about splitting
> > qcom,dsp-common from qcom,pas-common with the latter keeping properties
> > that are common to existing DSP and SoCCP, while the former being used
> > only for DSPs?
> >
>
> What would be in the dsp-common then?
All items that got spread to individual DSP schemas:
- single item in smem-states / smem-state-names (and maybe the value of that item)
- 6 standard interrupts with minItems:5
- XO clock
Ideally after this we can split qcom,adsp.yaml into several smaller
schemas de-monstrifying the if-pile.
Anyway, current patchset has another issue, I'll comment in a minute.
>
> Best regards,
> Krzysztof
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms
2026-03-10 10:03 ` [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms Jingyi Wang
2026-03-11 2:04 ` Dmitry Baryshkov
@ 2026-03-11 6:32 ` Krzysztof Kozlowski
1 sibling, 0 replies; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:32 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:20AM -0700, Jingyi Wang wrote:
> Document the component used to boot SoCCP on Kaanapali SoC and add
> compatible for Glymur SoCCP which could fallback to Kaanapali. Extend
> the "qcom,smem-states", "qcom,smem-state-names" in the pas-common.
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> .../remoteproc/qcom,kaanapali-soccp-pas.yaml | 154 +++++++++++++++++++++
> .../bindings/remoteproc/qcom,pas-common.yaml | 6 +-
> 2 files changed, 159 insertions(+), 1 deletion(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
` (3 preceding siblings ...)
2026-03-10 10:03 ` [PATCH v4 4/7] dt-bindings: remoteproc: qcom: Document pas for SoCCP on Kaanapali and Glymur platforms Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-10 13:50 ` Bartosz Golaszewski
2026-03-11 6:20 ` Krzysztof Kozlowski
2026-03-10 10:03 ` [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems Jingyi Wang
2026-03-10 10:03 ` [PATCH v4 7/7] remoteproc: qcom_q6v5_pas: Add SoCCP node on Kaanapali Jingyi Wang
6 siblings, 2 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang
rproc_add() called by rproc probe function failure will tear down all
the resources including do device_del() and remove subdev etc. If
rproc_report_crash() is called in this path, the rproc_crash_handler_work
could be excuted asynchronously, rproc_boot_recovery()->rproc_stop() will
be called with recovery enabled, which may cause NULL pointer dereference
if the resource has already been cleaned up.
[ 5.251483] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000300
[ 5.260499] Mem abort info:
[ 5.263384] ESR = 0x0000000096000006
[ 5.267248] EC = 0x25: DABT (current EL), IL = 32 bits
[ 5.272711] SET = 0, FnV = 0
[ 5.275865] EA = 0, S1PTW = 0
[ 5.279106] FSC = 0x06: level 2 translation fault
[ 5.284125] Data abort info:
[ 5.287101] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
[ 5.292742] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 5.297939] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 5.303400] user pgtable: 4k pages, 48-bit VAs, pgdp=000000089e086000
[ 5.310022] [0000000000000300] pgd=080000089e087403, p4d=080000089e087403, pud=080000089e088403, pmd=0000000000000000
[ 5.320917] Internal error: Oops: 0000000096000006 [#1] SMP
[ 5.392494] Hardware name: Qualcomm Technologies, Inc. Kaanapali QRD (DT)
[ 5.399466] Workqueue: rproc_recovery_wq rproc_crash_handler_work
[ 5.405729] pstate: 23400005 (nzCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
[ 5.412879] pc : qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem]
[ 5.419674] lr : glink_subdev_stop+0x1c/0x30 [qcom_common]
[ 5.425308] sp : ffff800080ffbc90
[ 5.428724] x29: ffff800080ffbc90 x28: ffff00081be833f0 x27: ffff000800059c00
[ 5.436053] x26: 0000000000000000 x25: ffff000800a56f80 x24: 61c8864680b583eb
[ 5.443384] x23: ffff00081be83038 x22: 0000000000000001 x21: ffff00081be83000
[ 5.450714] x20: ffff00081be833c0 x19: 0000000000000000 x18: 0000000000000010
[ 5.458043] x17: 0000000000000000 x16: 0000000000000000 x15: ffff0008042684f8
[ 5.465374] x14: 00000000000002dd x13: ffff0008042684f8 x12: ffffd37f69f967a0
[ 5.472705] x11: ffffd37f6a006800 x10: ffffd37f69fee7c0 x9 : ffffd37f69fee818
[ 5.480036] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
[ 5.487366] x5 : ffff000d6536d408 x4 : 0000000000000001 x3 : 0000000000000000
[ 5.494697] x2 : ffffd37f5703c18c x1 : 0000000000000001 x0 : 0000000000000000
[ 5.502028] Call trace:
[ 5.504549] qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem] (P)
[ 5.511344] glink_subdev_stop+0x1c/0x30 [qcom_common]
[ 5.516622] rproc_stop+0x58/0x17c
[ 5.520127] rproc_trigger_recovery+0xb0/0x150
[ 5.524693] rproc_crash_handler_work+0xa4/0xc4
[ 5.529346] process_scheduled_works+0x18c/0x2d8
[ 5.534092] worker_thread+0x144/0x280
[ 5.537952] kthread+0x124/0x138
[ 5.541280] ret_from_fork+0x10/0x20
[ 5.544965] Code: a9be7bfd 910003fd a90153f3 aa0003f3 (b9430000)
[ 5.551224] ---[ end trace 0000000000000000 ]---
So set recovery_disabled during rproc_add().
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
drivers/remoteproc/remoteproc_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index b087ed21858a..f66dde712cec 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -2286,7 +2286,10 @@ int rproc_add(struct rproc *rproc)
{
struct device *dev = &rproc->dev;
int ret;
+ bool rproc_recovery_save;
+ rproc_recovery_save = rproc->recovery_disabled;
+ rproc->recovery_disabled = true;
ret = rproc_validate(rproc);
if (ret < 0)
return ret;
@@ -2319,6 +2322,7 @@ int rproc_add(struct rproc *rproc)
list_add_rcu(&rproc->node, &rproc_list);
mutex_unlock(&rproc_list_mutex);
+ rproc->recovery_disabled = rproc_recovery_save;
return 0;
rproc_remove_dev:
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-10 10:03 ` [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add() Jingyi Wang
@ 2026-03-10 13:50 ` Bartosz Golaszewski
2026-03-11 2:11 ` Dmitry Baryshkov
2026-03-11 6:20 ` Krzysztof Kozlowski
1 sibling, 1 reply; 31+ messages in thread
From: Bartosz Golaszewski @ 2026-03-10 13:50 UTC (permalink / raw)
To: Jingyi Wang
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam, Luca Weiss, Bartosz Golaszewski,
Konrad Dybcio
On Tue, 10 Mar 2026 11:03:21 +0100, Jingyi Wang
<jingyi.wang@oss.qualcomm.com> said:
> rproc_add() called by rproc probe function failure will tear down all
> the resources including do device_del() and remove subdev etc. If
> rproc_report_crash() is called in this path, the rproc_crash_handler_work
> could be excuted asynchronously, rproc_boot_recovery()->rproc_stop() will
> be called with recovery enabled, which may cause NULL pointer dereference
> if the resource has already been cleaned up.
>
> [ 5.251483] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000300
> [ 5.260499] Mem abort info:
> [ 5.263384] ESR = 0x0000000096000006
> [ 5.267248] EC = 0x25: DABT (current EL), IL = 32 bits
> [ 5.272711] SET = 0, FnV = 0
> [ 5.275865] EA = 0, S1PTW = 0
> [ 5.279106] FSC = 0x06: level 2 translation fault
> [ 5.284125] Data abort info:
> [ 5.287101] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
> [ 5.292742] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> [ 5.297939] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [ 5.303400] user pgtable: 4k pages, 48-bit VAs, pgdp=000000089e086000
> [ 5.310022] [0000000000000300] pgd=080000089e087403, p4d=080000089e087403, pud=080000089e088403, pmd=0000000000000000
> [ 5.320917] Internal error: Oops: 0000000096000006 [#1] SMP
> [ 5.392494] Hardware name: Qualcomm Technologies, Inc. Kaanapali QRD (DT)
> [ 5.399466] Workqueue: rproc_recovery_wq rproc_crash_handler_work
> [ 5.405729] pstate: 23400005 (nzCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
> [ 5.412879] pc : qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem]
> [ 5.419674] lr : glink_subdev_stop+0x1c/0x30 [qcom_common]
> [ 5.425308] sp : ffff800080ffbc90
> [ 5.428724] x29: ffff800080ffbc90 x28: ffff00081be833f0 x27: ffff000800059c00
> [ 5.436053] x26: 0000000000000000 x25: ffff000800a56f80 x24: 61c8864680b583eb
> [ 5.443384] x23: ffff00081be83038 x22: 0000000000000001 x21: ffff00081be83000
> [ 5.450714] x20: ffff00081be833c0 x19: 0000000000000000 x18: 0000000000000010
> [ 5.458043] x17: 0000000000000000 x16: 0000000000000000 x15: ffff0008042684f8
> [ 5.465374] x14: 00000000000002dd x13: ffff0008042684f8 x12: ffffd37f69f967a0
> [ 5.472705] x11: ffffd37f6a006800 x10: ffffd37f69fee7c0 x9 : ffffd37f69fee818
> [ 5.480036] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
> [ 5.487366] x5 : ffff000d6536d408 x4 : 0000000000000001 x3 : 0000000000000000
> [ 5.494697] x2 : ffffd37f5703c18c x1 : 0000000000000001 x0 : 0000000000000000
> [ 5.502028] Call trace:
> [ 5.504549] qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem] (P)
> [ 5.511344] glink_subdev_stop+0x1c/0x30 [qcom_common]
> [ 5.516622] rproc_stop+0x58/0x17c
> [ 5.520127] rproc_trigger_recovery+0xb0/0x150
> [ 5.524693] rproc_crash_handler_work+0xa4/0xc4
> [ 5.529346] process_scheduled_works+0x18c/0x2d8
> [ 5.534092] worker_thread+0x144/0x280
> [ 5.537952] kthread+0x124/0x138
> [ 5.541280] ret_from_fork+0x10/0x20
> [ 5.544965] Code: a9be7bfd 910003fd a90153f3 aa0003f3 (b9430000)
> [ 5.551224] ---[ end trace 0000000000000000 ]---
>
> So set recovery_disabled during rproc_add().
>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index b087ed21858a..f66dde712cec 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -2286,7 +2286,10 @@ int rproc_add(struct rproc *rproc)
> {
> struct device *dev = &rproc->dev;
> int ret;
> + bool rproc_recovery_save;
>
> + rproc_recovery_save = rproc->recovery_disabled;
> + rproc->recovery_disabled = true;
> ret = rproc_validate(rproc);
> if (ret < 0)
> return ret;
> @@ -2319,6 +2322,7 @@ int rproc_add(struct rproc *rproc)
> list_add_rcu(&rproc->node, &rproc_list);
> mutex_unlock(&rproc_list_mutex);
>
> + rproc->recovery_disabled = rproc_recovery_save;
> return 0;
>
> rproc_remove_dev:
>
> --
> 2.25.1
>
>
Ideally things like this would be passed to the rproc core in some kind of a
config structure and only set when registration succeeds. This looks to me
like papering over the real issue and I think it's still racy as there's no
true synchronization.
Wouldn't it be better to take rproc->lock for the entire duration of
rproc_add()? It's already initialized in rproc_alloc().
Bart
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-10 13:50 ` Bartosz Golaszewski
@ 2026-03-11 2:11 ` Dmitry Baryshkov
2026-03-11 8:39 ` Bartosz Golaszewski
0 siblings, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-11 2:11 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Jingyi Wang, aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Konrad Dybcio
On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
> On Tue, 10 Mar 2026 11:03:21 +0100, Jingyi Wang
> <jingyi.wang@oss.qualcomm.com> said:
> > rproc_add() called by rproc probe function failure will tear down all
> > the resources including do device_del() and remove subdev etc. If
> > rproc_report_crash() is called in this path, the rproc_crash_handler_work
> > could be excuted asynchronously, rproc_boot_recovery()->rproc_stop() will
> > be called with recovery enabled, which may cause NULL pointer dereference
> > if the resource has already been cleaned up.
> >
> > [ 5.251483] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000300
> > [ 5.260499] Mem abort info:
> > [ 5.263384] ESR = 0x0000000096000006
> > [ 5.267248] EC = 0x25: DABT (current EL), IL = 32 bits
> > [ 5.272711] SET = 0, FnV = 0
> > [ 5.275865] EA = 0, S1PTW = 0
> > [ 5.279106] FSC = 0x06: level 2 translation fault
> > [ 5.284125] Data abort info:
> > [ 5.287101] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
> > [ 5.292742] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> > [ 5.297939] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> > [ 5.303400] user pgtable: 4k pages, 48-bit VAs, pgdp=000000089e086000
> > [ 5.310022] [0000000000000300] pgd=080000089e087403, p4d=080000089e087403, pud=080000089e088403, pmd=0000000000000000
> > [ 5.320917] Internal error: Oops: 0000000096000006 [#1] SMP
> > [ 5.392494] Hardware name: Qualcomm Technologies, Inc. Kaanapali QRD (DT)
> > [ 5.399466] Workqueue: rproc_recovery_wq rproc_crash_handler_work
> > [ 5.405729] pstate: 23400005 (nzCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
> > [ 5.412879] pc : qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem]
> > [ 5.419674] lr : glink_subdev_stop+0x1c/0x30 [qcom_common]
> > [ 5.425308] sp : ffff800080ffbc90
> > [ 5.428724] x29: ffff800080ffbc90 x28: ffff00081be833f0 x27: ffff000800059c00
> > [ 5.436053] x26: 0000000000000000 x25: ffff000800a56f80 x24: 61c8864680b583eb
> > [ 5.443384] x23: ffff00081be83038 x22: 0000000000000001 x21: ffff00081be83000
> > [ 5.450714] x20: ffff00081be833c0 x19: 0000000000000000 x18: 0000000000000010
> > [ 5.458043] x17: 0000000000000000 x16: 0000000000000000 x15: ffff0008042684f8
> > [ 5.465374] x14: 00000000000002dd x13: ffff0008042684f8 x12: ffffd37f69f967a0
> > [ 5.472705] x11: ffffd37f6a006800 x10: ffffd37f69fee7c0 x9 : ffffd37f69fee818
> > [ 5.480036] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
> > [ 5.487366] x5 : ffff000d6536d408 x4 : 0000000000000001 x3 : 0000000000000000
> > [ 5.494697] x2 : ffffd37f5703c18c x1 : 0000000000000001 x0 : 0000000000000000
> > [ 5.502028] Call trace:
> > [ 5.504549] qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem] (P)
> > [ 5.511344] glink_subdev_stop+0x1c/0x30 [qcom_common]
> > [ 5.516622] rproc_stop+0x58/0x17c
> > [ 5.520127] rproc_trigger_recovery+0xb0/0x150
> > [ 5.524693] rproc_crash_handler_work+0xa4/0xc4
> > [ 5.529346] process_scheduled_works+0x18c/0x2d8
> > [ 5.534092] worker_thread+0x144/0x280
> > [ 5.537952] kthread+0x124/0x138
> > [ 5.541280] ret_from_fork+0x10/0x20
> > [ 5.544965] Code: a9be7bfd 910003fd a90153f3 aa0003f3 (b9430000)
> > [ 5.551224] ---[ end trace 0000000000000000 ]---
> >
> > So set recovery_disabled during rproc_add().
> >
> > Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> > ---
> > drivers/remoteproc/remoteproc_core.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> > index b087ed21858a..f66dde712cec 100644
> > --- a/drivers/remoteproc/remoteproc_core.c
> > +++ b/drivers/remoteproc/remoteproc_core.c
> > @@ -2286,7 +2286,10 @@ int rproc_add(struct rproc *rproc)
> > {
> > struct device *dev = &rproc->dev;
> > int ret;
> > + bool rproc_recovery_save;
> >
> > + rproc_recovery_save = rproc->recovery_disabled;
> > + rproc->recovery_disabled = true;
> > ret = rproc_validate(rproc);
> > if (ret < 0)
> > return ret;
> > @@ -2319,6 +2322,7 @@ int rproc_add(struct rproc *rproc)
> > list_add_rcu(&rproc->node, &rproc_list);
> > mutex_unlock(&rproc_list_mutex);
> >
> > + rproc->recovery_disabled = rproc_recovery_save;
> > return 0;
> >
> > rproc_remove_dev:
> >
> > --
> > 2.25.1
> >
> >
>
> Ideally things like this would be passed to the rproc core in some kind of a
> config structure and only set when registration succeeds. This looks to me
> like papering over the real issue and I think it's still racy as there's no
> true synchronization.
>
> Wouldn't it be better to take rproc->lock for the entire duration of
> rproc_add()? It's already initialized in rproc_alloc().
It would still be racy as rproc_trigger_recovery() is called outside of
the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
must explicitly call cancel_work_sync() on the crash_handler work (and
any other work items that can be scheduled).
>
> Bart
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-11 2:11 ` Dmitry Baryshkov
@ 2026-03-11 8:39 ` Bartosz Golaszewski
2026-03-13 2:37 ` Dmitry Baryshkov
0 siblings, 1 reply; 31+ messages in thread
From: Bartosz Golaszewski @ 2026-03-11 8:39 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bartosz Golaszewski, Jingyi Wang, aiqun.yu, tingwei.zhang,
trilok.soni, yijie.yang, linux-arm-msm, linux-remoteproc,
devicetree, linux-kernel, Bjorn Andersson, Mathieu Poirier,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam, Luca Weiss, Konrad Dybcio
On Wed, 11 Mar 2026 03:11:42 +0100, Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> said:
> On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
>>
>> Ideally things like this would be passed to the rproc core in some kind of a
>> config structure and only set when registration succeeds. This looks to me
>> like papering over the real issue and I think it's still racy as there's no
>> true synchronization.
>>
>> Wouldn't it be better to take rproc->lock for the entire duration of
>> rproc_add()? It's already initialized in rproc_alloc().
>
> It would still be racy as rproc_trigger_recovery() is called outside of
> the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
> must explicitly call cancel_work_sync() on the crash_handler work (and
> any other work items that can be scheduled).
>
This looks weird TBH. For example: rproc_crash_handler_work() takes the lock,
but releases it right before calling inspecting rproc->recovery_disabled and
calling rproc_trigger_recovery(). It looks wrong, I think it should keep the
lock and rptoc_trigger_recovery() should enforce it being taken before the
call.
Bart
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-11 8:39 ` Bartosz Golaszewski
@ 2026-03-13 2:37 ` Dmitry Baryshkov
2026-03-19 4:36 ` Jingyi Wang
0 siblings, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-13 2:37 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Jingyi Wang, aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang,
linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Konrad Dybcio
On Wed, Mar 11, 2026 at 01:39:50AM -0700, Bartosz Golaszewski wrote:
> On Wed, 11 Mar 2026 03:11:42 +0100, Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> said:
> > On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
> >>
> >> Ideally things like this would be passed to the rproc core in some kind of a
> >> config structure and only set when registration succeeds. This looks to me
> >> like papering over the real issue and I think it's still racy as there's no
> >> true synchronization.
> >>
> >> Wouldn't it be better to take rproc->lock for the entire duration of
> >> rproc_add()? It's already initialized in rproc_alloc().
> >
> > It would still be racy as rproc_trigger_recovery() is called outside of
> > the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
> > must explicitly call cancel_work_sync() on the crash_handler work (and
> > any other work items that can be scheduled).
> >
>
> This looks weird TBH. For example: rproc_crash_handler_work() takes the lock,
> but releases it right before calling inspecting rproc->recovery_disabled and
> calling rproc_trigger_recovery(). It looks wrong, I think it should keep the
> lock and rptoc_trigger_recovery() should enforce it being taken before the
> call.
Yes. Nevertheless the driver should cancel the work too.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-13 2:37 ` Dmitry Baryshkov
@ 2026-03-19 4:36 ` Jingyi Wang
2026-03-19 5:23 ` Dmitry Baryshkov
0 siblings, 1 reply; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 4:36 UTC (permalink / raw)
To: Dmitry Baryshkov, Bartosz Golaszewski
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Bjorn Andersson,
Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam, Luca Weiss, Konrad Dybcio
On 3/13/2026 10:37 AM, Dmitry Baryshkov wrote:
> On Wed, Mar 11, 2026 at 01:39:50AM -0700, Bartosz Golaszewski wrote:
>> On Wed, 11 Mar 2026 03:11:42 +0100, Dmitry Baryshkov
>> <dmitry.baryshkov@oss.qualcomm.com> said:
>>> On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
>>>>
>>>> Ideally things like this would be passed to the rproc core in some kind of a
>>>> config structure and only set when registration succeeds. This looks to me
>>>> like papering over the real issue and I think it's still racy as there's no
>>>> true synchronization.
>>>>
>>>> Wouldn't it be better to take rproc->lock for the entire duration of
>>>> rproc_add()? It's already initialized in rproc_alloc().
>>>
>>> It would still be racy as rproc_trigger_recovery() is called outside of
>>> the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
>>> must explicitly call cancel_work_sync() on the crash_handler work (and
>>> any other work items that can be scheduled).
>>>
>>
>> This looks weird TBH. For example: rproc_crash_handler_work() takes the lock,
>> but releases it right before calling inspecting rproc->recovery_disabled and
>> calling rproc_trigger_recovery(). It looks wrong, I think it should keep the
>> lock and rptoc_trigger_recovery() should enforce it being taken before the
>> call.
>
> Yes. Nevertheless the driver should cancel the work too.
>
Hi Dmitry & Bartosz,
rproc_crash_handler_work() may call rproc_trigger_recovery() and
rproc_add() may call rproc_boot(), both the function have already
hold the lock. And the lock cannot protect resources like glink_subdev
in the patch.
And there is a possible case for cancel_work, rproc_add tear down call
cancel work and wait for the work finished, the reboot run successfully,
and the tear down continued and the resources all released, including sysfs
and glink_subdev.
Indeed recovery_disabled is kind of hacky.
The root cause for this issue is that for remoteproc with RPROC_OFFLINE
state, the rproc_start will be called asynchronously, but for the remoteproc
with RPROC_DETACHED, the attach function is called directly, the failure
in this path will cause the rproc_add() fail and the resource release.
I think the current patch can be dropped, we are thinking about make rproc_attach
called asynchronously to avoid this race.
Thanks,
Jingyi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-19 4:36 ` Jingyi Wang
@ 2026-03-19 5:23 ` Dmitry Baryshkov
2026-03-19 5:44 ` Jingyi Wang
0 siblings, 1 reply; 31+ messages in thread
From: Dmitry Baryshkov @ 2026-03-19 5:23 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bartosz Golaszewski, aiqun.yu, tingwei.zhang, trilok.soni,
yijie.yang, linux-arm-msm, linux-remoteproc, devicetree,
linux-kernel, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Konrad Dybcio
On Thu, Mar 19, 2026 at 12:36:15PM +0800, Jingyi Wang wrote:
>
>
> On 3/13/2026 10:37 AM, Dmitry Baryshkov wrote:
> > On Wed, Mar 11, 2026 at 01:39:50AM -0700, Bartosz Golaszewski wrote:
> > > On Wed, 11 Mar 2026 03:11:42 +0100, Dmitry Baryshkov
> > > <dmitry.baryshkov@oss.qualcomm.com> said:
> > > > On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
> > > > >
> > > > > Ideally things like this would be passed to the rproc core in some kind of a
> > > > > config structure and only set when registration succeeds. This looks to me
> > > > > like papering over the real issue and I think it's still racy as there's no
> > > > > true synchronization.
> > > > >
> > > > > Wouldn't it be better to take rproc->lock for the entire duration of
> > > > > rproc_add()? It's already initialized in rproc_alloc().
> > > >
> > > > It would still be racy as rproc_trigger_recovery() is called outside of
> > > > the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
> > > > must explicitly call cancel_work_sync() on the crash_handler work (and
> > > > any other work items that can be scheduled).
> > > >
> > >
> > > This looks weird TBH. For example: rproc_crash_handler_work() takes the lock,
> > > but releases it right before calling inspecting rproc->recovery_disabled and
> > > calling rproc_trigger_recovery(). It looks wrong, I think it should keep the
> > > lock and rptoc_trigger_recovery() should enforce it being taken before the
> > > call.
> >
> > Yes. Nevertheless the driver should cancel the work too.
> >
>
> Hi Dmitry & Bartosz,
>
> rproc_crash_handler_work() may call rproc_trigger_recovery() and
> rproc_add() may call rproc_boot(), both the function have already
> hold the lock. And the lock cannot protect resources like glink_subdev
> in the patch.
>
> And there is a possible case for cancel_work, rproc_add tear down call
> cancel work and wait for the work finished, the reboot run successfully,
> and the tear down continued and the resources all released, including sysfs
> and glink_subdev.
>
> Indeed recovery_disabled is kind of hacky.
> The root cause for this issue is that for remoteproc with RPROC_OFFLINE
> state, the rproc_start will be called asynchronously, but for the remoteproc
> with RPROC_DETACHED, the attach function is called directly, the failure
> in this path will cause the rproc_add() fail and the resource release.
> I think the current patch can be dropped, we are thinking about make rproc_attach
> called asynchronously to avoid this race.
Isn't this patch necessary for SoCCP bringup? If not, why did you
include it into the series?
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-19 5:23 ` Dmitry Baryshkov
@ 2026-03-19 5:44 ` Jingyi Wang
0 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 5:44 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bartosz Golaszewski, aiqun.yu, tingwei.zhang, trilok.soni,
yijie.yang, linux-arm-msm, linux-remoteproc, devicetree,
linux-kernel, Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Konrad Dybcio
On 3/19/2026 1:23 PM, Dmitry Baryshkov wrote:
> On Thu, Mar 19, 2026 at 12:36:15PM +0800, Jingyi Wang wrote:
>>
>>
>> On 3/13/2026 10:37 AM, Dmitry Baryshkov wrote:
>>> On Wed, Mar 11, 2026 at 01:39:50AM -0700, Bartosz Golaszewski wrote:
>>>> On Wed, 11 Mar 2026 03:11:42 +0100, Dmitry Baryshkov
>>>> <dmitry.baryshkov@oss.qualcomm.com> said:
>>>>> On Tue, Mar 10, 2026 at 06:50:30AM -0700, Bartosz Golaszewski wrote:
>>>>>>
>>>>>> Ideally things like this would be passed to the rproc core in some kind of a
>>>>>> config structure and only set when registration succeeds. This looks to me
>>>>>> like papering over the real issue and I think it's still racy as there's no
>>>>>> true synchronization.
>>>>>>
>>>>>> Wouldn't it be better to take rproc->lock for the entire duration of
>>>>>> rproc_add()? It's already initialized in rproc_alloc().
>>>>>
>>>>> It would still be racy as rproc_trigger_recovery() is called outside of
>>>>> the lock. Instead the error cleanup path (and BTW, rproc_del() path too)
>>>>> must explicitly call cancel_work_sync() on the crash_handler work (and
>>>>> any other work items that can be scheduled).
>>>>>
>>>>
>>>> This looks weird TBH. For example: rproc_crash_handler_work() takes the lock,
>>>> but releases it right before calling inspecting rproc->recovery_disabled and
>>>> calling rproc_trigger_recovery(). It looks wrong, I think it should keep the
>>>> lock and rptoc_trigger_recovery() should enforce it being taken before the
>>>> call.
>>>
>>> Yes. Nevertheless the driver should cancel the work too.
>>>
>>
>> Hi Dmitry & Bartosz,
>>
>> rproc_crash_handler_work() may call rproc_trigger_recovery() and
>> rproc_add() may call rproc_boot(), both the function have already
>> hold the lock. And the lock cannot protect resources like glink_subdev
>> in the patch.
>>
>> And there is a possible case for cancel_work, rproc_add tear down call
>> cancel work and wait for the work finished, the reboot run successfully,
>> and the tear down continued and the resources all released, including sysfs
>> and glink_subdev.
>>
>> Indeed recovery_disabled is kind of hacky.
>> The root cause for this issue is that for remoteproc with RPROC_OFFLINE
>> state, the rproc_start will be called asynchronously, but for the remoteproc
>> with RPROC_DETACHED, the attach function is called directly, the failure
>> in this path will cause the rproc_add() fail and the resource release.
>> I think the current patch can be dropped, we are thinking about make rproc_attach
>> called asynchronously to avoid this race.
>
> Isn't this patch necessary for SoCCP bringup? If not, why did you
> include it into the series?
>
yes, will squash to soccp patch in next versoin.
Thanks,
Jingyi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-10 10:03 ` [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add() Jingyi Wang
2026-03-10 13:50 ` Bartosz Golaszewski
@ 2026-03-11 6:20 ` Krzysztof Kozlowski
2026-03-19 4:38 ` Jingyi Wang
1 sibling, 1 reply; 31+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:20 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On Tue, Mar 10, 2026 at 03:03:21AM -0700, Jingyi Wang wrote:
> rproc_add() called by rproc probe function failure will tear down all
> the resources including do device_del() and remove subdev etc. If
> rproc_report_crash() is called in this path, the rproc_crash_handler_work
> could be excuted asynchronously, rproc_boot_recovery()->rproc_stop() will
> be called with recovery enabled, which may cause NULL pointer dereference
> if the resource has already been cleaned up.
>
> [ 5.251483] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000300
> [ 5.260499] Mem abort info:
> [ 5.263384] ESR = 0x0000000096000006
> [ 5.267248] EC = 0x25: DABT (current EL), IL = 32 bits
> [ 5.272711] SET = 0, FnV = 0
> [ 5.275865] EA = 0, S1PTW = 0
> [ 5.279106] FSC = 0x06: level 2 translation fault
> [ 5.284125] Data abort info:
> [ 5.287101] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
> [ 5.292742] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
> [ 5.297939] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
> [ 5.303400] user pgtable: 4k pages, 48-bit VAs, pgdp=000000089e086000
> [ 5.310022] [0000000000000300] pgd=080000089e087403, p4d=080000089e087403, pud=080000089e088403, pmd=0000000000000000
> [ 5.320917] Internal error: Oops: 0000000096000006 [#1] SMP
> [ 5.392494] Hardware name: Qualcomm Technologies, Inc. Kaanapali QRD (DT)
> [ 5.399466] Workqueue: rproc_recovery_wq rproc_crash_handler_work
> [ 5.405729] pstate: 23400005 (nzCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
> [ 5.412879] pc : qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem]
> [ 5.419674] lr : glink_subdev_stop+0x1c/0x30 [qcom_common]
> [ 5.425308] sp : ffff800080ffbc90
> [ 5.428724] x29: ffff800080ffbc90 x28: ffff00081be833f0 x27: ffff000800059c00
> [ 5.436053] x26: 0000000000000000 x25: ffff000800a56f80 x24: 61c8864680b583eb
> [ 5.443384] x23: ffff00081be83038 x22: 0000000000000001 x21: ffff00081be83000
> [ 5.450714] x20: ffff00081be833c0 x19: 0000000000000000 x18: 0000000000000010
> [ 5.458043] x17: 0000000000000000 x16: 0000000000000000 x15: ffff0008042684f8
> [ 5.465374] x14: 00000000000002dd x13: ffff0008042684f8 x12: ffffd37f69f967a0
> [ 5.472705] x11: ffffd37f6a006800 x10: ffffd37f69fee7c0 x9 : ffffd37f69fee818
> [ 5.480036] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
> [ 5.487366] x5 : ffff000d6536d408 x4 : 0000000000000001 x3 : 0000000000000000
> [ 5.494697] x2 : ffffd37f5703c18c x1 : 0000000000000001 x0 : 0000000000000000
Please trim your commit msg from irrelevant data, so this will be easier
to read.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add()
2026-03-11 6:20 ` Krzysztof Kozlowski
@ 2026-03-19 4:38 ` Jingyi Wang
0 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 4:38 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel
On 3/11/2026 2:20 PM, Krzysztof Kozlowski wrote:
> On Tue, Mar 10, 2026 at 03:03:21AM -0700, Jingyi Wang wrote:
>> rproc_add() called by rproc probe function failure will tear down all
>> the resources including do device_del() and remove subdev etc. If
>> rproc_report_crash() is called in this path, the rproc_crash_handler_work
>> could be excuted asynchronously, rproc_boot_recovery()->rproc_stop() will
>> be called with recovery enabled, which may cause NULL pointer dereference
>> if the resource has already been cleaned up.
>>
>> [ 5.251483] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000300
>> [ 5.260499] Mem abort info:
>> [ 5.263384] ESR = 0x0000000096000006
>> [ 5.267248] EC = 0x25: DABT (current EL), IL = 32 bits
>> [ 5.272711] SET = 0, FnV = 0
>> [ 5.275865] EA = 0, S1PTW = 0
>> [ 5.279106] FSC = 0x06: level 2 translation fault
>> [ 5.284125] Data abort info:
>> [ 5.287101] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
>> [ 5.292742] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
>> [ 5.297939] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
>> [ 5.303400] user pgtable: 4k pages, 48-bit VAs, pgdp=000000089e086000
>> [ 5.310022] [0000000000000300] pgd=080000089e087403, p4d=080000089e087403, pud=080000089e088403, pmd=0000000000000000
>> [ 5.320917] Internal error: Oops: 0000000096000006 [#1] SMP
>> [ 5.392494] Hardware name: Qualcomm Technologies, Inc. Kaanapali QRD (DT)
>> [ 5.399466] Workqueue: rproc_recovery_wq rproc_crash_handler_work
>> [ 5.405729] pstate: 23400005 (nzCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
>> [ 5.412879] pc : qcom_glink_smem_unregister+0x14/0x48 [qcom_glink_smem]
>> [ 5.419674] lr : glink_subdev_stop+0x1c/0x30 [qcom_common]
>> [ 5.425308] sp : ffff800080ffbc90
>> [ 5.428724] x29: ffff800080ffbc90 x28: ffff00081be833f0 x27: ffff000800059c00
>> [ 5.436053] x26: 0000000000000000 x25: ffff000800a56f80 x24: 61c8864680b583eb
>> [ 5.443384] x23: ffff00081be83038 x22: 0000000000000001 x21: ffff00081be83000
>> [ 5.450714] x20: ffff00081be833c0 x19: 0000000000000000 x18: 0000000000000010
>> [ 5.458043] x17: 0000000000000000 x16: 0000000000000000 x15: ffff0008042684f8
>> [ 5.465374] x14: 00000000000002dd x13: ffff0008042684f8 x12: ffffd37f69f967a0
>> [ 5.472705] x11: ffffd37f6a006800 x10: ffffd37f69fee7c0 x9 : ffffd37f69fee818
>> [ 5.480036] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
>> [ 5.487366] x5 : ffff000d6536d408 x4 : 0000000000000001 x3 : 0000000000000000
>> [ 5.494697] x2 : ffffd37f5703c18c x1 : 0000000000000001 x0 : 0000000000000000
>
> Please trim your commit msg from irrelevant data, so this will be easier
> to read.
>
> Best regards,
> Krzysztof
>
Well noted.
Thanks,
Jingyi
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
` (4 preceding siblings ...)
2026-03-10 10:03 ` [PATCH v4 5/7] remoteproc: core: set recovery_disabled when doing rproc_add() Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
2026-03-11 8:28 ` Stephan Gerhold
2026-03-10 10:03 ` [PATCH v4 7/7] remoteproc: qcom_q6v5_pas: Add SoCCP node on Kaanapali Jingyi Wang
6 siblings, 1 reply; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang,
Gokul Krishna Krishnakumar
From: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
Subsystems can be brought out of reset by entities such as bootloaders.
As the irq enablement could be later than subsystem bring up, the state
of subsystem should be checked by reading SMP2P bits and performing ping
test.
A new qcom_pas_attach() function is introduced. if a crash state is
detected for the subsystem, rproc_report_crash() is called. If the
subsystem is ready either at the first check or within a 5-second timeout
and the ping is successful, it will be marked as "attached". The ready
state could be set by either ready interrupt or handover interrupt.
If "early_boot" is set by kernel but "subsys_booted" is not completed
within the timeout, It could be the early boot feature is not supported
by other entities. In this case, the state will be marked as RPROC_OFFLINE
so that the PAS driver can load the firmware and start the remoteproc. As
the running state is set once attach function is called, the watchdog or
fatal interrupt received can be handled correctly.
Signed-off-by: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
Co-developed-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
drivers/remoteproc/qcom_q6v5.c | 88 +++++++++++++++++++++++++++++-
drivers/remoteproc/qcom_q6v5.h | 17 +++++-
drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
drivers/remoteproc/qcom_q6v5_mss.c | 2 +-
drivers/remoteproc/qcom_q6v5_pas.c | 103 ++++++++++++++++++++++++++++++++++--
drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
6 files changed, 204 insertions(+), 10 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
index 58d5b85e58cd..abfe3aa71042 100644
--- a/drivers/remoteproc/qcom_q6v5.c
+++ b/drivers/remoteproc/qcom_q6v5.c
@@ -20,6 +20,7 @@
#define Q6V5_LOAD_STATE_MSG_LEN 64
#define Q6V5_PANIC_DELAY_MS 200
+#define Q6V5_PING_TIMEOUT_MS 500
static int q6v5_load_state_toggle(struct qcom_q6v5 *q6v5, bool enable)
{
@@ -94,6 +95,9 @@ static irqreturn_t q6v5_wdog_interrupt(int irq, void *data)
size_t len;
char *msg;
+ if (q6v5->early_boot)
+ complete(&q6v5->subsys_booted);
+
/* Sometimes the stop triggers a watchdog rather than a stop-ack */
if (!q6v5->running) {
complete(&q6v5->stop_done);
@@ -118,6 +122,9 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *data)
size_t len;
char *msg;
+ if (q6v5->early_boot)
+ complete(&q6v5->subsys_booted);
+
if (!q6v5->running)
return IRQ_HANDLED;
@@ -139,6 +146,9 @@ static irqreturn_t q6v5_ready_interrupt(int irq, void *data)
complete(&q6v5->start_done);
+ if (q6v5->early_boot)
+ complete(&q6v5->subsys_booted);
+
return IRQ_HANDLED;
}
@@ -172,6 +182,9 @@ static irqreturn_t q6v5_handover_interrupt(int irq, void *data)
if (q6v5->handover)
q6v5->handover(q6v5);
+ if (q6v5->early_boot)
+ complete(&q6v5->subsys_booted);
+
icc_set_bw(q6v5->path, 0, 0);
q6v5->handover_issued = true;
@@ -234,6 +247,74 @@ unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5)
}
EXPORT_SYMBOL_GPL(qcom_q6v5_panic);
+static irqreturn_t q6v5_pong_interrupt(int irq, void *data)
+{
+ struct qcom_q6v5 *q6v5 = data;
+
+ complete(&q6v5->ping_done);
+
+ return IRQ_HANDLED;
+}
+
+int qcom_q6v5_ping_subsystem(struct qcom_q6v5 *q6v5)
+{
+ int ret;
+ int ping_failed = 0;
+
+ reinit_completion(&q6v5->ping_done);
+
+ /* Set master kernel Ping bit */
+ ret = qcom_smem_state_update_bits(q6v5->ping_state,
+ BIT(q6v5->ping_bit), BIT(q6v5->ping_bit));
+ if (ret) {
+ dev_err(q6v5->dev, "Failed to update ping bits\n");
+ return ret;
+ }
+
+ ret = wait_for_completion_timeout(&q6v5->ping_done, msecs_to_jiffies(Q6V5_PING_TIMEOUT_MS));
+ if (!ret) {
+ ping_failed = -ETIMEDOUT;
+ dev_err(q6v5->dev, "Failed to get back pong\n");
+ }
+
+ /* Clear ping bit master kernel */
+ ret = qcom_smem_state_update_bits(q6v5->ping_state, BIT(q6v5->ping_bit), 0);
+ if (ret) {
+ dev_err(q6v5->dev, "Failed to clear master kernel bits\n");
+ return ret;
+ }
+
+ return ping_failed;
+}
+EXPORT_SYMBOL_GPL(qcom_q6v5_ping_subsystem);
+
+int qcom_q6v5_ping_subsystem_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev)
+{
+ int ret = -ENODEV;
+
+ q6v5->ping_state = devm_qcom_smem_state_get(&pdev->dev, "ping", &q6v5->ping_bit);
+ if (IS_ERR(q6v5->ping_state)) {
+ dev_err(&pdev->dev, "Failed to acquire smem state %ld\n",
+ PTR_ERR(q6v5->ping_state));
+ return PTR_ERR(q6v5->ping_state);
+ }
+
+ init_completion(&q6v5->ping_done);
+
+ q6v5->pong_irq = platform_get_irq_byname(pdev, "pong");
+ if (q6v5->pong_irq < 0)
+ return q6v5->pong_irq;
+
+ ret = devm_request_threaded_irq(&pdev->dev, q6v5->pong_irq, NULL,
+ q6v5_pong_interrupt, IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+ "q6v5 pong", q6v5);
+ if (ret)
+ dev_err(&pdev->dev, "Failed to acquire pong IRQ\n");
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(qcom_q6v5_ping_subsystem_init);
+
/**
* qcom_q6v5_init() - initializer of the q6v5 common struct
* @q6v5: handle to be initialized
@@ -242,12 +323,13 @@ EXPORT_SYMBOL_GPL(qcom_q6v5_panic);
* @crash_reason: SMEM id for crash reason string, or 0 if none
* @load_state: load state resource string
* @handover: function to be called when proxy resources should be released
+ * @early_boot: true if the subsystem should be brought up by the bootloader
*
* Return: 0 on success, negative errno on failure
*/
int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
struct rproc *rproc, int crash_reason, const char *load_state,
- void (*handover)(struct qcom_q6v5 *q6v5))
+ bool early_boot, void (*handover)(struct qcom_q6v5 *q6v5))
{
int ret;
@@ -255,10 +337,14 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
q6v5->dev = &pdev->dev;
q6v5->crash_reason = crash_reason;
q6v5->handover = handover;
+ q6v5->early_boot = early_boot;
init_completion(&q6v5->start_done);
init_completion(&q6v5->stop_done);
+ if (early_boot)
+ init_completion(&q6v5->subsys_booted);
+
q6v5->wdog_irq = platform_get_irq_byname(pdev, "wdog");
if (q6v5->wdog_irq < 0)
return q6v5->wdog_irq;
diff --git a/drivers/remoteproc/qcom_q6v5.h b/drivers/remoteproc/qcom_q6v5.h
index 5a859c41896e..69574a211710 100644
--- a/drivers/remoteproc/qcom_q6v5.h
+++ b/drivers/remoteproc/qcom_q6v5.h
@@ -17,22 +17,27 @@ struct qcom_q6v5 {
struct rproc *rproc;
struct qcom_smem_state *state;
+ struct qcom_smem_state *ping_state;
struct qmp *qmp;
struct icc_path *path;
unsigned stop_bit;
+ unsigned int ping_bit;
int wdog_irq;
int fatal_irq;
int ready_irq;
int handover_irq;
int stop_irq;
+ int pong_irq;
bool handover_issued;
struct completion start_done;
struct completion stop_done;
+ struct completion subsys_booted;
+ struct completion ping_done;
int crash_reason;
@@ -40,10 +45,16 @@ struct qcom_q6v5 {
const char *load_state;
void (*handover)(struct qcom_q6v5 *q6v5);
+
+ bool early_boot;
};
-int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
- struct rproc *rproc, int crash_reason, const char *load_state,
+int qcom_q6v5_init(struct qcom_q6v5 *q6v5,
+ struct platform_device *pdev,
+ struct rproc *rproc,
+ int crash_reason,
+ const char *load_state,
+ bool early_boot,
void (*handover)(struct qcom_q6v5 *q6v5));
void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5);
@@ -52,5 +63,7 @@ int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon);
int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout);
unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5);
+int qcom_q6v5_ping_subsystem(struct qcom_q6v5 *q6v5);
+int qcom_q6v5_ping_subsystem_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev);
#endif
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c
index b5c8d6d38c9c..15b3cdf8c157 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -712,7 +712,7 @@ static int adsp_probe(struct platform_device *pdev)
goto disable_pm;
ret = qcom_q6v5_init(&adsp->q6v5, pdev, rproc, desc->crash_reason_smem,
- desc->load_state, qcom_adsp_pil_handover);
+ desc->load_state, false, qcom_adsp_pil_handover);
if (ret)
goto disable_pm;
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 4e9eb5bd11fa..99d48d48c37f 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -2181,7 +2181,7 @@ static int q6v5_probe(struct platform_device *pdev)
qproc->has_mba_logs = desc->has_mba_logs;
ret = qcom_q6v5_init(&qproc->q6v5, pdev, rproc, MPSS_CRASH_REASON_SMEM, "modem",
- qcom_msa_handover);
+ false, qcom_msa_handover);
if (ret)
goto detach_proxy_pds;
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 46204da046fa..4700d111e058 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -36,6 +36,8 @@
#define MAX_ASSIGN_COUNT 3
+#define EARLY_ATTACH_TIMEOUT_MS 5000
+
struct qcom_pas_data {
int crash_reason_smem;
const char *firmware_name;
@@ -60,6 +62,7 @@ struct qcom_pas_data {
int region_assign_count;
bool region_assign_shared;
int region_assign_vmid;
+ bool early_boot;
};
struct qcom_pas {
@@ -423,13 +426,21 @@ static int qcom_pas_stop(struct rproc *rproc)
qcom_pas_unmap_carveout(rproc, pas->mem_phys, pas->mem_size);
- handover = qcom_q6v5_unprepare(&pas->q6v5);
- if (handover)
- qcom_pas_handover(&pas->q6v5);
+ /*
+ * qcom_q6v5_prepare is not called in qcom_pas_attach, skip unprepare to
+ * avoid mismatch.
+ */
+ if (pas->rproc->state != RPROC_ATTACHED) {
+ handover = qcom_q6v5_unprepare(&pas->q6v5);
+ if (handover)
+ qcom_pas_handover(&pas->q6v5);
+ }
if (pas->smem_host_id)
ret = qcom_smem_bust_hwspin_lock_by_host(pas->smem_host_id);
+ pas->q6v5.early_boot = false;
+
return ret;
}
@@ -510,6 +521,80 @@ static unsigned long qcom_pas_panic(struct rproc *rproc)
return qcom_q6v5_panic(&pas->q6v5);
}
+static int qcom_pas_attach(struct rproc *rproc)
+{
+ int ret;
+ struct qcom_pas *pas = rproc->priv;
+ bool ready_state;
+ bool crash_state;
+
+ pas->q6v5.running = true;
+ ret = irq_get_irqchip_state(pas->q6v5.fatal_irq,
+ IRQCHIP_STATE_LINE_LEVEL, &crash_state);
+
+ if (!ret && crash_state) {
+ dev_err(pas->dev, "Sub system has crashed before driver probe\n");
+ rproc_report_crash(rproc, RPROC_FATAL_ERROR);
+ ret = -EINVAL;
+ goto disable_running;
+ }
+
+ if (!ret)
+ ret = irq_get_irqchip_state(pas->q6v5.ready_irq,
+ IRQCHIP_STATE_LINE_LEVEL, &ready_state);
+
+ /*
+ * smp2p allocate irq entry can be delayed, irq_get_irqchip_state will get -ENODEV,
+ * the 5 seconds timeout is set to wait for this, after the entry is allocated, smp2p
+ * will call the qcom_smp2p_intr and complete the timeout in the ISR.
+ */
+ if (unlikely(ret == -ENODEV) || unlikely(!ready_state)) {
+ ret = wait_for_completion_timeout(&pas->q6v5.subsys_booted,
+ msecs_to_jiffies(EARLY_ATTACH_TIMEOUT_MS));
+
+ /*
+ * The bootloader may not support early boot, mark the state as
+ * RPROC_OFFLINE so that the PAS driver can load the firmware and
+ * start the remoteproc.
+ */
+ if (!ret) {
+ dev_err(pas->dev, "Timeout on waiting for subsystem interrupt\n");
+ pas->rproc->state = RPROC_OFFLINE;
+ ret = -ETIMEDOUT;
+ goto disable_running;
+ }
+
+ /* Only ping the subsystem if ready_state is set */
+ ret = irq_get_irqchip_state(pas->q6v5.ready_irq,
+ IRQCHIP_STATE_LINE_LEVEL, &ready_state);
+
+ if (ret)
+ goto disable_running;
+
+ if (!ready_state) {
+ ret = -EINVAL;
+ goto disable_running;
+ }
+ }
+
+ ret = qcom_q6v5_ping_subsystem(&pas->q6v5);
+
+ if (ret) {
+ dev_err(pas->dev, "Failed to ping subsystem, assuming device crashed\n");
+ rproc_report_crash(rproc, RPROC_FATAL_ERROR);
+ goto disable_running;
+ }
+
+ pas->q6v5.handover_issued = true;
+
+ return 0;
+
+disable_running:
+ pas->q6v5.running = false;
+
+ return ret;
+}
+
static const struct rproc_ops qcom_pas_ops = {
.unprepare = qcom_pas_unprepare,
.start = qcom_pas_start,
@@ -518,6 +603,7 @@ static const struct rproc_ops qcom_pas_ops = {
.parse_fw = qcom_pas_parse_firmware,
.load = qcom_pas_load,
.panic = qcom_pas_panic,
+ .attach = qcom_pas_attach,
};
static const struct rproc_ops qcom_pas_minidump_ops = {
@@ -823,7 +909,7 @@ static int qcom_pas_probe(struct platform_device *pdev)
pas->proxy_pd_count = ret;
ret = qcom_q6v5_init(&pas->q6v5, pdev, rproc, desc->crash_reason_smem,
- desc->load_state, qcom_pas_handover);
+ desc->load_state, desc->early_boot, qcom_pas_handover);
if (ret)
goto detach_proxy_pds;
@@ -855,6 +941,15 @@ static int qcom_pas_probe(struct platform_device *pdev)
pas->pas_ctx->use_tzmem = rproc->has_iommu;
pas->dtb_pas_ctx->use_tzmem = rproc->has_iommu;
+
+ if (pas->q6v5.early_boot) {
+ ret = qcom_q6v5_ping_subsystem_init(&pas->q6v5, pdev);
+ if (ret)
+ dev_warn(&pdev->dev, "Falling back to firmware load\n");
+ else
+ pas->rproc->state = RPROC_DETACHED;
+ }
+
ret = rproc_add(rproc);
if (ret)
goto remove_ssr_sysmon;
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index c27200159a88..859141589ed7 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -1011,7 +1011,7 @@ static int q6v5_wcss_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = qcom_q6v5_init(&wcss->q6v5, pdev, rproc, desc->crash_reason_smem, NULL, NULL);
+ ret = qcom_q6v5_init(&wcss->q6v5, pdev, rproc, desc->crash_reason_smem, NULL, false, NULL);
if (ret)
return ret;
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems
2026-03-10 10:03 ` [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems Jingyi Wang
@ 2026-03-11 8:28 ` Stephan Gerhold
2026-03-19 4:11 ` Jingyi Wang
0 siblings, 1 reply; 31+ messages in thread
From: Stephan Gerhold @ 2026-03-11 8:28 UTC (permalink / raw)
To: Jingyi Wang
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel,
Gokul Krishna Krishnakumar
On Tue, Mar 10, 2026 at 03:03:22AM -0700, Jingyi Wang wrote:
> From: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
>
> Subsystems can be brought out of reset by entities such as bootloaders.
> As the irq enablement could be later than subsystem bring up, the state
> of subsystem should be checked by reading SMP2P bits and performing ping
> test.
>
> A new qcom_pas_attach() function is introduced. if a crash state is
> detected for the subsystem, rproc_report_crash() is called. If the
> subsystem is ready either at the first check or within a 5-second timeout
> and the ping is successful, it will be marked as "attached". The ready
> state could be set by either ready interrupt or handover interrupt.
>
> If "early_boot" is set by kernel but "subsys_booted" is not completed
> within the timeout, It could be the early boot feature is not supported
> by other entities. In this case, the state will be marked as RPROC_OFFLINE
> so that the PAS driver can load the firmware and start the remoteproc. As
> the running state is set once attach function is called, the watchdog or
> fatal interrupt received can be handled correctly.
>
> Signed-off-by: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
> Co-developed-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> drivers/remoteproc/qcom_q6v5.c | 88 +++++++++++++++++++++++++++++-
> drivers/remoteproc/qcom_q6v5.h | 17 +++++-
> drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
> drivers/remoteproc/qcom_q6v5_mss.c | 2 +-
> drivers/remoteproc/qcom_q6v5_pas.c | 103 ++++++++++++++++++++++++++++++++++--
> drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
> 6 files changed, 204 insertions(+), 10 deletions(-)
>
> [...]
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 46204da046fa..4700d111e058 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -36,6 +36,8 @@
>
> #define MAX_ASSIGN_COUNT 3
>
> +#define EARLY_ATTACH_TIMEOUT_MS 5000
> +
> struct qcom_pas_data {
> int crash_reason_smem;
> const char *firmware_name;
> [...]
> @@ -510,6 +521,80 @@ static unsigned long qcom_pas_panic(struct rproc *rproc)
> return qcom_q6v5_panic(&pas->q6v5);
> }
>
> +static int qcom_pas_attach(struct rproc *rproc)
> +{
> + int ret;
> + struct qcom_pas *pas = rproc->priv;
> + bool ready_state;
> + bool crash_state;
> +
> + pas->q6v5.running = true;
> + ret = irq_get_irqchip_state(pas->q6v5.fatal_irq,
> + IRQCHIP_STATE_LINE_LEVEL, &crash_state);
> +
> + if (!ret && crash_state) {
> + dev_err(pas->dev, "Sub system has crashed before driver probe\n");
> + rproc_report_crash(rproc, RPROC_FATAL_ERROR);
> + ret = -EINVAL;
> + goto disable_running;
> + }
> +
> + if (!ret)
> + ret = irq_get_irqchip_state(pas->q6v5.ready_irq,
> + IRQCHIP_STATE_LINE_LEVEL, &ready_state);
> +
> + /*
> + * smp2p allocate irq entry can be delayed, irq_get_irqchip_state will get -ENODEV,
> + * the 5 seconds timeout is set to wait for this, after the entry is allocated, smp2p
> + * will call the qcom_smp2p_intr and complete the timeout in the ISR.
> + */
> + if (unlikely(ret == -ENODEV) || unlikely(!ready_state)) {
> + ret = wait_for_completion_timeout(&pas->q6v5.subsys_booted,
> + msecs_to_jiffies(EARLY_ATTACH_TIMEOUT_MS));
I have asked this back in October for v2 [1] and again in December for
v3 [2], but you still haven't really answered it. Please answer all
of the following questions:
1. What is the use case for this timeout?
2. In which situations will the start of the remoteproc be delayed?
3. Why does the boot firmware not wait until the remoteproc is fully
started before it continues booting?
4. If the boot firmware gives up control before the remoteproc is fully
started, how do you ensure that the handover resources are
maintained until the remoteproc signals handover?
v4 looks a bit less dangerous now since you don't enable the handover
IRQ anymore. Still, I don't understand how this would work in practice.
Removing this timeout would be preferable because then we could actually
support firmware versions that do not automatically start the remoteproc
without having to delay the boot process for 5s.
Thanks,
Stephan
[1]: https://lore.kernel.org/r/aQHmanEiWmEac7aV@linaro.org/
[2]: https://lore.kernel.org/r/aUsUhX8Km275qonq@linaro.org/
^ permalink raw reply [flat|nested] 31+ messages in thread* Re: [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems
2026-03-11 8:28 ` Stephan Gerhold
@ 2026-03-19 4:11 ` Jingyi Wang
0 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-19 4:11 UTC (permalink / raw)
To: Stephan Gerhold
Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio, aiqun.yu,
tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel,
Gokul Krishna Krishnakumar
On 3/11/2026 4:28 PM, Stephan Gerhold wrote:
> On Tue, Mar 10, 2026 at 03:03:22AM -0700, Jingyi Wang wrote:
>> From: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
>>
>> Subsystems can be brought out of reset by entities such as bootloaders.
>> As the irq enablement could be later than subsystem bring up, the state
>> of subsystem should be checked by reading SMP2P bits and performing ping
>> test.
>>
>> A new qcom_pas_attach() function is introduced. if a crash state is
>> detected for the subsystem, rproc_report_crash() is called. If the
>> subsystem is ready either at the first check or within a 5-second timeout
>> and the ping is successful, it will be marked as "attached". The ready
>> state could be set by either ready interrupt or handover interrupt.
>>
>> If "early_boot" is set by kernel but "subsys_booted" is not completed
>> within the timeout, It could be the early boot feature is not supported
>> by other entities. In this case, the state will be marked as RPROC_OFFLINE
>> so that the PAS driver can load the firmware and start the remoteproc. As
>> the running state is set once attach function is called, the watchdog or
>> fatal interrupt received can be handled correctly.
>>
>> Signed-off-by: Gokul Krishna Krishnakumar <gokul.krishnakumar@oss.qualcomm.com>
>> Co-developed-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
>> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
>> ---
>> drivers/remoteproc/qcom_q6v5.c | 88 +++++++++++++++++++++++++++++-
>> drivers/remoteproc/qcom_q6v5.h | 17 +++++-
>> drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
>> drivers/remoteproc/qcom_q6v5_mss.c | 2 +-
>> drivers/remoteproc/qcom_q6v5_pas.c | 103 ++++++++++++++++++++++++++++++++++--
>> drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
>> 6 files changed, 204 insertions(+), 10 deletions(-)
>>
>> [...]
>> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
>> index 46204da046fa..4700d111e058 100644
>> --- a/drivers/remoteproc/qcom_q6v5_pas.c
>> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
>> @@ -36,6 +36,8 @@
>>
>> #define MAX_ASSIGN_COUNT 3
>>
>> +#define EARLY_ATTACH_TIMEOUT_MS 5000
>> +
>> struct qcom_pas_data {
>> int crash_reason_smem;
>> const char *firmware_name;
>> [...]
>> @@ -510,6 +521,80 @@ static unsigned long qcom_pas_panic(struct rproc *rproc)
>> return qcom_q6v5_panic(&pas->q6v5);
>> }
>>
>> +static int qcom_pas_attach(struct rproc *rproc)
>> +{
>> + int ret;
>> + struct qcom_pas *pas = rproc->priv;
>> + bool ready_state;
>> + bool crash_state;
>> +
>> + pas->q6v5.running = true;
>> + ret = irq_get_irqchip_state(pas->q6v5.fatal_irq,
>> + IRQCHIP_STATE_LINE_LEVEL, &crash_state);
>> +
>> + if (!ret && crash_state) {
>> + dev_err(pas->dev, "Sub system has crashed before driver probe\n");
>> + rproc_report_crash(rproc, RPROC_FATAL_ERROR);
>> + ret = -EINVAL;
>> + goto disable_running;
>> + }
>> +
>> + if (!ret)
>> + ret = irq_get_irqchip_state(pas->q6v5.ready_irq,
>> + IRQCHIP_STATE_LINE_LEVEL, &ready_state);
>> +
>> + /*
>> + * smp2p allocate irq entry can be delayed, irq_get_irqchip_state will get -ENODEV,
>> + * the 5 seconds timeout is set to wait for this, after the entry is allocated, smp2p
>> + * will call the qcom_smp2p_intr and complete the timeout in the ISR.
>> + */
>> + if (unlikely(ret == -ENODEV) || unlikely(!ready_state)) {
>> + ret = wait_for_completion_timeout(&pas->q6v5.subsys_booted,
>> + msecs_to_jiffies(EARLY_ATTACH_TIMEOUT_MS));
>
> I have asked this back in October for v2 [1] and again in December for
> v3 [2], but you still haven't really answered it. Please answer all
> of the following questions:
>
> 1. What is the use case for this timeout?
> 2. In which situations will the start of the remoteproc be delayed?
> 3. Why does the boot firmware not wait until the remoteproc is fully
> started before it continues booting?
> 4. If the boot firmware gives up control before the remoteproc is fully
> started, how do you ensure that the handover resources are
> maintained until the remoteproc signals handover?
>
> v4 looks a bit less dangerous now since you don't enable the handover
> IRQ anymore. Still, I don't understand how this would work in practice.
> Removing this timeout would be preferable because then we could actually
> support firmware versions that do not automatically start the remoteproc
> without having to delay the boot process for 5s.
>
> Thanks,
> Stephan
>
> [1]: https://lore.kernel.org/r/aQHmanEiWmEac7aV@linaro.org/
> [2]: https://lore.kernel.org/r/aUsUhX8Km275qonq@linaro.org/
Hi Stephan,
For question [1] and [2],
We tried to answer the reason why the timeout is added in the comments,
but seems it is still not clear enough, it is a design in downstream
code to avoid the irq is not received when we check the irq state, but
indeed it seems like a redundant design and may block firmware start.
So we will remove this timeout in next series.
For question [3] and [4],
I think it related to how to deal with the "start" if "attach" fail?
As we will remove the timeout, we have 2 proposals for this:
a. attach fail -> keep the state "RPROC_DETACHED" -> if user echo "start" -> call attach() function again
-> if user echo "stop" to set RPROC_OFFLINE -> user echo "start" to do firmware load
If attach fail, user need to do "stop" first to set the RPROC_OFFLINE
and then "start" the remoteproc for firmware loading.
b. attach fail -> change state to RPROC_OFFLINE -> user echo "start" to do firmware load
this is what current code do, if attach fail, RPROC_OFFLINE will be set,
next time user echo start will go to the firmware load path.
Could you please share your comments on which one is better?
And qcom_pas_attach() is called by rproc_add() with auto_boot enabled.
if qcom_pas_attach() return false, rproc_add() will teardown all the
resources, so in rproc_trigger_auto_boot(), instead of calling rproc_boot
directly:
if (rproc->state == RPROC_DETACHED)
return rproc_boot(rproc);
we will schedule work to call rproc_boot asynchronously, like what firmware
loading is doing now, to make sure rproc_add() can success even if attach
failed, and we can do the firmware loading in the next step.
Do you think it is okay to do this change?
Thanks,
Jingyi
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v4 7/7] remoteproc: qcom_q6v5_pas: Add SoCCP node on Kaanapali
2026-03-10 10:03 [PATCH v4 0/7] Add binding and driver for Kaanapali SoCCP Jingyi Wang
` (5 preceding siblings ...)
2026-03-10 10:03 ` [PATCH v4 6/7] remoteproc: qcom: pas: Add late attach support for subsystems Jingyi Wang
@ 2026-03-10 10:03 ` Jingyi Wang
6 siblings, 0 replies; 31+ messages in thread
From: Jingyi Wang @ 2026-03-10 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
Luca Weiss, Bartosz Golaszewski, Konrad Dybcio
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
linux-remoteproc, devicetree, linux-kernel, Jingyi Wang,
Dmitry Baryshkov
The SoC Control Processor (SoCCP) is small RISC-V MCU that controls
USB Type-C, battery charging and various other functions on Qualcomm SoCs.
It provides a solution for control-plane processing, reducing per-subsystem
microcontroller reinvention. Add support for SoCCP PAS loader on Kaanapali
platform.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
drivers/remoteproc/qcom_q6v5_pas.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 4700d111e058..a5219dffcc7c 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1625,7 +1625,25 @@ static const struct qcom_pas_data sm8750_mpss_resource = {
.region_assign_vmid = QCOM_SCM_VMID_MSS_MSA,
};
+static const struct qcom_pas_data kaanapali_soccp_resource = {
+ .crash_reason_smem = 656,
+ .firmware_name = "soccp.mbn",
+ .dtb_firmware_name = "soccp_dtb.mbn",
+ .pas_id = 51,
+ .dtb_pas_id = 0x41,
+ .proxy_pd_names = (char*[]){
+ "cx",
+ "mx",
+ NULL
+ },
+ .ssr_name = "soccp",
+ .sysmon_name = "soccp",
+ .auto_boot = true,
+ .early_boot = true,
+};
+
static const struct of_device_id qcom_pas_of_match[] = {
+ { .compatible = "qcom,kaanapali-soccp-pas", .data = &kaanapali_soccp_resource},
{ .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource},
{ .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource},
{ .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource},
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread