linux: replace u-boot,env with nvmem,layout

The former is deprecated in favor of nvmem-layout. In preparation for
eventual removal from the kernel, do so here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-10-05 15:06:13 -07:00
parent 1a5d2ed42e
commit bfe26aefcd
24 changed files with 127 additions and 52 deletions

View File

@ -65,9 +65,12 @@
* around for bad block management * around for bad block management
*/ */
label = "u-boot-env"; label = "u-boot-env";
compatible = "u-boot,env";
reg = <0x00150000 0x00010000>; reg = <0x00150000 0x00010000>;
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@160000 { partition@160000 {

View File

@ -64,8 +64,11 @@
partition@100000 { partition@100000 {
label = "u-boot-env"; label = "u-boot-env";
reg = <0x00100000 0x00100000>; reg = <0x00100000 0x00100000>;
compatible = "u-boot,env";
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@200000 { partition@200000 {

View File

@ -47,24 +47,27 @@
}; };
partition@100000 { partition@100000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0x00100000 0x0004000>; reg = <0x00100000 0x0004000>;
read-only; read-only;
ethaddr { nvmem-layout {
}; compatible = "u-boot,env";
bootcmd { ethaddr {
}; };
serno { bootcmd {
}; };
ProductID { serno {
}; };
HardwareVer { ProductID {
};
HardwareVer {
};
}; };
}; };

View File

@ -188,9 +188,12 @@
partition@40000 { partition@40000 {
label = "u-boot-env-main"; label = "u-boot-env-main";
compatible = "u-boot,env-redundant-count";
reg = <0x00040000 0x20000>; /* one block is 128k */ reg = <0x00040000 0x20000>; /* one block is 128k */
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env-redundant-count";
};
}; };
/* /*
@ -199,9 +202,12 @@
* *
* partition@60000 { * partition@60000 {
* label = "u-boot-env-redundant"; * label = "u-boot-env-redundant";
* compatible = "u-boot,env-redundant-count";
* reg = <0x00060000 0x20000>; * reg = <0x00060000 0x20000>;
* read-only; * read-only;
*
* nvmem-layout {
* compatible = "u-boot,env-redundant-count";
* };
* }; * };
*/ */
}; };

View File

@ -48,11 +48,14 @@
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
compatible = "u-boot,env-redundant-bool";
reg = <0x00000000 0x00001000>; reg = <0x00000000 0x00001000>;
label = "u-boot-env-1"; label = "u-boot-env-1";
ethaddr { nvmem-layout {
compatible = "u-boot,env-redundant-bool";
ethaddr {
};
}; };
}; };
@ -60,10 +63,12 @@
* Causes the following warning: * sysfs: cannot create duplicate filename '/bus/nvmem/devices/u-boot-env0' * Causes the following warning: * sysfs: cannot create duplicate filename '/bus/nvmem/devices/u-boot-env0'
* *
* partition@1000 { * partition@1000 {
* compatible = "u-boot,env-redundant-bool";
* reg = <0x00001000 0x00001000>; * reg = <0x00001000 0x00001000>;
* label = "u-boot-env-2"; * label = "u-boot-env-2";
* *
* nvmem-layout {
* compatible = "u-boot,env-redundant-bool";
* };
* }; * };
*/ */
}; };

View File

