linux: replace u-boot,env with nvmem,layout
authorRosen Penev <rosenp@gmail.com>
Sat, 5 Oct 2024 22:06:13 +0000 (15:06 -0700)
committerRobert Marko <robimarko@gmail.com>
Fri, 27 Dec 2024 12:34:58 +0000 (13:34 +0100)
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>
Link: https://github.com/openwrt/openwrt/pull/16097
Signed-off-by: Robert Marko <robimarko@gmail.com>
24 files changed:
target/linux/apm821xx/dts/meraki-mr24.dts
target/linux/apm821xx/dts/meraki-mx60.dts
target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
target/linux/apm821xx/dts/netgear-wndr4700.dts
target/linux/apm821xx/dts/wd-mybooklive.dts
target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi
target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi
target/linux/ath79/dts/qca955x_senao_loader.dtsi
target/linux/ath79/dts/qca9563_dlink_dap-1720-a1.dts
target/linux/ath79/dts/qca9563_dlink_dir-8x9-a1.dtsi
target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap391x.dts
target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-xe3-4.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts
target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts

index 088372057af97af92e001e97649d0ae4bf54a7db..c67faaaa3284ad6b53af3c9f6fcae32c5ed4573d 100644 (file)
                                 * around for bad block management
                                 */
                                label = "u-boot-env";
-                               compatible = "u-boot,env";
                                reg = <0x00150000 0x00010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@160000 {
index 0471bd609dde8e2f6dec0ee0b308590fef31a780..534b5ac183f800559c63aa438ba4554804ab6aaf 100644 (file)
                        partition@100000 {
                                label = "u-boot-env";
                                reg = <0x00100000 0x00100000>;
-                               compatible = "u-boot,env";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@200000 {
index 7c9faa883f2982e47cfd14506416e8008f57c48b..2612bba85a1c85e406f5a35383c8a2760f9e4c0e 100644 (file)
                        };
 
                        partition@100000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0x00100000 0x0004000>;
                                read-only;
 
-                               ethaddr {
-                               };
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
 
-                               bootcmd {
-                               };
+                                       ethaddr {
+                                       };
 
-                               serno {
-                               };
+                                       bootcmd {
+                                       };
 
-                               ProductID {
-                               };
+                                       serno {
+                                       };
+
+                                       ProductID {
+                                       };
 
-                               HardwareVer {
+                                       HardwareVer {
+                                       };
                                };
                        };
 
index 4ef05937d39d29ed1dee829157b1af2682fe0ab3..89d8bf5dd92e216fd7c76131371f0a2500d9421e 100644 (file)
 
                                partition@40000 {
                                        label = "u-boot-env-main";
-                                       compatible = "u-boot,env-redundant-count";
                                        reg = <0x00040000 0x20000>; /* one block is 128k */
                                        read-only;
+
+                                       nvmem-layout {
+                                               compatible = "u-boot,env-redundant-count";
+                                       };
                                };
 
 /*
  *
  *                             partition@60000 {
  *                                     label = "u-boot-env-redundant";
- *                                     compatible = "u-boot,env-redundant-count";
  *                                     reg = <0x00060000 0x20000>;
  *                                     read-only;
+ *
+ *                                     nvmem-layout {
+ *                                             compatible = "u-boot,env-redundant-count";
+ *                                     };
  *                             };
  */
                        };
index 5ed865e286c849538b51e934be42370c0ab1791a..b3ea1a61d9f241c7986e28e6df66c9ec255e7076 100644 (file)
                                        #size-cells = <1>;
 
                                        partition@0 {
-                                               compatible = "u-boot,env-redundant-bool";
                                                reg = <0x00000000 0x00001000>;
                                                label = "u-boot-env-1";
 
-                                               ethaddr {
+                                               nvmem-layout {
+                                                       compatible = "u-boot,env-redundant-bool";
+
+                                                       ethaddr {
+                                                       };
                                                };
                                        };
 
  * Causes the following warning: * sysfs: cannot create duplicate filename '/bus/nvmem/devices/u-boot-env0'
  *
  *                                     partition@1000 {
- *                                             compatible = "u-boot,env-redundant-bool";
  *                                             reg = <0x00001000 0x00001000>;
  *                                             label = "u-boot-env-2";
  *
+ *                                             nvmem-layout {
+ *                                                     compatible = "u-boot,env-redundant-bool";
+ *                                             };
  *                                     };
  */
                                };
