MIPS: BMIPS: Add support NAND device nodes
authorJaedon Shin <jaedon.shin@gmail.com>
Fri, 19 Aug 2016 02:52:29 +0000 (11:52 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Oct 2016 15:31:02 +0000 (17:31 +0200)
Adds NAND device nodes to BCM7xxx MIPS based SoCs.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: MIPS Mailing List <linux-mips@linux-mips.org>
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14003/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 files changed:
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/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
arch/mips/boot/dts/brcm/bcm97346dbsmb.dts
arch/mips/boot/dts/brcm/bcm97358svmb.dts
arch/mips/boot/dts/brcm/bcm97362svmb.dts
arch/mips/boot/dts/brcm/bcm97425svmb.dts
arch/mips/boot/dts/brcm/bcm97435svmb.dts
arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi [new file with mode: 0644]
arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi [new file with mode: 0644]

index 0da4f8a3744b2122b1f069cf3e225eea95c195f6..72d9cffa8927ffed363a30c6770f0fa4d7748f1c 100644 (file)
                        status = "disabled";
                };
 
+               hif_l2_intc: interrupt-controller@411000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <30>;
+               };
+
+               nand: nand@412800 {
+                       compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand";
+                       reg = <0x412800 0x400>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>;
+                       status = "disabled";
+               };
+
                sata: sata@181000 {
                        compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci";
                        reg-names = "ahci", "top-ctrl";
index aec1b2e7e2ab700d26566dda84f3bc77590cb1fc..7f78bfab164bea8c05491780740acedb69a8e6b5 100644 (file)
                        interrupts = <66>;
                        status = "disabled";
                };
+
+               hif_l2_intc: interrupt-controller@411000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <30>;
+               };
+
+               nand: nand@412800 {
+                       compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand";
+                       reg = <0x412800 0x400>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>;
+                       status = "disabled";
+               };
        };
 };
index 9f72d34904279fddc7f3f5bc5042ca4e5b159c3f..64b9fd90941d2f69af9bfccaa31d5a4007d60073 100644 (file)
                        status = "disabled";
                };
 
+               hif_l2_intc: interrupt-controller@411000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <30>;
+               };
+
+               nand: nand@412800 {
+                       compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand";
+                       reg = <0x412800 0x400>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>;
+                       status = "disabled";
+               };
+
                sata: sata@181000 {
                        compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci";
                        reg-names = "ahci", "top-ctrl";
index ff734f45df92a7db204e9beff2d91222295d730b..784d587252274ac464e304e2bb9fd92147b3a917 100644 (file)
                        status = "disabled";
                };
 
+               hif_l2_intc: interrupt-controller@411000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x411000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <30>;
+               };
+
+               nand: nand@412800 {
+                       compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand";
+                       reg = <0x412800 0x400>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>;
+                       status = "disabled";
+               };
+
                sata: sata@181000 {
                        compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci";
                        reg-names = "ahci", "top-ctrl";
index 1c8d3b4033a046c32c8e6498a540fd6a164766c7..7124c98224793bc7a3049b17b98cf2dec4b991d5 100644 (file)
                        status = "disabled";
                };
 
+               hif_l2_intc: interrupt-controller@41a000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x41a000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <24>;
+               };
+
+               nand: nand@41b800 {
+                       compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand";
+                       reg = <0x41b800 0x400>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>;
+                       status = "disabled";
+               };
+
                sata: sata@181000 {
                        compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci";
                        reg-names = "ahci", "top-ctrl";
index 2b28d91762ef2c6fc9f924bca34df3c67ce72151..a3648964be3a0c0c6f15a63612e600f187dd76f7 100644 (file)
                        status = "disabled";
                };
 