@ -201,9 +201,12 @@
}; };
partition@f80000 { partition@f80000 {
compatible = "u-boot,env";
reg = <0xf80000 0x40000>; reg = <0xf80000 0x40000>;
label = "u-boot-env"; label = "u-boot-env";
nvmem-layout {
compatible = "u-boot,env";
};
}; };
board_data: partition@fc0000 { board_data: partition@fc0000 {

View File

@ -146,9 +146,12 @@
}; };
partition@f80000 { partition@f80000 {
compatible = "u-boot,env";
reg = <0xf80000 0x40000>; reg = <0xf80000 0x40000>;
label = "u-boot-env"; label = "u-boot-env";
nvmem-layout {
compatible = "u-boot,env";
};
}; };
board_data: partition@fc0000 { board_data: partition@fc0000 {

View File

@ -104,9 +104,12 @@
}; };
partition@f40000 { partition@f40000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0xf40000 0x040000>; reg = <0xf40000 0x040000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
board_data: partition@f80000 { board_data: partition@f80000 {

View File

@ -59,9 +59,12 @@
}; };
partition@40000 { partition@40000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0x040000 0x010000>; reg = <0x040000 0x010000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@50000 { partition@50000 {

View File

@ -104,10 +104,13 @@
}; };
partition@40000 { partition@40000 {
compatible = "u-boot,env";
label = "u-boot-env"; // vendor calls it `bdcfg` label = "u-boot-env"; // vendor calls it `bdcfg`
reg = <0x040000 0x10000>; reg = <0x040000 0x10000>;
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@50000 { partition@50000 {

View File

@ -56,10 +56,13 @@
read-only; read-only;
}; };
bdcfg: partition@40000 { partition@40000 {
compatible = "u-boot,env";
label = "bdcfg"; label = "bdcfg";
reg = <0x040000 0x010000>; reg = <0x040000 0x010000>;
bdcfg: nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@50000 { partition@50000 {

View File

@ -56,9 +56,12 @@
}; };
partition@60000 { partition@60000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0x060000 0x010000>; reg = <0x060000 0x010000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@70000 { partition@70000 {

View File

@ -196,12 +196,15 @@
reg = <0x190000 0x1dc0000>; reg = <0x190000 0x1dc0000>;
}; };
partition9@1f50000 { partition9@1f50000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0x01f50000 0x00010000>; reg = <0x01f50000 0x00010000>;
macaddr_ubootenv_ethaddr: ethaddr { nvmem-layout {
#nvmem-cell-cells = <1>; compatible = "u-boot,env";
macaddr_ubootenv_ethaddr: ethaddr {
#nvmem-cell-cells = <1>;
};
}; };
}; };
partition10@1f60000 { partition10@1f60000 {

View File

@ -278,9 +278,12 @@
partition@e0000 { partition@e0000 {
label = "CFG1"; label = "CFG1";
compatible = "u-boot,env-redundant-bool";
reg = <0xe0000 0x10000>; reg = <0xe0000 0x10000>;
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env-redundant-bool";
};
}; };
partition@f0000 { partition@f0000 {
@ -331,9 +334,12 @@
partition@1fe0000 { partition@1fe0000 {
label = "CFG2"; label = "CFG2";
compatible = "u-boot,env-redundant-bool";
reg = <0x1fe0000 0x10000>; reg = <0x1fe0000 0x10000>;
read-only; read-only;
nvmem-layout {
compatible = "u-boot,env-redundant-bool";
};
}; };
}; };
}; };

View File

@ -163,6 +163,7 @@
partitions { partitions {
block-partition-u-boot-env { block-partition-u-boot-env {
partname = "u-boot-env"; partname = "u-boot-env";
nvmem-layout { nvmem-layout {
compatible = "u-boot,env"; compatible = "u-boot,env";
}; };

View File

@ -40,6 +40,7 @@
partitions { partitions {
block-partition-env { block-partition-env {
partname = "ubootenv"; partname = "ubootenv";
nvmem-layout { nvmem-layout {
compatible = "u-boot,env"; compatible = "u-boot,env";
}; };

View File

@ -38,6 +38,7 @@
partitions { partitions {
block-partition-env { block-partition-env {
partname = "ubootenv"; partname = "ubootenv";
nvmem-layout { nvmem-layout {
compatible = "u-boot,env"; compatible = "u-boot,env";
}; };

View File

@ -164,9 +164,12 @@
/* Empty space on NOR repurposed for U-Boot environment */ /* Empty space on NOR repurposed for U-Boot environment */
partition@fe0000 { partition@fe0000 {
compatible = "u-boot,env";
label = "u-boot-env"; label = "u-boot-env";
reg = <0xfe0000 0x20000>; reg = <0xfe0000 0x20000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
}; };
}; };

View File

@ -353,24 +353,27 @@
}; };
partition@510000 { partition@510000 {
compatible = "u-boot,env";
label = "0:APPSBLENV"; label = "0:APPSBLENV";
reg = <0x510000 0x10000>; reg = <0x510000 0x10000>;
ethaddr: ethaddr { nvmem-layout {
#nvmem-cell-cells = <0>; compatible = "u-boot,env";
};
eth1addr: eth1addr { ethaddr: ethaddr {
#nvmem-cell-cells = <0>; #nvmem-cell-cells = <0>;
}; };
eth2addr: eth2addr { eth1addr: eth1addr {
#nvmem-cell-cells = <0>; #nvmem-cell-cells = <0>;
}; };
eth5addr: eth5addr { eth2addr: eth2addr {
#nvmem-cell-cells = <0>; #nvmem-cell-cells = <0>;
};
eth5addr: eth5addr {
#nvmem-cell-cells = <0>;
};
}; };
}; };

View File

@ -193,9 +193,12 @@
}; };
partition@480000 { partition@480000 {
compatible = "u-boot,env";
label = "0:appsblenv"; label = "0:appsblenv";
reg = <0x480000 0x10000>; reg = <0x480000 0x10000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@490000 { partition@490000 {

View File

@ -167,11 +167,15 @@
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
compatible = "u-boot,env";
label = "env-data"; label = "env-data";
reg = <0x0 0x40000>; reg = <0x0 0x40000>;
macaddr_ubootenv_ethaddr: ethaddr {}; nvmem-layout {
compatible = "u-boot,env";
macaddr_ubootenv_ethaddr: ethaddr {
};
};
}; };
}; };
}; };

View File

@ -212,12 +212,15 @@
}; };
partition@600000 { partition@600000 {
compatible = "u-boot,env";
label = "0:appsblenv"; label = "0:appsblenv";
reg = <0x600000 0x10000>; reg = <0x600000 0x10000>;
macaddr_lan: ethaddr { nvmem-layout {
#nvmem-cell-cells = <1>; compatible = "u-boot,env";
macaddr_lan: ethaddr {
#nvmem-cell-cells = <1>;
};
}; };
}; };

View File

@ -195,11 +195,14 @@
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
compatible = "u-boot,env";
label = "env-data"; label = "env-data";
reg = <0x0 0x40000>; reg = <0x0 0x40000>;
macaddr_appsblenv_ethaddr: ethaddr { nvmem-layout {
compatible = "u-boot,env";
macaddr_appsblenv_ethaddr: ethaddr {
};
}; };
}; };
}; };

View File

@ -81,9 +81,12 @@
}; };
partition@40000 { partition@40000 {
compatible = "u-boot,env";
label = "Config"; label = "Config";
reg = <0x40000 0x10000>; reg = <0x40000 0x10000>;
nvmem-layout {
compatible = "u-boot,env";
};
}; };
partition@50000 { partition@50000 {