Commit 078fb7aa authored by Rob Herring's avatar Rob Herring Committed by Sudeep Holla

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 2e9edc07
...@@ -101,13 +101,22 @@ led-8 { ...@@ -101,13 +101,22 @@ led-8 {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
motherboard-bus@8000000 {
arm,hbi = <0x190>; arm,hbi = <0x190>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
ranges; ranges = <0 0 0x08000000 0x04000000>,
<1 0 0x14000000 0x04000000>,
<2 0 0x18000000 0x04000000>,
<3 0 0x1c000000 0x04000000>,
<4 0 0x0c000000 0x04000000>,
<5 0 0x10000000 0x04000000>;
nor_flash: flash@0 { nor_flash: flash@0 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
......
...@@ -20,13 +20,23 @@ ...@@ -20,13 +20,23 @@
/ { / {
bus@40000000 { bus@40000000 {
motherboard { compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x40000000 0x40000000 0x10000000>,
<0x10000000 0x10000000 0x00020000>;
motherboard-bus@40000000 {
arm,hbi = <0x190>; arm,hbi = <0x190>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
ranges; ranges = <0 0 0x40000000 0x04000000>,
<1 0 0x44000000 0x04000000>,
<2 0 0x48000000 0x04000000>,
<3 0 0x4c000000 0x04000000>,
<7 0 0x10000000 0x00020000>;
flash@0,00000000 { flash@0,00000000 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
......
...@@ -237,16 +237,7 @@ energy { ...@@ -237,16 +237,7 @@ energy {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
......
...@@ -609,16 +609,7 @@ etm2_out_port: endpoint { ...@@ -609,16 +609,7 @@ etm2_out_port: endpoint {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
......
...@@ -207,16 +207,7 @@ temp-dcc { ...@@ -207,16 +207,7 @@ temp-dcc {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x08000000 0x04000000>,
<1 0 0x14000000 0x04000000>,
<2 0 0x18000000 0x04000000>,
<3 0 0x1c000000 0x04000000>,
<4 0 0x0c000000 0x04000000>,
<5 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
......
...@@ -296,16 +296,6 @@ power-vd10-s3 { ...@@ -296,16 +296,6 @@ power-vd10-s3 {
}; };
smb: bus@40000000 { smb: bus@40000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x40000000 0x04000000>,
<1 0 0x44000000 0x04000000>,
<2 0 0x48000000 0x04000000>,
<3 0 0x4c000000 0x04000000>,
<7 0 0x10000000 0x00020000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 4>, interrupt-map = <0 0 0 &gic 0 0 4>,
......
...@@ -195,17 +195,6 @@ panel_in: endpoint { ...@@ -195,17 +195,6 @@ panel_in: endpoint {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -802,16 +802,6 @@ memory@80000000 { ...@@ -802,16 +802,6 @@ memory@80000000 {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 15>; interrupt-map-mask = <0 0 15>;
interrupt-map = <0 0 0 &gic 0 GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic 0 GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -92,11 +92,21 @@ nmi-button { ...@@ -92,11 +92,21 @@ nmi-button {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x8000000 0 0x8000000 0x18000000>;
motherboard-bus@8000000 {
compatible = "arm,vexpress,v2p-p1", "simple-bus"; compatible = "arm,vexpress,v2p-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
ranges; ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
arm,hbi = <0x252>; arm,hbi = <0x252>;
arm,vexpress,site = <0>; arm,vexpress,site = <0>;
......
...@@ -133,17 +133,6 @@ panel_in: endpoint { ...@@ -133,17 +133,6 @@ panel_in: endpoint {
}; };
bus@8000000 { bus@8000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
/ { / {
bus@8000000 { bus@8000000 {
motherboard-bus { motherboard-bus@8000000 {
arm,v2m-memory-map = "rs2"; arm,v2m-memory-map = "rs2";
iofpga-bus@300000000 { iofpga-bus@300000000 {
......
...@@ -77,11 +77,21 @@ dvimode { ...@@ -77,11 +77,21 @@ dvimode {
}; };
bus@8000000 { bus@8000000 {
motherboard-bus { compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x8000000 0 0x8000000 0x18000000>;
motherboard-bus@8000000 {
compatible = "arm,vexpress,v2m-p1", "simple-bus"; compatible = "arm,vexpress,v2m-p1", "simple-bus";
#address-cells = <2>; /* SMB chipselect number and offset */ #address-cells = <2>; /* SMB chipselect number and offset */
#size-cells = <1>; #size-cells = <1>;
ranges; ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
flash@0 { flash@0 {
compatible = "arm,vexpress-flash", "cfi-flash"; compatible = "arm,vexpress-flash", "cfi-flash";
......
...@@ -145,17 +145,7 @@ temp-fpga { ...@@ -145,17 +145,7 @@ temp-fpga {
}; };
smb: bus@8000000 { smb: bus@8000000 {
compatible = "simple-bus"; ranges = <0x8000000 0 0x8000000 0x18000000>;
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0 0x08000000 0x04000000>,
<1 0 0 0x14000000 0x04000000>,
<2 0 0 0x18000000 0x04000000>,
<3 0 0 0x1c000000 0x04000000>,
<4 0 0 0x0c000000 0x04000000>,
<5 0 0 0x10000000 0x04000000>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 63>; interrupt-map-mask = <0 0 63>;
interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, interrupt-map = <0 0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment