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 4ea8be3449f9ae1dc01fe5cc4023299d4b1f5cb2..8b32e9f22d81cf1e458cd457a69f0a13c1d00258 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 8905aa33ca61fe33815beb4c3f2f7f0b97a7d989..8c18d802c8491792161c2d0abf0cc10336d1165a 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 b9a5268fe7ad6fa0943c929a1b73a252d63e91a1..e3a32b08d16707f6b32c9d69f3d198430a408849 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 220605e297c344ed3ac3781aa4d69aec3a0512fe..f5846a50e4d492804b6667a5a1a8f0b972b5a6fd 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 5fa063ed396cfe883844f84cd929edd05346afae..d0e0f8afb7c950815f67da2a9db4bffecf9fa3a5 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 f5fe309f7762d170d51bd82d45267c90dbeae90f..1a2f9a8082709b4acbf15d634527b52bd1696414 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 1d0817c6e3f93be80b6c7e85a84151697f1ce9ff..60bf9903e0f8cb8963cdb47776539df0e71f423c 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 cce49e80904359bd40dd5114e232d61b567906ab..b6ff614dadc6b1d80756c86ab1aaa1cd10c50234 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 45cb3ad954c1ff39e53a568884368d6e2bfe501c..e5af2d4630748431304890671f16e2bf5e6d25af 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 {