From patchwork Tue Feb 16 21:19:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 1441114 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=qfGE51oQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DgDQn0qG7z9s1l for ; Wed, 17 Feb 2021 08:20:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E85AB82802; Tue, 16 Feb 2021 22:20:13 +0100 (CET) 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="qfGE51oQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98423827EF; Tue, 16 Feb 2021 22:20:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 A5835827A5 for ; Tue, 16 Feb 2021 22:19:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=olteanv@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id w1so18800810ejf.11 for ; Tue, 16 Feb 2021 13:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P3ayAM4ywX0K+u7E0pO1/rcTlp+zPzpeqG1VRBV8vno=; b=qfGE51oQEXxp8whHI94+ukWA8U9NoeJVrX2NDvlNe+5kImiWiFhQ42CuhZuqwU6r7n kUG3qbMASiTNUjms2c6kbemlIC2NAmDNEwV9rFNq0GF9OUkw5QBV1pwI3vq2aCYHYHJg ngjwvGrTVBxMyIXMnKwSzPE4qpUMYHcVlp9OeKGWr71iR3HYlArGAZKfDsEtHKMZEP0x Aw3wwjK8fr/o04dq1cq1DLRMdCv3ND+XBJjsCSX+VZfeUGqp1E7LRM+hB3iV4YD4b8Mw TblhdjAwNmAtyAUhHdCDRMzz7HVmbRJQdQ7U++iIdMdmjDwbRij6HQ7y2R/bTYrpMv9Y O7JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P3ayAM4ywX0K+u7E0pO1/rcTlp+zPzpeqG1VRBV8vno=; b=J1gdcsWoisQwsV4foruwXLbbVjLUjNWwiKnEsc1mbwWTL3gbesTTpWMk3HsWDCRTSk icHMtjSWGGVONAgVXzfZ6f3w5TBCXybHPPcf2f2t7NBPfDye5w6xSyvQG2X8CNY8ZCVD gwD9Qczbx19pFxm3hF3R8ekDAbqKQBdkyIwUERxUmVX8JYHSjWVwWlzvCzgGlJFM2yrc nvqLeGlpzsE7/+ecgdzO+ZhclA/gNRCNjB7+I14NCP1mjj62h3gI+UzVlVvvoiLwXuZN 2sC866cCHbCF4rFIBb7TfN4APvXBMtwDsY/OMvd1RsC9XsRuPBVcbtTNfgmXDNOpC2Kd qavg== X-Gm-Message-State: AOAM5330zqsAX48nQ67l7MkyEhPqse8tbqhyLrfFisrwo/qlOeYVgzPh VMN6Ej3zR/7qrfufWhwSbnM= X-Google-Smtp-Source: ABdhPJzc6hpdtHqJQE683EXW7uW3D9q03CItDQP2puKQfLx87est6oJpJLxo/vVOQpwf6xkCWWR07g== X-Received: by 2002:a17:906:c82f:: with SMTP id dd15mr15597135ejb.247.1613510396349; Tue, 16 Feb 2021 13:19:56 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id o10sm14803455eju.89.2021.02.16.13.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 13:19:55 -0800 (PST) From: Vladimir Oltean To: Tom Rini , Joe Hershberger , Simon Glass , Bin Meng , u-boot@lists.denx.de Cc: Michael Walle , Alexandru Marginean , Claudiu Manoil , Priyanka Jain Subject: [PATCH v5 2/9] net: phy: fixed: support speeds of 2500 and 10000 Date: Tue, 16 Feb 2021 23:19:29 +0200 Message-Id: <20210216211936.3291988-3-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210216211936.3291988-1-olteanv@gmail.com> References: <20210216211936.3291988-1-olteanv@gmail.com> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: Vladimir Oltean Unlike the Linux fixed PHY driver, the one in U-Boot does not attempt to emulate the clause 22 register set of a gigabit copper PHY driver through the swphy framework. Therefore, the limitation of being unable to support speeds higher than gigabit in fixed-link does not apply to the U-Boot fixed PHY driver. This makes the fixed-link U-Boot implementation more similar to the one from phylink, which can work with any valid link speed. Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil --- Changes in v5: None. Changes in v4: Patch is new. drivers/net/phy/fixed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index d117a50719a2..ae6b44bec81c 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -25,7 +25,8 @@ static int fixedphy_of_init(struct phy_device *phydev) return -EINVAL; val = ofnode_read_u32_default(node, "speed", 0); - if (val != SPEED_10 && val != SPEED_100 && val != SPEED_1000) { + if (val != SPEED_10 && val != SPEED_100 && val != SPEED_1000 && + val != SPEED_2500 && val != SPEED_10000) { printf("ERROR: no/invalid speed given in fixed-link node!"); return -EINVAL; }