devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings
@ 2025-12-16  7:54 Binbin Zhou
  2025-12-16  7:54 ` [PATCH 1/7] dt-bindings: PCI: loongson: Document msi-parent property Binbin Zhou
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:54 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Binbin Zhou

Hi all:

As Krzysztof pointed out in the OSS talk, LoongArch only has three DTS,
but has a bunch of warnings. The patchset attempts to fix them.

Patch-1 and patch-3 are taken from Yao[1],thanks a lot!

[1]: https://lore.kernel.org/all/20251209140006.54821-1-me@ziyao.cc/

Test environment and results: 

Package                   Version
------------------------- -----------
attrs                     25.4.0
dtschema                  2025.12
jsonschema                4.25.1
jsonschema-specifications 2025.9.1
pip                       25.3
pylibfdt                  1.7.2.post1
referencing               0.37.0
rfc3987                   1.3.8
rpds-py                   0.30.0
ruamel.yaml               0.18.16
ruamel.yaml.clib          0.2.15
typing_extensions         4.15.0

---------
make dtbs_check W=1

  SYNC    include/config/auto.conf
  UPD     include/config/kernel.release
  DTC [C] arch/loongarch/boot/dts/loongson-2k0500-ref.dtb
  DTC [C] arch/loongarch/boot/dts/loongson-2k1000-ref.dtb
  DTC [C] arch/loongarch/boot/dts/loongson-2k2000-ref.dtb

Thanks.
Binbin

Binbin Zhou (5):
  dt-bindings: interrupt-controller: loongson,pch-pic: Change to
    unevaluatedProperties
  LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt
    controller address cells
  LoongArch: dts: loongson-2k1000: Add default Local I/O Interrupt
    controller address cells
  LoongArch: dts: loongson-2k2000: Add default PCH PIC controller
    address cells
  LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names

Yao Zi (2):
  dt-bindings: PCI: loongson: Document msi-parent property
  LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended

 .../loongson,pch-pic.yaml                     |  5 ++-
 .../devicetree/bindings/pci/loongson.yaml     |  2 ++
 arch/loongarch/boot/dts/loongson-2k0500.dtsi  |  1 +
 arch/loongarch/boot/dts/loongson-2k1000.dtsi  | 30 +++++++----------
 arch/loongarch/boot/dts/loongson-2k2000.dtsi  | 33 ++++++++-----------
 5 files changed, 32 insertions(+), 39 deletions(-)


base-commit: 4c2aab372d819471df4fec9e3240d80938fcc983
-- 
2.47.3


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

* [PATCH 1/7] dt-bindings: PCI: loongson: Document msi-parent property
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
@ 2025-12-16  7:54 ` Binbin Zhou
  2025-12-16  7:55 ` [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties Binbin Zhou
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:54 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree,
	Rob Herring (Arm)

From: Yao Zi <me@ziyao.cc>

Loongson PCI controllers found in LS2K1000/2000 SoCs
(loongson,ls2k-pci), 7A1000/2000 bridge chips (loongson,ls7a-pci), and
RS780E bridge chips (loongson,rs780e-pci) all have their paired MSI
controllers.

Though only the one in LS2K2000 SoC is described in devicetree, we
should document the property for all variants. For the same reason, it
isn't marked as required for now.

Fixes: 83e757ecfd5d ("dt-bindings: Document Loongson PCI Host Controller")
Signed-off-by: Yao Zi <me@ziyao.cc>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/pci/loongson.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/loongson.yaml b/Documentation/devicetree/bindings/pci/loongson.yaml
index e5bba63aa947..26e77218b901 100644
--- a/Documentation/devicetree/bindings/pci/loongson.yaml
+++ b/Documentation/devicetree/bindings/pci/loongson.yaml
@@ -32,6 +32,8 @@ properties:
     minItems: 1
     maxItems: 3
 
+  msi-parent: true
+
 required:
   - compatible
   - reg
-- 
2.47.3


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

* [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
  2025-12-16  7:54 ` [PATCH 1/7] dt-bindings: PCI: loongson: Document msi-parent property Binbin Zhou
