Message ID | 20240301-for-netnext-mt7530-improvements-3-v3-3-449f4f166454@arinc9.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88270-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp990330dyb; Fri, 1 Mar 2024 02:44:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8lvwodQW3no/PGeqH6FfDvz6ONfiTNQnU4/Yr0TvDJ20a4prrII29VNck+r9XN9RNtgKpgEBdjWYZ7NfLGB5d001nhw== X-Google-Smtp-Source: AGHT+IFZEam058SD2ckK/m5vO4vyvyo+D8Y5TX1RciciAgD/ItpCRTYs+dj5zb5bTeFM2nsItOw0 X-Received: by 2002:a05:6a20:12c5:b0:1a1:2767:bc47 with SMTP id v5-20020a056a2012c500b001a12767bc47mr1207652pzg.25.1709289878205; Fri, 01 Mar 2024 02:44:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709289878; cv=pass; d=google.com; s=arc-20160816; b=CqW40LJfOC878jWcGy8JOE/SCxcTRNjPw/LvNCyGvMoQqb79qVA+3fCQr07prCmNqD ix9x0syCzWOkWd6QZKqVwIziW2yVRq/Qnu5fctKRrJrxD1Ua5MPN2QxschfNiH8HnSDh Jvmz6aIZrP9Qj9yotbX/TXE57Eh2C/J912kcbZOzkZhRhCMsNLHgUBF4gxvasXH7s4iM MVWS2LAmv3UZ11EadZJWmhz+3pfipvHo4a41M6zUkW880n1nnlaTupCdkmIll089WiQv yLupbRQi7EHc4LnbMfS811w3nhD5aiYyFNG8u97fsWAmS1vHjrWW3M4uhJrUutBLu8xI Khvw== 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=xNlE86XmqkSplYYMvvd74gD/RbF2aUqtHPBgVCVc3H8=; b=otLoPHMD+lz5khHnmWshiX29/mGL+vHSgmigFVVMLKr9mCV+LXyoIYsj7EEX+8OLQH cJOqlqebbuun03h9/C8LW/nqTmVpPaGz2EDwAZDuZ4U95+yvWM4E3AvLdRbXf2NvGmLP S8RDFycOewkfEN3nDraDACOMcmtFKte3NHPpPNU86VZ8amQv8Z55VdZ1aZNl+aJlEnJ1 I3Xk2hSUXckZMijiFVdFoyVdcdjpPZvi/08x1bO5PlBdHq8wanbjV58P7rvddwk7Hvey LZiu9uVFC/ri1XKnc65rfsHizuIzlRapvqqICEoTLOckcy4aM3JrwjoQZaQhWPlGLV+K FXxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kcz6v5q7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88270-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88270-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id sn6-20020a17090b2e8600b002903e315e4bsi3496083pjb.81.2024.03.01.02.44.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:44:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88270-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=Kcz6v5q7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88270-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88270-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 095E1284F73 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 10:44:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0167D6EB64; Fri, 1 Mar 2024 10:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kcz6v5q7" 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 288DE20B29; Fri, 1 Mar 2024 10:42:59 +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=1709289779; cv=none; b=JMs48myouFoLzuIv/2W/aEWg8pw/8vZxaW8Rw4h8Fx+izI+m4R5C0t8NcddrYXFr1Sx4al8mxMy7RBz1vHN9wXFfQcZKnaan3FZ3/cGJang8GrteRwWplOwUBO1VWZGr5rTz2hRT4QbjFrtcoIwaMNaOAzah8EHx0GjQUjCOYnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709289779; c=relaxed/simple; bh=wUpyw43HcHACBQ/8AUAV0rAR4ahB+zKQE8l7LVuV9Hs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DiEk8RcVEhrnTO0qfq25lPtZtrw0n5hBkyZP3+blUcolMx4LU8YPHasq7Jjyv6UCqEXH/eM3bmqmkP6ilEFR3N4UgDHEevf/1+DfALb+fxSZbRVvbPlveAI/6XoH4t8yji2W73rTZuzAL32plhKMpPFcdSTATxyj9RLTZYHvqCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kcz6v5q7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id DD65DC433A6; Fri, 1 Mar 2024 10:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709289778; bh=wUpyw43HcHACBQ/8AUAV0rAR4ahB+zKQE8l7LVuV9Hs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Kcz6v5q7MMQfEEkzl/ykwxZ+ENVTtozqoGi5h9AiOT9Pix2I0OeWyL9AYgxRRxw+h 51Lmfkx/wCQbGuuvSIVv7Nb02WGATTe6mFnfI9CS0/2PnrnABUi5II/BvjOpzkr9zv qHQpxKGFEQxHLfpldcbfhdOtg+P+sXFKIHcUdHsVMoFwLlANitHe5JYVezWSxLmWwa b9jksH9thiopFLwLBkMMxuFRJtnC3GV85nFf4qOGdGjjkLs7Ld/886YON2+es/aYKr xWiUeY1aGWIBZ+Dt0J6YJ/e0IPmZx7KstidKZINX/syjmEkaNKuxPmwQZ6g3VpXlov lQJsopR/CEunQ== 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 C3B85C54E41; Fri, 1 Mar 2024 10:42:58 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay <devnull+arinc.unal.arinc9.com@kernel.org> Date: Fri, 01 Mar 2024 12:42:59 +0200 Subject: [PATCH net-next v3 3/9] 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: <20240301-for-netnext-mt7530-improvements-3-v3-3-449f4f166454@arinc9.com> References: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com> In-Reply-To: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@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.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709289776; l=1298; i=arinc.unal@arinc9.com; s=arinc9-Xeront; h=from:subject:message-id; bh=ecurYkRWOTqqGU2AKHni4Fzup3XR61+gzZ3STlqM5Z4=; b=EcZZqAw0Px2l53CBDBN+OKBDR6BvhuwtATODCOqg0mePBSm4mjtM0F/hIs6zkpLPjTmfUVOAw G8CgcELxzmeB3sKfMJqHSwGicDtnlFN/3Ff4mY6SeGKl4qPnLVboMNF X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=z49tLn29CyiL4uwBTrqH9HO1Wu3sZIuRp4DaLZvtP9M= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-Xeront with auth_id=137 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: 1792320343477058301 X-GMAIL-MSGID: 1792320343477058301 |
Series |
MT7530 DSA Subdriver Improvements Act III
|
|
Commit Message
Arınç ÜNAL via B4 Relay
March 1, 2024, 10:42 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);