arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
authorRafał Miłecki <rafal@milecki.pl>
Mon, 29 Mar 2021 15:45:14 +0000 (17:45 +0200)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 29 Mar 2021 18:44:31 +0000 (11:44 -0700)
On most BCM4908 devices MAC address can be read from the bootloader
binary section containing device settings. Use NVMEM to describe that.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts

index 41e8fbf..2dd0284 100644 (file)
        };
 };
 
+&enet {
+       nvmem-cells = <&base_mac_addr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &usb_phy {
        brcm,ioc = <1>;
        status = "okay";
                #size-cells = <1>;
 
                partition@0 {
+                       compatible = "nvmem-cells";
                        label = "cferom";
                        reg = <0x0 0x100000>;
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0x100000>;
+
+                       base_mac_addr: mac@106a0 {
+                               reg = <0x106a0 0x6>;
+                       };
                };
 
                partition@100000 {
index b049a12..169fbb7 100644 (file)
        };
 };
 
+&enet {
+       nvmem-cells = <&base_mac_addr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &usb_phy {
        brcm,ioc = <1>;
        status = "okay";
                #size-cells = <1>;
 
                partition@0 {
+                       compatible = "nvmem-cells";
                        label = "cferom";
                        reg = <0x0 0x100000>;
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0x100000>;
+
+                       base_mac_addr: mac@106a0 {
+                               reg = <0x106a0 0x6>;
+                       };
                };
 
                partition@100000 {