[U-Boot] [PATCH 0/3][v3] Update MAC address in "ethernet" node of Linux device tree

York Sun york.sun at nxp.com
Wed Nov 29 19:33:02 UTC 2017


On 11/23/2017 03:22 AM, Prabhakar Kushwaha wrote:
> The MAC addresses get fixed in the device tree for "ethernet" nodes
> is by using trailing number behind "ethernet" found in "/aliases".
> It may not be necessary for the "ethernet" nodes to be sequential.
> There can be gaps in between or any ethenet node disabled.
> 
> Reason for gaps is because the available ethernet port are based on
> SerDes protocol chosen for the SoC. Usually Linux device tree 
> contains "ethernet" node for all possible ports supported by SoC
> for e.g. LS1046A. Where based on SerDes protocol some "ethernet" 
> ports are unavailable hence non-sequential. 
> 
> This patch-set provide way to fetch MAC addr sequentially from env
> variables and also create hole in "ethernet" node (disable) based
> on SerDes protocol for LS1046ARDB.
> 
> This patch-set provide a support to fetch MAC addr sequentially
> from env and apply them to "ethernet" nodes in the order they appear
> in device tree only if "ethernet" is not "disabled"
> 
> It also disables "ethernet" nodes in device tree based ethernet port
> availability  in the selected SerDes protocol.
> Currently the changes are done foe LS1046A. This has been added as a
> compile time option for now, to keep backward compatibility.
> 
> The associated documentation is also updated in the README.
> 
> Other platforms should also follow same approach. 
> 
> Prabhakar Kushwaha (3):
>   common: Fix-up MAC addr in dts by fetching env variable serially
>   arm: Add support of updating dts before fix-up
>   boards: ls1046ardb: disable unavailable "ethernet" node in dts
> 
>  README                           |  9 +++++++
>  arch/arm/lib/bootm-fdt.c         | 12 ++++++++++
>  board/freescale/ls1046ardb/eth.c | 51 ++++++++++++++++++++++++++++++++++++++++
>  common/fdt_support.c             | 25 ++++++++++++++++----
>  include/configs/ls1046ardb.h     |  2 ++
>  include/fdt_support.h            |  3 +++
>  6 files changed, 98 insertions(+), 4 deletions(-)
> 

Simon,

What do you think about this set?

York


More information about the U-Boot mailing list