67f30c821395d1e87057ab77012194bc0e347d5a
[openwrt/staging/xback.git] /
1 From 9f01f5cdb548352418b34ce77db02a560fe2913b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Mon, 29 Mar 2021 17:45:14 +0200
4 Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 On most BCM4908 devices MAC address can be read from the bootloader
10 binary section containing device settings. Use NVMEM to describe that.
11
12 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
14 ---
15 .../broadcom/bcm4908/bcm4906-netgear-r8000p.dts | 14 ++++++++++++++
16 .../broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 14 ++++++++++++++
17 2 files changed, 28 insertions(+)
18
19 --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
20 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
21 @@ -74,6 +74,11 @@
22 };
23 };
24
25 +&enet {
26 + nvmem-cells = <&base_mac_addr>;
27 + nvmem-cell-names = "mac-address";
28 +};
29 +
30 &usb_phy {
31 brcm,ioc = <1>;
32 status = "okay";
33 @@ -130,8 +135,17 @@
34 #size-cells = <1>;
35
36 partition@0 {
37 + compatible = "nvmem-cells";
38 label = "cferom";
39 reg = <0x0 0x100000>;
40 +
41 + #address-cells = <1>;
42 + #size-cells = <1>;
43 + ranges = <0 0x0 0x100000>;
44 +
45 + base_mac_addr: mac@106a0 {
46 + reg = <0x106a0 0x6>;
47 + };
48 };
49
50 partition@100000 {
51 --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
52 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
53 @@ -44,6 +44,11 @@
54 };
55 };
56
57 +&enet {
58 + nvmem-cells = <&base_mac_addr>;
59 + nvmem-cell-names = "mac-address";
60 +};
61 +
62 &usb_phy {
63 brcm,ioc = <1>;
64 status = "okay";
65 @@ -128,8 +133,17 @@
66 #size-cells = <1>;
67
68 partition@0 {
69 + compatible = "nvmem-cells";
70 label = "cferom";
71 reg = <0x0 0x100000>;
72 +
73 + #address-cells = <1>;
74 + #size-cells = <1>;
75 + ranges = <0 0x0 0x100000>;
76 +
77 + base_mac_addr: mac@106a0 {
78 + reg = <0x106a0 0x6>;
79 + };
80 };
81
82 partition@100000 {