Skip to contentSkip to conversation

ARM: dts: microchip: sam9x60: Move i2c address/size to dtsi

PATCH Applied Alexander Dahl 6 participants 11 messages May 28, 2024 – Aug 9, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: microchip: sam9x60: Move i2c address/size to dtsi

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
 .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		i2c-analog-filter;
 		i2c-digital-filter;
 		i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
 	status = "okay";
 
 	i2c0: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
 	status = "okay";
 
 	i2c6: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hei hei,

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 39 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Quoted 4 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

It's been a while. Is something wrong with the patch? Or with the commit message?

at91 support seems to have slowed down somehow lately? :-/

Greets
Alex

Quoted 170 lines
---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
 .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		i2c-analog-filter;
 		i2c-digital-filter;
 		i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
 	status = "okay";
 
 	i2c0: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
 	status = "okay";
 
 	i2c6: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 1 line
2.39.2
#2 lore raw

Hi Alex,

I added Claudiu in the thread.

Regards,
Mihai

-----------------------------------------------------------------

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 39 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Quoted 4 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

It's been a while. Is something wrong with the patch? Or with the commit message?

at91 support seems to have slowed down somehow lately? :-/

Greets
Alex

Quoted 10 lines
---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --  
.../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 --
2.39.2

maintainer
#3 lore raw
In reply to Alexander Dahl
Quoted 27 lines · Alexander Dahl

Hei hei,

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 24 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

     &flx5 {
             atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
             status = "okay";

             i2c5: i2c@600 {
                     pinctrl-0 = <&pinctrl_flx5_default>;
                     status = "okay";

                     pcf8523: rtc@68 {
                             compatible = "nxp,pcf8523";
                             reg = <0x68>;
                     };
             };
     };

… which created a warning like this:

[..]

Quoted 7 lines
Quoted 4 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

It's been a while. Is something wrong with the patch? Or with the commit message?

Sorry about that.

Quoted 1 line

at91 support seems to have slowed down somehow lately? :-/

Sorry for this feeling that you have. I guarantee it's not ;-)

Thanks a lot for your contribution, we'll make sure to react in a timely manner to your efforts on Microchip platforms.

Best regards,
Nicolas

Quoted 169 lines
Quoted 169 lines
---
  .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
  .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
  arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
  3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
               dmas = <0>, <0>;
               pinctrl-names = "default";
               pinctrl-0 = <&pinctrl_flx0_default>;
