]> git.itanic.dy.fi Git - linux-stable/commitdiff
ARM: BCM53016: MR32: get mac-address from nvmem
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 18 Sep 2021 17:29:31 +0000 (19:29 +0200)
committerFlorian Fainelli <f.fainelli@gmail.com>
Tue, 21 Sep 2021 21:20:14 +0000 (14:20 -0700)
The MAC-Address of the MR32's sole ethernet port is
located in offset 0x66 of the attached AT24C64 eeprom.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm/boot/dts/bcm53016-meraki-mr32.dts

index 577a4dc604d93e89c3be314c2a6f495ba65de569..64f973e1ef1297d58a11b4207b9a6e8e33d179ea 100644 (file)
@@ -110,6 +110,12 @@ eeprom: eeprom@50 {
                        reg = <0x50>;
                        pagesize = <32>;
                        read-only;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       mac_address: mac-address@66 {
+                               reg = <0x66 0x6>;
+                       };
                };
        };
 };
@@ -133,6 +139,11 @@ &uart2 {
         */
 };
 
+&gmac0 {
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&mac_address>;
+};
+
 &gmac1 {
        status = "disabled";
 };