Skip to content

Commit

Permalink
apm821xx: convert legacy nand partition layout
Browse files Browse the repository at this point in the history
in order to get nvmem-cells to work on AP and routers
(Netgears WNDR4700). The nvmem-cell needs to be within
a fixed-partition dt-node.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  • Loading branch information
chunkeey committed Feb 4, 2022
1 parent 1085c4b commit f095822
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 31 deletions.
3 changes: 0 additions & 3 deletions target/linux/apm821xx/dts/apm82181.dtsi
Expand Up @@ -251,9 +251,6 @@
nand-ecc-algo = "hamming";
nand-ecc-step-size = <256>;
nand-ecc-strength = <1>;

#address-cells = <1>;
#size-cells = <1>;
};
};
};
Expand Down
24 changes: 14 additions & 10 deletions target/linux/apm821xx/dts/meraki-mr24.dts
Expand Up @@ -38,13 +38,17 @@
status = "okay";
};

&EBC0 {
&ndfc {
/* Ikarem has 32MB of NAND */
ndfc@1,0 {
status = "okay";
/* 32 MiB NAND Flash */
nand {
nand-is-boot-medium;
status = "okay";

nand {
nand-is-boot-medium;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
Expand All @@ -59,10 +63,10 @@
* blocks (64KiB) in order to have spares
* around for bad block management
*/
label = "u-boot-env";
reg = <0x00150000 0x00010000>;
read-only;
};
label = "u-boot-env";
reg = <0x00150000 0x00010000>;
read-only;
};

partition@160000 {
/*
Expand Down
15 changes: 10 additions & 5 deletions target/linux/apm821xx/dts/meraki-mx60.dts
Expand Up @@ -42,12 +42,17 @@
dr_mode = "host";
};

&EBC0 {
&ndfc {
/* Buckminster has 1GiB of NAND */
ndfc@1,0 {
status = "okay";
nand {
nand-is-boot-medium;
status = "okay";

nand {
nand-is-boot-medium;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
Expand Down
17 changes: 11 additions & 6 deletions target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
Expand Up @@ -28,12 +28,17 @@
status = "okay";
};

&EBC0 {
ndfc@1,0 {
status = "okay";
/* 32 MiB SLC NAND Flash */
nand {
nand-is-boot-medium;
&ndfc {
status = "okay";
/* 32 MiB SLC NAND Flash */

nand {
nand-is-boot-medium;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
Expand Down
17 changes: 10 additions & 7 deletions target/linux/apm821xx/dts/netgear-wndr4700.dts
Expand Up @@ -169,13 +169,16 @@
dr_mode = "host";
};

&EBC0 {
ndfc: ndfc@1,0 {

status = "okay";
/* 128 MiB Nand Flash */
nand {
nand-is-boot-medium;
&ndfc {
status = "okay";
/* 128 MiB Nand Flash */
nand {
nand-is-boot-medium;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "uboot";
Expand Down

0 comments on commit f095822

Please sign in to comment.