ethernet controller driver call .of_get_mac_address() to get
the mac address from devictree tree, if these properties are
not present, then try to read from nvmem. i.MX6x/7D/8MQ/8MM
platforms ethernet MAC address read from nvmem ocotp eFuses,
but it requires to swap the six bytes order.
The patch set is to add property "nvmem_macaddr_swap" to swap
macaddr bytes order. If MAC address read from nvmem cell and
it is valid mac address, .of_get_mac_addr_nvmem() add new property
"nvmem-mac-address" in ethernet node. Later user call
.of_get_mac_address() to get MAC address again, it can read
valid MAC address from device tree in directly.
Update these two properties for binding documentation.
Fugang Duan (3):
net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes
order
of_net: add property "nvmem-mac-address" for of_get_mac_addr()
dt-bindings: doc: add new properties for of_get_mac_address from nvmem
Documentation/devicetree/bindings/net/ethernet.txt | 3 +++
drivers/of/of_net.c | 4 ++++
net/ethernet/eth.c | 25 +++++++++++++++++-----
3 files changed, 27 insertions(+), 5 deletions(-)
--
2.7.4