Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3560363pxb; Mon, 24 Jan 2022 12:13:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPW3Q/e2SmNC6ZEXqe6eGnsYVPfMtP11c6EjIcWpuQSNiXmsc5PzjsYx2448BUyyDDNSnN X-Received: by 2002:a17:902:7401:b0:14b:1339:58cf with SMTP id g1-20020a170902740100b0014b133958cfmr15094889pll.66.1643055232913; Mon, 24 Jan 2022 12:13:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055232; cv=none; d=google.com; s=arc-20160816; b=Zo2NhSVuJARtozRZXefuj2chkKiM4G9E3uaaeHn1jbB75bs9YVABEOF7LwMw1oei9R HC+SzFAXnWYzzeFuzQ39RqnW76Y4zfWkuDt1zDYyo0fDBDP3gPDoThyckt8OXdmBV+Og ltA9A9IiYlLkSAbd86BMT9rq0MhLrIuix4ueNE5c6WP3yfl3K/d+WeVx32wxplNG7uUu e1cZ6ubrmmPywaqRZO4riF4VuyH5gD0OD+8IipAw0IFrXo3Agj7OqQ3tZD5JRc8/MBDK 35crof/Bi206Pt/1KBV63xjdym+DN4iPGB22UU8Ex8KffIjs8hFPBsn93EHVcJEXb9NK I1ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=89zimvHpB1U3L+rhfVqmKWMtc3/YyBIQ/RPhOHm+ucU=; b=TBauakLKzcxXsj7I5x+g7C9pm3JzZxSgZx1brZD9xkgDA7gi5rVHIqda3mmxrmPWlH uWCsIYRnCqnwzZAkHgmgXGMpSYuws3IE7ArGZpcY38vmVeRwB3vqxXPvLnkxD+cG+P9k UzZbuG3+Yq0Da0hQ7gyZcuDUz968JXrYzR+jwUjJ4zk3xuNOZuy+aBYIObY6guJz/A4K MnpSkL52Cv5CTmN3spn0YBt95gar8W7hSZOlsHnIAyVxNCQ9euMgq/WsMWXWuAIebFJr DTW4+bvF8DpIPEr/xjuJOPAmGqhAAYL4OSFLC24sqyCCDxSNDjvIUTy1X831t58b7LgO YO5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ULhIT443; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si260414pju.166.2022.01.24.12.13.38; Mon, 24 Jan 2022 12:13:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=ULhIT443; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347635AbiAXTRA (ORCPT + 99 others); Mon, 24 Jan 2022 14:17:00 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:38626 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343546AbiAXTI4 (ORCPT ); Mon, 24 Jan 2022 14:08:56 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1788D60BB9; Mon, 24 Jan 2022 19:08:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC527C340E5; Mon, 24 Jan 2022 19:08:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051334; bh=q1AQ1O9jbhap56lP71ZI3bOXZMTG/h6Z1vfl4pHRoHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ULhIT4435jn+Ljr3uvz0pRgvOSl1VSYyxauTybHJpiDf1uPMY8M78GIH3zeNscAgn KJppiO6F4XmLo2LWyMQ2PvjzVUEz5Jrk4lvv4MmVmQkUdNhgdle8PmD4GNBoUCmujb Mhn3Ries+hBd0kmw05s7Mkh27HVoGUWS8R06QUfU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corentin Labbe , "Russell King (Oracle)" , Andrew Lunn , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 128/186] net: phy: marvell: configure RGMII delays for 88E1118 Date: Mon, 24 Jan 2022 19:43:23 +0100 Message-Id: <20220124183941.227299670@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King (Oracle) [ Upstream commit f22725c95ececb703c3f741e8f946d23705630b7 ] Corentin Labbe reports that the SSI 1328 does not work when allowing the PHY to operate at gigabit speeds, but does work with the generic PHY driver. This appears to be because m88e1118_config_init() writes a fixed value to the MSCR register, claiming that this is to enable 1G speeds. However, this always sets bits 4 and 5, enabling RGMII transmit and receive delays. The suspicion is that the original board this was added for required the delays to make 1G speeds work. Add the necessary configuration for RGMII delays for the 88E1118 to bring this into line with the requirements for RGMII support, and thus make the SSI 1328 work. Corentin Labbe has tested this on gemini-ssi1328 and gemini-ns2502. Reported-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/phy/marvell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 727b991312a4e..3d8d765932934 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -938,6 +938,12 @@ static int m88e1118_config_init(struct phy_device *phydev) if (err < 0) return err; + if (phy_interface_is_rgmii(phydev)) { + err = m88e1121_config_aneg_rgmii_delays(phydev); + if (err < 0) + return err; + } + /* Adjust LED Control */ if (phydev->dev_flags & MARVELL_PHY_M1118_DNS323_LEDS) err = phy_write(phydev, 0x10, 0x1100); -- 2.34.1