ramips: convert MT7915 EEPROM to NVMEM format

This patch converts MT7915 WiFi calibration data to NVMEM format. The
EEPROM size is 0xe00.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This commit is contained in:
Shiji Yang 2023-10-02 10:12:02 +08:00 committed by Christian Marangi
parent 65cd6a6fec
commit 9ac891f8c4
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
28 changed files with 332 additions and 213 deletions

View File

@ -95,13 +95,16 @@
};
factory: partition@1e0000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x1e0000 0x100000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
@ -155,7 +158,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -87,13 +87,16 @@
};
factory: partition@1e0000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x1e0000 0x100000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
@ -128,7 +131,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -86,9 +86,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@180000 {
@ -133,7 +140,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};

View File

@ -59,7 +59,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};
@ -87,9 +88,20 @@
};
factory: partition@50000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x50000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
};
partition@90000 {
@ -101,16 +113,6 @@
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cell-names = "mac-address";

View File

@ -81,7 +81,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -114,9 +115,16 @@
};
factory: partition@40000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@50000 {

View File

@ -76,9 +76,16 @@
};
factory: partition@40000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
/* additional partitions in DTS */
@ -94,7 +101,8 @@
wifi:wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -125,13 +125,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x100000 0x80000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
@ -175,7 +178,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -97,9 +97,16 @@
};
factory: partition@180000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x0180000 0x0080000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@200000 {
@ -133,7 +140,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -103,13 +103,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x0100000 0x0080000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_8004: macaddr@8004 {
reg = <0x8004 0x6>;
@ -147,7 +150,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -73,13 +73,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x100000 0x80000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
@ -168,6 +171,7 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};

View File

@ -88,9 +88,24 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
macaddr_factory_3fffa: macaddr@3fffa {
reg = <0x3fffa 0x6>;
};
};
partition@180000 {
@ -139,7 +154,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -184,17 +200,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
macaddr_factory_3fffa: macaddr@3fffa {
reg = <0x3fffa 0x6>;
};
};

View File

@ -80,9 +80,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@180000 {
@ -127,7 +134,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};

View File

@ -72,9 +72,16 @@
};
config: partition@fa0000 {
compatible = "nvmem-cells";
label = "config";
reg = <0xfa0000 0x010000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
macaddr_config_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
partition@fb0000 {
@ -84,9 +91,16 @@
};
radio: partition@ff0000 {
compatible = "nvmem-cells";
label = "radio";
reg = <0xff0000 0x010000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_radio_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
};
};
@ -100,9 +114,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x0>;
nvmem-cells = <&macaddr_config_8>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
nvmem-cell-names = "eeprom", "mac-address";
mediatek,disable-radar-background;
};
};
@ -153,13 +166,3 @@
function = "gpio";
};
};
&config {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_config_8: macaddr@8 {
reg = <0x8 0x6>;
};
};

View File

@ -107,9 +107,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@180000 {
@ -171,7 +178,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};

View File

@ -113,9 +113,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@180000 {
@ -213,7 +220,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};

View File

@ -105,7 +105,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -194,9 +195,20 @@
};
factory: partition@50000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x50000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
partition@90000 {
@ -207,13 +219,3 @@
};
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};

View File

@ -70,9 +70,24 @@
};
factory: partition@40000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
macaddr_factory_e006: macaddr@e006 {
reg = <0xe006 0x6>;
};
};
partition@50000 {
@ -92,7 +107,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -147,17 +163,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
macaddr_factory_e006: macaddr@e006 {
reg = <0xe006 0x6>;
};
};

View File

@ -105,9 +105,16 @@
};
config: partition@fa0000 {
compatible = "nvmem-cells";
label = "config";
reg = <0xfa0000 0x010000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
macaddr_config_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
partition@fb0000 {
@ -117,9 +124,16 @@
};
radio: partition@ff0000 {
compatible = "nvmem-cells";
label = "radio";
reg = <0xff0000 0x010000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_radio_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
};
};
@ -133,9 +147,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x0>;
nvmem-cells = <&macaddr_config_8>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
nvmem-cell-names = "eeprom", "mac-address";
mediatek,disable-radar-background;
};
};
@ -191,13 +204,3 @@
function = "gpio";
};
};
&config {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_config_8: macaddr@8 {
reg = <0x8 0x6>;
};
};

View File

