public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells
@ 2025-05-28 16:37 Frank Li
  2025-06-05 12:54 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2025-05-28 16:37 UTC (permalink / raw)
  To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	open list:IRQCHIP DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
  Cc: imx

According to existed dts arch/arm/boot/dts/armv7-m.dtsi and driver
drivers/irqchip/irq-nvic.c, compatible string should be arm,armv7m-nvic,

Remove unused compatible string arm,v6m-nvic, arm,v7m-nvic and arm,v8m-nvic.

Fix below CHECK_DTB warning:

arch/arm/boot/dts/nxp/vf/vf610m4-cosmic.dtb: /interrupt-controller@e000e100:
    failed to match any schema with compatible: ['arm,armv7m-nvic']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
change in v2:
- fix example interrupt-cells
- commit message add driver information
- remove unused compatible string
---
 .../bindings/interrupt-controller/arm,nvic.yaml     | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
index d89eca956c5fa..c0be00b450291 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
@@ -17,9 +17,7 @@ description:
 properties:
   compatible:
     enum:
-      - arm,v6m-nvic
-      - arm,v7m-nvic
-      - arm,v8m-nvic
+      - arm,armv7m-nvic
 
   reg:
     maxItems: 1
@@ -30,10 +28,10 @@ properties:
   interrupt-controller: true
 
   '#interrupt-cells':
-    const: 2
+    const: 1
     description: |
       Number of cells to encode an interrupt source:
-      first = interrupt number, second = priority.
+      first = interrupt number.
 
   arm,num-irq-priority-bits:
     description: Number of priority bits implemented by the SoC
@@ -45,15 +43,14 @@ required:
   - reg
   - interrupt-controller
   - '#interrupt-cells'
