Skip to content

Commit

Permalink
ath79: gl-e750: use nvmem for mac addresses
Browse files Browse the repository at this point in the history
This is a simple conversion to dts.

68ac3f2 states that the 5ghz wifi address is calculated from ART 0
+ 2.

Signed-off-by: Rosen Penev <[email protected]>
Link: openwrt/openwrt#17066
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
neheb authored and hauke committed Dec 8, 2024
1 parent d087a79 commit 477c8a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 10 additions & 1 deletion target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@

&pcie0 {
status = "okay";

wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&macaddr_art_0 2>;
nvmem-cell-names = "mac-address";
};
};

&usb0 {
Expand Down Expand Up @@ -90,7 +97,9 @@
#size-cells = <1>;

macaddr_art_0: macaddr@0 {
compatible = "mac-base";
reg = <0x0 0x6>;
#nvmem-cell-cells = <1>;
};

cal_art_1000: calibration@1000 {
Expand Down Expand Up @@ -134,7 +143,7 @@

phy-handle = <&swphy4>;

nvmem-cells = <&macaddr_art_0>;
nvmem-cells = <&macaddr_art_0 0>;
nvmem-cell-names = "mac-address";
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ PHYNBR=${DEVPATH##*/phy}
board=$(board_name)

case $board in
glinet,gl-e750)
# Set mac address for 5g device
[ "$PHYNBR" -eq 0 ] && \
macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress
;;
zyxel,emg2926-q10a|\
zyxel,nbg6716)
ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
Expand Down

0 comments on commit 477c8a5

Please sign in to comment.