@ -108,9 +108,16 @@
};
radio: partition@ff0000 {
compatible = "nvmem-cells";
label = "radio";
reg = <0xff0000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_radio_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
};
};
@ -131,7 +138,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x0>;
nvmem-cells = <&eeprom_radio_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};

View File

@ -90,9 +90,16 @@
};
info: partition@90000 {
compatible = "nvmem-cells";
label = "product-info";
reg = <0x90000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
macaddr_info_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
partition@a0000 {
@ -120,9 +127,16 @@
};
radio: partition@ff0000 {
compatible = "nvmem-cells";
label = "radio";
reg = <0xff0000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_radio_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
};
};
@ -143,7 +157,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x0>;
nvmem-cells = <&eeprom_radio_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -186,13 +201,3 @@
};
};
};
&info {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_info_8: macaddr@8 {
reg = <0x8 0x6>;
};
};

View File

@ -47,6 +47,10 @@
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x400>;
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
eeprom: partition@b0000 {
@ -104,10 +108,8 @@
&wlan_5g {
compatible = "mediatek,mt76";
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
nvmem-cell-names = "eeprom", "mac-address";
/* This is a workaround.
*

View File

@ -61,7 +61,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};
@ -87,8 +88,19 @@
};
factory:partition@50000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x50000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
};
partition@90000 {
@ -119,15 +131,3 @@
};
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
};

View File

@ -86,9 +86,24 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
macaddr_factory_3fffa: macaddr@3fffa {
reg = <0x3fffa 0x6>;
};
};
partition@180000 {
@ -135,7 +150,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -185,17 +201,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
macaddr_factory_3fffa: macaddr@3fffa {
reg = <0x3fffa 0x6>;
};
};

View File

@ -112,9 +112,20 @@
*/
factory: partition@50000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x50000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
};
partition@90000 {
@ -134,7 +145,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -178,13 +190,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
};

View File

@ -120,9 +120,24 @@
*/
factory: partition@50000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x50000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_0004: macaddr@0004 {
reg = <0x0004 0x6>;
};
macaddr_factory_e006: macaddr@e006 {
reg = <0xe006 0x6>;
};
};
partition@90000 {
@ -142,7 +157,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -201,18 +217,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_0004: macaddr@0004 {
reg = <0x0004 0x6>;
};
macaddr_factory_e006: macaddr@e006 {
reg = <0xe006 0x6>;
};
};

View File

@ -90,9 +90,20 @@
*/
factory: partition@50000 {
compatible = "nvmem-cells";
label = "Factory";
reg = <0x50000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_0004: macaddr@0004 {
reg = <0x0004 0x6>;
};
};
partition@90000 {
@ -112,7 +123,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -137,13 +149,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_0004: macaddr@0004 {
reg = <0x0004 0x6>;
};
};

View File

@ -37,9 +37,16 @@
};
factory: partition@100000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x100000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
};
partition@180000 {
@ -93,9 +100,16 @@
};
mrd: partition@7780000 {
compatible = "nvmem-cells";
label = "mrd";
reg = <0x7780000 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
read-only;
macaddr_mrd_1fff8: macaddr@1fff8 {
reg = <0x1fff8 0x6>;
};
};
};
};
@ -109,7 +123,8 @@
reg = <0x0 0 0 0 0>;
compatible = "mediatek,mt76";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
/* MAC-Address set in userspace */
};
@ -129,16 +144,6 @@
};
};
&mrd {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mrd_1fff8: macaddr@1fff8 {
reg = <0x1fff8 0x6>;
};
};
&state_default {
gpio {
groups = "uart3";

View File

@ -103,9 +103,24 @@
};
factory: partition@200000 {
compatible = "nvmem-cells";
reg = <0x200000 0x1c0000>;
#address-cells = <1>;
#size-cells = <1>;
label = "Factory";
read-only;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_1fdfa: macaddr@1fdfa {
reg = <0x1fdfa 0x6>;
};
macaddr_factory_1fdf4: macaddr@1fdf4 {
reg = <0x1fdf4 0x6>;
};
};
partition@3c0000 {
@ -185,7 +200,8 @@
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
};
};
@ -217,17 +233,3 @@
function = "gpio";
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_1fdfa: macaddr@1fdfa {
reg = <0x1fdfa 0x6>;
};
macaddr_factory_1fdf4: macaddr@1fdf4 {
reg = <0x1fdf4 0x6>;
};
};