On 11/01/2024 09:48, Michal Simek wrote: > > > On 1/11/24 09:18, Krzysztof Kozlowski wrote: >> On 11/01/2024 09:10, Michal Simek wrote: >>> >>> >>> On 1/11/24 08:56, Krzysztof Kozlowski wrote: >>>> On 11/01/2024 08:09, Michal Simek wrote: >>>>> >>>>> >>>>> On 1/10/24 22:27, Krzysztof Kozlowski wrote: >>>>>> On 10/01/2024 14:35, Michal Simek wrote: >>>>>>> Move cells to board dtsi files from generic zynqmp.dtsi. Changes are >>>>>>> related to qspi, spi, nand, i2c and ethernet nodes. >>>>>>> >>>>>>> All errors are generated when dtbs are compiled with W=1. >>>>>>> >>>>>> >>>>>> I don't see any errors on some other platforms, like Samsung. Isn't the >>>>>> actual problem that you do not disable the nodes (I2C, SPI etc) in DTSI? >>>>> >>>>> On i2c node. Bus is present on the board but it can end in a connector or >>>>> device >>>>> which we don't have OS/bootloader drivers for. But we have drivers using >>>>> i2c >>>>> tools or u-boot i2c probe. It means that transition should happen. >>>>> On i2c interesting is that W=1 is not able to report issues when you have >>>>> i2c >>>>> mux described like this >>>>> >>>>> i2c@0 { >>>>> #address-cells = <1>; >>>>> #size-cells = <0>; >>>>> reg = <0>; >>>>> /* HPC0_IIC */ >>>> >>>> I understand and it is quite common, but it does not explain the case. >>>> Your bus should still be disabled in DTSI and enabled in DTS for these >>>> cases. >>>> >>>> And how exactly do you solve the warning for above case? >>> >>> I had address/size-cells in dtsi (entire SoC) and then just enabled the >>> whole >>> i2c bus(for above reason) in board dts file without any childs there. >>> Then W=1 reported that there are address/size-cells without child. >>> >>> Another way how to solve it would be to simply delete address/size cells in >>> these cases. >> >> But your device without children sill have address/size cells, doesn't >> it? Or does it mean you did not add it to such cases? >> >> Anyway, I have exactly the same case exynos5800-peach-pi.dts with i2c_2 >> and no W=1 warnings. I really do not think your solution is correct. >> >> Also, address/size cells are properties of the SoC, so rather DTSI. > > Let me take a look at i2c case again. For gems it should be clear that I need > to > remove it because when there is mdio node I am getting errors like this. > > arch/arm64/boot/dts/xilinx/zynqmp.dtsi:627.27-641.5: Warning > (avoid_unnecessary_addr_size): /axi/ethernet@ff0e0000: unnecessary > #address-cells/#size-cells without "ranges" or child "reg" property
Yes, which also synchronizes your DTS with kernel: See: eb2f7ff7de56 ("arm64: xilinx: Remove address/size-cells from gem nodes") BTW, Instead of working on U-Boot clone of DTS, I would suggest spending effort on re-using in kernel DTS (see Sumit's work using rebased-DTS tree). Best regards, Krzysztof