]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: zynq: Enable QSPIs on platforms
authorMichal Simek <michal.simek@amd.com>
Wed, 11 Dec 2024 12:41:32 +0000 (13:41 +0100)
committerMichal Simek <michal.simek@amd.com>
Mon, 3 Feb 2025 16:05:50 +0000 (17:05 +0100)
Enable QSPIs with default MTD layout used for testing.
Zybos, Microzed and Zturn are only enabling controller without specifying
MTD map.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/b10d922fec7fde0948205b266bf7e960113859c5.1733920873.git.michal.simek@amd.com
arch/arm/boot/dts/xilinx/zynq-cc108.dts
arch/arm/boot/dts/xilinx/zynq-microzed.dts
arch/arm/boot/dts/xilinx/zynq-zc702.dts
arch/arm/boot/dts/xilinx/zynq-zc706.dts
arch/arm/boot/dts/xilinx/zynq-zc770-xm010.dts
arch/arm/boot/dts/xilinx/zynq-zc770-xm013.dts
arch/arm/boot/dts/xilinx/zynq-zed.dts
arch/arm/boot/dts/xilinx/zynq-zturn-common.dtsi
arch/arm/boot/dts/xilinx/zynq-zybo-z7.dts
arch/arm/boot/dts/xilinx/zynq-zybo.dts

index 5e542ded3d0c704d077ef9e541c8a8569fa844b1..f5525c04842698683560eeabf63f1535e02102da 100644 (file)
@@ -18,6 +18,7 @@
        aliases {
                ethernet0 = &gem0;
                serial0 = &uart0;
+               spi0 = &qspi;
        };
 
        chosen {
        };
 };
 
+&qspi {
+       status = "okay";
+       num-cs = <1>;
+       flash@0 { /* 16 MB */
+               compatible = "jedec,spi-nor";
+               reg = <0x0>;
+               spi-max-frequency = <50000000>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               partition@0 {
+                       label = "qspi-fsbl-uboot-bs";
+                       reg = <0x0 0x400000>; /* 4MB */
+               };
+               partition@400000 {
+                       label = "qspi-linux";
+                       reg = <0x400000 0x400000>; /* 4MB */
+               };
+               partition@800000 {
+                       label = "qspi-rootfs";
+                       reg = <0x800000 0x400000>; /* 4MB */
+               };
+               partition@c00000 {
+                       label = "qspi-devicetree";
+                       reg = <0xc00000 0x100000>; /* 1MB */
+               };
+               partition@d00000 {
+                       label = "qspi-scratch";
+                       reg = <0xd00000 0x200000>; /* 2MB */
+               };
+               partition@f00000 {
+                       label = "qspi-uboot-env";
+                       reg = <0xf00000 0x100000>; /* 1MB */
+               };
+       };
+};
+
 &sdhci1 {
        status = "okay";
        broken-cd ;
index f2f560cc0c0df0df87d5d4c89d8427be90f25295..4c3e56980c9863a452eb499dae97af7040730558 100644 (file)
@@ -13,6 +13,7 @@
        aliases {
                ethernet0 = &gem0;
                serial0 = &uart1;
+               spi0 = &qspi;
        };
 
        memory@0 {
        ps-clk-frequency = <33333333>;
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+};
+
 &gem0 {
        status = "okay";
        phy-mode = "rgmii-id";
index b18812353875c73c66e246d586343aa034193336..6955637c5b1ac5c6c9acc7df6eab7e3e05ebd0c8 100644 (file)
@@ -15,6 +15,7 @@
                ethernet0 = &gem0;
                i2c0 = &i2c0;
                serial0 = &uart1;
+               spi0 = &qspi;
                mmc0 = &sdhci0;
                nvmem0 = &eeprom;
                rtc0 = &rtc;
        };
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+       num-cs = <1>;
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0x0>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               spi-max-frequency = <50000000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       partition@0 {
+                               label = "qspi-fsbl-uboot";
+                               reg = <0x0 0x100000>;
+                       };
+                       partition@100000 {
+                               label = "qspi-linux";
+                               reg = <0x100000 0x500000>;
+                       };
+                       partition@600000 {
+                               label = "qspi-device-tree";
+                               reg = <0x600000 0x20000>;
+                       };
+                       partition@620000 {
+                               label = "qspi-rootfs";
+                               reg = <0x620000 0x5e0000>;
+                       };
+                       partition@c00000 {
+                               label = "qspi-bitstream";
+                               reg = <0xc00000 0x400000>;
+                       };
+               };
+       };
+};
+
 &sdhci0 {
        bootph-all;
        status = "okay";
index 1e38c5caec22b6547b830ba656f9339c1c24762c..3b803c698473ed0803a0eef51f063c01b88675ef 100644 (file)
@@ -14,6 +14,7 @@
                ethernet0 = &gem0;
                i2c0 = &i2c0;
                serial0 = &uart1;
+               spi0 = &qspi;
                mmc0 = &sdhci0;
                nvmem0 = &eeprom;
                rtc0 = &rtc;
        };
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+       num-cs = <2>;
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>, <1>;
+               parallel-memories = /bits/ 64 <0x1000000 0x1000000>; /* 16MB */
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               spi-max-frequency = <50000000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       partition@0 {
+                               label = "qspi-fsbl-uboot";
+                               reg = <0x0 0x100000>;
+                       };
+                       partition@100000 {
+                               label = "qspi-linux";
+                               reg = <0x100000 0x500000>;
+                       };
+                       partition@600000 {
+                               label = "qspi-device-tree";
+                               reg = <0x600000 0x20000>;
+                       };
+                       partition@620000 {
+                               label = "qspi-rootfs";
+                               reg = <0x620000 0x5e0000>;
+                       };
+                       partition@c00000 {
+                               label = "qspi-bitstream";
+                               reg = <0xc00000 0x400000>;
+                       };
+               };
+       };
+};
+
 &sdhci0 {
        bootph-all;
        status = "okay";
index 02876f6d23a53119d4b8b2fe145ee0e4b2b6762f..5fe799c3c7cf449314fbe270c6bfcc7d54fa1602 100644 (file)
@@ -15,6 +15,7 @@
                ethernet0 = &gem0;
                i2c0 = &i2c0;
                serial0 = &uart1;
+               spi0 = &qspi;
                spi1 = &spi1;
        };
 
                compatible = "atmel,24c02";
                reg = <0x52>;
        };
