LoongArch: DTS: Fix dtbs_check warnings
Subsystems (5)
cover LoongArch: DTS: Fix dtbs_check warnings
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/[email protected]/
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
Signature · 1 line
2.47.3
PATCH 1/7 dt-bindings: PCI: loongson: Document msi-parent property
From: Yao Zi <[email protected]>
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.
--- Documentation/devicetree/bindings/pci/loongson.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/pci/loongson.yaml +2 -0
@@ -32,6 +32,8 @@ properties: minItems: 1 maxItems: 3 + msi-parent: true + required: - compatible - reg
Signature · 1 line
2.47.3
PATCH 2/7 dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
In reply to Binbin ZhouChange 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
--- .../bindings/interrupt-controller/loongson,pch-pic.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +4 -1
@@ -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: - |
Signature · 1 line
2.47.3
Rob Herring
maintainerRe: [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
Quoted 17 lines · Binbin Zhou
Change additionalProperties to unevaluatedProperties because it refs to
interrupt-controller.yaml.Fix below
CHECK_DTBSwarnings: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.yamlSigned-off-by Binbin Zhou <[email protected]>--- .../bindings/interrupt-controller/loongson,pch-pic.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +0
-0
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml description: · line 18
Quoted 5 lines
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +2
-0@@ -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.
Quoted 16 lines
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +2
-1+ properties: compatible: const: loongson,pch-pic-1.0@@ -41,7 +44,7 @@ required: - interrupt-controller - '#interrupt-cells' -additionalProperties: false +unevaluatedProperties: false examples: - |Signature · 1 line
2.47.3
Re: [PATCH 2/7] dt-bindings: interrupt-controller: loongson,pch-pic: Change to unevaluatedProperties
Hi Rob:
Thanks for your review.
Quoted 22 lines · Rob Herring
Quoted 20 lines · Binbin Zhou
Change additionalProperties to unevaluatedProperties because it refs to
interrupt-controller.yaml.Fix below
CHECK_DTBSwarnings: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.yamlSigned-off-by Binbin Zhou <[email protected]>--- .../bindings/interrupt-controller/loongson,pch-pic.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +0
-0@@ -14,6 +14,9 @@ description: transforming interrupts from on-chip devices into HyperTransport vectorized interrupts.
Quoted 5 lines
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml description: · line 18
Quoted 2 lines
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +2
-0+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
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/interrupt-controller/loongson,pch-pic.yaml +2
-2+ 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
Signature · 2 lines
Thanks. Binbin
PATCH 3/7 LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended
In reply to Binbin ZhouFrom: Yao Zi <[email protected]>
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.
--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 25 ++++++--------- arch/loongarch/boot/dts/loongson-2k2000.dtsi | 32 ++++++++------------ 2 files changed, 21 insertions(+), 36 deletions(-)
arch/loongarch/boot/dts/loongson-2k1000.dtsi +9 -16
@@ -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"; };
arch/loongarch/boot/dts/loongson-2k2000.dtsi +12 -20
@@ -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"; };
Signature · 1 line
2.47.3
PATCH 4/7 LoongArch: dts: loongson-2k0500: Add default Extend I/O Interrupt controller address cells
In reply to Binbin ZhouAdd 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)
--- arch/loongarch/boot/dts/loongson-2k0500.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/loongarch/boot/dts/loongson-2k0500.dtsi +1 -0
@@ -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>;
Signature · 1 line
2.47.3
PATCH 5/7 LoongArch: dts: loongson-2k1000: Add default Local I/O Interrupt controller address cells
In reply to Binbin ZhouAdd 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)
--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/loongarch/boot/dts/loongson-2k1000.dtsi +1 -0
@@ -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>;
Signature · 1 line
2.47.3
Huacai Chen
maintainerRe: [PATCH 5/7] LoongArch: dts: loongson-2k1000: Add default Local I/O Interrupt controller address cells
Hi, Binbin,
Quoted 24 lines · 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 fallbackValue '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 <[email protected]>--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 1 + 1 file changed, 1 insertion(+)arch/loongarch/boot/dts/loongson-2k1000.dtsi +0
-0
arch/loongarch/boot/dts/loongson-2k1000.dtsi liointc1: interrupt-controller@1fe01440 { · line 134
Quoted 4 lines
arch/loongarch/boot/dts/loongson-2k1000.dtsi +1
-0@@ -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
Quoted 6 lines
arch/loongarch/boot/dts/loongson-2k1000.dtsi +0
-1#interrupt-cells = <2>; interrupt-parent = <&cpuintc>; interrupts = <3>; --2.47.3
PATCH 6/7 LoongArch: dts: loongson-2k2000: Add default PCH PIC controller address cells
In reply to Binbin ZhouAdd 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)
--- arch/loongarch/boot/dts/loongson-2k2000.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/loongarch/boot/dts/loongson-2k2000.dtsi +1 -0
@@ -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>;
Signature · 1 line
2.47.3
PATCH 7/7 LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
In reply to Binbin ZhouFrom: Binbin Zhou <[email protected]>
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.
--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/loongarch/boot/dts/loongson-2k1000.dtsi +2 -2
@@ -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)>;
Signature · 1 line
2.47.3
Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
Quoted 7 lines · Binbin Zhou
From: Binbin Zhou <[email protected]>
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_checkwarnings.
I think this is an unintended breakage in dtschema upstream, but not really a violation. As I've mentioned in my original cover-letter,
Quoted 5 lines
which IMHO is a regression caused by dt-schema commit
57138f5b8c92("schemas: i2c: Avoid extra characters in i2c nodename pattern"). Commit647181a1f8ff("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
Quoted 30 lines
Signed-off-by Binbin Zhou <[email protected]>--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/loongarch/boot/dts/loongson-2k1000.dtsi +2
-2@@ -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)>;Signature · 1 line
2.47.3
Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
Quoted 18 lines · Yao Zi
Quoted 7 lines · Binbin Zhou
From: Binbin Zhou <[email protected]>
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_checkwarnings.I think this is an unintended breakage in dtschema upstream, but not really a violation. As I've mentioned in my original cover-letter,
Quoted 5 lines
which IMHO is a regression caused by dt-schema commit
57138f5b8c92("schemas: i2c: Avoid extra characters in i2c nodename pattern"). Commit647181a1f8ff("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.
Quoted 7 lines
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
Re: [PATCH 7/7] LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
In reply to Binbin ZhouQuoted 4 lines · Binbin Zhou
From: Binbin Zhou <[email protected]>
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.
Quoted 3 lines
Rename those to i2c-0, i2c-1 to adhere to the binding and suppress
dtbs_checkwarnings.
With fixed commit msg:
Best regards,
Krzysztof
Quoted 6 lines · 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!
I'm fine with it, but should you add your own Sign-off-by to PATCH 1 and PATCH 3?
Regards,
Yao Zi