[PATCH v3 3/5] dt-bindings: remoteproc: qcom,pas: Document pas for SoCCP on Kaanapali and Glymur platforms

Jingyi Wang posted 5 patches 1 month, 2 weeks ago
[PATCH v3 3/5] dt-bindings: remoteproc: qcom,pas: Document pas for SoCCP on Kaanapali and Glymur platforms
Posted by Jingyi Wang 1 month, 2 weeks ago
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", "interrupts" and
"interrupt-names" properties in the pas-common.

Co-developed-by: Sibi Sankar <sibi.sankar@oss.qualcomm.com>
Signed-off-by: Sibi Sankar <sibi.sankar@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
 .../remoteproc/qcom,kaanapali-soccp-pas.yaml       | 134 +++++++++++++++++++++
 .../bindings/remoteproc/qcom,pas-common.yaml       |  28 +++--
 2 files changed, 155 insertions(+), 7 deletions(-)

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..bd94ab9a3da4
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,kaanapali-soccp-pas.yaml
@@ -0,0 +1,134 @@
+# 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 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 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 Hexagon core
+      - description: Firmware name of the Hexagon Devicetree
+
+  memory-region:
+    items:
+      - description: Memory region for main Firmware authentication
+      - description: Memory region for Devicetree Firmware authentication
+
+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>,
+                              <&soccp_smp2p_in 10 IRQ_TYPE_EDGE_RISING>;
+        interrupt-names = "wdog",
+                          "fatal",
+                          "ready",
+                          "handover",
+                          "stop-ack",
+                          "pong",
+                          "wake-ack";
+
+        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 10>,
+                           <&soccp_smp2p_out 9>,
+                           <&soccp_smp2p_out 8>;
+        qcom,smem-state-names = "stop",
+                                "wakeup",
+                                "sleep",
+                                "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 63a82e7a8bf8..149e993282bb 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
@@ -33,16 +33,22 @@ properties:
       - description: Handover interrupt
       - description: Stop acknowledge interrupt
       - description: Shutdown acknowledge interrupt
+      - description: Pong interrupt
+      - description: Wake acknowledge interrupt
 
   interrupt-names:
     minItems: 5
+    maxItems: 7
     items:
-      - const: wdog
-      - const: fatal
-      - const: ready
-      - const: handover
-      - const: stop-ack
-      - const: shutdown-ack
+      enum:
+        - wdog
+        - fatal
+        - ready
+        - handover
+        - stop-ack
+        - shutdown-ack
+        - pong
+        - wake-ack
 
   power-domains:
     minItems: 1
@@ -55,13 +61,21 @@ 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: Wake up the remoteproc
+      - description: Make the remoteproc sleep
+      - 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: wakeup
+      - const: sleep
+      - const: ping
 
   smd-edge:
     $ref: /schemas/remoteproc/qcom,smd-edge.yaml#

-- 
2.25.1
Re: [PATCH v3 3/5] dt-bindings: remoteproc: qcom,pas: Document pas for SoCCP on Kaanapali and Glymur platforms
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On Tue, Dec 23, 2025 at 01:13:49AM -0800, Jingyi Wang wrote:
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
> index 63a82e7a8bf8..149e993282bb 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
> @@ -33,16 +33,22 @@ properties:
>        - description: Handover interrupt
>        - description: Stop acknowledge interrupt
>        - description: Shutdown acknowledge interrupt
> +      - description: Pong interrupt
> +      - description: Wake acknowledge interrupt
>  
>    interrupt-names:
>      minItems: 5
> +    maxItems: 7
>      items:
> -      - const: wdog
> -      - const: fatal
> -      - const: ready
> -      - const: handover
> -      - const: stop-ack
> -      - const: shutdown-ack
> +      enum:

No, no. Stop doing random changes. NAK

Now you remove strict order (see writing bindings) and claim every
device like SM8550 ADSP PAS has any order.

And it is now de-synced with interrupts. Read writing bindings - this is
clearly described there at line 90!

You can only grow existing list.



> +        - wdog
> +        - fatal
> +        - ready
> +        - handover
> +        - stop-ack
> +        - shutdown-ack
> +        - pong
> +        - wake-ack
>  
>    power-domains:
>      minItems: 1
> @@ -55,13 +61,21 @@ 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: Wake up the remoteproc
> +      - description: Make the remoteproc sleep
> +      - description: Ping the remoteproc

So every device like SM8550 PAS has now four smem states... without any
explanation. Read writing bindings - what does it say?

"... and define constraints specific to the device."

"DO define properties in terms of constraints. How many entries? What are
 possible values? What is the order? All these constraints represent the ABI
  as well."

It is your homework to read the docs. Not mine.

If you want to change common list you must define strict constraints for
EVERY user.

Best regards,
Krzysztof
Re: [PATCH v3 3/5] dt-bindings: remoteproc: qcom,pas: Document pas for SoCCP on Kaanapali and Glymur platforms
Posted by Jingyi Wang 1 month, 2 weeks ago

