Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp651746pxv; Thu, 15 Jul 2021 12:30:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf10JUMRWXqWeI/zEb55+SPKO2mSIFcdTBSQm3/o+6bW7lzz2pbjqAIeAYJPY2RgkThvUJ X-Received: by 2002:a17:906:8158:: with SMTP id z24mr7237743ejw.359.1626377448763; Thu, 15 Jul 2021 12:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626377448; cv=none; d=google.com; s=arc-20160816; b=HfeRJdlS6QvfRPh1DFvYDB2VBg7lKCW7YSr44lvl0fni+GuXDDNXB9xRc86eA9Hyk8 /r0T5+/s5sxBvOIM3rFTeMcuI9pTlyouJmcoXSd1/dP3xifKZBq3C+PYlJN0q/38SV+D ESwqEotPdJq+Dui3ac7GG+7fOFNW2BMag3RnmZMmbtyOsbkJlazPCvaVqRm9PSIQNuc/ mT6FqHq4dblROiRJF4ktitpShXQDT1qPqXGzHwxkIyxJFqaiUmr/2SnK+VcR2AtgB7ts v1ASAfdWhCBycyza/VeUp+KWZFS4dnVKLvcnoLfkaLtQ+ziGrDakH8yHMy3THMcF2FMw SVtw== 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=mUIFgZw7GRzI333sG55q1eP7jxXQcppFlgejGOykIAM=; b=jAsD7FTuyMXTrl0F3JJCCZ5Ci6o2Y94cHATXQcDvLdWS/YwTg5dBpTo8XocwOYbYnF YKERhAdaumjbkcJYW0nrEMD/FGak17X6e2lltfUYDaC/dUQseRg2ZlUvJfzLwdViy74T Q7aIEqBT9b4C61S9yyAuVCzuAdAG1gAWltJbzN4aAfEPlQOZHUqLrO91Hz/JRCFQHfZw qenrFc2prqZDuN2SPQEr5HeBuUzocq/ZdI/WoLoOauQja+/fV5ImM0EoYKENaPjd3thX eNsm3C0J5OyHzz8wh5GFDYWOjTEy2STferWsotnFafIkLEwaseNi3IlA3KuoSPDvPEGG wkzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m9jU7pAU; 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 n8si9573256edy.1.2021.07.15.12.30.25; Thu, 15 Jul 2021 12:30:48 -0700 (PDT) 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=m9jU7pAU; 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 S1344648AbhGOTaA (ORCPT + 99 others); Thu, 15 Jul 2021 15:30:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243962AbhGOTK0 (ORCPT ); Thu, 15 Jul 2021 15:10:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0C4E61285; Thu, 15 Jul 2021 19:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376045; bh=8Uvy0ZR2VNDF31lYFpuwH6pxmHiXXDSje6pg83UwUio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m9jU7pAU3sU/C8tx5H4ld0JHgOKQnMCVf0Bhi8UTwOzkBinDmQcK2rXkCPSZHYZCg 3wOqDmvlh1thD8qx4a0rd9bmZ8JPIKCtuX5NyliZTjDrzRlr+vzd3FAIcPTKSO0lTT cry5YuuKtx23qbpDWpl7YPMflV6nB/x2Fr0PSN7o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Radu Pirea (NXP OSS)" , Vladimir Oltean , "Russell King (Oracle)" , "David S. Miller" , Sasha Levin Subject: [PATCH 5.13 102/266] net: phy: nxp-c45-tja11xx: enable MDIO write access to the master/slave registers Date: Thu, 15 Jul 2021 20:37:37 +0200 Message-Id: <20210715182632.006335242@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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: Vladimir Oltean [ Upstream commit 0b5f0f29b118910c89fe249cdfbc11b400a86a18 ] The SJA1110 switch integrates TJA1103 PHYs, but in SJA1110 switch rev B silicon, there is a bug in that the registers for selecting the 100base-T1 autoneg master/slave roles are not writable. To enable write access to the master/slave registers, these additional PHY writes are necessary during initialization. The issue has been corrected in later SJA1110 silicon versions and is not present in the standalone PHY variants, but applying the workaround unconditionally in the driver should not do any harm. Suggested-by: Radu Pirea (NXP OSS) Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/phy/nxp-c45-tja11xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c index 26b9c0d7cb9d..b7ce0e737333 100644 --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -546,6 +546,12 @@ static int nxp_c45_config_init(struct phy_device *phydev) return ret; } + /* Bug workaround for SJA1110 rev B: enable write access + * to MDIO_MMD_PMAPMD + */ + phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F8, 1); + phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F9, 2); + phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, VEND1_PHY_CONFIG, PHY_CONFIG_AUTO); -- 2.30.2