ARM: dts: ixp4xx: Use the expansion bus
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Jul 2021 23:58:54 +0000 (01:58 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 8 Aug 2021 23:55:10 +0000 (01:55 +0200)
Replace the "simple-bus" simplification by the proper bus for
IXP4xx memory or device expansion.

Use chip-select addressing with two address cells on all the
flashes mounted on the IXP4xx devices. This includes all flash
chips.

Change the unit-name from @50000000 to @c4000000 as the DTS
validation screams. The registers for controlling the bus are
at c4000000 but the actual memory windows and ranges are at
50000000. Well it is just syntax, we can live with it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/intel-ixp42x-dlink-dsm-g600.dts
arch/arm/boot/dts/intel-ixp42x-iomega-nas100d.dts
arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts
arch/arm/boot/dts/intel-ixp42x-welltech-epbx100.dts
arch/arm/boot/dts/intel-ixp42x.dtsi
arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts
arch/arm/boot/dts/intel-ixp43x.dtsi
arch/arm/boot/dts/intel-ixp45x-ixp46x.dtsi
arch/arm/boot/dts/intel-ixp4xx.dtsi

index 4ea8be3..8b32e9f 100644 (file)
        };
 
        soc {
-               bus@50000000 {
+               bus@c4000000 {
                        /* The first 16MB region at CS0 on the expansion bus */
-                       flash@0 {
+                       flash@0,0 {
                                compatible = "intel,ixp4xx-flash", "cfi-flash";
                                bank-width = <2>;
                                /*
                                 * 16 MB of Flash in 128 0x20000 sized blocks
                                 * mapped in at CS0.
                                 */
-                               reg = <0x00000000 0x1000000>;
+                               reg = <0 0x00000000 0x1000000>;
 
                                partitions {
                                        compatible = "redboot-fis";
index 8905aa3..8c18d80 100644 (file)
        };
 
        soc {
-               bus@50000000 {
+               bus@c4000000 {
                        /* The first 16MB region at CS0 on the expansion bus */
-                       flash@0 {
+                       flash@0,0 {
                                compatible = "intel,ixp4xx-flash", "cfi-flash";
                                bank-width = <2>;
                                /*
                                 * 8 MB of Flash in 0x20000 byte blocks
                                 * mapped in at CS0.
                                 */
-                               reg = <0x00000000 0x800000>;
+                               reg = <0 0x00000000 0x800000>;
 
                                partitions {
                                        compatible = "redboot-fis";
index b9a5268..e3a32b0 100644 (file)
        };
 
        soc {
-               bus@50000000 {
+               bus@c4000000 {
                        /* The first 16MB region at CS0 on the expansion bus */
-                       flash@0 {
+                       flash@0,0 {
                                compatible = "intel,ixp4xx-flash", "cfi-flash";
                                bank-width = <2>;
                                /*
                                 * 8 MB of Flash in 0x20000 byte blocks
                                 * mapped in at CS0.
                                 */
-                               reg = <0x00000000 0x800000>;
+                               reg = <0 0x00000000 0x800000>;
 
                                partitions {
                                        compatible = "redboot-fis";
index 220605e..f5846a5 100644 (file)
        };
 
        soc {
-               bus@50000000 {
-                       flash@0 {
+               bus@c4000000 {
+                       flash@0,0 {
                                compatible = "intel,ixp4xx-flash", "cfi-flash";
                                bank-width = <2>;
                                /*
                                 * 16 MB of Flash
                                 */
-                               reg = <0x00000000 0x1000000>;
+                               reg = <0 0x00000000 0x1000000>;
 
                                partitions {
                                        compatible = "fixed-partitions";
index 5fa063e..d0e0f8a 100644 (file)
@@ -7,6 +7,11 @@
 
 / {
        soc {
+               bus@c4000000 {
+                       compatible = "intel,ixp42x-expansion-bus-controller", "syscon";
+                       reg = <0xc4000000 0x28>;
+               };
+
                pci@c0000000 {
                        compatible = "intel,ixp42x-pci";
                };
index f5fe309..1a2f9a8 100644 (file)
        };
 
        soc {
-               bus@50000000 {
-                       flash@0 {
+               bus@c4000000 {
+                       flash@0,0 {
                                compatible = "intel,ixp4xx-flash", "cfi-flash";
                                bank-width = <2>;
+                               /* Enable writes on the expansion bus */
+                               intel,ixp4xx-eb-write-enable = <1>;
                                /*
                                 * 32 MB of Flash in 0x20000 byte blocks
-                                * mapped in at CS0.
+                                * mapped in at CS0 and CS1
                                 */
-                               reg = <0x00000000 0x2000000>;
+                               reg = <0 0x00000000 0x2000000>;
 
                                partitions {
                                        compatible = "redboot-fis";
index 1d0817c..60bf990 100644 (file)
@@ -8,6 +8,12 @@
 
 / {
        soc {
+               bus@c4000000 {
+                       compatible = "intel,ixp43x-expansion-bus-controller", "syscon";
+                       /* Uses at least up to 0x230 */
+                       reg = <0xc4000000 0x1000>;
+               };
+
                pci@c0000000 {
                        compatible = "intel,ixp43x-pci";
                };
index cce49e8..b6ff614 100644 (file)
@@ -9,6 +9,17 @@
 
 / {
        soc {
+               bus@c4000000 {
+                       compatible = "intel,ixp46x-expansion-bus-controller", "syscon";
+                       /* Uses at least up to 0x124 */
+                       reg = <0xc4000000 0x1000>;
+               };
+
+               rng@70002100 {
+                       compatible = "intel,ixp46x-rng";
+                       reg = <0x70002100 4>;
+               };
+
                interrupt-controller@c8003000 {
                        compatible = "intel,ixp43x-interrupt";
                };
index 45cb3ad..e5af2d4 100644 (file)
                interrupt-parent = <&intcon>;
 
                /*
-                * The IXP4xx expansion bus is a set of 16 or 32MB
-                * windows in the 256MB space from 0x50000000 to
-                * 0x5fffffff.
+                * The IXP4xx expansion bus is a set of up to 7 each up to 16MB
+                * windows in the 256MB space from 0x50000000 to 0x5fffffff.
                 */
-               bus@50000000 {
-                       compatible = "simple-bus";
-                       #address-cells = <1>;
+               bus@c4000000 {
+                       /* compatible and reg filled in by per-soc device tree */
+                       native-endian;
+                       #address-cells = <2>;
                        #size-cells = <1>;
-                       ranges = <0x00000000 0x50000000 0x10000000>;
-                       dma-ranges = <0x00000000 0x50000000 0x10000000>;
+                       ranges = <0 0x0 0x50000000 0x01000000>,
+                                <1 0x0 0x51000000 0x01000000>,
+                                <2 0x0 0x52000000 0x01000000>,
+                                <3 0x0 0x53000000 0x01000000>,
+                                <4 0x0 0x54000000 0x01000000>,
+                                <5 0x0 0x55000000 0x01000000>,
+                                <6 0x0 0x56000000 0x01000000>,
+                                <7 0x0 0x57000000 0x01000000>;
+                       dma-ranges = <0 0x0 0x50000000 0x01000000>,
+                                <1 0x0 0x51000000 0x01000000>,
+                                <2 0x0 0x52000000 0x01000000>,
+                                <3 0x0 0x53000000 0x01000000>,
+                                <4 0x0 0x54000000 0x01000000>,
+                                <5 0x0 0x55000000 0x01000000>,
+                                <6 0x0 0x56000000 0x01000000>,
+                                <7 0x0 0x57000000 0x01000000>;
                };
 
                qmgr: queue-manager@60000000 {