@ 2025-12-16  7:55 ` Binbin Zhou
  2025-12-16 16:16   ` Rob Herring
  2025-12-16  7:55 ` [PATCH 3/7] LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended Binbin Zhou
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:55 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Binbin Zhou

Change additionalProperties to unevaluatedProperties because it refs to
interrupt-controller.yaml.

Fix below CHECK_DTBS warnings:
arch/loongarch/boot/dts/loongson-2k2000-ref.dtb: interrupt-controller@10000000 (loongson,pch-pic-1.0): '#address-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'
        from schema $id: http://devicetree.org/schemas/interrupt-controller/loongson,pch-pic.yaml

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 .../bindings/interrupt-controller/loongson,pch-pic.yaml      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
index b7bc5cb1dff2..1f818316082e 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
@@ -14,6 +14,9 @@ description:
   transforming interrupts from on-chip devices into HyperTransport vectorized
   interrupts.
 
+allOf:
+  - $ref: /schemas/interrupt-controller.yaml#
+
 properties:
   compatible:
     const: loongson,pch-pic-1.0
@@ -41,7 +44,7 @@ required:
   - interrupt-controller
   - '#interrupt-cells'
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.47.3


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

* [PATCH 3/7] LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
  2025-12-16  7:54 ` [PATCH 1/7] dt-bindings: PCI: loongson: Document msi-parent property Binbin Zhou
  2025-12-16  7:55 ` [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties Binbin Zhou
@ 2025-12-16  7:55 ` Binbin Zhou
  2025-12-16  7:56 ` [PATCH 4/7] LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt controller address cells Binbin Zhou
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:55 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

From: Yao Zi <me@ziyao.cc>

SoC integrated peripherals on LS2K1000 and LS2K2000 could be discovered
as PCI devices, but require sideband interrupts to function, which are
previously described by interrupts and interrupt-parent properties.

However, pci/pci-device.yaml allows interrupts property to only specify
PCI INTx interrupts, not sideband ones. Convert these devices to use
interrupt-extended property, which describes sideband interrupts used by
PCI devices since dt-schema commit e6ea659d2baa ("schemas: pci-device:
Allow interrupts-extended for sideband interrupts"), eliminating
dtbs_check warnings.

Fixes: 30a5532a3206 ("LoongArch: dts: DeviceTree for Loongson-2K1000")
Signed-off-by: Yao Zi <me@ziyao.cc>
---
 arch/loongarch/boot/dts/loongson-2k1000.dtsi | 25 ++++++---------
 arch/loongarch/boot/dts/loongson-2k2000.dtsi | 32 ++++++++------------
 2 files changed, 21 insertions(+), 36 deletions(-)

diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
index 60ab425f793f..eee06b84951c 100644
--- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
@@ -437,54 +437,47 @@ pcie@1a000000 {
 
 			gmac0: ethernet@3,0 {
 				reg = <0x1800 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc0>;
-				interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
-					     <13 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc0 12 IRQ_TYPE_LEVEL_HIGH>,
+						      <&liointc0 13 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "macirq", "eth_lpi";
 				status = "disabled";
 			};
 
 			gmac1: ethernet@3,1 {
 				reg = <0x1900 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc0>;
-				interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
-					     <15 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc0 14 IRQ_TYPE_LEVEL_HIGH>,
+						      <&liointc0 15 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "macirq", "eth_lpi";
 				status = "disabled";
 			};
 
 			ehci0: usb@4,1 {
 				reg = <0x2100 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc1>;
-				interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc1 18 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			ohci0: usb@4,2 {
 				reg = <0x2200 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc1>;
-				interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc1 19 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			display@6,0 {
 				reg = <0x3000 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc0>;
-				interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc0 28 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			hda@7,0 {
 				reg = <0x3800 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc0>;
-				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc0 4 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			sata: sata@8,0 {
 				reg = <0x4000 0x0 0x0 0x0 0x0>;
-				interrupt-parent = <&liointc0>;
-				interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&liointc0 19 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
diff --git a/arch/loongarch/boot/dts/loongson-2k2000.dtsi b/arch/loongarch/boot/dts/loongson-2k2000.dtsi
index 6c77b86ee06c..87c45f1f7cc7 100644
--- a/arch/loongarch/boot/dts/loongson-2k2000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k2000.dtsi
@@ -291,65 +291,57 @@ pcie@1a000000 {
 
 			gmac0: ethernet@3,0 {
 				reg = <0x1800 0x0 0x0 0x0 0x0>;
-				interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
-					     <13 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&pic 12 IRQ_TYPE_LEVEL_HIGH>,
+						      <&pic 13 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "macirq", "eth_lpi";
-				interrupt-parent = <&pic>;
 				status = "disabled";
 			};
 
 			gmac1: ethernet@3,1 {
 				reg = <0x1900 0x0 0x0 0x0 0x0>;
-				interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
-					     <15 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&pic 14 IRQ_TYPE_LEVEL_HIGH>,
+						      <&pic 15 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "macirq", "eth_lpi";
-				interrupt-parent = <&pic>;
 				status = "disabled";
 			};
 
 			gmac2: ethernet@3,2 {
 				reg = <0x1a00 0x0 0x0 0x0 0x0>;
-				interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
-					     <18 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&pic 17 IRQ_TYPE_LEVEL_HIGH>,
+						      <&pic 18 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "macirq", "eth_lpi";
-				interrupt-parent = <&pic>;
 				status = "disabled";
 			};
 
 			xhci0: usb@4,0 {
 				reg = <0x2000 0x0 0x0 0x0 0x0>;
-				interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
-				interrupt-parent = <&pic>;
+				interrupts-extended = <&pic 48 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			xhci1: usb@19,0 {
 				reg = <0xc800 0x0 0x0 0x0 0x0>;
-				interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
-				interrupt-parent = <&pic>;
+				interrupts-extended = <&pic 22 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			display@6,1 {
 				reg = <0x3100 0x0 0x0 0x0 0x0>;
-				interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
-				interrupt-parent = <&pic>;
+				interrupts-extended = <&pic 28 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
 			i2s@7,0 {
 				reg = <0x3800 0x0 0x0 0x0 0x0>;
-				interrupts = <78 IRQ_TYPE_LEVEL_HIGH>,
-					     <79 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts-extended = <&pic 78 IRQ_TYPE_LEVEL_HIGH>,
+						      <&pic 79 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "tx", "rx";
-				interrupt-parent = <&pic>;
 				status = "disabled";
 			};
 
 			sata: sata@8,0 {
 				reg = <0x4000 0x0 0x0 0x0 0x0>;
-				interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
-				interrupt-parent = <&pic>;
+				interrupts-extended = <&pic 16 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
-- 
2.47.3


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

* [PATCH 4/7] LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt controller address cells
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
                   ` (2 preceding siblings ...)
  2025-12-16  7:55 ` [PATCH 3/7] LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended Binbin Zhou
@ 2025-12-16  7:56 ` Binbin Zhou
  2025-12-16  7:56 ` [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local " Binbin Zhou
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:56 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Binbin Zhou

Add missing address-cells 0 to the extend I/O interrupt controller node
to silence W=1 warning:

  loongson-2k0500.dtsi:513.5-51: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@0,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe11600, using 0 as fallback

Value '0' is correct because:
1. The extend I/O interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 arch/loongarch/boot/dts/loongson-2k0500.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/boot/dts/loongson-2k0500.dtsi b/arch/loongarch/boot/dts/loongson-2k0500.dtsi
index 357de4ca7555..0594da1ea83d 100644
--- a/arch/loongarch/boot/dts/loongson-2k0500.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k0500.dtsi
@@ -164,6 +164,7 @@ eiointc: interrupt-controller@1fe11600 {
 			compatible = "loongson,ls2k0500-eiointc";
 			reg = <0x0 0x1fe11600 0x0 0xea00>;
 			interrupt-controller;
+			#address-cells = <0>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&cpuintc>;
 			interrupts = <3>;
-- 
2.47.3


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

* [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local I/O Interrupt controller address cells
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
                   ` (3 preceding siblings ...)
  2025-12-16  7:56 ` [PATCH 4/7] LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt controller address cells Binbin Zhou
@ 2025-12-16  7:56 ` Binbin Zhou
  2025-12-17  4:49   ` Huacai Chen
  2025-12-16  7:56 ` [PATCH 6/7] LoongArch: dts: loongson-2k2000: Add default PCH PIC " Binbin Zhou
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:56 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Binbin Zhou

