From: Hans de Goede Date: Wed, 26 Oct 2016 09:44:19 +0200 Subject: [U-Boot] [PATCH] arm: dts: Pine64: add Ethernet alias In-Reply-To: References: <1477008706-13387-1-git-send-email-andre.przywara@arm.com> <8376ab7e-0365-c753-8a8d-c47a62495dec@arm.com> <75efcb6b-e1e5-2505-949b-119301b6c8c5@arm.com> Message-ID: <83f0c74f-3607-bd97-a9cd-db1fa94d22ec@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 26-10-16 09:00, Jagan Teki wrote: > On Tue, Oct 25, 2016 at 3:59 AM, Andr? Przywara wrote: >> On 21/10/16 11:28, Hans de Goede wrote: >>> Hi, >>> >>> On 21-10-16 12:06, Andre Przywara wrote: >>>> Hi, >>>> >>>> On 21/10/16 10:31, Jagan Teki wrote: >>>>> On Fri, Oct 21, 2016 at 5:41 AM, Andre Przywara >>>>> wrote: >>>>>> The sun8i-emac driver works fine with the A64 Ethernet IP, but we are >>>>>> missing an alias entry to trigger the driver instantiation by U-Boot. >>>>>> Add the line to point U-Boot to the Ethernet DT node. >>>>>> This enables TFTP boot on the Pine64. >>>>>> >>>>>> Signed-off-by: Andre Przywara >>>>>> --- >>>>>> arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 + >>>>>> 1 file changed, 1 insertion(+) >>>>>> >>>>>> diff --git a/arch/arm/dts/sun50i-a64-pine64-common.dtsi >>>>>> b/arch/arm/dts/sun50i-a64-pine64-common.dtsi >>>>>> index d5a7249..c0fde44 100644 >>>>>> --- a/arch/arm/dts/sun50i-a64-pine64-common.dtsi >>>>>> +++ b/arch/arm/dts/sun50i-a64-pine64-common.dtsi >>>>>> @@ -46,6 +46,7 @@ >>>>>> >>>>>> aliases { >>>>>> serial0 = &uart0; >>>>>> + ethernet0 = &emac; >>>>> >>>>> I think alias doesn?t require for probing emac, it will straight away >>>>> probed like >>>>> >>>>>> dm tree >>>>> .... >>>>> eth [ + ] ethernet at 01c30000 >>>>> >>>>> Did you find any issue while detecting eth? >>>> >>>> Yes, it just didn't work ;-) I don't have a board here, but can post the >>>> error message later tonight. >> >> .... >> Net: phy interface7 >> >> Error: ethernet at 01c30000 address not set. >> No ethernet found. >> .... >> >>>> In fact I was wondering about that already, maybe it's worth >>>> investigating this further. >> >> So the reason is that CONFIG_NET_RANDOM_ETHADDR isn't defined, so >> without the DT alias triggering the SID MAC generation there will be >> _no_ MAC address at all, which makes the driver give up. >> AFAIK on the A64 the MAC generation from the SID serial number works >> just fine, so we should in any case add the alias. > > I wondered how the alias related to MAC generation, See the setup_environment() function in board/sunxi/board.c, we use the alias-es to determine for which interface we need to generate a random MAC and set ethaddr / eth1addr in the environment. Regards, Hans