From patchwork Sun Aug 30 17:34:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 248728 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2715122ilg; Sun, 30 Aug 2020 10:34:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGfebxyzpJG22TjZzujFB8Kal1NqsxobiSkHPMZ8q1UWJbUpKHe7cp7KzCnlSx4cOVRNmS X-Received: by 2002:a05:6402:b72:: with SMTP id cb18mr7829233edb.299.1598808898197; Sun, 30 Aug 2020 10:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598808898; cv=none; d=google.com; s=arc-20160816; b=Fj4RW0C7OfZgnglGQFXiVGIZj6Ol8v2QtdgKMVUlFDJKDGp0uiN781eG/lbyokOfl5 H+wiCC7fpWtijzD4zbVACz/hHiSuMiOUMxGjxAckzlOi0mMDkSJic3M9+qUp16v+RJ/5 Y7cRSTK+klRZqJ1uB+qTGfkSuPa4its/Seq2BedusqgjsFV2dpA1jEfi3vXiu9rrMBBY bRuYmzok7tM+3ZBpcr00Idc0HnEVIQAArRrxnDVD4xfo2ldfTpM0UVFVflkaPmXf2VZe 3v/Yux5Y76B/mwCwazLS/KY96sWsqKYoAOKT2NRLPciyUNtxWWBo7swQ5MtA3WkiwkEu FP3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=tZK2TP+2t+mV0g/68G8cvz0ZN9xuJYPJklBKZRz98cU=; b=yp16oJnvRpnWhsaRRZq/snAriMkeY307HF9jJk5rIsVa1Vs4ayKhxeADFbN/EzMuZY KKoTHUgNc+sEkYiYIAmwv8tatUnWfAPXuHhSaDf/j4RgTU2Vx4No6ZxZcapVkwqqpnvC cOO7P+RXRmkvRie2YDG1MGxW+q6TDkhelsZdlEj0GDc4kldZh/eRmCg5POEMkwTvX4vT AJcHH8C9Ip0VIkrywW/GBNr3lrDaigSVEie5YSKYDoLjM2J+DXYTd50JscvWmsiUvzJ9 VMnTbHVOHEwKC+EJANUhUxWWCF6QAaPjGE4UWW/C5dw6Uf3ZriW9kzLrUHHOCtrIbzB9 RS0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jUPKGZ54; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si4290347edb.188.2020.08.30.10.34.58; Sun, 30 Aug 2020 10:34:58 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jUPKGZ54; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbgH3Rew (ORCPT + 9 others); Sun, 30 Aug 2020 13:34:52 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:37150 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbgH3Rev (ORCPT ); Sun, 30 Aug 2020 13:34:51 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 07UHYeVE048007; Sun, 30 Aug 2020 12:34:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1598808881; bh=tZK2TP+2t+mV0g/68G8cvz0ZN9xuJYPJklBKZRz98cU=; h=From:To:CC:Subject:Date; b=jUPKGZ54DdcDx3hI7okuktTei1TwUue4GK/7Mj/FKzzMs8OWK4aVAD9E44didGBob +qKOxpq2Zq3+5sQ59GxFcM8EXLfkxVodjUzspSGJHZX6ojYdqEl5Z5STnX0PeBlLKl VZ7kQO/k53avLuxRHJT1H3r0VmUcogLlTRn0BChA= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07UHYew0111224; Sun, 30 Aug 2020 12:34:40 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Sun, 30 Aug 2020 12:34:40 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Sun, 30 Aug 2020 12:34:40 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07UHYdDD109498; Sun, 30 Aug 2020 12:34:40 -0500 From: Grygorii Strashko To: "David S. Miller" , Jakub Kicinski , CC: , , Vignesh Raghavendra , Grygorii Strashko Subject: [PATCH] net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode Date: Sun, 30 Aug 2020 20:34:32 +0300 Message-ID: <20200830173432.14960-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In RMII link mode it's required to set bit 15 IFCTL_A in MAC_SL MAC_CONTROL register to enable support for 100Mbit link speed. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index cb994f66c3be..9baf3f3da91e 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -174,6 +174,8 @@ void am65_cpsw_nuss_adjust_link(struct net_device *ndev) if (phy->speed == 10 && phy_interface_is_rgmii(phy)) /* Can be used with in band mode only */ mac_control |= CPSW_SL_CTL_EXT_EN; + if (phy->speed == 100 && phy->interface == PHY_INTERFACE_MODE_RMII) + mac_control |= CPSW_SL_CTL_IFCTL_A; if (phy->duplex) mac_control |= CPSW_SL_CTL_FULLDUPLEX;