MIPS: BMIPS: Add support SPI device nodes
authorJaedon Shin <jaedon.shin@gmail.com>
Tue, 10 Jan 2017 02:00:31 +0000 (11:00 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 24 Jan 2017 17:30:34 +0000 (18:30 +0100)
Adds SPI device nodes to BCM7xxx MIPS based SoCs.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14990/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 files changed:
arch/mips/boot/dts/brcm/bcm7125.dtsi
arch/mips/boot/dts/brcm/bcm7346.dtsi
arch/mips/boot/dts/brcm/bcm7358.dtsi
arch/mips/boot/dts/brcm/bcm7360.dtsi
arch/mips/boot/dts/brcm/bcm7362.dtsi
arch/mips/boot/dts/brcm/bcm7420.dtsi
arch/mips/boot/dts/brcm/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
arch/mips/boot/dts/brcm/bcm97125cbmb.dts
arch/mips/boot/dts/brcm/bcm97346dbsmb.dts
arch/mips/boot/dts/brcm/bcm97358svmb.dts
arch/mips/boot/dts/brcm/bcm97360svmb.dts
arch/mips/boot/dts/brcm/bcm97362svmb.dts
arch/mips/boot/dts/brcm/bcm97420c.dts
arch/mips/boot/dts/brcm/bcm97425svmb.dts
arch/mips/boot/dts/brcm/bcm97435svmb.dts

index bbd00f65ce397a7a83b762f7dc5da316efa427fb..79f838ed96c5e681d50f2754437c5bde72044df7 100644 (file)
                        compatible = "brcm,bcm7120-l2-intc";
                        reg = <0x406780 0x8>;
 
-                       brcm,int-map-mask = <0x44>, <0xf000000>;
+                       brcm,int-map-mask = <0x44>, <0xf000000>, <0x100000>;
                        brcm,int-fwd-mask = <0x70000>;
 
                        interrupt-controller;
                        #interrupt-cells = <1>;
 
                        interrupt-parent = <&periph_intc>;
-                       interrupts = <18>, <19>;
-                       interrupt-names = "upg_main", "upg_bsc";
+                       interrupts = <18>, <19>, <20>;
+                       interrupt-names = "upg_main", "upg_bsc", "upg_spi";
                };
 
                sun_top_ctrl: syscon@404000 {
                        interrupts = <61>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <79>;
+               };
+
+               qspi: spi@443000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@406400 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x406400 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 4bbcc95f1c15d6dee9f2124d4318d60fba246b99..da7bfa45a57d1b01cc055291c62a81ae08bdebfb 100644 (file)
                        interrupts = <85>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <31>;
+               };
+
+               qspi: spi@413000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@408a00 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x408a00 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 3e42535c8d290907705172bcdb86387983564c34..9b05760453f0913d36316826c30c8c5abdf9befb 100644 (file)
                        interrupts = <24>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <31>;
+               };
+
+               qspi: spi@413000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@408a00 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x408a00 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 112a5571c5961c2b5939a81881967121515bf802..57b613c6acf27ba635f277fbbcec068bddd7a00b 100644 (file)
                        interrupts = <82>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <31>;
+               };
+
+               qspi: spi@413000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@408a00 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x408a00 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 34abfb0b07e79406e23bd2bd63396aea282992a5..c2a2843aaa9a7b0573aba98681bf732b28224bc8 100644 (file)
                        interrupts = <82>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <31>;
+               };
+
+               qspi: spi@413000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@408a00 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x408a00 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index b143723c674e8d4b15f50940175d4e87f5b0cc47..532fc8a157962c789ed96bb3d6b5ff02303c2a03 100644 (file)
                        compatible = "brcm,bcm7120-l2-intc";
                        reg = <0x406780 0x8>;
 
-                       brcm,int-map-mask = <0x44>, <0x1f000000>;
+                       brcm,int-map-mask = <0x44>, <0x1f000000>, <0x100000>;
                        brcm,int-fwd-mask = <0x70000>;
 
                        interrupt-controller;
                        #interrupt-cells = <1>;
 
                        interrupt-parent = <&periph_intc>;
-                       interrupts = <18>, <19>;
-                       interrupt-names = "upg_main", "upg_bsc";
+                       interrupts = <18>, <19>, <20>;
+                       interrupt-names = "upg_main", "upg_bsc", "upg_spi";
                };
 
                sun_top_ctrl: syscon@404000 {
                        interrupts = <62>;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@411d00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411d00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <78>;
+               };
+
+               qspi: spi@443000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@406400 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x406400 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 2488d2f61f6017a26f0d1d9198421e5ee6ae35a4..f56fb25f2e6b5ce7894a3e08aeb8879f28e7fe1f 100644 (file)
                        mmc-hs200-1_8v;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@41ad00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x41ad00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <25>;
+               };
+
+               qspi: spi@41c000 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@409200 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x409200 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 19fa259b968b3fc7b1ab476a4ed27125b6af8862..f2cead2eae5c0037caae6fa68e81ea0ddfb46011 100644 (file)
                        mmc-hs200-1_8v;
                        status = "disabled";
                };
