Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Fix dtc warnings on reg and ranges in examples

A recent update to dtc and changes to the default warnings introduced
some new warnings in the DT binding examples:

Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.example.dts:23.13-61:
Warning (dma_ranges_format): /example-0/dram-controller@1c01000:dma-ranges: "dma-ranges" property has invalid length (12 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/hwmon/adi,axi-fan-control.example.dts:17.22-28.11:
Warning (unit_address_vs_reg): /example-0/fpga-axi@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.example.dts:34.13-54:
Warning (dma_ranges_format): /example-0/memory-controller@2c00000:dma-ranges: "dma-ranges" property has invalid length (24 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 2)
Documentation/devicetree/bindings/mfd/st,stpmic1.example.dts:19.15-79.11:
Warning (unit_address_vs_reg): /example-0/i2c@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.example.dts:28.23-31.15:
Warning (unit_address_vs_reg): /example-0/mdio@37000000/switch@10: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/rng/brcm,bcm2835.example.dts:17.5-21.11:
Warning (unit_address_vs_reg): /example-0/rng: node has a reg or ranges property, but no unit name
Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.example.dts:20.20-43.11:
Warning (unit_address_vs_reg): /example-0/soc@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/usb/ingenic,musb.example.dts:18.28-21.11:
Warning (unit_address_vs_reg): /example-0/usb-phy@0: node has a unit name, but no reg or ranges property

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-hwmon@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-spi@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>

+35 -23
+6
Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
··· 42 42 description: 43 43 See section 2.3.9 of the DeviceTree Specification. 44 44 45 + '#address-cells': true 46 + 47 + '#size-cells': true 48 + 45 49 required: 46 50 - "#interconnect-cells" 47 51 - compatible ··· 63 59 compatible = "allwinner,sun5i-a13-mbus"; 64 60 reg = <0x01c01000 0x1000>; 65 61 clocks = <&ccu CLK_MBUS>; 62 + #address-cells = <1>; 63 + #size-cells = <1>; 66 64 dma-ranges = <0x00000000 0x40000000 0x20000000>; 67 65 #interconnect-cells = <1>; 68 66 };
+1 -1
Documentation/devicetree/bindings/hwmon/adi,axi-fan-control.yaml
··· 47 47 48 48 examples: 49 49 - | 50 - fpga_axi: fpga-axi@0 { 50 + fpga_axi: fpga-axi { 51 51 #address-cells = <0x2>; 52 52 #size-cells = <0x1>; 53 53
+23 -18
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml
··· 97 97 #include <dt-bindings/clock/tegra186-clock.h> 98 98 #include <dt-bindings/interrupt-controller/arm-gic.h> 99 99 100 - memory-controller@2c00000 { 101 - compatible = "nvidia,tegra186-mc"; 102 - reg = <0x0 0x02c00000 0x0 0xb0000>; 103 - interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>; 104 - 100 + bus { 105 101 #address-cells = <2>; 106 102 #size-cells = <2>; 107 103 108 - ranges = <0x0 0x02c00000 0x02c00000 0x0 0xb0000>; 104 + memory-controller@2c00000 { 105 + compatible = "nvidia,tegra186-mc"; 106 + reg = <0x0 0x02c00000 0x0 0xb0000>; 107 + interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>; 109 108 110 - /* 111 - * Memory clients have access to all 40 bits that the memory 112 - * controller can address. 113 - */ 114 - dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>; 109 + #address-cells = <2>; 110 + #size-cells = <2>; 115 111 116 - external-memory-controller@2c60000 { 117 - compatible = "nvidia,tegra186-emc"; 118 - reg = <0x0 0x02c60000 0x0 0x50000>; 119 - interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>; 120 - clocks = <&bpmp TEGRA186_CLK_EMC>; 121 - clock-names = "emc"; 112 + ranges = <0x0 0x02c00000 0x0 0x02c00000 0x0 0xb0000>; 122 113 123 - nvidia,bpmp = <&bpmp>; 114 + /* 115 + * Memory clients have access to all 40 bits that the memory 116 + * controller can address. 117 + */ 118 + dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>; 119 + 120 + external-memory-controller@2c60000 { 121 + compatible = "nvidia,tegra186-emc"; 122 + reg = <0x0 0x02c60000 0x0 0x50000>; 123 + interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>; 124 + clocks = <&bpmp TEGRA186_CLK_EMC>; 125 + clock-names = "emc"; 126 + 127 + nvidia,bpmp = <&bpmp>; 128 + }; 124 129 }; 125 130 }; 126 131
+1 -1
Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
··· 274 274 - | 275 275 #include <dt-bindings/mfd/st,stpmic1.h> 276 276 #include <dt-bindings/interrupt-controller/arm-gic.h> 277 - i2c@0 { 277 + i2c { 278 278 #address-cells = <1>; 279 279 #size-cells = <0>; 280 280 pmic@33 {
+1
Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
··· 48 48 49 49 switch@10 { 50 50 compatible = "qca,qca8337"; 51 + reg = <0x10>; 51 52 /* ... */ 52 53 }; 53 54 };
+1 -1
Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml
··· 39 39 40 40 examples: 41 41 - | 42 - rng { 42 + rng@7e104000 { 43 43 compatible = "brcm,bcm2835-rng"; 44 44 reg = <0x7e104000 0x10>; 45 45 interrupts = <2 29>;
+1 -1
Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml
··· 61 61 #include <dt-bindings/clock/qcom,gcc-sdm845.h> 62 62 #include <dt-bindings/interrupt-controller/arm-gic.h> 63 63 64 - soc: soc@0 { 64 + soc: soc { 65 65 #address-cells = <2>; 66 66 #size-cells = <2>; 67 67
+1 -1
Documentation/devicetree/bindings/usb/ingenic,musb.yaml
··· 56 56 examples: 57 57 - | 58 58 #include <dt-bindings/clock/jz4740-cgu.h> 59 - usb_phy: usb-phy@0 { 59 + usb_phy: usb-phy { 60 60 compatible = "usb-nop-xceiv"; 61 61 #phy-cells = <0>; 62 62 };