Skip to contentSkip to conversation

dt-bindings: remoteproc: ti: Fix the number of mailboxes

PATCH In review Rob Herring 2 participants 4 messages Jan 7, 2022

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: remoteproc: ti: Fix the number of mailboxes

Based on the example, the TI K3 DSP and R5 have 2 mailboxes, but the schema says 1. Fix the schema.

---
 .../devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml         | 2 +-
 .../devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +1 -1
index 5ec6505ac408..648144fa1582 100644
@@ -53,7 +53,7 @@ properties:
       OMAP Mailbox specifier denoting the sub-mailbox, to be used for
       communication with the remote processor. This property should match
       with the sub-mailbox node used in the firmware image.
-    maxItems: 1
+    maxItems: 2
 
   memory-region:
     minItems: 2
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +1 -1
index eeef255c4045..2c5f91ea5296 100644
@@ -135,7 +135,7 @@ patternProperties:
           OMAP Mailbox specifier denoting the sub-mailbox, to be used for
           communication with the remote processor. This property should match
           with the sub-mailbox node used in the firmware image.
-        maxItems: 1
+        maxItems: 2
 
       memory-region:
         description: |
Signature · 1 line
2.32.0
#1 lore raw

Hi Rob,

Quoted 2 lines · Rob Herring

Based on the example, the TI K3 DSP and R5 have 2 mailboxes, but the schema says 1. Fix the schema.

No, 1 is correct. The OMAP Mailbox binding uses #mbox-cells as 1 and not 0, and uses a phandle as the cell-value.

regards
Suman

Quoted 34 lines
---
 .../devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml         | 2 +-
 .../devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +1 -1
index 5ec6505ac408..648144fa1582 100644
@@ -53,7 +53,7 @@ properties:
       OMAP Mailbox specifier denoting the sub-mailbox, to be used for
       communication with the remote processor. This property should match
       with the sub-mailbox node used in the firmware image.
-    maxItems: 1
+    maxItems: 2
 
   memory-region:
     minItems: 2
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +1 -1
index eeef255c4045..2c5f91ea5296 100644
@@ -135,7 +135,7 @@ patternProperties:
           OMAP Mailbox specifier denoting the sub-mailbox, to be used for
           communication with the remote processor. This property should match
           with the sub-mailbox node used in the firmware image.
-        maxItems: 1
+        maxItems: 2
 
       memory-region:
         description: |
#2 lore raw
Quoted 8 lines · Suman Anna

Hi Rob,

Quoted 2 lines · Rob Herring

Based on the example, the TI K3 DSP and R5 have 2 mailboxes, but the schema says 1. Fix the schema.

No, 1 is correct. The OMAP Mailbox binding uses #mbox-cells as 1 and not 0, and uses a phandle as the cell-value.

The following is what you get with your current patch,

Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.example.dt.yaml:
dsp@4d80800000: mboxes: [[4294967295, 4294967295]] is too short Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.example.dt.yaml:
dsp@64800000: mboxes: [[4294967295, 4294967295]] is too short

regards
Suman

Quoted 39 lines

regards
Suman

Quoted 34 lines
---
 .../devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml         | 2 +-
 .../devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +1 -1
index 5ec6505ac408..648144fa1582 100644
@@ -53,7 +53,7 @@ properties:
       OMAP Mailbox specifier denoting the sub-mailbox, to be used for
       communication with the remote processor. This property should match
       with the sub-mailbox node used in the firmware image.
-    maxItems: 1
+    maxItems: 2
 
   memory-region:
     minItems: 2
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +1 -1
index eeef255c4045..2c5f91ea5296 100644
@@ -135,7 +135,7 @@ patternProperties:
           OMAP Mailbox specifier denoting the sub-mailbox, to be used for
           communication with the remote processor. This property should match
           with the sub-mailbox node used in the firmware image.
-        maxItems: 1
+        maxItems: 2
 
       memory-region:
         description: |
author maintainer
#3 lore raw
Quoted 10 lines · Suman Anna
Quoted 8 lines · Suman Anna

Hi Rob,

Quoted 2 lines · Rob Herring

Based on the example, the TI K3 DSP and R5 have 2 mailboxes, but the schema says 1. Fix the schema.

No, 1 is correct. The OMAP Mailbox binding uses #mbox-cells as 1 and not 0, and uses a phandle as the cell-value.

That's unfortunate. Really, ti,mbox-tx/rx should have been the mbox cells with 2 entries (rx and tx)...

Quoted 7 lines

The following is what you get with your current patch,

Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.example.dt.yaml:
dsp@4d80800000: mboxes: [[4294967295, 4294967295]] is too short Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.example.dt.yaml:
dsp@64800000: mboxes: [[4294967295, 4294967295]] is too short

Ugg, yes. What I'm working on is getting validation on dtb files to work. That means the dts <> are lost and we have to either parse the properties properly (look up #foo-cells) or use __fixups__ to find unresolved phandles (the case for most examples). The latter works most of the time except a few cases like above. So the fix here is to add a mbox provider node to the example.

Rob