-  - arm,num-irq-priority-bits
 
 additionalProperties: false
 
 examples:
   - |
     interrupt-controller@e000e100 {
-        compatible = "arm,v7m-nvic";
-        #interrupt-cells = <2>;
+        compatible = "arm,armv7m-nvic";
+        #interrupt-cells = <1>;
         #address-cells = <0>;
         interrupt-controller;
         reg = <0xe000e100 0xc00>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells
  2025-05-28 16:37 [PATCH v2 1/1] dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells Frank Li
@ 2025-06-05 12:54 ` Rob Herring
  2025-06-05 15:16   ` Frank Li
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2025-06-05 12:54 UTC (permalink / raw)
  To: Frank Li
  Cc: Thomas Gleixner, Krzysztof Kozlowski, Conor Dooley,
	open list:IRQCHIP DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, imx

On Wed, May 28, 2025 at 12:37:04PM -0400, Frank Li wrote:
> According to existed dts arch/arm/boot/dts/armv7-m.dtsi and driver
> drivers/irqchip/irq-nvic.c, compatible string should be arm,armv7m-nvic,
> 
> Remove unused compatible string arm,v6m-nvic, arm,v7m-nvic and arm,v8m-nvic.
> 
> Fix below CHECK_DTB warning:
> 
> arch/arm/boot/dts/nxp/vf/vf610m4-cosmic.dtb: /interrupt-controller@e000e100:
>     failed to match any schema with compatible: ['arm,armv7m-nvic']
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> change in v2:
> - fix example interrupt-cells
> - commit message add driver information
> - remove unused compatible string
> ---
>  .../bindings/interrupt-controller/arm,nvic.yaml     | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> index d89eca956c5fa..c0be00b450291 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> @@ -17,9 +17,7 @@ description:
>  properties:
>    compatible:
>      enum:
> -      - arm,v6m-nvic
> -      - arm,v7m-nvic
> -      - arm,v8m-nvic

These came from Zephyr and are in use:

https://docs.zephyrproject.org/latest/build/dts/api/bindings/interrupt-controller/arm%2Cv7m-nvic.html

> +      - arm,armv7m-nvic

Add '# deprecated' after it.

>  
>    reg:
>      maxItems: 1
> @@ -30,10 +28,10 @@ properties:
>    interrupt-controller: true
>  
>    '#interrupt-cells':
> -    const: 2
> +    const: 1

Have to support both.

>      description: |
>        Number of cells to encode an interrupt source:
> -      first = interrupt number, second = priority.
> +      first = interrupt number.
>  
>    arm,num-irq-priority-bits:
>      description: Number of priority bits implemented by the SoC
> @@ -45,15 +43,14 @@ required:
>    - reg
>    - interrupt-controller
>    - '#interrupt-cells'
> -  - arm,num-irq-priority-bits

Is there NVIC h/w without priority bits? If not, this should remain 
required.

>  
>  additionalProperties: false
>  
>  examples:
>    - |
>      interrupt-controller@e000e100 {
> -        compatible = "arm,v7m-nvic";
> -        #interrupt-cells = <2>;
> +        compatible = "arm,armv7m-nvic";
> +        #interrupt-cells = <1>;
>          #address-cells = <0>;
>          interrupt-controller;
>          reg = <0xe000e100 0xc00>;
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells
  2025-06-05 12:54 ` Rob Herring
@ 2025-06-05 15:16   ` Frank Li
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Li @ 2025-06-05 15:16 UTC (permalink / raw)
  To: Rob Herring
  Cc: Thomas Gleixner, Krzysztof Kozlowski, Conor Dooley,
	open list:IRQCHIP DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, imx

On Thu, Jun 05, 2025 at 07:54:44AM -0500, Rob Herring wrote:
> On Wed, May 28, 2025 at 12:37:04PM -0400, Frank Li wrote:
> > According to existed dts arch/arm/boot/dts/armv7-m.dtsi and driver
> > drivers/irqchip/irq-nvic.c, compatible string should be arm,armv7m-nvic,
> >
> > Remove unused compatible string arm,v6m-nvic, arm,v7m-nvic and arm,v8m-nvic.
> >
> > Fix below CHECK_DTB warning:
> >
> > arch/arm/boot/dts/nxp/vf/vf610m4-cosmic.dtb: /interrupt-controller@e000e100:
> >     failed to match any schema with compatible: ['arm,armv7m-nvic']
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> > change in v2:
> > - fix example interrupt-cells
> > - commit message add driver information
> > - remove unused compatible string
> > ---
> >  .../bindings/interrupt-controller/arm,nvic.yaml     | 13 +++++--------
> >  1 file changed, 5 insertions(+), 8 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> > index d89eca956c5fa..c0be00b450291 100644
> > --- a/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> > +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,nvic.yaml
> > @@ -17,9 +17,7 @@ description:
> >  properties:
> >    compatible:
> >      enum:
> > -      - arm,v6m-nvic
> > -      - arm,v7m-nvic
> > -      - arm,v8m-nvic
>
> These came from Zephyr and are in use:
>
> https://docs.zephyrproject.org/latest/build/dts/api/bindings/interrupt-controller/arm%2Cv7m-nvic.html

If that case, do you want to deprecated "arm,armv7m-nvic" or "arm,vNm-nvic"

look like second arm is duplicated. And not much user use arm,armv7m-nvic
in linux code.  vf610 is old chips.

Frank
>
> > +      - arm,armv7m-nvic
>
> Add '# deprecated' after it.
>
> >
> >    reg:
> >      maxItems: 1
> > @@ -30,10 +28,10 @@ properties:
> >    interrupt-controller: true
> >
> >    '#interrupt-cells':
> > -    const: 2
> > +    const: 1
>
> Have to support both.
>
> >      description: |
> >        Number of cells to encode an interrupt source:
> > -      first = interrupt number, second = priority.
> > +      first = interrupt number.
> >
> >    arm,num-irq-priority-bits:
> >      description: Number of priority bits implemented by the SoC
> > @@ -45,15 +43,14 @@ required:
> >    - reg
> >    - interrupt-controller
> >    - '#interrupt-cells'
> > -  - arm,num-irq-priority-bits
>
> Is there NVIC h/w without priority bits? If not, this should remain
> required.
>
> >
> >  additionalProperties: false
> >
> >  examples:
> >    - |
> >      interrupt-controller@e000e100 {
> > -        compatible = "arm,v7m-nvic";
> > -        #interrupt-cells = <2>;
> > +        compatible = "arm,armv7m-nvic";
> > +        #interrupt-cells = <1>;
> >          #address-cells = <0>;
> >          interrupt-controller;
> >          reg = <0xe000e100 0xc00>;
> > --
> > 2.34.1
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-05 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 16:37 [PATCH v2 1/1] dt-bindings: interrupt-controller: Add arm,armv7m-nvic and fix #interrupt-cells Frank Li
2025-06-05 12:54 ` Rob Herring
2025-06-05 15:16   ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox