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 871B0C433FE for ; Wed, 9 Nov 2022 13:24:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13D0084EEF; Wed, 9 Nov 2022 14:24:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="M1HTr8F/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3DF2984FB2; Wed, 9 Nov 2022 14:24:35 +0100 (CET) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 66D5E84EEF for ; Wed, 9 Nov 2022 14:24:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x830.google.com with SMTP id w4so10343792qts.0 for ; Wed, 09 Nov 2022 05:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vt1So4qQrbXx7jcOUV9n5t+9KrwzsCxTr6B1bXmztSE=; b=M1HTr8F/sDsgeatS/ciGDwGI4jEGdAB0H38d2bM5tQ+q7MV75wxlTowwRK6bNbJMrN raLrk6Wgq1YHHJmGSjSSvKLgma1NI6l0zObyWBXw6FuOenmXzmDf7BycZZVpcY6zfSvi Q5UrDJeRPnxdZbGQl0JjXk0QZ5H/NLwCF873M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vt1So4qQrbXx7jcOUV9n5t+9KrwzsCxTr6B1bXmztSE=; b=t3BsOu+XnDMQRjOqmmlxlVAMfHXUVGfQn/jXew4gMbV70LoPo8EC5fWRjPagHrNlgH uXk6lfbOE5EQwhcUmhvKP6lEmGJ06JQxInlFgqsI7RCnkD1oTLYJvd5Um+pR/BoRT9Sq b1aoPFU/YRr68etoieJbxTcQPRpf2C4ey9eYq9qhWYlnBA8X0tFuyoJhL5VaLKFntD26 59DA0vumXfZ0zJZ3DF+LxAT4bdIHnG3DrEOZG8naB1YqcggAh73/kU8E0cvF/uIH2Hk3 6mBAVIIxLP9OoL92+49h73JkJKV+dcYxQ4/hApXRAI+iAvyDouvQgAp2mJq+UpixmDr5 gSTA== X-Gm-Message-State: ACrzQf1nVVB7wLZNV9hYd6S3x91ufjrxQvi0rMeXsEFHStfXhrM4afuZ ywGIQXLl1YcuxrfvX+B7KppgQQ== X-Google-Smtp-Source: AMsMyM7LzrDAB5GyuSp4ksJJosc8K6Sc+5JjbZK3Ax8zcbMNZPOhC3gze/wlLcHrgQt21PrsEYc9mw== X-Received: by 2002:a05:622a:903:b0:3a5:57f5:a772 with SMTP id bx3-20020a05622a090300b003a557f5a772mr24667268qtb.506.1668000270118; Wed, 09 Nov 2022 05:24:30 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-31d7-721a-07f8-1839.res6.spectrum.com. [2603:6081:7b00:6400:31d7:721a:7f8:1839]) by smtp.gmail.com with ESMTPSA id y22-20020a05620a44d600b006f9c2be0b4bsm11333854qkp.135.2022.11.09.05.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 05:24:29 -0800 (PST) Date: Wed, 9 Nov 2022 08:24:27 -0500 From: Tom Rini To: Ioana Ciornei Cc: sr@denx.de, gaurav.jain@nxp.com, priyanka.jain@nxp.com, wasim.khan@nxp.com, meenakshi.aggarwal@nxp.com, u-boot@lists.denx.de Subject: Re: LX2106A U-Boot: board_eth_init() not called any more Message-ID: <20221109132427.GV6335@bill-the-cat> References: <37f10445-df50-da31-89d2-a6a6efc83701@denx.de> <20221109104859.274836-1-ioana.ciornei@nxp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KM+e2hnYAO+MCJ5e" Content-Disposition: inline In-Reply-To: <20221109104859.274836-1-ioana.ciornei@nxp.com> X-Clacks-Overhead: GNU Terry Pratchett 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 --KM+e2hnYAO+MCJ5e Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 09, 2022 at 12:48:59PM +0200, Ioana Ciornei wrote: > > From: Stefan Roese > > Subject: LX2106A U-Boot: board_eth_init() not called any more > > > > Dear NXP LX2160 developers! > > >=20 > Hi! >=20 > > 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? > > >=20 > 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. >=20 > 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). >=20 > 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. > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=828d3495023880 ("arm:= dts: lx2160a: add external MDIO nodes") > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82f660f7af1dcb ("arm:= dts: lx2160ardb: add DPMAC and PHY nodes") > =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82643f5b47ec06 ("conf= igs: lx2160ardb: enable CONFIG_DM_ETH and related") >=20 > 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. >=20 > U-Boot 2023.01-rc1-00019-g77b5cc2948f5 (Nov 09 2022 - 11:25:19 +0200) >=20 > 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 =3D 161.13MHz Clock2 =3D 161.13MHz > SERDES2 Reference: Clock1 =3D 100MHz Clock2 =3D 100MHz > SERDES3 Reference: Clock1 =3D 100MHz Clock2 =3D 100MHz > (...) > EEPROM: NXID v1 > In: serial_pl01x > Out: serial_pl01x > Err: serial_pl01x > SEC0: RNG instantiated > Net: e1000: 68:05:ca:57:cc:c8 >=20 > 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, t= otal 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 >=20 > 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 > =3D> setenv ethact DPMAC3@usxgmii > =3D> setenv ipaddr 10.0.0.1 > =3D> 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 I suspect there's unused code in the board directory that should be removed then, can we please get that cleaned up? Thanks. --=20 Tom --KM+e2hnYAO+MCJ5e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNrqggACgkQFHw5/5Y0 tyzJZwv/Xxs2r1CKs9XfcdphWUMWlAerD7wCOpDhpGWODWfaGi+YcSymwoILbjUK sXmOuy2gbVDvnTc8SQkJx7nNTQ+Cj7rbFY3l0AXmypfknfBmL/6nC1/HtIWEs19z rReKJ5LU5DcjpcPeMeAlRm52KA9y8QTZJiu8twFTJdITkeQdoLdAH2O210E6jGGM 4MZYGS3Yy2+orT2ebIghxwda97rVs7r1Qi7A2V2Anqw3P/BfGefpY8E7HBl/bm8p T5mgUPzRMIllhupapt8lx5bwl6A5OUBsuNiL653pqoXXSJb8RDvjIMoXuWlDvi+L hVPQgal/JLobDO8EfIDA9vcyLClimqMpFZrm488brC/lWEImXGmf9rUe9OU+0Sdq kT0KFTiPPgyeJOjDvvf6RPqU9oVRVYK2ByLiNcgnOh2K23u3Y9o4Bd+dDMTCy3Gn iFlutQPpMavXzuFoOZxhZgr7cbPntTDNTy2bFYIqErIhBaT8tTN03u+3/zY59F4I h3/K92Bm =4C0d -----END PGP SIGNATURE----- --KM+e2hnYAO+MCJ5e--