aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/files/arch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-09-24 01:14:53 +0200
committerDaniel Golle <daniel@makrotopia.org>2017-01-01 10:07:58 +0100
commit5cde94d9ab577c5ab68fc71e15a05d1bda5041f2 (patch)
tree0056dc8fb66987bbdf46e935ae85b101c841b4e8 /target/linux/oxnas/files/arch
parentae21033e764dde7d359e2bfaac1de83081318f22 (diff)
downloadupstream-5cde94d9ab577c5ab68fc71e15a05d1bda5041f2.tar.gz
upstream-5cde94d9ab577c5ab68fc71e15a05d1bda5041f2.tar.bz2
upstream-5cde94d9ab577c5ab68fc71e15a05d1bda5041f2.zip
oxnas: backport upstream NAND driver
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/oxnas/files/arch')
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts30
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts70
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts38
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-v3.dts38
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts37
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi9
6 files changed, 133 insertions, 89 deletions
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts
index 712c03e425..5f7c2a1e94 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts
@@ -34,15 +34,6 @@
nand@41000000 {
status = "okay";
- partition@0 {
- label = "boot";
- reg = <0x0 0x26c0000>;
- };
-
- partition@26c0000 {
- label = "ubi";
- reg = <0x26c0000 0xd940000>;
- };
};
ethernet@40400000 {
@@ -132,3 +123,24 @@
};
};
};
+
+&nandc {
+ status = "okay";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "boot";
+ reg = <0x00000000 0x026c0000>;
+ };
+
+ partition@26c0000 {
+ label = "ubi";
+ reg = <0x026c0000 0x0d940000>;
+ };
+};
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
index 1312fd63b5..a59addccac 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
@@ -31,37 +31,6 @@
nr-ports = <2>;
};
- nand@41000000 {
- status = "okay";
-
- partition@0 {
- label = "stage1";
- reg = <0x00000000 0x00040000>;
- read-only;
- };
-
- partition@40000 {
- label = "u-boot";
- reg = <0x00040000 0x00200000>;
- read-only;
- };
-
- partition@240000 {
- label = "initrd";
- reg = <0x00240000 0x00600000>;
- };
-
- partition@840000 {
- label = "kernel";
- reg = <0x00840000 0x007C0000>;
- };
-
- partition@e00000 {
- label = "ubi";
- reg = <0x01000000 0x07000000>;
- };
- };
-
ethernet@40400000 {
status = "okay";
snps,phy-addr = <1>;
@@ -163,3 +132,42 @@
gpios = <&GPIOA 9 0>;
};
};
+
+&nandc {
+ status = "okay";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "stage1";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot";
+ reg = <0x00040000 0x00200000>;
+ read-only;
+ };
+
+ partition@240000 {
+ label = "initrd";
+ reg = <0x00240000 0x00600000>;
+ };
+
+ partition@840000 {
+ label = "kernel";
+ reg = <0x00840000 0x007C0000>;
+ };
+
+ partition@e00000 {
+ label = "ubi";
+ reg = <0x01000000 0x07000000>;
+ };
+ };
+};
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts
index f3730c32a6..5b087e93fa 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-pro.dts
@@ -28,21 +28,6 @@
status = "okay";
};
- nand@41000000 {
- status = "okay";
-
- partition@0 {
- label = "boot";
- reg = <0x00000000 0x00e00000>;
- /*read-only;*/
- };
-
- partition@e00000 {
- label = "ubi";
- reg = <0x00e00000 0x07200000>;
- };
- };
-
ethernet@40400000 {
status = "okay";
};
@@ -84,3 +69,26 @@
};
};
};
+
+&nandc {
+ status = "okay";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "boot";
+ reg = <0x00000000 0x00e00000>;
+ /*read-only;*/
+ };
+
+ partition@e00000 {
+ label = "ubi";
+ reg = <0x00e00000 0x07200000>;
+ };
+ };
+};
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-v3.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-v3.dts
index 802913273b..be0f6c9077 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-v3.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-pogoplug-v3.dts
@@ -25,21 +25,6 @@
status = "okay";
};
- nand@41000000 {
- status = "okay";
-
- partition@0 {
- label = "boot";
- reg = <0x00000000 0x00e00000>;
- /*read-only;*/
- };
-
- partition@e00000 {
- label = "ubi";
- reg = <0x00e00000 0x07200000>;
- };
- };
-
ethernet@40400000 {
status = "okay";
};
@@ -81,3 +66,26 @@
};
};
+
+&nandc {
+ status = "okay";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "boot";
+ reg = <0x00000000 0x00e00000>;
+ /*read-only;*/
+ };
+
+ partition@e00000 {
+ label = "ubi";
+ reg = <0x00e00000 0x07200000>;
+ };
+ };
+};
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts
index a8112c947c..ad93d4ec15 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts
@@ -27,20 +27,6 @@
status = "okay";
};
- nand@41000000 {
- status = "okay";
-
- partition@0 {
- label = "boot";
- reg = <0x00000000 0x00e00000>;
- /*read-only;*/
- };
-
- partition@e00000 {
- label = "ubi";
- reg = <0x00e00000 0x07200000>;
- };
- };
ethernet@40400000 {
status = "okay";
@@ -91,3 +77,26 @@
};
};
+
+&nandc {
+ status = "okay";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "boot";
+ reg = <0x00000000 0x00e00000>;
+ read-only;
+ };
+
+ partition@e00000 {
+ label = "ubi";
+ reg = <0x00e00000 0x07200000>;
+ };
+ };
+};
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi b/target/linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi
index 4ba4b8b086..c096a7d1c3 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi
@@ -298,16 +298,15 @@
status = "disabled";
};
- nand@41000000 {
- compatible = "plxtech,nand-nas782x", "gen_nand";
- reg = <0x41000000 0x100000>, <0x41C00000 0x20>;
- nand-ecc-mode = "soft";
+ nandc: nand-controller@41000000 {
+ compatible = "oxsemi,ox820-nand";
+ reg = <0x41000000 0x100000>;
clocks = <&stdclk 9>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_nand0>;
resets = <&rst 15>;
#address-cells = <1>;
- #size-cells = <1>;
+ #size-cells = <0>;
status = "disabled";
};