+};
 
+&qspi {
+       status = "okay";
+       num-cs = <1>;
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0x0>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               spi-max-frequency = <50000000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       partition@0 {
+                               label = "qspi-fsbl-uboot";
+                               reg = <0x0 0x100000>;
+                       };
+                       partition@100000 {
+                               label = "qspi-linux";
+                               reg = <0x100000 0x500000>;
+                       };
+                       partition@600000 {
+                               label = "qspi-device-tree";
+                               reg = <0x600000 0x20000>;
+                       };
+                       partition@620000 {
+                               label = "qspi-rootfs";
+                               reg = <0x620000 0x5e0000>;
+                       };
+                       partition@c00000 {
+                               label = "qspi-bitstream";
+                               reg = <0xc00000 0x400000>;
+                       };
+               };
+       };
 };
 
 &sdhci0 {
index f07af61eaa29f24443cb7c9c60efead002c3e055..103e87ea7253523ab079a7741b4561cd0e1b0d3d 100644 (file)
@@ -15,6 +15,7 @@
                ethernet0 = &gem1;
                i2c0 = &i2c1;
                serial0 = &uart0;
+               spi0 = &qspi;
                spi1 = &spi0;
        };
 
        };
 };
 
+&qspi {
+       status = "okay";
+       num-cs = <2>;
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>, <1>;
+               parallel-memories = /bits/ 64 <0x1000000 0x1000000>; /* 16MB */
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               spi-max-frequency = <50000000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       partition@0 {
+                               label = "qspi-fsbl-uboot";
+                               reg = <0x0 0x100000>;
+                       };
+                       partition@100000 {
+                               label = "qspi-linux";
+                               reg = <0x100000 0x500000>;
+                       };
+                       partition@600000 {
+                               label = "qspi-device-tree";
+                               reg = <0x600000 0x20000>;
+                       };
+                       partition@620000 {
+                               label = "qspi-rootfs";
+                               reg = <0x620000 0x5e0000>;
+                       };
+                       partition@c00000 {
+                               label = "qspi-bitstream";
+                               reg = <0xc00000 0x400000>;
+                       };
+               };
+       };
+};
+
 &spi0 {
        status = "okay";
        num-cs = <4>;
index ff2b4e06efbb30bf6c67e1e30b8ee0704c506ded..52ba569b2b9f76124c0cb0a1cbe85d5954f8fabd 100644 (file)
@@ -13,6 +13,7 @@
        aliases {
                ethernet0 = &gem0;
                serial0 = &uart1;
+               spi0 = &qspi;
                mmc0 = &sdhci0;
        };
 
        };
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+       num-cs = <1>;
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               spi-max-frequency = <50000000>;
+               m25p,fast-read;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       partition@0 {
+                               label = "qspi-fsbl-uboot";
+                               reg = <0x0 0x100000>;
+                       };
+                       partition@100000 {
+                               label = "qspi-linux";
+                               reg = <0x100000 0x500000>;
+                       };
+                       partition@600000 {
+                               label = "qspi-device-tree";
+                               reg = <0x600000 0x20000>;
+                       };
+                       partition@620000 {
+                               label = "qspi-rootfs";
+                               reg = <0x620000 0x5e0000>;
+                       };
+                       partition@c00000 {
+                               label = "qspi-bitstream";
+                               reg = <0xc00000 0x400000>;
+                       };
+               };
+       };
+};
+
 &sdhci0 {
        bootph-all;
        status = "okay";
index 800e891495f5834e93345fb7b163da1ae5fa1f67..defef9c8da1360ca2cd618d6786112c567afc4be 100644 (file)
        ps-clk-frequency = <33333333>;
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+};
+
 &gem0 {
        status = "okay";
        phy-mode = "rgmii-id";
index 6983caa35b0d48c25d0e564763a4827266015eb0..5e4247da2285c0c686198c9606abdaf5de4e3dc9 100644 (file)
@@ -10,6 +10,7 @@
        aliases {
                ethernet0 = &gem0;
                serial0 = &uart1;
+               spi0 = &qspi;
        };
 
        memory@0 {
        };
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+};
+
 &sdhci0 {
        bootph-all;
        status = "okay";
index f365693fe2f73378307fa738453244dd5ded0e1a..fbc7d1b12e94f95516404aaae971acf7b3c2332f 100644 (file)
@@ -13,6 +13,7 @@
        aliases {
                ethernet0 = &gem0;
                serial0 = &uart1;
+               spi0 = &qspi;
                mmc0 = &sdhci0;
        };
 
        };
 };
 
+&qspi {
+       bootph-all;
+       status = "okay";
+};
+
 &sdhci0 {
        bootph-all;
        status = "okay";