Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D63ABC4332F for ; Wed, 9 Nov 2022 13:30:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D8F0884EEF; Wed, 9 Nov 2022 14:30:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1668000611; bh=oV5x+nj8+XhNusvtn9+LQqU+SX0W0tO3DCz0MVAsiTM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=I8+rhHkQNd2lBj1geJrBYKQKOKJyZtwQLOL2fSeBQ1rhpCkL7NC5Rcf8wcT0kuwtz qtjCaE3cOWuoBz6AGcmxo51rz0H0FzNR+FiY2CnKX8tw0h7FLn2Oc2ykff3FB7Wji5 wcIeDj+NuUXCMR+kVjyrrtdyJQtgFwXB5wZ+fpY+y1m2njdR5O/YhTQcm3ZQbwmgRe 9Q4HjGLVHNvtJz617jlg5xyrNwGm7PUL/dIEyUnrCNQU1DtxVgAZMLi2S0+9d7QJY5 N9FFxj9w0LtQGYqN4GgjzklGeWuejdTM24zrBG5u+yiwI0n1ONDDFpBh4QeO5eoQw/ VuQV0v8jDGywA== Received: by phobos.denx.de (Postfix, from userid 109) id D48FF84EEF; Wed, 9 Nov 2022 14:30:05 +0100 (CET) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6011784EEF for ; Wed, 9 Nov 2022 14:30:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4N6m6Z2bN2z9sQd; Wed, 9 Nov 2022 14:29:58 +0100 (CET) Message-ID: Date: Wed, 9 Nov 2022 14:29:56 +0100 MIME-Version: 1.0 Subject: Re: LX2106A U-Boot: board_eth_init() not called any more Content-Language: en-US To: Ioana Ciornei Cc: gaurav.jain@nxp.com, priyanka.jain@nxp.com, wasim.khan@nxp.com, meenakshi.aggarwal@nxp.com, u-boot@lists.denx.de References: <37f10445-df50-da31-89d2-a6a6efc83701@denx.de> <20221109104859.274836-1-ioana.ciornei@nxp.com> From: Stefan Roese In-Reply-To: <20221109104859.274836-1-ioana.ciornei@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4N6m6Z2bN2z9sQd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Ioana, On 09.11.22 11:48, Ioana Ciornei wrote: >> From: Stefan Roese >> Subject: LX2106A U-Boot: board_eth_init() not called any more >> >> Dear NXP LX2160 developers! >> > > Hi! > >> With commit 94633c36f9eb ("net: Make DM_ETH be selected by NETDEVICE") >> DM_ETH is now mandatory. And net/eth_legacy.c is not compiled anymore. >> Resulting in board_eth_init() not being called anymore. On NXP LX2160 >> platforms (and some other NXP platforms as well), this functions and >> the legacy net/eth infrastructure seems still to be used AFAICT. >> >> So could you please let me know, if and how ethernet support on these >> boards is supposed to work with recent U-Boot versions on LX2160? My >> understanding is, that the current versions will result in an output >> like this: >> >> ... >> In: serial_pl01x >> Out: serial_pl01x >> Err: serial_pl01x >> SEC0: RNG instantiated >> Net: No ethernet found. >> ... >> >> Or did I miss something? >> > > I am not exactly sure what you missed but ethernet support under DM_ETH > for the DPAA2 based boards was added more than 2 years ago in the > upstream. > > For example, the LX2160ARDB board does no longer rely on the > board_eth_init() function but rather it discovers its ethernet > interfaces, any connected PHY etc using the DTS file (just like Linux > does). > > There are multiple patch sets that I submitted which made this support > available. For reference, I will list below just some patches which > added DM_ETH support for LX2160ARDB. >       8d3495023880 ("arm: dts: lx2160a: add external MDIO nodes") >       f660f7af1dcb ("arm: dts: lx2160ardb: add DPMAC and PHY nodes") >       643f5b47ec06 ("configs: lx2160ardb: enable CONFIG_DM_ETH and related") Thanks for getting back to me. Yes, I completely missed this, as I was only looking at board_eth_init() and using the LX2160 board with DM_ETH disabled, which now is not supported any more. > And to double check, I just booted a LX2160ARDB board > (lx2160ardb_tfa_defconfig) with the latest u-boot from upstream and from > the log below you can see that the DPAA2 ethernet interfaces are > available. > > U-Boot 2023.01-rc1-00019-g77b5cc2948f5 (Nov 09 2022 - 11:25:19 +0200) > > SoC: LX2160ACE Rev2.0 (0x87360020) > Clock Configuration: > CPU0(A72):2200 MHz CPU1(A72):2200 MHz CPU2(A72):2200 MHz > CPU3(A72):2200 MHz CPU4(A72):2200 MHz CPU5(A72):2200 MHz > CPU6(A72):2200 MHz CPU7(A72):2200 MHz CPU8(A72):2200 MHz > CPU9(A72):2200 MHz CPU10(A72):2200 MHz CPU11(A72):2200 MHz > CPU12(A72):2200 MHz CPU13(A72):2200 MHz CPU14(A72):2200 MHz > CPU15(A72):2200 MHz > Bus: 750 MHz DDR: 3200 MT/s > Reset Configuration Word (RCW): > 00000000: 5883833c 24580058 00000000 00000000 > 00000010: 00000000 0c010000 00000000 00000000 > 00000020: 036001a0 00002580 00000000 00000096 > 00000030: 00000000 00000000 00000000 00000000 > 00000040: 00000000 00000000 00000000 00000000 > 00000050: 00000000 00000000 00000000 00000000 > 00000060: 00000000 00000000 00027000 00000000 > 00000070: 08b30010 00150020 > Model: NXP Layerscape LX2160ARDB Board > Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#1 > FPGA: v4.0 > SERDES1 Reference: Clock1 = 161.13MHz Clock2 = 161.13MHz > SERDES2 Reference: Clock1 = 100MHz Clock2 = 100MHz > SERDES3 Reference: Clock1 = 100MHz Clock2 = 100MHz > (...) > EEPROM: NXID v1 > In: serial_pl01x > Out: serial_pl01x > Err: serial_pl01x > SEC0: RNG instantiated > Net: e1000: 68:05:ca:57:cc:c8 > > Warning: e1000#0 MAC addresses don't match: > Address in ROM is 68:05:ca:57:cc:c8 > Address in environment is 00:04:9f:05:c4:27 > eth0: DPMAC3@usxgmii, eth1: DPMAC4@usxgmii, eth2: DPMAC17@rgmii-id, eth3: DPMAC18@rgmii-id, eth4: e1000#0 [PRIME] > SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB > device 0 offset 0x640000, size 0x80000 > SF: 524288 bytes @ 0x640000 Read: OK > device 0 offset 0xf00000, size 0x100000 > SF: 1048576 bytes @ 0xf00000 Read: OK > device 0 offset 0xa00000, size 0x300000 > SF: 3145728 bytes @ 0xa00000 Read: OK > device 0 offset 0xe00000, size 0x100000 > SF: 1048576 bytes @ 0xe00000 Read: OK > crc32+ MC firmware version 10.24.0 > > fsl-mc: Booting Management Complex ... SUCCESS > fsl-mc: Management Complex booted (version: 10.24.0, boot status: 0x1) > Hit any key to stop autoboot: 0 > => setenv ethact DPMAC3@usxgmii > => setenv ipaddr 10.0.0.1 > => ping 10.0.0.2 > DPMAC3@usxgmii Waiting for PHY auto negotiation to complete.Using DPMAC3@usxgmii device > host 10.0.0.2 is alive Great. Many thanks for this testing this. I need to check what needs to be done on our custom LX2160 based board in the dts/dtsi files and corresponding drivers to fully support operation with DM_ETH enabled now. BTW: You might want to send a patch removing the now obsolete board_eth_init() functions in board/freescale/*. Thanks, Stefan