[RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI

Icenowy Zheng posted 4 patches 1 month, 3 weeks ago
[RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Icenowy Zheng 1 month, 3 weeks ago
The SBI firmware might want to communicate to the AON firmware too.

Add a mbox-name item to allow to allocate a mailbox for SBI.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
 .../devicetree/bindings/firmware/thead,th1520-aon.yaml     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
index 3365124c7fd47..555465f4aab4e 100644
--- a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
+++ b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
@@ -26,11 +26,12 @@ properties:
     const: thead,th1520-aon
 
   mboxes:
-    maxItems: 1
+    maxItems: 2
 
   mbox-names:
     items:
       - const: aon
+      - const: aon-for-sbi
 
   resets:
     maxItems: 1
@@ -54,7 +55,7 @@ examples:
   - |
     aon: aon {
         compatible = "thead,th1520-aon";
-        mboxes = <&mbox_910t 1>;
-        mbox-names = "aon";
+        mboxes = <&mbox_910t 1>, <&mbox_910r 1>;
+        mbox-names = "aon", "aon-for-sbi";
         #power-domain-cells = <1>;
     };
-- 
2.50.1
Re: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On 14/08/2025 09:07, Icenowy Zheng wrote:
> The SBI firmware might want to communicate to the AON firmware too.
> 
> Add a mbox-name item to allow to allocate a mailbox for SBI.
> 
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> ---
>  .../devicetree/bindings/firmware/thead,th1520-aon.yaml     | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
> index 3365124c7fd47..555465f4aab4e 100644
> --- a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
> +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
> @@ -26,11 +26,12 @@ properties:
>      const: thead,th1520-aon
>  
>    mboxes:
> -    maxItems: 1
> +    maxItems: 2


ABI break without explanation why ("allow" is not a reason to affect
ABI) and its impact.


Best regards,
Krzysztof
Re: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Icenowy Zheng 1 month, 3 weeks ago
在 2025-08-14星期四的 09:18 +0200,Krzysztof Kozlowski写道:
> On 14/08/2025 09:07, Icenowy Zheng wrote:
> > The SBI firmware might want to communicate to the AON firmware too.
> > 
> > Add a mbox-name item to allow to allocate a mailbox for SBI.
> > 
> > Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> > ---
> >  .../devicetree/bindings/firmware/thead,th1520-aon.yaml     | 7
> > ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
> > b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
> > index 3365124c7fd47..555465f4aab4e 100644
> > --- a/Documentation/devicetree/bindings/firmware/thead,th1520-
> > aon.yaml
> > +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-
> > aon.yaml
> > @@ -26,11 +26,12 @@ properties:
> >      const: thead,th1520-aon
> >  
> >    mboxes:
> > -    maxItems: 1
> > +    maxItems: 2
> 
> 
> ABI break without explanation why ("allow" is not a reason to affect
> ABI) and its impact.

Is adding items an ABI break?

Or should I explicitly say "minItems: 1" here?

> 
> 
> Best regards,
> Krzysztof
Re: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On 14/08/2025 09:30, Icenowy Zheng wrote:
> 在 2025-08-14星期四的 09:18 +0200,Krzysztof Kozlowski写道:
>> On 14/08/2025 09:07, Icenowy Zheng wrote:
>>> The SBI firmware might want to communicate to the AON firmware too.
>>>
>>> Add a mbox-name item to allow to allocate a mailbox for SBI.
>>>
>>> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
>>> ---
>>>  .../devicetree/bindings/firmware/thead,th1520-aon.yaml     | 7
>>> ++++---
>>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
>>> b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml
>>> index 3365124c7fd47..555465f4aab4e 100644
>>> --- a/Documentation/devicetree/bindings/firmware/thead,th1520-
>>> aon.yaml
>>> +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-
>>> aon.yaml
>>> @@ -26,11 +26,12 @@ properties:
>>>      const: thead,th1520-aon
>>>  
>>>    mboxes:
>>> -    maxItems: 1
>>> +    maxItems: 2
>>
>>
>> ABI break without explanation why ("allow" is not a reason to affect
>> ABI) and its impact.
> 
> Is adding items an ABI break?

Adding required items is ABI break. You can easily test it. Apply patch
#1 and test your DTS. Apply patch #2 and test your DTS. New warnings
appear, so that's a proof of ABI impact.


> 
> Or should I explicitly say "minItems: 1" here?

Yes, but you should clearly explain the impact. Is it working? Not
working? Are you fixing something?

Best regards,
Krzysztof
Re: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Icenowy Zheng 1 month, 3 weeks ago
在 2025-08-14星期四的 09:49 +0200,Krzysztof Kozlowski写道:
> On 14/08/2025 09:30, Icenowy Zheng wrote:
> > 在 2025-08-14星期四的 09:18 +0200,Krzysztof Kozlowski写道:
> > > On 14/08/2025 09:07, Icenowy Zheng wrote:
> > > > The SBI firmware might want to communicate to the AON firmware
> > > > too.
> > > > 
> > > > Add a mbox-name item to allow to allocate a mailbox for SBI.
> > > > 
> > > > Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> > > > ---
> > > >  .../devicetree/bindings/firmware/thead,th1520-aon.yaml     | 7
> > > > ++++---
> > > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/firmware/thead,th1520-
> > > > aon.yaml
> > > > b/Documentation/devicetree/bindings/firmware/thead,th1520-
> > > > aon.yaml
> > > > index 3365124c7fd47..555465f4aab4e 100644
> > > > --- a/Documentation/devicetree/bindings/firmware/thead,th1520-
> > > > aon.yaml
> > > > +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-
> > > > aon.yaml
> > > > @@ -26,11 +26,12 @@ properties:
> > > >      const: thead,th1520-aon
> > > >  
> > > >    mboxes:
> > > > -    maxItems: 1
> > > > +    maxItems: 2
> > > 
> > > 
> > > ABI break without explanation why ("allow" is not a reason to
> > > affect
> > > ABI) and its impact.
> > 
> > Is adding items an ABI break?
> 
> Adding required items is ABI break. You can easily test it. Apply
> patch
> #1 and test your DTS. Apply patch #2 and test your DTS. New warnings
> appear, so that's a proof of ABI impact.

Ah sorry I don't mean that item is required.

> 
> 
> > 
> > Or should I explicitly say "minItems: 1" here?
> 
> Yes, but you should clearly explain the impact. Is it working? Not
> working? Are you fixing something?

The jsonschema draft says "Omitting this keyword has the same behavior
as a value of 0." for minItems. [1]

[1]
https://json-schema.org/draft/2020-12/json-schema-validation#section-6.4.2-3

> 
> Best regards,
> Krzysztof
Re: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/08/2025 10:04, Icenowy Zheng wrote:
>>
>>>
>>> Or should I explicitly say "minItems: 1" here?
>>
>> Yes, but you should clearly explain the impact. Is it working? Not
>> working? Are you fixing something?
> 
> The jsonschema draft says "Omitting this keyword has the same behavior
> as a value of 0." for minItems. [1]

No, omitting this means it is implied by maxItems, see fixups.py:130.

Best regards,
Krzysztof