Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3675254pxb; Mon, 24 Jan 2022 15:04:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvIU7xm0maUoTvjHW5/r2KKuiXIavlpNjxBHEff4oXnJEZFmYC1W7sES1F5nIMYDaVJEOf X-Received: by 2002:a17:903:24d:b0:14a:677d:843a with SMTP id j13-20020a170903024d00b0014a677d843amr16230649plh.129.1643065491481; Mon, 24 Jan 2022 15:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065491; cv=none; d=google.com; s=arc-20160816; b=CeUqluBWaHT0fQLbSPya7lE3V+/sJkNTZoCUdvPfTG7pRwrpAja4IgS8O9dNcUBh7i DgjLCKPx1/gsFbWzJ8qwhmA2jiS32ijtgkr64yStQCqSJZg0kxqYh1fbLlOHZxKvEvu4 FW6jwF1jMCpkAwhIsto0d8TBiYBtN+umM+bp+RsPOr7ZPzXH96vJzka6ssFavI5Hn122 C7YGR3xJatIOGSOrZiHMTjULmPFHiJ4plOi1HJOsYzuVT5mwxkrOmypVFl5MBQFbuFVS FZm2VWNTt3Wmd9c2+bGTgNOG7SgEoj8koQLImARtyDsB3WTkKFVirPmt/kgrE9pr8Hqr gaOQ== 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=I6uLDtlcGrF6Tob3gB4egMBXBcxOH7fuXQDG7WkIS48=; b=IInUOLh73TyCSrn4qchs4wJ5V1MmQyIuVEPi+GdU2nAvkCXeI5vEBYSTBUF/rmWaLx tdxWOyHR45ODUesND6AO03HpSF3VmT6lEfGBQTDzvcfgUM+3U+dg0Fw6ZpBFdA8719bP i2xXLJriUALBlS1eiAkMWGloT2MoJMsV6l4VOnSdABc+oCzVuq47W/YDo8g6+nXmJPiS 7gyhrHPnuyJDUjcq4H8rb5dGUDvoJZOdKbM62X+AsFfV/IqM+dR55HbT5xXasJCxlSDk Wn/4YIjHb7p3fhcLa1BX2DUplIYi1nUW79Nnvnoe8UcelzHA2gUTaIoVCfqmv2p1vhuX v+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tAdOaJW9; 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 s21si15789518pfu.287.2022.01.24.15.04.39; Mon, 24 Jan 2022 15:04:51 -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=tAdOaJW9; 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 S1841995AbiAXXAb (ORCPT + 99 others); Mon, 24 Jan 2022 18:00:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1577770AbiAXWBE (ORCPT ); Mon, 24 Jan 2022 17:01:04 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 885FAC02B8F9; Mon, 24 Jan 2022 12:40:17 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 4EE90B81060; Mon, 24 Jan 2022 20:40:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54153C340E5; Mon, 24 Jan 2022 20:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056815; bh=PhaiHvgaJpNLluoQ655csgJdmKRf0MjZyKXxTOJ71MQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tAdOaJW9I2PiRCnPpNBEsfTMJP07qHZaO30QV37u1wRsFTsKbdG6k45lujiTQROvs UgjKBP3arPgZKpME78YoN0vYwDqbEyCKKOH/IWLxedQFAdU8m/lay9zLbaDSCQ/nsA EbAyI+sxiAWTkFQT0NkWs32c5LWD3I+vX9mxfT78= 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 5.15 608/846] net: phy: marvell: configure RGMII delays for 88E1118 Date: Mon, 24 Jan 2022 19:42:05 +0100 Message-Id: <20220124184121.993809745@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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(+) --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1244,6 +1244,12 @@ static int m88e1118_config_init(struct p 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);