ath79: nec,wg800hp: convert to nvmem
Userspace handling is deprecated. Unused wan mac added to dts. Requires DSA to implement. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16246 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
70e41d0205
commit
8918d84250
3 changed files with 28 additions and 6 deletions
|
@ -142,6 +142,24 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_board_data_280: macaddr@280 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0x280 0x11>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_board_data_480: macaddr@480 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0x480 0x11>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_board_data_680: macaddr@680 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0x680 0x11>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
macaddr_board_data_880: macaddr@880 {
|
macaddr_board_data_880: macaddr@880 {
|
||||||
compatible = "mac-base";
|
compatible = "mac-base";
|
||||||
reg = <0x880 0x11>;
|
reg = <0x880 0x11>;
|
||||||
|
@ -160,6 +178,10 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cal_art_1000: calibration@1000 {
|
||||||
|
reg = <0x1000 0x440>;
|
||||||
|
};
|
||||||
|
|
||||||
cal_art_5000: calibration@5000 {
|
cal_art_5000: calibration@5000 {
|
||||||
reg = <0x5000 0x844>;
|
reg = <0x5000 0x844>;
|
||||||
};
|
};
|
||||||
|
@ -191,6 +213,9 @@
|
||||||
|
|
||||||
phy-mode = "sgmii";
|
phy-mode = "sgmii";
|
||||||
phy-handle = <&phy0>;
|
phy-handle = <&phy0>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_board_data_280 0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie {
|
&pcie {
|
||||||
|
@ -206,5 +231,7 @@
|
||||||
|
|
||||||
&wmac {
|
&wmac {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
qca,no-eeprom;
|
|
||||||
|
nvmem-cells = <&macaddr_board_data_680 0>, <&cal_art_1000>;
|
||||||
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
};
|
};
|
||||||
|
|
|
@ -781,7 +781,6 @@ ath79_setup_macs()
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
nec,wg800hp)
|
nec,wg800hp)
|
||||||
lan_mac=$(mtd_get_mac_text board_data 0x280)
|
|
||||||
wan_mac=$(mtd_get_mac_text board_data 0x480)
|
wan_mac=$(mtd_get_mac_text board_data 0x480)
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -61,10 +61,6 @@ case "$FIRMWARE" in
|
||||||
caldata_extract "art" 0x1000 0x440
|
caldata_extract "art" 0x1000 0x440
|
||||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||||
;;
|
;;
|
||||||
nec,wg800hp)
|
|
||||||
caldata_extract "art" 0x1000 0x440
|
|
||||||
ath9k_patch_mac $(mtd_get_mac_text board_data 0x680)
|
|
||||||
;;
|
|
||||||
qihoo,c301)
|
qihoo,c301)
|
||||||
caldata_extract "radiocfg" 0x1000 0x440
|
caldata_extract "radiocfg" 0x1000 0x440
|
||||||
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
||||||
|
|
Loading…
Reference in a new issue