mediatek: convert mtd-mac-address to nvmem implementation
Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
parent
8ec21d6bb2
commit
1e6f330ccf
5 changed files with 89 additions and 12 deletions
|
@ -218,8 +218,9 @@
|
||||||
|
|
||||||
phy-connection-type = "2500base-x";
|
phy-connection-type = "2500base-x";
|
||||||
|
|
||||||
mtd-mac-address = <&factory 0x4>;
|
nvmem-cells = <&macaddr_factory_4>;
|
||||||
mtd-mac-address-increment = <(-1)>;
|
nvmem-cell-names = "mac-address";
|
||||||
|
mac-address-increment = <(-1)>;
|
||||||
|
|
||||||
fixed-link {
|
fixed-link {
|
||||||
speed = <2500>;
|
speed = <2500>;
|
||||||
|
@ -337,3 +338,13 @@
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&factory {
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_4: macaddr@4 {
|
||||||
|
reg = <0x4 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -53,9 +53,25 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&gmac0 {
|
&gmac0 {
|
||||||
mtd-mac-address = <&factory 0x7fff4>;
|
nvmem-cells = <&macaddr_factory_7fff4>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&wan {
|
&wan {
|
||||||
mtd-mac-address = <&factory 0x7fffa>;
|
nvmem-cells = <&macaddr_factory_7fffa>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&factory {
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_7fff4: macaddr@7fff4 {
|
||||||
|
reg = <0x7fff4 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_factory_7fffa: macaddr@7fffa {
|
||||||
|
reg = <0x7fffa 0x6>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -98,9 +98,25 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&gmac0 {
|
&gmac0 {
|
||||||
mtd-mac-address = <&factory 0x7fff4>;
|
nvmem-cells = <&macaddr_factory_7fff4>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&wan {
|
&wan {
|
||||||
mtd-mac-address = <&factory 0x7fffa>;
|
nvmem-cells = <&macaddr_factory_7fffa>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&factory {
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_7fff4: macaddr@7fff4 {
|
||||||
|
reg = <0x7fff4 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_factory_7fffa: macaddr@7fffa {
|
||||||
|
reg = <0x7fffa 0x6>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,7 +49,8 @@
|
||||||
|
|
||||||
&wmac {
|
&wmac {
|
||||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
mtd-mac-address = <&eeprom 0x0>;
|
nvmem-cells = <&macaddr_eeprom_0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,11 +58,27 @@
|
||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
reg = <0x0 0 0 0 0>;
|
reg = <0x0 0 0 0 0>;
|
||||||
mediatek,mtd-eeprom = <&factory 0x20000>;
|
mediatek,mtd-eeprom = <&factory 0x20000>;
|
||||||
mtd-mac-address = <&eeprom 0x6>;
|
nvmem-cells = <&macaddr_eeprom_6>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
ieee80211-freq-limit = <5000000 6000000>;
|
ieee80211-freq-limit = <5000000 6000000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gmac0 {
|
&gmac0 {
|
||||||
mtd-mac-address = <&eeprom 0x0>;
|
nvmem-cells = <&macaddr_eeprom_0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&eeprom {
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_eeprom_0: macaddr@0 {
|
||||||
|
reg = <0x0 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_eeprom_6: macaddr@6 {
|
||||||
|
reg = <0x6 0x6>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,8 @@
|
||||||
|
|
||||||
&wmac {
|
&wmac {
|
||||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
mtd-mac-address = <&eeprom 0x0>;
|
nvmem-cells = <&macaddr_eeprom_0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,11 +74,27 @@
|
||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
reg = <0x0 0 0 0 0>;
|
reg = <0x0 0 0 0 0>;
|
||||||
mediatek,mtd-eeprom = <&factory 0x20000>;
|
mediatek,mtd-eeprom = <&factory 0x20000>;
|
||||||
mtd-mac-address = <&eeprom 0x6>;
|
nvmem-cells = <&macaddr_eeprom_6>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
ieee80211-freq-limit = <5000000 6000000>;
|
ieee80211-freq-limit = <5000000 6000000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gmac0 {
|
&gmac0 {
|
||||||
mtd-mac-address = <&eeprom 0x0>;
|
nvmem-cells = <&macaddr_eeprom_0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&eeprom {
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_eeprom_0: macaddr@0 {
|
||||||
|
reg = <0x0 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_eeprom_6: macaddr@6 {
|
||||||
|
reg = <0x6 0x6>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue