From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A596BC48BE5 for ; Sat, 12 Jun 2021 18:40:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C2CBF611CD for ; Sat, 12 Jun 2021 18:40:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2CBF611CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5512280C67; Sat, 12 Jun 2021 20:40:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ad5uBj06"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53FCA80ECC; Sat, 12 Jun 2021 20:40:31 +0200 (CEST) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 998C78096D for ; Sat, 12 Jun 2021 20:40:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rfried.dev@gmail.com Received: by mail-ej1-x62b.google.com with SMTP id h24so9566150ejy.2 for ; Sat, 12 Jun 2021 11:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:content-transfer-encoding:date:message-id:cc:subject :from:to:references:in-reply-to; bh=PJsD1yoHD4HahgvVTNK2pLie6Qv3aLi3liaJ98/tfG8=; b=Ad5uBj06lD24M+3Fbdl8NHfnDWtnR99CHdKw9ccYmDOUpKQXdvShhxgg0isvo1zFz/ rvxUwh1y2C+CCBccGGqzqqDfEzKOUsrlWAdG4yUuUxWWj04TFi/MJyX4i/f379Xjkzww mws8jgtOxUVTNws5ZIGIt34QZT3j5rH9g5zDqS3Sy/NHFDGdXabhHLE75tGu+fsRzXEQ qlYJVj384/fBW1RooWhm0ddXL31i4KKNgxT+JqGec1HeoTywrpzIuBNLVCIH+ZuRw03s JjUJFYBui1hDXhWHEPX9DMkzSJvIGZSblJXxqoxhoSbPejaLwynvTrWdsOZcMt9wjHxH HO4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:date :message-id:cc:subject:from:to:references:in-reply-to; bh=PJsD1yoHD4HahgvVTNK2pLie6Qv3aLi3liaJ98/tfG8=; b=cL7qqX3nMuj4e9PpdSY7whz6Bd6QuaiStaAFzxedydxYGo5vieX0XFzMpJfHSmd4tI U+esYP8u/krVR/IBgJOxv5oECVBE+o+U8Gy8Hg/aSEW2APWX+eOww+sY1Reos8VLDBWZ xSFW9mBK8qPYGFWaAUHlD+EgI3R3CWIZ7tXhk03mAzgh1gJkfQgwFeM2FVY16MzZ+iOD MVtIJ+75IEniTFE8C2H8QDMbhkunFlkGQyXyiu/KC6sVf/fxFln6EFlOWNCEXT6XXty6 55mogwz0yljvkjUwRuBIsllHgtFPrnq1KiNqab9hQAfVsYbcD1EHXCWyJzVOLjeGBs1m uZrw== X-Gm-Message-State: AOAM530v41curqmZEbicyf6aZjRburtbNdsykIlxh4wgKgmCF0/ZayME ZeEM4CBf8VXICFEYxB8VocZknj81VDSCnA== X-Google-Smtp-Source: ABdhPJxpeNak+YIjh3rvDZdMMGLTanNQs1KJ2o8lEstI3INv8G4sdSidX17hXuvYByDdPxt5TIN+cg== X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr8513763ejg.6.1623523228351; Sat, 12 Jun 2021 11:40:28 -0700 (PDT) Received: from localhost ([2a00:a040:198:e68a::1004]) by smtp.gmail.com with ESMTPSA id f10sm4223473edx.60.2021.06.12.11.40.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Jun 2021 11:40:27 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 12 Jun 2021 21:40:26 +0300 Message-Id: Cc: Subject: Re: [PATCH v3] net: tsec: add option to set device max-speed via dts From: "Ramon Fried" To: "Aleksandar Gerasimovski" , "Bin Meng" , "Vladimir Oltean" , "u-boot@lists.denx.de" , "Priyanka Jain (OSS)" , "Rainer Boschung" References: In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On Fri Jun 4, 2021 at 4:40 PM IDT, Aleksandar Gerasimovski wrote: > Current tsec adapter sets adapter gigabit capabilities by default, and > in > reality this must not always be the case. > It is possible that tsec adapter is used for 100Mbps connection, and in > this case setting 1000Mbps capabilities can lead to some side effects > such > longer autoneg process. > > In our ls102x designs this problem leads to long autoneg times (> 4 sec) > in case board rgmii link is 100Mbps capable only. > Limiting the rgmii link capabilities provides faster and smoother > link establishment. > > Signed-off-by: Aleksandar Gerasimovski > > Reviewed-by: Vladimir Oltean > Reviewed-by: Bin Meng > --- > Changes for v2: > - keep the variable sort order in a decreasing order of line length > - fix comment typo > Changes for v3: > - fix commit message typos > --- > drivers/net/tsec.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c > index c68e4b7..ee820aa 100644 > --- a/drivers/net/tsec.c > +++ b/drivers/net/tsec.c > @@ -828,6 +828,7 @@ int tsec_probe(struct udevice *dev) > const char *phy_mode; > ofnode parent, child; > fdt_addr_t reg; > + u32 max_speed; > int ret; > =20 > data =3D (struct tsec_data *)dev_get_driver_data(dev); > @@ -893,8 +894,12 @@ int tsec_probe(struct udevice *dev) > } > priv->interface =3D pdata->phy_interface; > =20 > + /* Check for speed limit, default is 1000Mbps */ > + max_speed =3D dev_read_u32_default(dev, "max-speed", 1000); > + > /* Initialize flags */ > - priv->flags =3D TSEC_GIGABIT; > + if (max_speed =3D=3D 1000) > + priv->flags =3D TSEC_GIGABIT; > if (priv->interface =3D=3D PHY_INTERFACE_MODE_SGMII) > priv->flags |=3D TSEC_SGMII; > =20 > -- > 1.8.3.1 Applied to u-boot-net/master, thanks! Best regards, Ramon Fried