Message ID | 20240208-for-netnext-mt7530-improvements-3-v1-3-d7c1cfd502ca@arinc9.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2709282dyb; Wed, 7 Feb 2024 21:53:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWC51THX3nEEJ1/JVOIbtHXvR0lg87iYdj4GNrKMiHCE4CXQXv70aTQUEFeWQEOYME8XUXiYHkZJBQghAnpbYX+3NkxQQ== X-Google-Smtp-Source: AGHT+IFOBQN/OO62uHVGct7ZJNhtW4CiC9623RYDO/rNdZ0IWusjyODV+CW57KfxKnPgqdBUrAW4 X-Received: by 2002:a17:90a:6d03:b0:295:bc73:31c4 with SMTP id z3-20020a17090a6d0300b00295bc7331c4mr2862985pjj.11.1707371609396; Wed, 07 Feb 2024 21:53:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707371609; cv=pass; d=google.com; s=arc-20160816; b=FMn8j2CBizWm4QlHN0AXCfGCML1112PA7cVKikFQD2//hUjjwGNd6EiprqKMQN2qCb C8HkSRNIgnbKpk2uiFBxwid3fPTPV1QH6G2Zoy+RZ5rgsBlWedGmCLLP/gXbVJRDngoG EFd+2COSUTlwEP55RCyiQ8FD2bR+U/4qgTUrbtHyf5rJdrJM1KGFwer++I+xW7ftrLZt oNvhc0LuoD8Lp4I1T1IQa1EVwGdfp0aNzdK/zqBlHKEvwmf4YPOVfa/3AphRzGMppiLZ gprEcy4VH9RxTUBXH9o8zhaeSuWGgglmcxzUBs6E/JbFv+z6hOoXacbo2vRZxOECrA2G YnYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=d/uU7W/uTpzzuvfgVU4nRTK1vU25pcV789OeP+1QpRA=; fh=ZHkD8v8xYOV3XsxF+EfzZ61ugEAFHYerA3T3Rt1/aoI=; b=n45+VMy+qnbv++IGh6ATg3/1Rlh4Z0ENpCprmpW29aJxXV3Yrqgc4t1lm+mnNOmMKJ mS5W0+mGzAP1vbQ30L8xwgfJYOnZbJqJfKehy+l2VxK/fvn7qQ5iiqs1ReQRm93UkeRp NYZvxWBZPvLJvQe5qv42eewFyGR3a3dU39QvSM5iROtcq0MGFcQSp+6wG240slZYQBfx UV5ur5P4DLzIRnF0KMIoi5YwV7qvpNTlAIAXCZ2rOv/MLL8i0K7LnofL7rD+IjovjC1u Wz/xitO+fQ/g8VhVrjAJg3yM/f6ezOdAobstdD68cem+T5Aq4wFqbRPDb9wm1iPFKxZB MWCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cBHOSC7y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCX09QSkbfBvAbw0muL5wM8xq5l+G8rKC8yePSIG9Y2r9DEPBS0Y6HSltO2t+tGw45Hq1dKLS5RYO2cY4rVinrmlb5Iong== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n14-20020a17090a4e0e00b00296e2a92793si655351pjh.94.2024.02.07.21.53.29 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 21:53:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cBHOSC7y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57478-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2EF17285D4A for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 05:53:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76E846A328; Thu, 8 Feb 2024 05:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cBHOSC7y" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B77567C58; Thu, 8 Feb 2024 05:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707371493; cv=none; b=nZQOOjEuYfhBi2TFhlQVbV8LeKonVoXTQtuG7a1Cy7MfawCriqmp0rklmxT3eeRsy/O5S9X8goeLCOiSW/kRnReZRATXelP5QJovK5cTiXdjlVMf6H8mGK+DikcAGMBv1JcrpjhbLKtDvoFboyHy3CVAEmP+VfeLGdhWo56xyfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707371493; c=relaxed/simple; bh=wUpyw43HcHACBQ/8AUAV0rAR4ahB+zKQE8l7LVuV9Hs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=R5iFPvF205TJ8P6SwCLWwDgr3yX74QlrV3FPRn5yiDM5UALFN2nV+CpmreWy3moapLnZPlD1POhy6Rih/4PUtqiZgwpF7w6BSfawI0ZZStLxVSGzU5ZlrNRc8ClZlPel10teAtjcU8GdxBC8aDFwlw3368IegvvnRcha5jiLcfQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cBHOSC7y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 39B60C433A6; Thu, 8 Feb 2024 05:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707371493; bh=wUpyw43HcHACBQ/8AUAV0rAR4ahB+zKQE8l7LVuV9Hs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=cBHOSC7yaVTnS02Cyl5GFht/49PLZEWbToeZA1f3LgwWor/PoTHEWZpefJoUgPiSk OoVYW4ReJNmizZN4RebdXp2JRM48fdCnknKIGcyTQ2be0b9MdT1Y0u+AZ+dHi6bFKl 4jrTVL4gvxm0gsS8iEUYdhNAtZmeAKBGVJC+oBz/sXwK7j9eH9u4v2aLuXvECNcK36 j+8suBpSxPlC7mXSqT82PVkvb4xjxvTkcAxYBVB5Yyz0U+VRlOwj7cTofPbysKVf7w 8i4mN4/0/LVJ0od3RcxD7odaz6SmVU0IvVAmy1COIRIBQEy4UajiGHtIEMsADsyA+i vjIf7GYUx/xvQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E64C4829F; Thu, 8 Feb 2024 05:51:33 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay <devnull+arinc.unal.arinc9.com@kernel.org> Date: Thu, 08 Feb 2024 08:51:31 +0300 Subject: [PATCH netnext 3/8] net: dsa: mt7530: do not use SW_PHY_RST to reset MT7531 switch Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240208-for-netnext-mt7530-improvements-3-v1-3-d7c1cfd502ca@arinc9.com> References: <20240208-for-netnext-mt7530-improvements-3-v1-0-d7c1cfd502ca@arinc9.com> In-Reply-To: <20240208-for-netnext-mt7530-improvements-3-v1-0-d7c1cfd502ca@arinc9.com> To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>, Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Russell King <linux@armlinux.org.uk> Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens <bartel.eerdekens@constell8.be>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707371489; l=1298; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=ecurYkRWOTqqGU2AKHni4Fzup3XR61+gzZ3STlqM5Z4=; b=b9VDNMoY49Q3hQXGaelaQQGU9njla99nADPmBBsMFgG6+sLkgV6dTFLgcxR3xwicbe8v5YjB/ QUbfKb63s/bAWQS4VVEgivcMh5LXkwLvTS/ghzQdKgOVOMBAzfkIBiJ X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=VmvgMWwm73yVIrlyJYvGtnXkQJy9CvbaeEqPQO9Z4kA= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-patatt with auth_id=115 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> Reply-To: <arinc.unal@arinc9.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790308892575157256 X-GMAIL-MSGID: 1790308892575157256 |
Series |
MT7530 DSA Subdriver Improvements Act III
|
|
Commit Message
Arınç ÜNAL via B4 Relay
Feb. 8, 2024, 5:51 a.m. UTC
From: Arınç ÜNAL <arinc.unal@arinc9.com> According to the document MT7531 Reference Manual for Development Board v1.0, the SW_PHY_RST bit on the SYS_CTRL register doesn't exist for MT7531. This is likely why forcing link down on all ports is necessary for MT7531. Therefore, do not set SW_PHY_RST on mt7531_setup(). Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> --- drivers/net/dsa/mt7530.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 5cfd303b773f..296711fd5c43 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2451,14 +2451,12 @@ mt7531_setup(struct dsa_switch *ds) val = mt7530_read(priv, MT7531_TOP_SIG_SR); priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN); - /* all MACs must be forced link-down before sw reset */ + /* Force link down on all ports before internal reset */ for (i = 0; i < MT7530_NUM_PORTS; i++) mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK); /* Reset the switch through internal reset */ - mt7530_write(priv, MT7530_SYS_CTRL, - SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST | - SYS_CTRL_REG_RST); + mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST); if (!priv->p5_sgmii) { mt7531_pll_setup(priv);