+               hif_l2_intc: interrupt-controller@41b000 {
+                       compatible = "brcm,l2-intc";
+                       reg = <0x41b000 0x30>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <24>;
+               };
+
+               nand: nand@41c800 {
+                       compatible = "brcm,brcmnand-v6.2", "brcm,brcmnand";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg-names = "nand", "flash-dma";
+                       reg = <0x41c800 0x600>, <0x41d000 0x100>;
+                       interrupt-parent = <&hif_l2_intc>;
+                       interrupts = <24>, <4>;
+                       status = "disabled";
+               };
+
                sata: sata@181000 {
                        compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci";
                        reg-names = "ahci", "top-ctrl";
index 27c9f127a7ca3a8886aa2756de9f48421314f9a0..e67eaf30de3d131ac4432ed0f8a7097a6a8d89a6 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "bcm7346.dtsi"
+/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
 
 / {
        compatible = "brcm,bcm97346dbsmb", "brcm,bcm7346";
        status = "okay";
 };
 
+&nand {
+       status = "okay";
+};
+
 &sata {
        status = "okay";
 };
index 757fe9d5f4dff38e6f7916172b669bcb8d66f841..ee4607fae47accb047197ded65b43e09aea7addb 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "bcm7358.dtsi"
+/include/ "bcm97xxx-nand-cs1-bch4.dtsi"
 
 / {
        compatible = "brcm,bcm97358svmb", "brcm,bcm7358";
@@ -64,3 +65,7 @@
 &ohci0 {
        status = "okay";
 };
+
+&nand {
+       status = "okay";
+};
index 1b9bc4b2d9ae6a617bdc01c7c9b65d47f67f630c..68fd823868e07a3f580ca97960a93f78d36afaae 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "bcm7362.dtsi"
+/include/ "bcm97xxx-nand-cs1-bch4.dtsi"
 
 / {
        compatible = "brcm,bcm97362svmb", "brcm,bcm7362";
        status = "okay";
 };
 
+&nand {
+       status = "okay";
+};
+
 &sata {
        status = "okay";
 };
index 1c6b74daef5647f00864e8f62839c364762b2696..f95ba1bf3e5806d0a4b4467621b16eb2490cc2ed 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "bcm7425.dtsi"
+/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
 
 / {
        compatible = "brcm,bcm97425svmb", "brcm,bcm7425";
        status = "okay";
 };
 
+&nand {
+       status = "okay";
+};
+
 &sdhci0 {
        status = "okay";
 };
index 64bb1988dbc83aa57442c1f996eb990020d24b8a..fb37b7111bf4f39bbcac24af96a9f0fdf4dd9a02 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "bcm7435.dtsi"
+/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
 
 / {
        compatible = "brcm,bcm97435svmb", "brcm,bcm7435";
        status = "okay";
 };
 
+&nand {
+       status = "okay";
+};
+
 &sata {
        status = "okay";
 };
diff --git a/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi
new file mode 100644 (file)
index 0000000..3c24f97
--- /dev/null
@@ -0,0 +1,25 @@
+&nand {
+       nandcs@1 {
+               compatible = "brcm,nandcs";
+               reg = <1>;
+               nand-on-flash-bbt;
+
+               nand-ecc-strength = <24>;
+               nand-ecc-step-size = <1024>;
+               brcm,nand-oob-sector-size = <27>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       flash1.rootfs@0 {
+                               reg = <0x0 0x10000000>;
+                       };
+
+                       flash1.kernel@10000000 {
+                               reg = <0x10000000 0x400000>;
+                       };
+               };
+       };
+};
diff --git a/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi
new file mode 100644 (file)
index 0000000..cb53181
--- /dev/null
@@ -0,0 +1,25 @@
+&nand {
+       nandcs@1 {
+               compatible = "brcm,nandcs";
+               reg = <1>;
+               nand-on-flash-bbt;
+
+               nand-ecc-strength = <4>;
+               nand-ecc-step-size = <512>;
+               brcm,nand-oob-sector-size = <16>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       flash1.rootfs@0 {
+                               reg = <0x0 0x10000000>;
+                       };
+
+                       flash1.kernel@10000000 {
+                               reg = <0x10000000 0x400000>;
+                       };
+               };
+       };
+};