* [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names
2023-12-07 7:29 [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Binbin Zhou
@ 2023-12-07 7:29 ` Binbin Zhou
2023-12-07 8:23 ` Krzysztof Kozlowski
2023-12-07 7:29 ` [PATCH v6 2/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for interrupt-names Binbin Zhou
2023-12-29 15:08 ` [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Huacai Chen
2 siblings, 1 reply; 7+ messages in thread
From: Binbin Zhou @ 2023-12-07 7:29 UTC (permalink / raw)
To: Binbin Zhou, Huacai Chen, Thomas Gleixner, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Huacai Chen, devicetree, Jiaxun Yang, lvjianmin, WANG Xuerui,
loongarch, linux-kernel, Binbin Zhou, Rob Herring
As we know, the Loongson-2K0500 is a single-core CPU, and the
core1-related register (isr1) does not exist. So "reg" and "reg-names"
should be set to "minItems 2"(main nad isr0).
This fixes dtbs_check warning:
DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected)
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Rob Herring <robh@kernel.org>
---
.../interrupt-controller/loongson,liointc.yaml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
index 00b570c82903..a3276c1d9b59 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
@@ -11,8 +11,13 @@ maintainers:
description: |
This interrupt controller is found in the Loongson-3 family of chips and
- Loongson-2K1000 chip, as the primary package interrupt controller which
+ Loongson-2K series chips, as the primary package interrupt controller which
can route local I/O interrupt to interrupt lines of cores.
+ Be aware of the following points.
+ 1.The Loongson-2K0500 is a single core CPU;
+ 2.The Loongson-2K0500/2K1000 has 64 device interrupt sources as inputs, so we
+ need to define two nodes in dts{i} to describe the "0-31" and "32-61" interrupt
+ sources respectively.
allOf:
- $ref: /schemas/interrupt-controller.yaml#
@@ -33,6 +38,7 @@ properties:
- const: main
- const: isr0
- const: isr1
+ minItems: 2
interrupt-controller: true
@@ -86,7 +92,8 @@ if:
then:
properties:
reg:
- minItems: 3
+ minItems: 2
+ maxItems: 3
required:
- reg-names
--
2.39.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names
2023-12-07 7:29 ` [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names Binbin Zhou
@ 2023-12-07 8:23 ` Krzysztof Kozlowski
2023-12-07 8:24 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-07 8:23 UTC (permalink / raw)
To: Binbin Zhou, Binbin Zhou, Huacai Chen, Thomas Gleixner,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Huacai Chen, devicetree, Jiaxun Yang, lvjianmin, WANG Xuerui,
loongarch, linux-kernel, Rob Herring
On 07/12/2023 08:29, Binbin Zhou wrote:
> As we know, the Loongson-2K0500 is a single-core CPU, and the
> core1-related register (isr1) does not exist. So "reg" and "reg-names"
> should be set to "minItems 2"(main nad isr0).
>
> This fixes dtbs_check warning:
>
> DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb
> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short
> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected)
> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short
> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short
> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
>
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> Reviewed-by: Rob Herring <robh@kernel.org>
Where? Point me to exact email on lore.
Didn't we already talk some time ago about fake reviews?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names
2023-12-07 8:23 ` Krzysztof Kozlowski
@ 2023-12-07 8:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-07 8:24 UTC (permalink / raw)
To: Binbin Zhou, Binbin Zhou, Huacai Chen, Thomas Gleixner,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Huacai Chen, devicetree, Jiaxun Yang, lvjianmin, WANG Xuerui,
loongarch, linux-kernel, Rob Herring
On 07/12/2023 09:23, Krzysztof Kozlowski wrote:
> On 07/12/2023 08:29, Binbin Zhou wrote:
>> As we know, the Loongson-2K0500 is a single-core CPU, and the
>> core1-related register (isr1) does not exist. So "reg" and "reg-names"
>> should be set to "minItems 2"(main nad isr0).
>>
>> This fixes dtbs_check warning:
>>
>> DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb
>> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short
>> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
>> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected)
>> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
>> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short
>> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
>> arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short
>> From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
>>
>> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
>> Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
>> Reviewed-by: Rob Herring <robh@kernel.org>
>
> Where? Point me to exact email on lore.
>
Ah, I see at v4, it's ok:
https://lore.kernel.org/all/170015648721.2522214.13442341316883618917.robh@kernel.org/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v6 2/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for interrupt-names
2023-12-07 7:29 [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Binbin Zhou
2023-12-07 7:29 ` [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names Binbin Zhou
@ 2023-12-07 7:29 ` Binbin Zhou
2023-12-29 15:08 ` [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Huacai Chen
2 siblings, 0 replies; 7+ messages in thread
From: Binbin Zhou @ 2023-12-07 7:29 UTC (permalink / raw)
To: Binbin Zhou, Huacai Chen, Thomas Gleixner, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Huacai Chen, devicetree, Jiaxun Yang, lvjianmin, WANG Xuerui,
loongarch, linux-kernel, Binbin Zhou, Rob Herring
The Loongson-2K0500/2K1000 CPUs have 64 interrupt sources as inputs, and
a route-mapped node handles up to 32 interrupt sources, so two liointc
nodes are defined in dts{i}.
Of course, we have to make sure that the routing outputs ("intx") of the
two nodes do not conflict, i.e. "int0" can only be used as a routing
output for one of them. Therefore, "interrupt-names" should be defined
as "pattern".
In addition, since "interrupt-names" and "interrupts" are one-to-one
correspondence, we pass it to get the corresponding interrupt number in
the driver. Setting it to "required" does not break ABI, because it
is already logically represented as "required".
This fixes dtbs_check warning:
DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: interrupt-names:0: 'int0' was expected
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: Unevaluated properties are not allowed ('interrupt-names' was unexpected)
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
DTC_CHK arch/loongarch/boot/dts/loongson-2k1000-ref.dtb
arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: interrupt-names:0: 'int0' was expected
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: Unevaluated properties are not allowed ('interrupt-names' was unexpected)
From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Rob Herring <robh@kernel.org>
---
.../bindings/interrupt-controller/loongson,liointc.yaml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
index a3276c1d9b59..60441f0c5d72 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
@@ -51,11 +51,9 @@ properties:
interrupt-names:
description: List of names for the parent interrupts.
items:
- - const: int0
- - const: int1
- - const: int2
- - const: int3
+ pattern: int[0-3]
minItems: 1
+ maxItems: 4
'#interrupt-cells':
const: 2
@@ -75,6 +73,7 @@ required:
- compatible
- reg
- interrupts
+ - interrupt-names
- interrupt-controller
- '#interrupt-cells'
- loongson,parent_int_map
--
2.39.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings
2023-12-07 7:29 [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Binbin Zhou
2023-12-07 7:29 ` [PATCH v6 1/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names Binbin Zhou
2023-12-07 7:29 ` [PATCH v6 2/2] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for interrupt-names Binbin Zhou
@ 2023-12-29 15:08 ` Huacai Chen
2024-01-09 9:56 ` Huacai Chen
2 siblings, 1 reply; 7+ messages in thread
From: Huacai Chen @ 2023-12-29 15:08 UTC (permalink / raw)
To: Binbin Zhou
Cc: Binbin Zhou, Huacai Chen, Thomas Gleixner, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, Jiaxun Yang,
lvjianmin, WANG Xuerui, loongarch, linux-kernel
Hi, Rob,
Since this series doesn't touch the driver any more, I suppose that
this series will go through your dt tree?
Huacai
On Thu, Dec 7, 2023 at 3:29 PM Binbin Zhou <zhoubinbin@loongson.cn> wrote:
>
> Hi all:
>
> Some liointc-related DTBS_CHECK warnings were found when trying to
> introduce the Loongson-2K DTS{I} for LoongArch.
> This patch series attempts to fix those warnings.
>
> Of course, these fixes also apply to MIPS Loongson-2K1000.
>
> Thanks.
>
> -----
> V6:
> - Drop the 'parent_int_map' related patches following Rob's comment.
>
> Link to V5:
> https://lore.kernel.org/all/cover.1700449792.git.zhoubinbin@loongson.cn/
>
> V5:
> - Add Reviewed-by tag;
> patch(1/5):
> - Just drop 'loongson,parent_int_map' instead of marking it as
> deprecated.
>
> Link to V4:
> https://lore.kernel.org/all/cover.1699521866.git.zhoubinbin@loongson.cn/
>
> V4:
> - Add Acked-by tag;
> patch(2/5):
> - Just add 'maxitem 2' instead of duplicating the list;
> patch(3/5):
> - Rewite commit message for 'interrupt-names'.
>
> Link to V3:
> https://lore.kernel.org/all/cover.1698717154.git.zhoubinbin@loongson.cn/
>
> V3:
> patch(1/5):
> - new patch, 'loongson,parent_int_map' renamed to 'loongson,parent-int-map';
> patch(2/5)(3/5):
> - Separate the change points into separate patches;
> patch(4/5):
> - new patch, make sure both parent map forms can be parsed;
> patch(5/5):
> - new patch, fix 'loongson,parent_int_map' references in mips loongson
> dts{i}.
>
> Link to V2:
> https://lore.kernel.org/all/20230821061315.3416836-1-zhoubinbin@loongson.cn/
>
> V2:
> 1. Update commit message;
> 2. "interruprt-names" should be "required", the driver gets the parent
> interrupts through it;
> 3. Add more descriptions to explain the rationale for multiple nodes;
> 4. Rewrite if-else statements.
>
> Link to V1:
> https://lore.kernel.org/all/20230815084713.1627520-1-zhoubinbin@loongson.cn/
>
> Binbin Zhou (2):
> dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check
> warning for reg-names
> dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check
> warning for interrupt-names
>
> .../interrupt-controller/loongson,liointc.yaml | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> --
> 2.39.3
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings
2023-12-29 15:08 ` [PATCH v6 0/2] dt-bindings: interrupt-controller: Fix some loongson,liointc warnings Huacai Chen
@ 2024-01-09 9:56 ` Huacai Chen
0 siblings, 0 replies; 7+ messages in thread
From: Huacai Chen @ 2024-01-09 9:56 UTC (permalink / raw)
To: Binbin Zhou
Cc: Binbin Zhou, Huacai Chen, Thomas Gleixner, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, Jiaxun Yang,
lvjianmin, WANG Xuerui, loongarch, linux-kernel
Applied to loongarch-next, thanks.
Huacai
On Fri, Dec 29, 2023 at 11:08 PM Huacai Chen <chenhuacai@kernel.org> wrote:
>
> Hi, Rob,
>
> Since this series doesn't touch the driver any more, I suppose that
> this series will go through your dt tree?
>
> Huacai
>
> On Thu, Dec 7, 2023 at 3:29 PM Binbin Zhou <zhoubinbin@loongson.cn> wrote:
> >
> > Hi all:
> >
> > Some liointc-related DTBS_CHECK warnings were found when trying to
> > introduce the Loongson-2K DTS{I} for LoongArch.
> > This patch series attempts to fix those warnings.
> >
> > Of course, these fixes also apply to MIPS Loongson-2K1000.
> >
> > Thanks.
> >
> > -----
> > V6:
> > - Drop the 'parent_int_map' related patches following Rob's comment.
> >
> > Link to V5:
> > https://lore.kernel.org/all/cover.1700449792.git.zhoubinbin@loongson.cn/
> >
> > V5:
> > - Add Reviewed-by tag;
> > patch(1/5):
> > - Just drop 'loongson,parent_int_map' instead of marking it as
> > deprecated.
> >
> > Link to V4:
> > https://lore.kernel.org/all/cover.1699521866.git.zhoubinbin@loongson.cn/
> >
> > V4:
> > - Add Acked-by tag;
> > patch(2/5):
> > - Just add 'maxitem 2' instead of duplicating the list;
> > patch(3/5):
> > - Rewite commit message for 'interrupt-names'.
> >
> > Link to V3:
> > https://lore.kernel.org/all/cover.1698717154.git.zhoubinbin@loongson.cn/
> >
> > V3:
> > patch(1/5):
> > - new patch, 'loongson,parent_int_map' renamed to 'loongson,parent-int-map';
> > patch(2/5)(3/5):
> > - Separate the change points into separate patches;
> > patch(4/5):
> > - new patch, make sure both parent map forms can be parsed;
> > patch(5/5):
> > - new patch, fix 'loongson,parent_int_map' references in mips loongson
> > dts{i}.
> >
> > Link to V2:
> > https://lore.kernel.org/all/20230821061315.3416836-1-zhoubinbin@loongson.cn/
> >
> > V2:
> > 1. Update commit message;
> > 2. "interruprt-names" should be "required", the driver gets the parent
> > interrupts through it;
> > 3. Add more descriptions to explain the rationale for multiple nodes;
> > 4. Rewrite if-else statements.
> >
> > Link to V1:
> > https://lore.kernel.org/all/20230815084713.1627520-1-zhoubinbin@loongson.cn/
> >
> > Binbin Zhou (2):
> > dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check
> > warning for reg-names
> > dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check
> > warning for interrupt-names
> >
> > .../interrupt-controller/loongson,liointc.yaml | 18 ++++++++++++------
> > 1 file changed, 12 insertions(+), 6 deletions(-)
> >
> > --
> > 2.39.3
> >
^ permalink raw reply [flat|nested] 7+ messages in thread