+
+               spi_l2_intc: interrupt-controller@41bd00 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x41bd00 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <25>;
+               };
+
+               qspi: spi@41d200 {
+                       #address-cells = <0x1>;
+                       #size-cells = <0x0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-qspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>;
+                       reg-names = "cs_reg", "hif_mspi", "bspi";
+                       interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+                       interrupt-parent = <&spi_l2_intc>;
+                       interrupt-names = "spi_lr_fullness_reached",
+                                         "spi_lr_session_aborted",
+                                         "spi_lr_impatient",
+                                         "spi_lr_session_done",
+                                         "spi_lr_overread",
+                                         "mspi_done",
+                                         "mspi_halted";
+                       status = "disabled";
+               };
+
+               mspi: spi@409200 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,spi-bcm-qspi",
+                                    "brcm,spi-brcmstb-mspi";
+                       clocks = <&upg_clk>;
+                       reg = <0x409200 0x180>;
+                       reg-names = "mspi";
+                       interrupts = <0x14>;
+                       interrupt-parent = <&upg_aon_irq0_intc>;
+                       interrupt-names = "mspi_done";
+                       status = "disabled";
+               };
        };
 };
index 5c24eacd72ddce0a5b354275664f528896af6e83..d72bc423ceaaed1229b81ec10f0a173eafc4c1ca 100644 (file)
@@ -57,3 +57,7 @@
 &ohci0 {
        status = "disabled";
 };
+
+&mspi {
+       status = "okay";
+};
index e67eaf30de3d131ac4432ed0f8a7097a6a8d89a6..ea52d7b5772f88137bb2e4b29f239adcbddbf47c 100644 (file)
 &sdhci0 {
        status = "okay";
 };
+
+&mspi {
+       status = "okay";
+};
index ee4607fae47accb047197ded65b43e09aea7addb..71357fdc19afe57b8b8e44a2d5a4b312d0361a94 100644 (file)
 &nand {
        status = "okay";
 };
+
+&qspi {
+       status = "okay";
+
+       m25p80@0 {
+               compatible = "m25p80";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+               spi-cpol;
+               spi-cpha;
+               use-bspi;
+               m25p,fast-read;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       flash0.cfe@0 {
+                               reg = <0x0 0x200000>;
+                       };
+
+                       flash0.mac@200000 {
+                               reg = <0x200000 0x40000>;
+                       };
+
+                       flash0.nvram@240000 {
+                               reg = <0x240000 0x10000>;
+                       };
+               };
+       };
+};
+
+&mspi {
+       status = "okay";
+};
index bed821b030139599e7fddb0f0de2c38d77fffb7d..e2fed406c6ee5db1d5ab98d72d291d27044b8ee5 100644 (file)
 &sdhci0 {
        status = "okay";
 };
+
+&qspi {
+       status = "okay";
+
+       m25p80@0 {
+               compatible = "m25p80";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+               spi-cpol;
+               spi-cpha;
+               use-bspi;
+               m25p,fast-read;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       flash0.cfe@0 {
+                               reg = <0x0 0x200000>;
+                       };
+
+                       flash0.mac@200000 {
+                               reg = <0x200000 0x40000>;
+                       };
+
+                       flash0.nvram@240000 {
+                               reg = <0x240000 0x10000>;
+                       };
+               };
+       };
+};
+
+&mspi {
+       status = "okay";
+};
index 68fd823868e07a3f580ca97960a93f78d36afaae..78bffdf1187203573d29c3677aa895bf85cb109c 100644 (file)
@@ -73,3 +73,7 @@
 &sdhci0 {
        status = "okay";
 };
+
+&mspi {
+       status = "okay";
+};
index e66271af055e74fd19c41f8390019c19c2fd08b9..d62b448a152dee118b1f8cc93034075516580215 100644 (file)
@@ -79,3 +79,7 @@
 &ohci1 {
        status = "okay";
 };
+
+&mspi {
+       status = "okay";
+};
index f95ba1bf3e5806d0a4b4467621b16eb2490cc2ed..73aa006bd9ce11c46d1695252f5537ad281b8861 100644 (file)
 &sdhci1 {
        status = "okay";
 };
+
+&qspi {
+       status = "okay";
+
+       m25p80@0 {
+               compatible = "m25p80";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+               spi-cpol;
+               spi-cpha;
+               use-bspi;
+               m25p,fast-read;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       flash0.cfe@0 {
+                               reg = <0x0 0x200000>;
+                       };
+
+                       flash0.mac@200000 {
+                               reg = <0x200000 0x40000>;
+                       };
+
+                       flash0.nvram@240000 {
+                               reg = <0x240000 0x10000>;
+                       };
+               };
+       };
+};
+
+&mspi {
+       status = "okay";
+};
index fb37b7111bf4f39bbcac24af96a9f0fdf4dd9a02..0a915f3feab6c304609413f361dec9f10b9d1e45 100644 (file)
 &sdhci1 {
        status = "okay";
 };
+
+&mspi {
+       status = "okay";
+};