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

arm: dts: vexpress: Fix addressing issues with 'motherboard-bus' nodes

The 'motherboard-bus' node in Arm Ltd boards fails schema checks as
'simple-bus' child nodes must have a unit-address. The 'ranges' handling is
also wrong (or at least strange) as the mapping of SMC chip selects should
be in the 'arm,vexpress,v2m-p1' node rather than a generic 'simple-bus'
node. Either there's 1 too many levels of 'simple-bus' nodes or 'ranges'
should be moved down a level. The latter change is more simple, so let's do
that. As the 'ranges' value doesn't vary for a given motherboard instance,
we can move 'ranges' into the motherboard dtsi files.

Link: https://lore.kernel.org/r/20210819184239.1192395-6-robh@kernel.org
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

authored by

Rob Herring and committed by
Sudeep Holla
078fb7aa 2e9edc07

+52 -92
+11 -2
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
··· 101 101 }; 102 102 103 103 bus@8000000 { 104 - motherboard-bus { 104 + compatible = "simple-bus"; 105 + #address-cells = <1>; 106 + #size-cells = <1>; 107 + 108 + motherboard-bus@8000000 { 105 109 arm,hbi = <0x190>; 106 110 arm,vexpress,site = <0>; 107 111 compatible = "arm,vexpress,v2m-p1", "simple-bus"; 108 112 #address-cells = <2>; /* SMB chipselect number and offset */ 109 113 #size-cells = <1>; 110 - ranges; 114 + ranges = <0 0 0x08000000 0x04000000>, 115 + <1 0 0x14000000 0x04000000>, 116 + <2 0 0x18000000 0x04000000>, 117 + <3 0 0x1c000000 0x04000000>, 118 + <4 0 0x0c000000 0x04000000>, 119 + <5 0 0x10000000 0x04000000>; 111 120 112 121 nor_flash: flash@0 { 113 122 compatible = "arm,vexpress-flash", "cfi-flash";
+12 -2
arch/arm/boot/dts/vexpress-v2m.dtsi
··· 20 20 21 21 / { 22 22 bus@40000000 { 23 - motherboard { 23 + compatible = "simple-bus"; 24 + #address-cells = <1>; 25 + #size-cells = <1>; 26 + ranges = <0x40000000 0x40000000 0x10000000>, 27 + <0x10000000 0x10000000 0x00020000>; 28 + 29 + motherboard-bus@40000000 { 24 30 arm,hbi = <0x190>; 25 31 arm,vexpress,site = <0>; 26 32 compatible = "arm,vexpress,v2m-p1", "simple-bus"; 27 33 #address-cells = <2>; /* SMB chipselect number and offset */ 28 34 #size-cells = <1>; 29 - ranges; 35 + ranges = <0 0 0x40000000 0x04000000>, 36 + <1 0 0x44000000 0x04000000>, 37 + <2 0 0x48000000 0x04000000>, 38 + <3 0 0x4c000000 0x04000000>, 39 + <7 0 0x10000000 0x00020000>; 30 40 31 41 flash@0,00000000 { 32 42 compatible = "arm,vexpress-flash", "cfi-flash";
+1 -10
arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts
··· 237 237 }; 238 238 239 239 bus@8000000 { 240 - compatible = "simple-bus"; 241 - 242 - #address-cells = <2>; 243 - #size-cells = <1>; 244 - ranges = <0 0 0 0x08000000 0x04000000>, 245 - <1 0 0 0x14000000 0x04000000>, 246 - <2 0 0 0x18000000 0x04000000>, 247 - <3 0 0 0x1c000000 0x04000000>, 248 - <4 0 0 0x0c000000 0x04000000>, 249 - <5 0 0 0x10000000 0x04000000>; 240 + ranges = <0x8000000 0 0x8000000 0x18000000>; 250 241 251 242 #interrupt-cells = <1>; 252 243 interrupt-map-mask = <0 0 63>;
+1 -10
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
··· 609 609 }; 610 610 611 611 smb: bus@8000000 { 612 - compatible = "simple-bus"; 613 - 614 - #address-cells = <2>; 615 - #size-cells = <1>; 616 - ranges = <0 0 0 0x08000000 0x04000000>, 617 - <1 0 0 0x14000000 0x04000000>, 618 - <2 0 0 0x18000000 0x04000000>, 619 - <3 0 0 0x1c000000 0x04000000>, 620 - <4 0 0 0x0c000000 0x04000000>, 621 - <5 0 0 0x10000000 0x04000000>; 612 + ranges = <0x8000000 0 0x8000000 0x18000000>; 622 613 623 614 #interrupt-cells = <1>; 624 615 interrupt-map-mask = <0 0 63>;
+1 -10
arch/arm/boot/dts/vexpress-v2p-ca5s.dts
··· 207 207 }; 208 208 209 209 smb: bus@8000000 { 210 - compatible = "simple-bus"; 211 - 212 - #address-cells = <2>; 213 - #size-cells = <1>; 214 - ranges = <0 0 0x08000000 0x04000000>, 215 - <1 0 0x14000000 0x04000000>, 216 - <2 0 0x18000000 0x04000000>, 217 - <3 0 0x1c000000 0x04000000>, 218 - <4 0 0x0c000000 0x04000000>, 219 - <5 0 0x10000000 0x04000000>; 210 + ranges = <0 0x8000000 0x18000000>; 220 211 221 212 #interrupt-cells = <1>; 222 213 interrupt-map-mask = <0 0 63>;
-10
arch/arm/boot/dts/vexpress-v2p-ca9.dts
··· 296 296 }; 297 297 298 298 smb: bus@40000000 { 299 - compatible = "simple-bus"; 300 - 301 - #address-cells = <2>; 302 - #size-cells = <1>; 303 - ranges = <0 0 0x40000000 0x04000000>, 304 - <1 0 0x44000000 0x04000000>, 305 - <2 0 0x48000000 0x04000000>, 306 - <3 0 0x4c000000 0x04000000>, 307 - <7 0 0x10000000 0x00020000>; 308 - 309 299 #interrupt-cells = <1>; 310 300 interrupt-map-mask = <0 0 63>; 311 301 interrupt-map = <0 0 0 &gic 0 0 4>,
-11
arch/arm64/boot/dts/arm/fvp-base-revc.dts
··· 195 195 }; 196 196 197 197 bus@8000000 { 198 - compatible = "simple-bus"; 199 - 200 - #address-cells = <2>; 201 - #size-cells = <1>; 202 - ranges = <0 0 0 0x08000000 0x04000000>, 203 - <1 0 0 0x14000000 0x04000000>, 204 - <2 0 0 0x18000000 0x04000000>, 205 - <3 0 0 0x1c000000 0x04000000>, 206 - <4 0 0 0x0c000000 0x04000000>, 207 - <5 0 0 0x10000000 0x04000000>; 208 - 209 198 #interrupt-cells = <1>; 210 199 interrupt-map-mask = <0 0 63>; 211 200 interrupt-map = <0 0 0 &gic 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
-10
arch/arm64/boot/dts/arm/juno-base.dtsi
··· 802 802 }; 803 803 804 804 bus@8000000 { 805 - compatible = "simple-bus"; 806 - #address-cells = <2>; 807 - #size-cells = <1>; 808 - ranges = <0 0 0 0x08000000 0x04000000>, 809 - <1 0 0 0x14000000 0x04000000>, 810 - <2 0 0 0x18000000 0x04000000>, 811 - <3 0 0 0x1c000000 0x04000000>, 812 - <4 0 0 0x0c000000 0x04000000>, 813 - <5 0 0 0x10000000 0x04000000>; 814 - 815 805 #interrupt-cells = <1>; 816 806 interrupt-map-mask = <0 0 15>; 817 807 interrupt-map = <0 0 0 &gic 0 GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+12 -2
arch/arm64/boot/dts/arm/juno-motherboard.dtsi
··· 92 92 }; 93 93 94 94 bus@8000000 { 95 - motherboard-bus { 95 + compatible = "simple-bus"; 96 + #address-cells = <2>; 97 + #size-cells = <1>; 98 + ranges = <0 0x8000000 0 0x8000000 0x18000000>; 99 + 100 + motherboard-bus@8000000 { 96 101 compatible = "arm,vexpress,v2p-p1", "simple-bus"; 97 102 #address-cells = <2>; /* SMB chipselect number and offset */ 98 103 #size-cells = <1>; 99 - ranges; 104 + ranges = <0 0 0 0x08000000 0x04000000>, 105 + <1 0 0 0x14000000 0x04000000>, 106 + <2 0 0 0x18000000 0x04000000>, 107 + <3 0 0 0x1c000000 0x04000000>, 108 + <4 0 0 0x0c000000 0x04000000>, 109 + <5 0 0 0x10000000 0x04000000>; 100 110 arm,hbi = <0x252>; 101 111 arm,vexpress,site = <0>; 102 112
-11
arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
··· 133 133 }; 134 134 135 135 bus@8000000 { 136 - compatible = "simple-bus"; 137 - 138 - #address-cells = <2>; 139 - #size-cells = <1>; 140 - ranges = <0 0 0 0x08000000 0x04000000>, 141 - <1 0 0 0x14000000 0x04000000>, 142 - <2 0 0 0x18000000 0x04000000>, 143 - <3 0 0 0x1c000000 0x04000000>, 144 - <4 0 0 0x0c000000 0x04000000>, 145 - <5 0 0 0x10000000 0x04000000>; 146 - 147 136 #interrupt-cells = <1>; 148 137 interrupt-map-mask = <0 0 63>; 149 138 interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+1 -1
arch/arm64/boot/dts/arm/rtsm_ve-motherboard-rs2.dtsi
··· 6 6 */ 7 7 / { 8 8 bus@8000000 { 9 - motherboard-bus { 9 + motherboard-bus@8000000 { 10 10 arm,v2m-memory-map = "rs2"; 11 11 12 12 iofpga-bus@300000000 {
+12 -2
arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi
··· 77 77 }; 78 78 79 79 bus@8000000 { 80 - motherboard-bus { 80 + compatible = "simple-bus"; 81 + #address-cells = <2>; 82 + #size-cells = <1>; 83 + ranges = <0 0x8000000 0 0x8000000 0x18000000>; 84 + 85 + motherboard-bus@8000000 { 81 86 compatible = "arm,vexpress,v2m-p1", "simple-bus"; 82 87 #address-cells = <2>; /* SMB chipselect number and offset */ 83 88 #size-cells = <1>; 84 - ranges; 89 + ranges = <0 0 0 0x08000000 0x04000000>, 90 + <1 0 0 0x14000000 0x04000000>, 91 + <2 0 0 0x18000000 0x04000000>, 92 + <3 0 0 0x1c000000 0x04000000>, 93 + <4 0 0 0x0c000000 0x04000000>, 94 + <5 0 0 0x10000000 0x04000000>; 85 95 86 96 flash@0 { 87 97 compatible = "arm,vexpress-flash", "cfi-flash";
+1 -11
arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts
··· 145 145 }; 146 146 147 147 smb: bus@8000000 { 148 - compatible = "simple-bus"; 149 - 150 - #address-cells = <2>; 151 - #size-cells = <1>; 152 - ranges = <0 0 0 0x08000000 0x04000000>, 153 - <1 0 0 0x14000000 0x04000000>, 154 - <2 0 0 0x18000000 0x04000000>, 155 - <3 0 0 0x1c000000 0x04000000>, 156 - <4 0 0 0x0c000000 0x04000000>, 157 - <5 0 0 0x10000000 0x04000000>; 158 - 148 + ranges = <0x8000000 0 0x8000000 0x18000000>; 159 149 #interrupt-cells = <1>; 160 150 interrupt-map-mask = <0 0 63>; 161 151 interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,