Subject: Re: [Intel-wired-lan] [next] igb: allow setting MAC address on i211 using a device tree blob V5

From: John Holland <[email-masked]>
Date: Thu, 18 Feb 2016 14:43:59 +0100

On 02/18/2016 12:10 PM, John Holland wrote:
> Hello,
>
> The Intel i211 LOM PCIe Ethernet controllers' iNVM operates as an OTP
> and has no external EEPROM interface [1]. The following allows the
> driver to pickup the MAC address from a device tree blob when CONFIG_OF
> has been enabled.
>
> +       if (eth_platform_get_mac_address(&pdev->dev, hw->mac.addr)) {

For later reference, putting all necessary information in one place.

This requires the dtb for the mac address routing to be properly 
positioned. On an imx6q using U-Boot, that required setting the U-Boot 
environment variable eth1addr and reworking the PCIe tree and allocating 
an alias as such:

1) Set intel,i211 MAC address.

# env set eth1addr <valid-mac-address>

2) Add an alias to pick up the MAC address from U-Boot and route it to 
the intel,i211 PCIe endpoint for an imx6qdl derivative.

/ {
         aliases {
                 ethernet1 = &eth1;
         };

};

&pcie {
         /* soc pcie bridge 00:00.0 */
         pcie@0,0 {
                 reg = <0x000000 0 0 0 0>;
                 #address-cells = <3>;
                 #size-cells = <2>;

                 /* pcie endpoint 01:00.0 */
                 eth1: intel,i211@pcie0,0 {
                         reg = <0x010000 0 0 0 0>;
                 };
         };
};

John