Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp305295rdb; Wed, 17 Jan 2024 02:30:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkiy/41A+00AsZl8fBWgIPCnAL/T6fTxRtBmjL5uRWP26c0ebZ8eP73R8CCMZjWqEaGYxz X-Received: by 2002:ad4:5bcd:0:b0:681:784b:dfd8 with SMTP id t13-20020ad45bcd000000b00681784bdfd8mr1826515qvt.7.1705487403005; Wed, 17 Jan 2024 02:30:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487402; cv=pass; d=google.com; s=arc-20160816; b=qPQ8VJeZ2Zr8R11uhPtDyvDy+hzCkHEx7r2LUPFaqzSSpo0hmmXo6v+GN5B6AbLFVd h42XLYIvVBclhuEI2jMHDUBHiinbvQuMLe6flqAjPVS2m4qY7RZ9lSQF0dZ31y8XYyuH sUlNxDnOoKRTkUXZysE9hANf2ROFO8BM+jSJmAYy+xw/TgrTys1wI1SZxLO8zqIX5TcQ enG8lxqhxljKaXEQMwH27tp4/qwIVYW9j5YPQksZdaP0LSrqDiNwWnVVG4EJV7H8FgGl 9rXJ7mInUq6qhgbged1KeNilpAWR6gimzxp4pd9e10jE61dcGYztTZuN6ErMIlw4oMPb Rhsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zfeP++ce84dD1NKgVgvHGZi5163rCfdKWO3hg8LgOVI=; fh=c4SWefwPnDBL/h4hfmTNJ3/EdZgKZx+7X7D6BlF0Dbw=; b=CtpJ82V7ZfV2rD1UcHQXzKUSmPGAsC26kPoWQ9oEoqvV6q/y0OZvvLdvqnNKVleNGv qhEOxtSx0E4a5UgjJXyEUMusbdqXNfb03pPKZgzmt2WwO5Z87YdgUU3K1zenLaY7EXsw xFLGtbX/rr/YAv5Q4LNmXzpjqrsWvVBqTtvHQzK5leDJjGWjKyJIv0gJIDmqI5uNDWzd h7zDOxLAnnBSBnmnzUy1xeIDRXo+ToeS24p9OE6cZkWaxMDK/ipUWCf+rCPnDs2WZeo0 1qyPJYNvNFmU6wAcM6wQbbDIH34eYZtzetqM5qFKsIhFix9FYGc+2aEpojPCKYTA/0X1 S2aA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=N32HXSuy; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28837-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28837-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g1-20020a0cdf01000000b0067eaa04ddd1si3121229qvl.143.2024.01.17.02.30.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:30:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28837-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=N32HXSuy; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28837-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28837-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8E4971C24573 for ; Wed, 17 Jan 2024 10:30:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 622121DDDA; Wed, 17 Jan 2024 10:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="N32HXSuy" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 C42AC1DDC8; Wed, 17 Jan 2024 10:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487347; cv=none; b=ZafIEHpk14G4S0/AN+OF7JXZqBYBkbI8WdJZ104HFcxq4cqPqL7bF9kl86o5vNDtLAa8N9SSXXljDD9RBFnqJbiLJPM0Gg3OIHGlKjyjKaMKvJsJS7q6CnSAga6F14bYXoVW/XFJAvKlJs+HzYkScggpPG5hOcnACACbvB9IfZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487347; c=relaxed/simple; bh=fn/GJyMwTt+UK9FTMORdK7KeF7Ng/MbdAFIOD30iFgQ=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-GND-Sasl; b=XydulKR5aso1biq5G3j76fAk4cBJeQInMnnBe8DTnbYKTLnZM2Hl+Xd2vBlloyo4xbjXOReTvZ2UWXHJZ7QZukK+gPLV9zGv2GPRpSTXJGW8eNuvcwT1H2FIFWkadDoMRR5EhySWkNjbXSk/0Yl5zvtfYtzUvV7ZQ4XGYbvAfXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=N32HXSuy; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id DC18C40011; Wed, 17 Jan 2024 10:28:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1705487343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zfeP++ce84dD1NKgVgvHGZi5163rCfdKWO3hg8LgOVI=; b=N32HXSuy1FlHbm8WyQDHEDDv+uuPBFcXr2Bi+LQhw2GFP3ElffuZ/Xiv3dXLDxgp6aS9N7 UMzFd4ZwST898UyPfVXPpCcdmqAOrlJoTOER5tSGNFSiockd2+WkceaWkBlIF93/dqsLws GG+wLuxlSOQj5ZpbMnsjbP3eWvkkGVi6DlLvESr1Si4pFc1iZOCGUKJNnZgyl2hVBpAzIp R95oluJ7Hdp3vEP4gGYMVBVZhpBabXsNQXvZwtFtMjjXQinyU/gyawz1ZegFqcucszBWmg /jEEF9YsZHKV9Ly5sh3nXk5kHct1271wv4izVbcGH5Vg8YgbHuGkh5C4kqi6vQ== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RFC PATCH net-next 3/8] net: dsa: mt7530: do not use SW_PHY_RST to reset MT7531 switch Date: Wed, 17 Jan 2024 13:28:33 +0300 Message-Id: <20240117102838.57445-4-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240117102838.57445-1-arinc.unal@arinc9.com> References: <20240117102838.57445-1-arinc.unal@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: 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 --- 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 d2e861361191..a43178b62817 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2434,14 +2434,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); -- 2.40.1