2
0
forked from Ivasoft/openwrt

lantiq: kernel: xway-nand: Move ECC engine setting to new DT binding

When trying to add support for another device with Micron NAND chips,
it was discovered that the default setting in the kernel source does
not work with Micron Chips, since the device trees setting is
overwritten and hard coded by the kernel xway_nand driver. This was
the original reason for this PR.
A kernel patch sets the default ECC mode to soft without overwriting
the device tree settings and the device tree for devices using it
are updated with new parameters because the old ones are deprecated
by torvalds/linux@533af69.
A patch for kernel 5.4 is provided to support the new settings
because kernel 5.4 does not support it.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
This commit is contained in:
Daniel Kestrel
2021-08-07 09:28:24 +02:00
committed by Hauke Mehrtens
parent 6bb51c9d1c
commit ca1874437c
13 changed files with 50 additions and 7 deletions

View File

@@ -130,6 +130,8 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -183,6 +183,8 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -14,7 +14,7 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-ecc-mode = "soft";
nand-use-soft-ecc-engine;
nand-ecc-strength = <3>;
nand-ecc-step-size = <256>;

View File

@@ -6,7 +6,7 @@
};
&localbus {
flash@1 {
flash1: flash@1 {
compatible = "lantiq,nand-xway";
bank-width = <2>;
reg = <1 0x0 0x2000000>;
@@ -14,7 +14,7 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-ecc-mode = "on-die";
nand-ecc-engine = <&flash1>;
partitions {
compatible = "fixed-partitions";

View File

@@ -231,7 +231,7 @@
};
&localbus {
flash@1 {
flash1: flash@1 {
compatible = "lantiq,nand-xway";
bank-width = <1>;
reg = <1 0x0 0x2000000>;
@@ -239,7 +239,7 @@
pinctrl-0 = <&nand_pins>;
pinctrl-names = "default";
nand-ecc-mode = "on-die";
nand-ecc-engine = <&flash1>;
partitions {
compatible = "fixed-partitions";

View File

@@ -46,7 +46,7 @@
};
&localbus {
flash@1 {
flash1: flash@1 {
compatible = "lantiq,nand-xway";
lantiq,cs1 = <1>;
bank-width = <1>;
@@ -55,7 +55,7 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-ecc-mode = "on-die";
nand-ecc-engine = <&flash1>;
partitions {
compatible = "fixed-partitions";

View File

@@ -91,6 +91,8 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -103,6 +103,8 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -216,6 +216,7 @@
nand-on-flash-bbt;
nand-ecc-strength = <3>;
nand-ecc-step-size = <256>;
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";

View File

@@ -19,6 +19,8 @@
pinctrl-0 = <&nand_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -30,6 +30,8 @@
pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
pinctrl-names = "default";
nand-use-soft-ecc-engine;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;

View File

@@ -51,6 +51,8 @@
#address-cells = <1>;
#size-cells = <1>;
nand-use-soft-ecc-engine;
partition@0 {
label = "kernel";
reg = <0x0 0x200000>;