[PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible

Stanimir Varbanov posted 4 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
Posted by Stanimir Varbanov 3 months, 1 week ago
Add bcm2712-pm compatible and update the bindings to satisfy it's
requirements. The PM hardware block inside bcm2712 lacks the "asb"
and "rpivid_asb" register ranges and also does not have clocks, update
the bindings accordingly.

Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 38 ++++++++++++++++---
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
index e28ef198a801..ce910802ee9d 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
@@ -13,23 +13,21 @@ description: |
 maintainers:
   - Nicolas Saenz Julienne <nsaenz@kernel.org>
 
-allOf:
-  - $ref: /schemas/watchdog/watchdog.yaml#
-
 properties:
   compatible:
     items:
       - enum:
           - brcm,bcm2835-pm
           - brcm,bcm2711-pm
+          - brcm,bcm2712-pm
       - const: brcm,bcm2835-pm-wdt
 
   reg:
-    minItems: 2
+    minItems: 1
     maxItems: 3
 
   reg-names:
-    minItems: 2
+    minItems: 1
     items:
       - const: pm
       - const: asb
@@ -62,7 +60,35 @@ required:
   - reg
   - "#power-domain-cells"
   - "#reset-cells"
-  - clocks
+
+allOf:
+  - $ref: /schemas/watchdog/watchdog.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - brcm,bcm2835-pm
+              - brcm,bcm2711-pm
+    then:
+      required:
+        - clocks
+
+      properties:
+        reg:
+          minItems: 2
+
+        reg-names:
+          minItems: 2
+
+    else:
+      properties:
+        reg:
+          minItems: 1
+
+        reg-names:
+          minItems: 1
 
 additionalProperties: false
 
-- 
2.47.0
Re: [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
Posted by Conor Dooley 3 months, 1 week ago
On Fri, Oct 31, 2025 at 12:24:21PM +0200, Stanimir Varbanov wrote:
> Add bcm2712-pm compatible and update the bindings to satisfy it's
> requirements. The PM hardware block inside bcm2712 lacks the "asb"
> and "rpivid_asb" register ranges and also does not have clocks, update
> the bindings accordingly.
> 
> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
>  .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 38 ++++++++++++++++---
>  1 file changed, 32 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> index e28ef198a801..ce910802ee9d 100644
> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
> @@ -13,23 +13,21 @@ description: |
>  maintainers:
>    - Nicolas Saenz Julienne <nsaenz@kernel.org>
>  
> -allOf:
> -  - $ref: /schemas/watchdog/watchdog.yaml#
> -
>  properties:
>    compatible:
>      items:
>        - enum:
>            - brcm,bcm2835-pm
>            - brcm,bcm2711-pm
> +          - brcm,bcm2712-pm
>        - const: brcm,bcm2835-pm-wdt
>  
>    reg:
> -    minItems: 2
> +    minItems: 1
>      maxItems: 3
>  
>    reg-names:
> -    minItems: 2
> +    minItems: 1
>      items:
>        - const: pm
>        - const: asb
> @@ -62,7 +60,35 @@ required:
>    - reg
>    - "#power-domain-cells"
>    - "#reset-cells"
> -  - clocks
> +
> +allOf:
> +  - $ref: /schemas/watchdog/watchdog.yaml#
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - brcm,bcm2835-pm
> +              - brcm,bcm2711-pm
> +    then:
> +      required:
> +        - clocks
> +
> +      properties:
> +        reg:
> +          minItems: 2
> +
> +        reg-names:
> +          minItems: 2

> +
> +    else:
> +      properties:
> +        reg:
> +          minItems: 1
> +
> +        reg-names:
> +          minItems: 1

This else has no impact, was it meant to be maxItems?
pw-bot: changes-requested

>  
>  additionalProperties: false
>  
> -- 
> 2.47.0
> 
Re: [PATCH v2 2/4] dt-bindings: soc: bcm: Add bcm2712 compatible
Posted by Stanimir Varbanov 3 months, 1 week ago
Hi Conor,

On 10/31/25 5:04 PM, Conor Dooley wrote:
> On Fri, Oct 31, 2025 at 12:24:21PM +0200, Stanimir Varbanov wrote:
>> Add bcm2712-pm compatible and update the bindings to satisfy it's
>> requirements. The PM hardware block inside bcm2712 lacks the "asb"
>> and "rpivid_asb" register ranges and also does not have clocks, update
>> the bindings accordingly.
>>
>> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
>> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
>> ---
>>  .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 38 ++++++++++++++++---
>>  1 file changed, 32 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> index e28ef198a801..ce910802ee9d 100644
>> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
>> @@ -13,23 +13,21 @@ description: |
>>  maintainers:
>>    - Nicolas Saenz Julienne <nsaenz@kernel.org>
>>  
>> -allOf:
>> -  - $ref: /schemas/watchdog/watchdog.yaml#
>> -
>>  properties:
>>    compatible:
>>      items:
>>        - enum:
>>            - brcm,bcm2835-pm
>>            - brcm,bcm2711-pm
>> +          - brcm,bcm2712-pm
>>        - const: brcm,bcm2835-pm-wdt
>>  
>>    reg:
>> -    minItems: 2
>> +    minItems: 1
>>      maxItems: 3
>>  
>>    reg-names:
>> -    minItems: 2
>> +    minItems: 1
>>      items:
>>        - const: pm
>>        - const: asb
>> @@ -62,7 +60,35 @@ required:
>>    - reg
>>    - "#power-domain-cells"
>>    - "#reset-cells"
>> -  - clocks
>> +
>> +allOf:
>> +  - $ref: /schemas/watchdog/watchdog.yaml#
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - brcm,bcm2835-pm
>> +              - brcm,bcm2711-pm
>> +    then:
>> +      required:
>> +        - clocks
>> +
>> +      properties:
>> +        reg:
>> +          minItems: 2
>> +
>> +        reg-names:
>> +          minItems: 2
> 
>> +
>> +    else:
>> +      properties:
>> +        reg:
>> +          minItems: 1
>> +
>> +        reg-names:
>> +          minItems: 1
> 
> This else has no impact, was it meant to be maxItems?

Oops, yes it should be maxItems. Sending new version ...

~Stan