ramips: fix ethernet MAC address on Omega2
authorMichael Siegenthaler <msiegen@google.com>
Thu, 19 Aug 2021 00:58:56 +0000 (17:58 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 21 Aug 2021 14:30:30 +0000 (16:30 +0200)
According to https://docs.onion.io/omega2-docs/mac-address.html, 0x28 is
the correct location to read the address on Onion Omega 2(+) devices.

This fixes a regression introduced by commit 77e850fe76e3 ("ramips: tidy up
MAC address setup for Linkit Smart and Omega2"), which was a cleanup that
intended to preserve existing behavior. In my testing with v19.07.7,
however, the MAC address determined from the device tree takes precedence
over the one set by 02_network, so the aforementioned commit actually
changed the behavior.

Signed-off-by: Michael Siegenthaler <msiegen@google.com>
[Adapt patch to nvmem usage]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7628an_onion_omega2.dtsi

index 555a2a126170bd45ed9761e4ccfee5090e46dedb..742c975d66b8e1003437e942e1e86d0f2fd395df 100644 (file)
 };
 
 &ethernet {
-       nvmem-cells = <&macaddr_factory_2e>;
+       nvmem-cells = <&macaddr_factory_28>;
        nvmem-cell-names = "mac-address";
 };
 
        #address-cells = <1>;
        #size-cells = <1>;
 
-       macaddr_factory_2e: macaddr@2e {
-               reg = <0x2e 0x6>;
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
        };
 };