index a80b6045b4ef3ee34405d547815e3e01a3157147..eb3a12696420384476bb9b4cf31e16d469af2460 100644 (file)
                        };
 
                        partition@f80000 {
-                               compatible = "u-boot,env";
                                reg = <0xf80000 0x40000>;
                                label = "u-boot-env";
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        board_data: partition@fc0000 {
index 887f5f7b29d6c6e7dfe19a823ad6bacd09117728..8a540a0b1ac4397cde4f6b9a5d5afe819a8383c0 100644 (file)
                        };
 
                        partition@f80000 {
-                               compatible = "u-boot,env";
                                reg = <0xf80000 0x40000>;
                                label = "u-boot-env";
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        board_data: partition@fc0000 {
index 2164ce95991e9423210061d549c83af00d519d0c..775aa88853744aa1bd6fee3928c11543abf26c74 100644 (file)
                        };
 
                        partition@f40000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0xf40000 0x040000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        board_data: partition@f80000 {
index 7cf64bd9659fc63b8d364f7d8620762c3de1e4ad..fd1e084cd31bd8becdcf74b6abca9578646f809d 100644 (file)
                        };
 
                        partition@40000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0x040000 0x010000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@50000 {
index 35f3913d9bfcc4ff42a59faf2f74b32cdef6d302..14fbc5b51ee62c05d7282a74414c03e44fda7c6a 100644 (file)
                        };
 
                        partition@40000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env"; // vendor calls it `bdcfg`
                                reg = <0x040000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@50000 {
index 70ec60219dfcc09c2b807b28263a70e9d52ce777..c5ef01ca79f8c6a8615b58f124a1b91b7bb645f3 100644 (file)
                                read-only;
                        };
 
-                       bdcfg: partition@40000 {
-                               compatible = "u-boot,env";
+                       partition@40000 {
                                label = "bdcfg";
                                reg = <0x040000 0x010000>;
+
+                               bdcfg: nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@50000 {
index a3223238996500dc4cb4d07d98738805ea7209dd..64ad7f06d3e707c5882cda4e8afb5b7dedf7937e 100644 (file)
                        };
 
                        partition@60000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0x060000 0x010000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@70000 {
index 52a96eae980184d300098973821c557e155ec1b8..f343bea725bfab1c5118c2f3f69dc7975fd417cb 100644 (file)
                                reg = <0x190000 0x1dc0000>;
                        };
                        partition9@1f50000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0x01f50000 0x00010000>;
 
-                               macaddr_ubootenv_ethaddr: ethaddr {
-                                       #nvmem-cell-cells = <1>;
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+
+                                       macaddr_ubootenv_ethaddr: ethaddr {
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
                        partition10@1f60000 {
index 1eb6ea2eb895b05149cd262461cf01a7ed8eed78..9e1dfa5c1d7b12e35a6652ce2fd61141ec28ab1d 100644 (file)
 
                        partition@e0000 {
                                label = "CFG1";
-                               compatible = "u-boot,env-redundant-bool";
                                reg = <0xe0000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env-redundant-bool";
+                               };
                        };
 
                        partition@f0000 {
 
                        partition@1fe0000 {
                                label = "CFG2";
-                               compatible = "u-boot,env-redundant-bool";
                                reg = <0x1fe0000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env-redundant-bool";
+                               };
                        };
                };
        };
index 0bd3ac0a2954990b7edb8eada54d4dae6c018953..26d5b503e7bb36b5b87dfbbfc7dfb73a32aff4d5 100644 (file)
                        partitions {
                                block-partition-u-boot-env {
                                        partname = "u-boot-env";
+
                                        nvmem-layout {
                                                compatible = "u-boot,env";
                                        };
index cd266d6b0f581ce00ccaa0579eeb1ad1de4a92dd..12c94e4da8d29a8d45e2a6051e9d9fafa9af1fca 100644 (file)
@@ -40,6 +40,7 @@
                                        partitions {
                                                block-partition-env {
                                                        partname = "ubootenv";
+
                                                        nvmem-layout {
                                                                compatible = "u-boot,env";
                                                        };
index c2ab424e3e6ef242db387a72bb7c5d2cb6206fd5..52075ab34add61ce4884d200356a5eb9d5594b10 100644 (file)
@@ -38,6 +38,7 @@
                                        partitions {
                                                block-partition-env {
                                                        partname = "ubootenv";
+
                                                        nvmem-layout {
                                                                compatible = "u-boot,env";
                                                        };
index 306f84a516fdd5a1de430f61c6c4984851423335..023370a67805d184d7fda56289355070640fdd53 100644 (file)
 
                        /* Empty space on NOR repurposed for U-Boot environment */
                        partition@fe0000 {
-                               compatible = "u-boot,env";
                                label = "u-boot-env";
                                reg = <0xfe0000 0x20000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
                };
        };
index eba4d116adb6832352e4793adfc8e03b9a898bb4..e0a6e9eb9397ad023491e79374ffbe7869f3092b 100644 (file)
                        };
 
                        partition@510000 {
-                               compatible = "u-boot,env";
                                label = "0:APPSBLENV";
                                reg = <0x510000 0x10000>;
 
-                               ethaddr: ethaddr {
-                                       #nvmem-cell-cells = <0>;
-                               };
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
 
-                               eth1addr: eth1addr {
-                                       #nvmem-cell-cells = <0>;
-                               };
+                                       ethaddr: ethaddr {
+                                               #nvmem-cell-cells = <0>;
+                                       };
 
-                               eth2addr: eth2addr {
-                                       #nvmem-cell-cells = <0>;
-                               };
+                                       eth1addr: eth1addr {
+                                               #nvmem-cell-cells = <0>;
+                                       };
+
+                                       eth2addr: eth2addr {
+                                               #nvmem-cell-cells = <0>;
+                                       };
 
-                               eth5addr: eth5addr {
-                                       #nvmem-cell-cells = <0>;
+                                       eth5addr: eth5addr {
+                                               #nvmem-cell-cells = <0>;
+                                       };
                                };
                        };
 
index 23e89a9ae42d31d22e8194d4d525dc7c2e532379..e5c768fafb7541af27800ba626d01a3b4291a0a1 100644 (file)
                        };
 
                        partition@480000 {
-                               compatible = "u-boot,env";
                                label = "0:appsblenv";
                                reg = <0x480000 0x10000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@490000 {
index 0e71faea72a220b0ef044527a2877534858bbc60..8ced6318f9df5f4d771f5737ef6041e3ed90b06a 100644 (file)
                                #size-cells = <1>;
 
                                partition@0 {
-                                       compatible = "u-boot,env";
                                        label = "env-data";
                                        reg = <0x0 0x40000>;
 
-                                       macaddr_ubootenv_ethaddr: ethaddr {};
+                                       nvmem-layout {
+                                               compatible = "u-boot,env";
+
+                                               macaddr_ubootenv_ethaddr: ethaddr {
+                                               };
+                                       };
                                };
                        };
                };
index b18f38cc6cf4dc4d9e9381fc734c05ffb3fa9245..242f84fa15a35ccb036726326ec09ef131ead56d 100644 (file)
                        };
 
                        partition@600000 {
-                               compatible = "u-boot,env";
                                label = "0:appsblenv";
                                reg = <0x600000 0x10000>;
 
-                               macaddr_lan: ethaddr {
-                                       #nvmem-cell-cells = <1>;
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+
+                                       macaddr_lan: ethaddr {
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
 
index 347bb6e8abe5395977ac078242bbb87f59b00e7b..f5574c19b56d88bf8567db9ffa234f826141fdcd 100644 (file)
                                #size-cells = <1>;
 
                                partition@0 {
-                                       compatible = "u-boot,env";
                                        label = "env-data";
                                        reg = <0x0 0x40000>;
 
-                                       macaddr_appsblenv_ethaddr: ethaddr {
+                                       nvmem-layout {
+                                               compatible = "u-boot,env";
+
+                                               macaddr_appsblenv_ethaddr: ethaddr {
+                                               };
                                        };
                                };
                        };
index 8512ff96b0466fba06281de1d8ee62288b4adf21..cd429cbf4d6aeac372d5d4a96ca796b7aee99dec 100644 (file)
                        };
 
                        partition@40000 {
-                               compatible = "u-boot,env";
                                label = "Config";
                                reg = <0x40000 0x10000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+                               };
                        };
 
                        partition@50000 {