ramips: replace "mac-address-ascii" with "mac-base"

With upstream accepted "mac-base" binding there is no need for a
downstream "mac-address-ascii" workaround anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[TP-Link EC330-G5u v1 - OK]
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
This commit is contained in:
Rafał Miłecki 2023-07-14 15:11:14 +02:00
parent 08607da37c
commit ab9153f2d9
2 changed files with 39 additions and 25 deletions

View file

@ -82,15 +82,23 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
macaddr_config_8014: macaddr@8014 { macaddr_config_8014: macaddr@8014 {
compatible = "mac-base";
reg = <0x8014 0x11>; reg = <0x8014 0x11>;
#nvmem-cell-cells = <1>;
}; };
macaddr_config_8036: macaddr@8036 { macaddr_config_8036: macaddr@8036 {
compatible = "mac-base";
reg = <0x8036 0x11>; reg = <0x8036 0x11>;
#nvmem-cell-cells = <1>;
};
}; };
}; };
@ -137,8 +145,8 @@
}; };
&gmac0 { &gmac0 {
nvmem-cells = <&macaddr_config_8014>; nvmem-cells = <&macaddr_config_8014 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
}; };
&gmac1 { &gmac1 {
@ -146,8 +154,8 @@
label = "wan"; label = "wan";
phy-handle = <&ethphy4>; phy-handle = <&ethphy4>;
nvmem-cells = <&macaddr_config_8036>; nvmem-cells = <&macaddr_config_8036 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
}; };
&mdio { &mdio {

View file

@ -230,14 +230,22 @@
read-only; read-only;
compatible = "nvmem-cells"; compatible = "nvmem-cells";
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
macaddr_factory_165: macaddr@165 { macaddr_factory_165: macaddr@165 {
compatible = "mac-base";
reg = <0x165 0x11>; reg = <0x165 0x11>;
#nvmem-cell-cells = <1>;
}; };
}; };
};
partition@0_wholeflash { partition@0_wholeflash {
label = "wholeflash"; label = "wholeflash";
reg = <0x0 0x7f80000>; reg = <0x0 0x7f80000>;
@ -257,8 +265,8 @@
mediatek,mtd-eeprom = <&factory 0x8000>; mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <2400000 2500000>; ieee80211-freq-limit = <2400000 2500000>;
nvmem-cells = <&macaddr_factory_165>; nvmem-cells = <&macaddr_factory_165 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
}; };
}; };
@ -269,15 +277,14 @@
mediatek,mtd-eeprom = <&factory 0x14000>; mediatek,mtd-eeprom = <&factory 0x14000>;
ieee80211-freq-limit = <5000000 6000000>; ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&macaddr_factory_165>; nvmem-cells = <&macaddr_factory_165 2>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
mac-address-increment = <(2)>;
}; };
}; };
&gmac0 { &gmac0 {
nvmem-cells = <&macaddr_factory_165>; nvmem-cells = <&macaddr_factory_165 0>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
}; };
&gmac1 { &gmac1 {
@ -285,9 +292,8 @@
label = "wan"; label = "wan";
phy-handle = <&ethphy0>; phy-handle = <&ethphy0>;
nvmem-cells = <&macaddr_factory_165>; nvmem-cells = <&macaddr_factory_165 1>;
nvmem-cell-names = "mac-address-ascii"; nvmem-cell-names = "mac-address";
mac-address-increment = <(1)>;
}; };
&mdio { &mdio {