mediatek: mt7622: replace mtd-eeprom with nvmem

These use fairly standard sizes.

0x4da8 for mt7615 + mt7622 and 0xe00 for mt7915.

Added a mediatek,mt76 compatible line where missing as required by mt76
upstream Documentation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23113
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Rosen Penev
2026-06-14 23:42:52 +02:00
committed by Jonas Jelonek
parent 3d7d675888
commit 17a0904384
26 changed files with 470 additions and 240 deletions
@@ -432,7 +432,7 @@
#size-cells = <1>;
factory_eeprom: eeprom@0 {
reg = <0x0 0x5000>;
reg = <0x0 0x4da8>;
};
macaddr_factory_7fff4: macaddr@7fff4 {
@@ -89,7 +89,7 @@
reg = <0x140000 0x80000>;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x40000>;
read-only;
@@ -99,11 +99,19 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0x4da8>;
};
};
};
@@ -138,10 +138,24 @@
read-only;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0x4da8>;
};
};
};
partition@200000 {
@@ -138,10 +138,24 @@
read-only;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x100000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
};
};
partition@2c0000 {
@@ -120,13 +120,9 @@
};
&slot0 {
status = "okay";
wifi@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
@@ -222,7 +218,14 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
&rtc {
@@ -210,12 +210,9 @@
};
&slot0 {
wmac1: mt7915@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
mediatek,mtd-eeprom = <&factory 0x05000>;
nvmem-cells = <&macaddr_odm 3>;
nvmem-cell-names = "mac-address";
};
};
@@ -322,10 +319,24 @@
};
};
factory: partition@5CC0000 {
partition@5CC0000 {
label = "Factory";
reg = <0x05CC0000 0x00100000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
};
};
partition@5DC0000 {
@@ -366,9 +377,13 @@
&wmac {
pinctrl-names = "default";
pinctrl-0 = <&epa_elna_pins>;
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&macaddr_odm 2>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&eeprom_factory_0>, <&macaddr_odm 2>;
nvmem-cell-names = "eeprom", "mac-address";
status = "okay";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>, <&macaddr_odm 3>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -173,9 +173,9 @@
};
&slot0 {
mt7615@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x05000>;
};
};
@@ -543,10 +543,24 @@
read-only;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x0040000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0x4da8>;
};
};
};
partition@200000 {
@@ -603,6 +617,12 @@
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
};
@@ -314,7 +314,7 @@
read-only;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x100000>;
read-only;
@@ -324,12 +324,20 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
macaddr_factory_7fff4: macaddr@7fff4 {
reg = <0x7fff4 0x6>;
};
@@ -384,15 +392,9 @@
};
&slot0 {
status = "okay";
wifi@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&macaddr_factory_4 1>;
nvmem-cell-names = "mac-address";
};
};
@@ -427,5 +429,12 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>, <&macaddr_factory_4 1>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -42,7 +42,7 @@
reg = <0x140000 0x0080000>;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x0100000>;
@@ -51,6 +51,14 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
macaddr_factory_7fff4: macaddr@7fff4 {
reg = <0x7fff4 0x6>;
};
@@ -103,12 +111,14 @@
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
};
&wmac1 {
mediatek,mtd-eeprom = <&factory 0x05000>;
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
};
&gmac0 {
@@ -357,7 +357,7 @@
};
&slot0 {
wmac1: mt7915@0,0 {
wmac1: wifi@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -405,7 +405,7 @@
reg = <0x140000 0x0080000>;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "Factory";
reg = <0x1c0000 0x0100000>;
read-only;
@@ -415,6 +415,14 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
macaddr_factory_7fff4: macaddr@7fff4 {
reg = <0x7fff4 0x6>;
};
@@ -553,10 +561,12 @@
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0000>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
};
&wmac1 {
mediatek,mtd-eeprom = <&factory 0x05000>;
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
};
@@ -50,10 +50,24 @@
reg = <0x80000 0x10000>;
};
factory: partition@90000 {
partition@90000 {
label = "Factory";
reg = <0x90000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
};
};
partition@d0000 {
@@ -77,20 +91,26 @@
};
};
&slot0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
};
};
&wmac {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&epa_elna_pins>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&slot0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
+11 -1
View File
@@ -37,9 +37,19 @@
reg = <0x140000 0x0080000>;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "Factory";
reg = <0x1c0000 0x0100000>;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
};
};
partition@200000 {
@@ -47,10 +47,24 @@
reg = <0xb0000 0x20000>;
};
factory: partition@D0000 {
partition@D0000 {
label = "Factory";
reg = <0xd0000 0x80000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
};
};
partition@150000 {
@@ -74,20 +88,26 @@
};
};
&slot0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
};
};
&wmac {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&epa_elna_pins>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&slot0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
@@ -297,11 +297,11 @@
#size-cells = <1>;
eeprom0: eeprom@0 {
reg = <0x0 0x5000>;
reg = <0x0 0xe00>;
};
eeprom1: eeprom@5000 {
reg = <0x5000 0x5000>;
reg = <0x5000 0xe00>;
};
};
};
@@ -330,14 +330,18 @@
};
&slot0 {
mt7915@0,0 {
#address-cells = <1>;
#size-cells = <0>;
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom0>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <2400000 5330000>;
#address-cells = <1>;
#size-cells = <0>;
band@0 {
/* 2.4 GHz */
reg = <0>;
@@ -361,9 +365,11 @@
};
&slot1 {
mt7915@0,0 {
/* upper 5 GHz */
/* upper 5 GHz */
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom1>, <&macaddr 0xf>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5490000 5835000>;
@@ -107,10 +107,9 @@
};
&slot0 {
mt7615@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5490000 6000000>;
};
};
@@ -121,10 +120,9 @@
};
&slot1 {
mt7615@0,0 {
wmac2: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x10000>;
ieee80211-freq-limit = <5000000 5490000>;
};
};
@@ -282,7 +280,7 @@
read-only;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x40000>;
read-only;
@@ -292,6 +290,10 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
macaddr_factory_24: macaddr@24 {
reg = <0x24 0x6>;
};
@@ -299,6 +301,14 @@
macaddr_factory_2a: macaddr@2a {
reg = <0x2a 0x6>;
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0x4da8>;
};
eeprom_factory_10000: eeprom@10000 {
reg = <0x10000 0x4da8>;
};
};
};
@@ -344,8 +354,23 @@
};
&wmac {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&epa_elna_pins>;
mediatek,mtd-eeprom = <&factory 0x0>;
status = "okay";
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5490000 6000000>;
};
&wmac2 {
nvmem-cells = <&eeprom_factory_10000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 5490000>;
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -65,25 +79,3 @@
reg = <0x1000000 0x3000000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -76,25 +90,3 @@
reg = <0x2110000 0x1ee0000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -51,3 +51,26 @@
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
&slot0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0 0 0 0 0>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0>;
nvmem-cell-names = "eeprom", "mac-address";
status = "okay";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -65,25 +79,3 @@
reg = <0x1000000 0x3000000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -76,25 +90,3 @@
reg = <0x2110000 0x1ee0000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -48,3 +48,26 @@
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
&slot0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0 0 0 0 0>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0>;
nvmem-cell-names = "eeprom", "mac-address";
status = "okay";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -65,25 +79,3 @@
reg = <0x1000000 0x3000000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -28,13 +28,27 @@
reg = <0xc0000 0x10000>;
};
factory: partition@d0000 {
partition@d0000 {
label = "factory";
reg = <0xd0000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
eeprom_factory_20000: eeprom@20000 {
reg = <0x20000 0xe00>;
};
};
};
eeprom: partition@110000 {
partition@110000 {
label = "eeprom";
reg = <0x110000 0x10000>;
read-only;
@@ -76,25 +90,3 @@
reg = <0x2110000 0x1ee0000>;
};
};
&wmac {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&slot0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x20000>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
@@ -48,3 +48,27 @@
};
};
};
&gmac0 {
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};
&slot0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0 0 0 0 0>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0>;
nvmem-cell-names = "eeprom", "mac-address";
status = "okay";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
@@ -267,7 +267,7 @@
reg = <0x180000 0x40000>;
};
factory: partition@1c0000 {
partition@1c0000 {
label = "factory";
reg = <0x1c0000 0x80000>;
read-only;
@@ -277,11 +277,19 @@
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x4da8>; /* actual length 0x400 */
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
eeprom_factory_5000: eeprom@5000 {
reg = <0x5000 0xe00>;
};
};
};
@@ -331,14 +339,9 @@
};
&slot0 {
status = "okay";
wifi@0,0 {
wmac1: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
};
@@ -373,5 +376,13 @@
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&wmac1 {
nvmem-cells = <&eeprom_factory_5000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
mediatek,disable-radar-background;
};
@@ -1,29 +1,42 @@
From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 24 Oct 2020 21:15:20 +0200
Subject: [PATCH] arm64: dts: mediatek: mt7622-rfb1: wire EEPROM to wmac from factory partition
Subject: [PATCH] arm64: dts: mediatek: mt7622-rfb1: wire EEPROM to wmac from
factory partition
Label the factory partition node so it can be referenced by phandle, and
add a mediatek,mtd-eeprom property to the wmac node pointing at the
factory partition to supply the calibration data at offset 0x0000.
Add an nvmem section so that the eeprom can be referenced from the wmac
node.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -599,7 +599,7 @@
reg = <0x140000 0x0080000>;
};
- partition@1c0000 {
+ factory: partition@1c0000 {
@@ -602,6 +602,16 @@
partition@1c0000 {
label = "Factory";
reg = <0x1c0000 0x0100000>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x4da8>; /* actual length 0x400 */
+ };
+ };
};
@@ -660,5 +660,6 @@
partition@200000 {
@@ -660,5 +670,7 @@
&wmac {
pinctrl-names = "default";
pinctrl-0 = <&wmac_pins>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
status = "okay";
};