-             #address-cells = <1>;
-             #size-cells = <0>;
               i2c-analog-filter;
               i2c-digital-filter;
               i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
       status = "okay";
 
       i2c0: i2c@600 {
-             #address-cells = <1>;
-             #size-cells = <0>;
               dmas = <0>, <0>;
               pinctrl-names = "default";
               pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
       status = "okay";
 
       i2c6: i2c@600 {
-             #address-cells = <1>;
-             #size-cells = <0>;
               dmas = <0>, <0>;
               pinctrl-names = "default";
               pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
                                       compatible = "microchip,sam9x60-i2c";
                                       reg = <0x600 0x200>;
                                       interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
                                       clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
                                       dmas = <&dma0
                                               (AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 --
2.39.2

maintainer
#4 lore raw
In reply to Alexander Dahl
Quoted 42 lines · Alexander Dahl

Hei hei,

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 39 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Quoted 7 lines
Quoted 4 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

It's been a while. Is something wrong with the patch? Or with the commit message?

Please CC your patches to proper people (e.g., use ./script/get_maintainer.pl). I see no Microchip AT91 maintainers in the initial to/cc list of your patch.

Thank you,
Claudiu Beznea

Quoted 177 lines

at91 support seems to have slowed down somehow lately? :-/

Greets
Alex

Quoted 170 lines
---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
 .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		i2c-analog-filter;
 		i2c-digital-filter;
 		i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
 	status = "okay";
 
 	i2c0: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
 	status = "okay";
 
 	i2c6: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 1 line
2.39.2
#5 lore raw

Hello Claudiu,

Am Mon, Jul 08, 2024 at 07:23:47PM +0300 schrieb claudiu beznea:

Quoted 50 lines · Alexander Dahl
Quoted 47 lines

Hei hei,

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 43 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

Quoted 6 lines
Quoted 2 lines

It's been a while. Is something wrong with the patch? Or with the commit message?

Please CC your patches to proper people (e.g., use ./script/get_maintainer.pl). I see no Microchip AT91 maintainers in the initial to/cc list of your patch.

You can be sure I did. This is the list I got on my patch and you see I CCed everone listed as a _maintainer_ from that output:

% ./scripts/get_maintainer.pl outgoing/arm-dts-microchip/0001-ARM-dts-microchip-sam9x60-Move-i2c-address-size-to-d.patch
Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Nicolas Ferre <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Alexandre Belloni <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Claudiu Beznea <[email protected]> (supporter:ARM/Microchip (AT91) SoC support,commit_signer:1/2=50%,authored:1/2=50%,added_lines:32/45=71%,removed_lines:32/45=71%)

Not sure why Nicolas, Alexandre, and you are listed as "supporter" only? I think you should have been in the CC list in the first place, sorry about that.

Besides, I just noticed arch/arm/boot/dts/microchip/sam9x60.dtsi is not covered by specific matches in MAINTAINERS file, just through a generic fallback for all dts. Lines in question are these, sam9 is not matched:

F: arch/arm/boot/dts/microchip/at91*
F: arch/arm/boot/dts/microchip/sama*

Okay for the next time I will also CC supporters, but I found the output of get_maintainer.pl some kind of confusing here.

Greets
Alex

Quoted 182 lines

Thank you,
Claudiu Beznea

Quoted 177 lines

at91 support seems to have slowed down somehow lately? :-/

Greets
Alex

Quoted 170 lines
---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
 .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		i2c-analog-filter;
 		i2c-digital-filter;
 		i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
 	status = "okay";
 
 	i2c0: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
 	status = "okay";
 
 	i2c6: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 1 line
2.39.2
#6 lore raw
Quoted 21 lines · Alexander Dahl

Am Mon, Jul 08, 2024 at 07:23:47PM +0300 schrieb claudiu beznea:

Quoted 8 lines · Alexander Dahl
Quoted 3 lines

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:
It's been a while. Is something wrong with the patch? Or with the commit message?

Please CC your patches to proper people (e.g., use ./script/get_maintainer.pl). I see no Microchip AT91 maintainers in the initial to/cc list of your patch.

You can be sure I did. This is the list I got on my patch and you see I CCed everone listed as a _maintainer_ from that output:

% ./scripts/get_maintainer.pl outgoing/arm-dts-microchip/0001-ARM-dts-microchip-sam9x60-Move-i2c-address-size-to-d.patch
Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Nicolas Ferre <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Alexandre Belloni <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Claudiu Beznea <[email protected]> (supporter:ARM/Microchip (AT91) SoC support,commit_signer:1/2=50%,authored:1/2=50%,added_lines:32/45=71%,removed_lines:32/45=71%)

Quoted 3 lines

Not sure why Nicolas, Alexandre, and you are listed as "supporter" only? I think you should have been in the CC list in the first place, sorry about that.

You say only, but actually "supporter" is a stronger wording than "maintainer" as it means that the people are actually paid to look after the platform:
S: *Status*, one of the following:
Supported: Someone is actually paid to look after this.
Maintained: Someone actually looks after it.
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in. See below..
Orphan: No current maintainer [but maybe you could take the
role as you write your new code].
Obsolete: Old code. Something tagged obsolete generally means
it has been replaced by a better system and you should be using that.

As an aside, it might be a bit inaccurate here though, because Claudiu is not paid to look after AT91 and Alexandre might not be either.

Quoted 7 lines

Besides, I just noticed arch/arm/boot/dts/microchip/sam9x60.dtsi is not covered by specific matches in MAINTAINERS file, just through a generic fallback for all dts. Lines in question are these, sam9 is not matched:

F: arch/arm/boot/dts/microchip/at91*
F: arch/arm/boot/dts/microchip/sama*

I think this is a hangover from when all arm dts files used to be in arch/arm/boot/dts/, so the patter was needed to only match stuff the lads cared about. Now that arm is like other architectures and has subdirectories for vendors I think these could be simplified:

MAINTAINERS +0 -0
index 691f98fe8ed3..1d2b201563e7 100644
	--- a/MAINTAINERS
	+++ b/MAINTAINERS
	@@ -2534,8 +2534,7 @@ L:	[email protected] (moderated for non-subscribers)
	 S:	Supported
	 W:	http://www.linux4sam.org
	 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
	-F:	arch/arm/boot/dts/microchip/at91*
	-F:	arch/arm/boot/dts/microchip/sama*
	+F:	arch/arm/boot/dts/microchip/
	 F:	arch/arm/include/debug/at91.S
	 F:	arch/arm/mach-at91/
	 F:	drivers/memory/atmel*
Quoted 3 lines

Okay for the next time I will also CC supporters, but I found the output of get_maintainer.pl some kind of confusing here.

Cheers,
Conor.

#7 lore raw
In reply to Alexander Dahl
Quoted 80 lines · Alexander Dahl

Hello Claudiu,

Am Mon, Jul 08, 2024 at 07:23:47PM +0300 schrieb claudiu beznea:

Quoted 50 lines · Alexander Dahl
Quoted 47 lines

Hei hei,

Am Tue, May 28, 2024 at 05:31:09PM +0200 schrieb Alexander Dahl:

Quoted 43 lines

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

Quoted 6 lines
Quoted 2 lines

It's been a while. Is something wrong with the patch? Or with the commit message?

Please CC your patches to proper people (e.g., use ./script/get_maintainer.pl). I see no Microchip AT91 maintainers in the initial to/cc list of your patch.

You can be sure I did. This is the list I got on my patch and you see I CCed everone listed as a _maintainer_ from that output:

% ./scripts/get_maintainer.pl outgoing/arm-dts-microchip/0001-ARM-dts-microchip-sam9x60-Move-i2c-address-size-to-d.patch
Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Conor Dooley <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Nicolas Ferre <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Alexandre Belloni <[email protected]> (supporter:ARM/Microchip (AT91) SoC support)
Claudiu Beznea <[email protected]> (supporter:ARM/Microchip (AT91) SoC support,commit_signer:1/2=50%,authored:1/2=50%,added_lines:32/45=71%,removed_lines:32/45=71%)

Not sure why Nicolas, Alexandre, and you are listed as "supporter" only? I think you should have been in the CC list in the first place, sorry about that.

Besides, I just noticed arch/arm/boot/dts/microchip/sam9x60.dtsi is not covered by specific matches in MAINTAINERS file, just through a generic fallback for all dts. Lines in question are these, sam9 is not matched:

Quoted 5 lines

F: arch/arm/boot/dts/microchip/at91*
F: arch/arm/boot/dts/microchip/sama*

Okay for the next time I will also CC supporters, but I found the output of get_maintainer.pl some kind of confusing here.

get_maintainers is mostly (for typical cases) used through scripts, like cc-cmd or b4, thus no one cares about actual title. But if supported confused you, then why not checking its meaning in MAINTAINERS file?

Best regards,
Krzysztof

maintainer Acked-by on v1 1/1
#8 lore raw
In reply to Alexander Dahl

Hi Alexander,

Quoted 2 lines · Alexander Dahl

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings.

Yes, indeed.

Quoted 38 lines

Allows to add i2c device
nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

     &flx5 {
             atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
             status = "okay";

             i2c5: i2c@600 {
                     pinctrl-0 = <&pinctrl_flx5_default>;
                     status = "okay";

                     pcf8523: rtc@68 {
                             compatible = "nxp,pcf8523";
                             reg = <0x68>;
                     };
             };
     };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Quoted 2 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those

Yes, and I think it was mentioned by Claudiu back then.

Quoted 2 lines

address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

I agree with the move, plus you addressed both of the current mainline boards:

Thanks Alexander, best regards,
Nicolas

Quoted 169 lines
---
  .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
  .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
  arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
  3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
                 dmas = <0>, <0>;
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinctrl_flx0_default>;
-               #address-cells = <1>;
-               #size-cells = <0>;
                 i2c-analog-filter;
                 i2c-digital-filter;
                 i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
         status = "okay";
 
         i2c0: i2c@600 {
-               #address-cells = <1>;
-               #size-cells = <0>;
                 dmas = <0>, <0>;
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
         status = "okay";
 
         i2c6: i2c@600 {
-               #address-cells = <1>;
-               #size-cells = <0>;
                 dmas = <0>, <0>;
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
                                         compatible = "microchip,sam9x60-i2c";
                                         reg = <0x600 0x200>;
                                         interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
                                         dmas = <&dma0
                                                 (AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 --
2.39.2

maintainer
#9 lore raw
In reply to Alexander Dahl
Quoted 2 lines · Alexander Dahl

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings.

Not required anymore:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cf7feb642dc0e36bbbda9ec9fecc6601f439b8dd

Quoted 38 lines

Allows to add i2c device
nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

[…]:236.4-17: Warning (reg_format): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format'
[…]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
[…]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4 […]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7: Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4 […]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
[…]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
[…]: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value
[…]:234.19-237.5: Warning (avoid_default_addr_size): /ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Quoted 6 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

Will apply it for the next PR.

Quoted 164 lines
---
 .../dts/microchip/at91-sam9x60_curiosity.dts  |  2 --
 .../arm/boot/dts/microchip/at91-sam9x60ek.dts |  4 ---
 arch/arm/boot/dts/microchip/sam9x60.dtsi      | 26 +++++++++++++++++++
 3 files changed, 26 insertions(+), 6 deletions(-)
arch/arm/boot/dts/microchip/at91-sam9x60_curiosity.dts +0 -2
index c6fbdd29019f..b9ffd9e5faac 100644
@@ -198,8 +198,6 @@ i2c0: i2c@600 {
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		i2c-analog-filter;
 		i2c-digital-filter;
 		i2c-digital-filter-width-ns = <35>;
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +0 -4
index f3cbb675cea4..3b38707d736e 100644
@@ -207,8 +207,6 @@ &flx0 {
 	status = "okay";
 
 	i2c0: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx0_default>;
@@ -254,8 +252,6 @@ &flx6 {
 	status = "okay";
 
 	i2c6: i2c@600 {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		dmas = <0>, <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flx6_default>;
arch/arm/boot/dts/microchip/sam9x60.dtsi +26 -0
index 291540e5d81e..551b46894f47 100644
@@ -215,6 +215,8 @@ i2c4: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -284,6 +286,8 @@ i2c5: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -394,6 +398,8 @@ i2c11: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -443,6 +449,8 @@ i2c12: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -600,6 +608,8 @@ i2c6: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -649,6 +659,8 @@ i2c7: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -698,6 +710,8 @@ i2c8: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -766,6 +780,8 @@ i2c0: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -834,6 +850,8 @@ i2c1: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -902,6 +920,8 @@ i2c2: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -970,6 +990,8 @@ i2c3: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1074,6 +1096,8 @@ i2c9: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1123,6 +1147,8 @@ i2c10: i2c@600 {
 					compatible = "microchip,sam9x60-i2c";
 					reg = <0x600 0x200>;
 					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+					#address-cells = <1>;
+					#size-cells = <0>;
 					clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
 					dmas = <&dma0
 						(AT91_XDMAC_DT_MEM_IF(0) |

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

maintainer Applied
#10 lore raw
In reply to Alexander Dahl
Quoted 53 lines · Alexander Dahl

These properties are common for all i2c subnodes, and marked as 'required' in atmel/microchip i2c bindings. Allows to add i2c device nodes (like an rtc for example) in other .dts files including sam9x60.dtsi without requiring to repeat these properties for each i2c device again and again.

Found on a custom board after adding this in .dts:

    &flx5 {
            atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
            status = "okay";

            i2c5: i2c@600 {
                    pinctrl-0 = <&pinctrl_flx5_default>;
                    status = "okay";

                    pcf8523: rtc@68 {
                            compatible = "nxp,pcf8523";
                            reg = <0x68>;
                    };
            };
    };

… which created a warning like this:

    […]:236.4-17: Warning (reg_format): 

/ahb/apb/flexcom@f0004000/i2c@600/rtc@68:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
[…]: Warning (pci_device_reg): Failed prerequisite 'reg_format' […]: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' […]: Warning (simple_bus_reg): Failed prerequisite 'reg_format'

[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7:
Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #address-cells for I2C bus also defined at […]:228.16-238.4

[…]/linux-6.6.25/arch/arm/boot/dts/microchip/sam9x60.dtsi:283.19-299.7:
Warning (i2c_bus_bridge): /ahb/apb/flexcom@f0004000/i2c@600: incorrect #size-cells for I2C bus also defined at […]:228.16-238.4
[…]: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' […]: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge' […]: Warning (spi_bus_reg): Failed prerequisite 'reg_format' […]:234.19-237.5: Warning (avoid_default_addr_size):
/ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #address-cells value

    […]:234.19-237.5: Warning (avoid_default_addr_size): 

/ahb/apb/flexcom@f0004000/i2c@600/rtc@68: Relying on default #size-cells
value
[…]: Warning (avoid_unnecessary_addr_size): Failed prerequisite
'avoid_default_addr_size'
[…]: Warning (unique_unit_address): Failed prerequisite
'avoid_default_addr_size'

Quoted 6 lines

This probably should have been done with commit 84f23f3284d5 ("ARM: dts:
at91: sam9x60: move flexcom definitions") already, where those address-cells and size-cells properties were left in the board .dts files instead of moving them to the dtsi.

Applied to at91-dt, thanks!

Please note that I've adjusted the commit message to reflect that the props you've adjusted are not required anymore in the validation schema.

Thank you,
Claudiu Beznea