]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
riscv: dts: microchip: add the mpfs' system controller qspi & associated flash
authorConor Dooley <conor.dooley@microchip.com>
Fri, 20 Oct 2023 13:18:44 +0000 (14:18 +0100)
committerConor Dooley <conor.dooley@microchip.com>
Wed, 6 Dec 2023 12:27:39 +0000 (12:27 +0000)
The system controller's flash can be accessed via an MSS-exposed QSPI
controller sitting, which sits between the mailbox's control & data
registers. On Icicle, it has an MT25QL01GBBB8ESF connected to it.

The system controller and MSS both have separate QSPI controllers, both
of which can access the flash, although the system controller takes
priority.
Unfortunately, on engineering sample silicon, such as that on Icicle
kits, the MSS' QSPI controller cannot write to the flash due to a bug.
As a workaround, a QSPI controller can be implemented in the FPGA
fabric and the IO routing modified to connect it to the flash in place
of the "hard" controller in the MSS.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
arch/riscv/boot/dts/microchip/mpfs.dtsi

index 90b261114763753565001398edcb4c86e3631ab1..2dae3f8f33f6168cf5dc6f3b0286ae7ac4fecca7 100644 (file)
        status = "okay";
 };
 
+&syscontroller_qspi {
+       /*
+        * The flash *is* there, but Icicle kits that have engineering sample
+        * silicon (write?) access to this flash to non-functional. The system
+        * controller itself can actually access it, but the MSS cannot write
+        * an image there. Instantiating a coreQSPI in the fabric & connecting
+        * it to the flash instead should work though. Pre-production or later
+        * silicon does not have this issue.
+        */
+       status = "disabled";
+
+       sys_ctrl_flash: flash@0 { // MT25QL01GBBB8ESF-0SIT
+               compatible = "jedec,spi-nor";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               spi-max-frequency = <20000000>;
+               spi-rx-bus-width = <1>;
+               reg = <0>;
+       };
+};
+
 &usb {
        status = "okay";
        dr_mode = "host";
index a6faf24f1dbaf659eb9f0df6baadc34fa3246f52..7ebce6dde6e414f309cf765be18196d6fe53581c 100644 (file)
                mboxes = <&mbox 0>;
        };
 
+       scbclk: mssclkclk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <80000000>;
+       };
+
        soc {
                #address-cells = <2>;
                #size-cells = <2>;
                        #mbox-cells = <1>;
                        status = "disabled";
                };
+
+               syscontroller_qspi: spi@37020100 {
+                       compatible = "microchip,mpfs-qspi", "microchip,coreqspi-rtl-v2";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x0 0x37020100 0x0 0x100>;
+                       interrupt-parent = <&plic>;
+                       interrupts = <110>;
+                       clocks = <&scbclk>;
+                       status = "disabled";
+               };
        };
 };