Add missing address-cells 0 to the local I/O interrupt controller node
to silence W=1 warning:

  loongson-2k1000.dtsi:498.5-55: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe01440, using 0 as fallback

Value '0' is correct because:
1. The local I/O interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 arch/loongarch/boot/dts/loongson-2k1000.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
index eee06b84951c..fa1c000fd3e0 100644
--- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
@@ -131,6 +131,7 @@ liointc1: interrupt-controller@1fe01440 {
 			      <0x0 0x1fe01148 0x0 0x8>;
 			reg-names = "main", "isr0", "isr1";
 			interrupt-controller;
+			#address-cells = <0>;
 			#interrupt-cells = <2>;
 			interrupt-parent = <&cpuintc>;
 			interrupts = <3>;
-- 
2.47.3


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

* [PATCH 6/7] LoongArch: dts: loongson-2k2000: Add default PCH PIC controller address cells
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
                   ` (4 preceding siblings ...)
  2025-12-16  7:56 ` [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local " Binbin Zhou
@ 2025-12-16  7:56 ` Binbin Zhou
  2025-12-16  7:56 ` [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names Binbin Zhou
  2025-12-16  9:31 ` [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Yao Zi
  7 siblings, 0 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:56 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, Binbin Zhou

Add missing address-cells 0 to the PCH PIC Controller node to silence
W=1 warning:

  loongson-2k2000.dtsi:364.5-49: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@10000000, using 0 as fallback

Value '0' is correct because:
1. The PCH PIC controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 arch/loongarch/boot/dts/loongson-2k2000.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/boot/dts/loongson-2k2000.dtsi b/arch/loongarch/boot/dts/loongson-2k2000.dtsi
index 87c45f1f7cc7..9b4bb4c7f60c 100644
--- a/arch/loongarch/boot/dts/loongson-2k2000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k2000.dtsi
@@ -149,6 +149,7 @@ pic: interrupt-controller@10000000 {
 			compatible = "loongson,pch-pic-1.0";
 			reg = <0x0 0x10000000 0x0 0x400>;
 			interrupt-controller;
+			#address-cells = <0>;
 			#interrupt-cells = <2>;
 			loongson,pic-base-vec = <0>;
 			interrupt-parent = <&eiointc>;
-- 
2.47.3


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

* [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
                   ` (5 preceding siblings ...)
  2025-12-16  7:56 ` [PATCH 6/7] LoongArch: dts: loongson-2k2000: Add default PCH PIC " Binbin Zhou
@ 2025-12-16  7:56 ` Binbin Zhou
  2025-12-16  9:44   ` Yao Zi
  2025-12-16 16:25   ` Krzysztof Kozlowski
  2025-12-16  9:31 ` [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Yao Zi
  7 siblings, 2 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-16  7:56 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

From: Binbin Zhou <zhoubb.aaron@gmail.com>

The binding wants the node to be named "i2c-number", alternatively
"i2c@address", but those are named "i2c-gpio-number" instead.

Rename those to i2c-0, i2c-1 to adhere to the binding and suppress
dtbs_check warnings.

Signed-off-by: Binbin Zhou <zhoubb.aaron@gmail.com>
---
 arch/loongarch/boot/dts/loongson-2k1000.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
index fa1c000fd3e0..f70b245c8bc4 100644
--- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
@@ -46,7 +46,7 @@ cpuintc: interrupt-controller {
 	};
 
 	/* i2c of the dvi eeprom edid */
-	i2c-gpio-0 {
+	i2c-0 {
 		compatible = "i2c-gpio";
 		scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
@@ -57,7 +57,7 @@ i2c-gpio-0 {
 	};
 
 	/* i2c of the eeprom edid */
-	i2c-gpio-1 {
+	i2c-1 {
 		compatible = "i2c-gpio";
 		scl-gpios = <&gpio0 33 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		sda-gpios = <&gpio0 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-- 
2.47.3


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

* Re: [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings
  2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
                   ` (6 preceding siblings ...)
  2025-12-16  7:56 ` [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names Binbin Zhou
@ 2025-12-16  9:31 ` Yao Zi
  7 siblings, 0 replies; 15+ messages in thread
From: Yao Zi @ 2025-12-16  9:31 UTC (permalink / raw)
  To: Binbin Zhou, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

On Tue, Dec 16, 2025 at 03:54:35PM +0800, Binbin Zhou wrote:
> Hi all:
> 
> As Krzysztof pointed out in the OSS talk, LoongArch only has three DTS,
> but has a bunch of warnings. The patchset attempts to fix them.
> 
> Patch-1 and patch-3 are taken from Yao[1],thanks a lot!

I'm fine with it, but should you add your own Sign-off-by to PATCH 1 and
PATCH 3?

Regards,
Yao Zi

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

* Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
  2025-12-16  7:56 ` [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names Binbin Zhou
@ 2025-12-16  9:44   ` Yao Zi
  2025-12-16 16:24     ` Krzysztof Kozlowski
  2025-12-16 16:25   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 15+ messages in thread
From: Yao Zi @ 2025-12-16  9:44 UTC (permalink / raw)
  To: Binbin Zhou, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

On Tue, Dec 16, 2025 at 03:56:59PM +0800, Binbin Zhou wrote:
> From: Binbin Zhou <zhoubb.aaron@gmail.com>
> 
> The binding wants the node to be named "i2c-number", alternatively
> "i2c@address", but those are named "i2c-gpio-number" instead.
> 
> Rename those to i2c-0, i2c-1 to adhere to the binding and suppress
> dtbs_check warnings.

I think this is an unintended breakage in dtschema upstream, but not
really a violation. As I've mentioned in my original cover-letter,

> which IMHO is a regression caused by dt-schema commit 57138f5b8c92
> ("schemas: i2c: Avoid extra characters in i2c nodename pattern"). Commit
> 647181a1f8ff ("schemas: i2c: Allow for 'i2c-.*' node names") fails to
> fix the case, as it doesn't take nodenames with multiple hyphens in
> account. I'll start a separate series for this.

So I think it should probably be fixed in dt-schema instead. i2c-gpio-X
provides more information to me, and I don't think it causes any
inconsistency or ambiguity.

By the way, we also have dozens of arm dtb targets shipping nodes named
like i2c-gpio-*, mostly microchip and st ones, fixing the regex in
dtschema upstream will also eliminate warnings for them.

Best regards,
Yao Zi

> Signed-off-by: Binbin Zhou <zhoubb.aaron@gmail.com>
> ---
>  arch/loongarch/boot/dts/loongson-2k1000.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> index fa1c000fd3e0..f70b245c8bc4 100644
> --- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> +++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> @@ -46,7 +46,7 @@ cpuintc: interrupt-controller {
>  	};
>  
>  	/* i2c of the dvi eeprom edid */
> -	i2c-gpio-0 {
> +	i2c-0 {
>  		compatible = "i2c-gpio";
>  		scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>  		sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> @@ -57,7 +57,7 @@ i2c-gpio-0 {
>  	};
>  
>  	/* i2c of the eeprom edid */
> -	i2c-gpio-1 {
> +	i2c-1 {
>  		compatible = "i2c-gpio";
>  		scl-gpios = <&gpio0 33 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>  		sda-gpios = <&gpio0 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> -- 
> 2.47.3
> 

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

* Re: [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
  2025-12-16  7:55 ` [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties Binbin Zhou
@ 2025-12-16 16:16   ` Rob Herring
  2025-12-17  7:17     ` Binbin Zhou
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Herring @ 2025-12-16 16:16 UTC (permalink / raw)
  To: Binbin Zhou
  Cc: Yao Zi, Binbin Zhou, Huacai Chen, Krzysztof Kozlowski,
	Conor Dooley, Huacai Chen, Xuerui Wang, loongarch, devicetree

On Tue, Dec 16, 2025 at 03:55:13PM +0800, Binbin Zhou wrote:
> Change additionalProperties to unevaluatedProperties because it refs to
> interrupt-controller.yaml.
> 
> Fix below CHECK_DTBS warnings:
> arch/loongarch/boot/dts/loongson-2k2000-ref.dtb: interrupt-controller@10000000 (loongson,pch-pic-1.0): '#address-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'
>         from schema $id: http://devicetree.org/schemas/interrupt-controller/loongson,pch-pic.yaml
> 
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
>  .../bindings/interrupt-controller/loongson,pch-pic.yaml      | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> index b7bc5cb1dff2..1f818316082e 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> @@ -14,6 +14,9 @@ description:
>    transforming interrupts from on-chip devices into HyperTransport vectorized
>    interrupts.
>  
> +allOf:
> +  - $ref: /schemas/interrupt-controller.yaml#

Adding this does not define the value(s) #address-cells must be. I'd 
assume it is 0 in this case.

> +
>  properties:
>    compatible:
>      const: loongson,pch-pic-1.0
> @@ -41,7 +44,7 @@ required:
>    - interrupt-controller
>    - '#interrupt-cells'
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> -- 
> 2.47.3
> 

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

* Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
  2025-12-16  9:44   ` Yao Zi
@ 2025-12-16 16:24     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-16 16:24 UTC (permalink / raw)
  To: Yao Zi, Binbin Zhou, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

On 16/12/2025 10:44, Yao Zi wrote:
> On Tue, Dec 16, 2025 at 03:56:59PM +0800, Binbin Zhou wrote:
>> From: Binbin Zhou <zhoubb.aaron@gmail.com>
>>
>> The binding wants the node to be named "i2c-number", alternatively
>> "i2c@address", but those are named "i2c-gpio-number" instead.
>>
>> Rename those to i2c-0, i2c-1 to adhere to the binding and suppress
>> dtbs_check warnings.
> 
> I think this is an unintended breakage in dtschema upstream, but not
> really a violation. As I've mentioned in my original cover-letter,
> 
>> which IMHO is a regression caused by dt-schema commit 57138f5b8c92
>> ("schemas: i2c: Avoid extra characters in i2c nodename pattern"). Commit
>> 647181a1f8ff ("schemas: i2c: Allow for 'i2c-.*' node names") fails to
>> fix the case, as it doesn't take nodenames with multiple hyphens in
>> account. I'll start a separate series for this.
> 
> So I think it should probably be fixed in dt-schema instead. i2c-gpio-X
> provides more information to me, and I don't think it causes any
> inconsistency or ambiguity.
> 
> By the way, we also have dozens of arm dtb targets shipping nodes named
> like i2c-gpio-*, mostly microchip and st ones, fixing the regex in
> dtschema upstream will also eliminate warnings for them.

No. Wolfram posted patches at some point, some parts got applied or at
least followed up by maintainers who care. Maybe Wolfram never resubmit
microchip and stm, but that's not the reason to roll back to discouraged
name.

Best regards,
Krzysztof

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

* Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
  2025-12-16  7:56 ` [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names Binbin Zhou
  2025-12-16  9:44   ` Yao Zi
@ 2025-12-16 16:25   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-16 16:25 UTC (permalink / raw)
  To: Binbin Zhou, Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree

On 16/12/2025 08:56, Binbin Zhou wrote:
> From: Binbin Zhou <zhoubb.aaron@gmail.com>
> 
> The binding wants the node to be named "i2c-number", alternatively
> "i2c@address", but those are named "i2c-gpio-number" instead.

i2c@address is wrong here, don't mention it.
> 
> Rename those to i2c-0, i2c-1 to adhere to the binding and suppress
> dtbs_check warnings.

With fixed commit msg:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof

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

* Re: [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local I/O Interrupt controller address cells
  2025-12-16  7:56 ` [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local " Binbin Zhou
@ 2025-12-17  4:49   ` Huacai Chen
  0 siblings, 0 replies; 15+ messages in thread
From: Huacai Chen @ 2025-12-17  4:49 UTC (permalink / raw)
  To: Binbin Zhou
  Cc: Yao Zi, Binbin Zhou, Huacai Chen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Xuerui Wang, loongarch,
	devicetree

Hi, Binbin,

On Tue, Dec 16, 2025 at 3:56 PM Binbin Zhou <zhoubinbin@loongson.cn> wrote:
>
> Add missing address-cells 0 to the local I/O interrupt controller node
> to silence W=1 warning:
>
>   loongson-2k1000.dtsi:498.5-55: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
>     Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe01440, using 0 as fallback
>
> Value '0' is correct because:
> 1. The local I/O interrupt controller does not have children,
> 2. interrupt-map property (in PCI node) consists of five components and
>    the fourth component "parent unit address", which size is defined by
>    '#address-cells' of the node pointed to by the interrupt-parent
>    component, is not used (=0)
>
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
>  arch/loongarch/boot/dts/loongson-2k1000.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> index eee06b84951c..fa1c000fd3e0 100644
> --- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> +++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
> @@ -131,6 +131,7 @@ liointc1: interrupt-controller@1fe01440 {
>                               <0x0 0x1fe01148 0x0 0x8>;
>                         reg-names = "main", "isr0", "isr1";
>                         interrupt-controller;
> +                       #address-cells = <0>;
I think liointc0 also need address-cells, no?

Huacai

>                         #interrupt-cells = <2>;
>                         interrupt-parent = <&cpuintc>;
>                         interrupts = <3>;
> --
> 2.47.3
>

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

* Re: [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
  2025-12-16 16:16   ` Rob Herring
@ 2025-12-17  7:17     ` Binbin Zhou
  0 siblings, 0 replies; 15+ messages in thread
From: Binbin Zhou @ 2025-12-17  7:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Binbin Zhou, Yao Zi, Huacai Chen, Krzysztof Kozlowski,
	Conor Dooley, Huacai Chen, Xuerui Wang, loongarch, devicetree

Hi Rob:

Thanks for your review.

On Wed, Dec 17, 2025 at 12:16 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Dec 16, 2025 at 03:55:13PM +0800, Binbin Zhou wrote:
> > Change additionalProperties to unevaluatedProperties because it refs to
> > interrupt-controller.yaml.
> >
> > Fix below CHECK_DTBS warnings:
> > arch/loongarch/boot/dts/loongson-2k2000-ref.dtb: interrupt-controller@10000000 (loongson,pch-pic-1.0): '#address-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'
> >         from schema $id: http://devicetree.org/schemas/interrupt-controller/loongson,pch-pic.yaml
> >
> > Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> > ---
> >  .../bindings/interrupt-controller/loongson,pch-pic.yaml      | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> > index b7bc5cb1dff2..1f818316082e 100644
> > --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> > +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml
> > @@ -14,6 +14,9 @@ description:
> >    transforming interrupts from on-chip devices into HyperTransport vectorized
> >    interrupts.
> >
> > +allOf:
> > +  - $ref: /schemas/interrupt-controller.yaml#
>
> Adding this does not define the value(s) #address-cells must be. I'd
> assume it is 0 in this case.

Indeed, interrupt-controller.yaml only defines #address-cells, and
does not specify values. But the addition of interrupt-controller.yaml
is still necessary, besides that, I would add the following:

@@ -37,12 +37,16 @@ properties:
   '#interrupt-cells':
     const: 2

+  '#address-cells':
+    const: 0
+
 required:
   - compatible
   - reg
   - loongson,pic-base-vec
   - interrupt-controller
   - '#interrupt-cells'
+  - '#address-cells'

 unevaluatedProperties: false

>
> > +
> >  properties:
> >    compatible:
> >      const: loongson,pch-pic-1.0
> > @@ -41,7 +44,7 @@ required:
> >    - interrupt-controller
> >    - '#interrupt-cells'
> >
> > -additionalProperties: false
> > +unevaluatedProperties: false
> >
> >  examples:
> >    - |
> > --
> > 2.47.3
> >

-- 
Thanks.
Binbin

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

end of thread, other threads:[~2025-12-17  7:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-16  7:54 [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Binbin Zhou
2025-12-16  7:54 ` [PATCH 1/7] dt-bindings: PCI: loongson: Document msi-parent property Binbin Zhou
2025-12-16  7:55 ` [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties Binbin Zhou
2025-12-16 16:16   ` Rob Herring
2025-12-17  7:17     ` Binbin Zhou
2025-12-16  7:55 ` [PATCH 3/7] LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended Binbin Zhou
2025-12-16  7:56 ` [PATCH 4/7] LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt controller address cells Binbin Zhou
2025-12-16  7:56 ` [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local " Binbin Zhou
2025-12-17  4:49   ` Huacai Chen
2025-12-16  7:56 ` [PATCH 6/7] LoongArch: dts: loongson-2k2000: Add default PCH PIC " Binbin Zhou
2025-12-16  7:56 ` [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names Binbin Zhou
2025-12-16  9:44   ` Yao Zi
2025-12-16 16:24     ` Krzysztof Kozlowski
2025-12-16 16:25   ` Krzysztof Kozlowski
2025-12-16  9:31 ` [PATCH 0/7] LoongArch: DTS: Fix dtbs_check warnings Yao Zi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).