On 12/23/2025 9:29 PM, Krzysztof Kozlowski wrote:
> On Tue, Dec 23, 2025 at 01:13:49AM -0800, Jingyi Wang wrote:
>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>> index 63a82e7a8bf8..149e993282bb 100644
>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>> @@ -33,16 +33,22 @@ properties:
>>        - description: Handover interrupt
>>        - description: Stop acknowledge interrupt
>>        - description: Shutdown acknowledge interrupt
>> +      - description: Pong interrupt
>> +      - description: Wake acknowledge interrupt
>>  
>>    interrupt-names:
>>      minItems: 5
>> +    maxItems: 7
>>      items:
>> -      - const: wdog
>> -      - const: fatal
>> -      - const: ready
>> -      - const: handover
>> -      - const: stop-ack
>> -      - const: shutdown-ack
>> +      enum:
> 
> No, no. Stop doing random changes. NAK
> 
> Now you remove strict order (see writing bindings) and claim every
> device like SM8550 ADSP PAS has any order.
> 
> And it is now de-synced with interrupts. Read writing bindings - this is
> clearly described there at line 90!
> 
> You can only grow existing list.
> 
> 
> 

the interrupt for soccp is defined as 
"wdog","fatal","ready","handover","stop-ack","pong","wake-ack"
while other pas could be:
"wdog","fatal","ready","handover","stop-ack","shutdown-ack"

so grow existing list is not work for this,

In the v1, got your comments to adjust pas-common.yaml for the interrupt:
https://lore.kernel.org/all/861b6ede-f168-44e6-85bd-10cf04dbcec7@kernel.org/

and in v2, interrupt are moved as part to the "allOf" with if-else and
also got NAK:
https://lore.kernel.org/all/20251030-venomous-apricot-falcon-b3fd64@kuoka/

Could you please share a example for us to understand how to maintain it in
pas-common.yaml, not define if-else and has strict order at the same time?
That will be very helpful.

Thanks,
Jingyi


>> +        - wdog
>> +        - fatal
>> +        - ready
>> +        - handover
>> +        - stop-ack
>> +        - shutdown-ack
>> +        - pong
>> +        - wake-ack
>>  
>>    power-domains:
>>      minItems: 1
>> @@ -55,13 +61,21 @@ 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: Wake up the remoteproc
>> +      - description: Make the remoteproc sleep
>> +      - description: Ping the remoteproc
> 
> So every device like SM8550 PAS has now four smem states... without any
> explanation. Read writing bindings - what does it say?
>

This change is similar to current interrupt-names property define 6 interrupts
but has minItems: 5

-  interrupt-names:
-    minItems: 5
-    items:
-      - const: wdog
-      - const: fatal
-      - const: ready
-      - const: handover
-      - const: stop-ack
-      - const: shutdown-ack


I think this should be "grow existing list" you mentioned above?

Thanks,
Jingyi
 
> "... and define constraints specific to the device."
> 
> "DO define properties in terms of constraints. How many entries? What are
>  possible values? What is the order? All these constraints represent the ABI
>   as well."
> 
> It is your homework to read the docs. Not mine.
> 
> If you want to change common list you must define strict constraints for
> EVERY user.
> 
> Best regards,
> Krzysztof
>
Re: [PATCH v3 3/5] dt-bindings: remoteproc: qcom,pas: Document pas for SoCCP on Kaanapali and Glymur platforms
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 24/12/2025 04:16, Jingyi Wang wrote:
> 
> 
> On 12/23/2025 9:29 PM, Krzysztof Kozlowski wrote:
>> On Tue, Dec 23, 2025 at 01:13:49AM -0800, Jingyi Wang wrote:
>>> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>>> index 63a82e7a8bf8..149e993282bb 100644
>>> --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>>> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml
>>> @@ -33,16 +33,22 @@ properties:
>>>        - description: Handover interrupt
>>>        - description: Stop acknowledge interrupt
>>>        - description: Shutdown acknowledge interrupt
>>> +      - description: Pong interrupt
>>> +      - description: Wake acknowledge interrupt
>>>  
>>>    interrupt-names:
>>>      minItems: 5
>>> +    maxItems: 7
>>>      items:
>>> -      - const: wdog
>>> -      - const: fatal
>>> -      - const: ready
>>> -      - const: handover
>>> -      - const: stop-ack
>>> -      - const: shutdown-ack
>>> +      enum:
>>
>> No, no. Stop doing random changes. NAK
>>
>> Now you remove strict order (see writing bindings) and claim every
>> device like SM8550 ADSP PAS has any order.
>>
>> And it is now de-synced with interrupts. Read writing bindings - this is
>> clearly described there at line 90!
>>
>> You can only grow existing list.
>>
>>
>>
> 
> the interrupt for soccp is defined as 
> "wdog","fatal","ready","handover","stop-ack","pong","wake-ack"
> while other pas could be:
> "wdog","fatal","ready","handover","stop-ack","shutdown-ack"
> 
> so grow existing list is not work for this,
> 
> In the v1, got your comments to adjust pas-common.yaml for the interrupt:
> https://lore.kernel.org/all/861b6ede-f168-44e6-85bd-10cf04dbcec7@kernel.org/
> 
> and in v2, interrupt are moved as part to the "allOf" with if-else and
> also got NAK:
> https://lore.kernel.org/all/20251030-venomous-apricot-falcon-b3fd64@kuoka/
> 
> Could you please share a example for us to understand how to maintain it in
> pas-common.yaml, not define if-else and has strict order at the same time?
> That will be very helpful.
> 

Can you read the docs first? This is not a ping pong, where you keep
sending till it passes the review. If I provide you idea, then you will
send something whatever based on that because you still did not read the
rules governing bindings.

Best regards,
Krzysztof