linux: replace nvmem-cells with nvmem-layout

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

Some of these are leftovers from nvmem-layout conversion.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16097
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2024-08-06 12:29:58 -07:00 committed by Robert Marko
parent d6c5805db3
commit 648d070c76
10 changed files with 41 additions and 41 deletions

View File

@ -90,8 +90,6 @@
reg = <0xff0000 0x10000>; reg = <0xff0000 0x10000>;
read-only; read-only;
compatible = "nvmem-cells";
nvmem-layout { nvmem-layout {
compatible = "fixed-layout"; compatible = "fixed-layout";
#address-cells = <1>; #address-cells = <1>;

View File

@ -266,8 +266,7 @@
}; };
}; };
config1: partition@1C0000 { partition@1C0000 {
compatible = "nvmem-cells";
label = "Config1"; label = "Config1";
reg = <0x001C0000 0x00080000>; reg = <0x001C0000 0x00080000>;
read-only; read-only;

View File

@ -164,7 +164,6 @@
}; };
partition@180000 { partition@180000 {
compatible = "nvmem-cells";
label = "factory"; label = "factory";
reg = <0x180000 0x100000>; reg = <0x180000 0x100000>;
read-only; read-only;

View File

@ -47,7 +47,6 @@
reg = <0x180000 0x200000>; reg = <0x180000 0x200000>;
read-only; read-only;
compatible = "nvmem-cells";
nvmem-layout { nvmem-layout {
compatible = "fixed-layout"; compatible = "fixed-layout";
#address-cells = <1>; #address-cells = <1>;

View File

@ -183,7 +183,6 @@
}; };
partition@180000 { partition@180000 {
compatible = "nvmem-cells";
reg = <0x180000 0x200000>; reg = <0x180000 0x200000>;
label = "factory"; label = "factory";
read-only; read-only;

View File

@ -40,21 +40,23 @@
}; };
}; };
}; };
@@ -273,3 +282,17 @@ @@ -273,3 +282,19 @@
pinctrl-0 = <&watchdog_pins>; pinctrl-0 = <&watchdog_pins>;
status = "okay"; status = "okay";
}; };
+ +
+&factory { +&factory {
+ compatible = "nvmem-cells"; + nvmem-layout {
+ #address-cells = <1>; + compatible = "fixed-layout";
+ #size-cells = <1>; + #address-cells = <1>;
+ #size-cells = <1>;
+ +
+ macaddr_factory_24: macaddr@24 { + macaddr_factory_24: macaddr@24 {
+ reg = <0x24 0x6>; + reg = <0x24 0x6>;
+ }; + };
+ +
+ macaddr_factory_2a: macaddr@2a { + macaddr_factory_2a: macaddr@2a {
+ reg = <0x2a 0x6>; + reg = <0x2a 0x6>;
+ };
+ }; + };
+}; +};

View File

@ -42,7 +42,7 @@
}; };
&pinctrl { &pinctrl {
@@ -259,48 +280,52 @@ @@ -259,48 +280,50 @@
reg = <0>; /* Chip select 0 */ reg = <0>; /* Chip select 0 */
spi-max-frequency = <20000000>; spi-max-frequency = <20000000>;
@ -112,8 +112,6 @@
+ label = "vendor"; + label = "vendor";
+ read-only; + read-only;
+ +
+ compatible = "nvmem-cells";
+
+ nvmem-layout { + nvmem-layout {
+ compatible = "fixed-layout"; + compatible = "fixed-layout";
+ #address-cells = <1>; + #address-cells = <1>;

View File

@ -161,22 +161,25 @@
}; };
partition@360000 { partition@360000 {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
label = "0:ART"; label = "0:ART";
reg = <0x00360000 0x00040000>; reg = <0x00360000 0x00040000>;
macaddr_eth0: macaddr@0 { nvmem-layout {
reg = <0x0 0x6>; compatible = "fixed-layout";
}; #address-cells = <1>;
#size-cells = <1>;
macaddr_eth1: macaddr@6 { macaddr_eth0: macaddr@0 {
reg = <0x6 0x6>; reg = <0x0 0x6>;
}; };
macaddr_eth2: macaddr@c { macaddr_eth1: macaddr@6 {
reg = <0xc 0x6>; reg = <0x6 0x6>;
};
macaddr_eth2: macaddr@c {
reg = <0xc 0x6>;
};
}; };
}; };

View File

@ -339,12 +339,14 @@
label = "0:ethphyfw1"; label = "0:ethphyfw1";
reg = <0x3b0000 0x80000>; reg = <0x3b0000 0x80000>;
compatible = "nvmem-cells"; nvmem-layout {
#address-cells = <1>; compatible = "fixed-layout";
#size-cells = <1>; #address-cells = <1>;
#size-cells = <1>;
aqr0_fw: firmware@0 { aqr0_fw: firmware@0 {
reg = <0x0 0x5fc02>; reg = <0x0 0x5fc02>;
};
}; };
}; };
@ -352,12 +354,14 @@
label = "0:ethphyfw2"; label = "0:ethphyfw2";
reg = <0x430000 0x80000>; reg = <0x430000 0x80000>;
compatible = "nvmem-cells"; nvmem-layout {
#address-cells = <1>; compatible = "fixed-layout";
#size-cells = <1>; #address-cells = <1>;
#size-cells = <1>;
aqr1_fw: firmware@0 { aqr1_fw: firmware@0 {
reg = <0x0 0x5fc02>; reg = <0x0 0x5fc02>;
};
}; };
}; };

View File

@ -164,7 +164,6 @@
}; };
partition@40000 { partition@40000 {
compatible = "nvmem-cells";
label = "factory"; label = "factory";
reg = <0x40000 0x10000>; reg = <0x40000 0x10000>;
read-only; read-only;