Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3974109pxb; Tue, 25 Jan 2022 00:22:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMOC3/nQc04ASFceOheFKFRqYo83375Prkblhman61spQiGgHmAt6CRSbHXmyJDrYntS+s X-Received: by 2002:a17:906:4317:: with SMTP id j23mr15292954ejm.748.1643098962954; Tue, 25 Jan 2022 00:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643098962; cv=none; d=google.com; s=arc-20160816; b=pgXasRnYdajUg1RzD4AmW1xPX61+rnUfyWHh+c0im1qh1yprDQKZZjlV0SJ+Lv5ckm PGGJcWml5lqNL6y/WqF4RixvAd2xm0LA79iaRfHTnvSd7i7TF1oYbENtjPWY70M8yyk9 /mL4AtEab+7AvQkeLHCMvUSwETuDRY3st7MINo/B67kt8iiMGgvJ4mHunOb6WVMsRkGS bZH4qMna9B1zoQa5Ny8CBkG5lgovlvXeuqFtdwwUU/YWI/4Gujzpn0H1NXRoYhwlZHrd qP0ey3Nw7zap2bzIuWLhu0BLRv2iJ9q7zO4HNRXq6pJ/K5JcvQG6g9PF24tVpxsRKVeb X86w== 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=ljkVJeWyfaic4ZENq4Fmp/OlaFK5ZxicLD66/E1UV+Q=; b=XH6+OUbMaGytyj2+Xz7hyxKHHosmIP4Zh6qBFIH1DqzpWOg+dLVfbKzVPLzCv2uaxz amCa/whiNsZoYzDRRLtqIAXeSuEB/BJ+DwXTIJRlTAfDQS9mfqIixYGkzrNV6KwpkI7u L/gHSaYZg3DboAI6ZHFjtdw6vzBqr5QrOiHd2aWCTxEggwcksJrqCfrNA4ROh5Efb9vF geXPAsfMYG0E/mkDYYQ/3NsfbWeGvpEPh7JYEronUK3lCTz6WpwaVr2rmkZEsmCq1FBi qUC4w2gwig4kFCQICw1UQcQfh/AsDOo/0DjfF3cJQWhRAwBkoUTVDbcaprstKQG0po0l qjnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iKF9mgJV; 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 e13si8207145ejl.349.2022.01.25.00.22.18; Tue, 25 Jan 2022 00:22:42 -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=iKF9mgJV; 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 S3420734AbiAYCZM (ORCPT + 99 others); Mon, 24 Jan 2022 21:25:12 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:49136 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349527AbiAXTUz (ORCPT ); Mon, 24 Jan 2022 14:20:55 -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 4080160BB9; Mon, 24 Jan 2022 19:20:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21D83C340E5; Mon, 24 Jan 2022 19:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052054; bh=LN39jkHUz74/NBozCkDKwTlU1Stu8vWcvU+ZnywHaE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iKF9mgJVtaBF1aV0EQCCsePg+952A9LluOxvRpbO81ABd2O0y+vCHjeF+Sgloq7H6 MltxGFDvWyrFBdJuF3Wn+PEHUMndMA5lfq2LcKLPSchKodB2PL8qKos1jZ1tvjUGAH aycirkKQxo4CwITBaL57Hm8qNIE3n+amZ9AHdRzA= 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.19 172/239] net: phy: marvell: configure RGMII delays for 88E1118 Date: Mon, 24 Jan 2022 19:43:30 +0100 Message-Id: <20220124183948.571646714@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@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 832a401c5fa56..484f6691b9c9f 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -930,6 +930,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