ARM: dts: BCM5301X: convert to iProc QSPI
authorJon Mason <jon.mason@broadcom.com>
Wed, 8 Feb 2017 20:45:16 +0000 (15:45 -0500)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 6 Mar 2017 00:59:02 +0000 (16:59 -0800)
The iproc-qspi driver is the SPI driver that should be used going
forward.  Modify the SPI DT entry to use this driver, and add an entry
in the bcm953012k DTS file to enable the SPI.

Tested on the bcm953012k board.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm/boot/dts/bcm5301x.dtsi
arch/arm/boot/dts/bcm953012k.dts

index 4fbb089cf5ad3c1f96a15f504ee433ff06b724df..8fd1ef9f0c2d77d33d5d831d3ea2b49366b5c355 100644 (file)
                        };
                };
 
-               spi@29000 {
-                       reg = <0x00029000 0x1000>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       spi_nor: spi-nor@0 {
-                               compatible = "jedec,spi-nor";
-                               reg = <0>;
-                               spi-max-frequency = <20000000>;
-                               linux,part-probe = "ofpart", "bcm47xxpart";
-                               status = "disabled";
-                       };
-               };
-
                gmac0: ethernet@24000 {
                        reg = <0x24000 0x800>;
                };
 
                brcm,nand-has-wp;
        };
+
+       spi@18029200 {
+               compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
+               reg = <0x18029200 0x184>,
+                     <0x18029000 0x124>,
+                     <0x1811b408 0x004>,
+                     <0x180293a0 0x01c>;
+               reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg";
+               interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "spi_lr_fullness_reached",
+                                 "spi_lr_session_aborted",
+                                 "spi_lr_impatient",
+                                 "spi_lr_session_done",
+                                 "spi_lr_overhead",
+                                 "mspi_done",
+                                 "mspi_halted";
+               clocks = <&iprocmed>;
+               clock-names = "iprocmed";
+               num-cs = <2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               spi_nor: spi-nor@0 {
+                       compatible = "jedec,spi-nor";
+                       reg = <0>;
+                       spi-max-frequency = <20000000>;
+                       linux,part-probe = "ofpart", "bcm47xxpart";
+                       status = "disabled";
+               };
+       };
 };
index 8bb468c3c1de7d02edb4e1c826afb78f9024f83f..a00c4e1dfb4c25ce532eaae9c06b08a22450ea71 100644 (file)
        };
 };
 
+&spi_nor {
+       status = "okay";
+       spi-max-frequency = <62500000>;
+       m25p,default-addr-width = <3>;
+
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       partition@0 {
+               label = "boot";
+               reg = <0x00000000 0x000d0000>;
+       };
+       partition@d000 {
+               label = "env";
+               reg = <0x000d0000 0x00030000>;
+       };
+       partition@100000 {
+               label = "system";
+               reg = <0x00100000 0x00600000>;
+       };
+       partition@700000 {
+               label = "rootfs";
+               reg = <0x00700000 0x00900000>;
+       };
+};
+
 &uart0 {
        clock-frequency = <62499840>;
 };