Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2855038rwd; Mon, 22 May 2023 05:29:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MxXbqYbWHDPv0uoQdAJWAZmUmtbP83Bba6QUBAh9K/2T6h6mG5ZTdpyE2zFufFADARy8E X-Received: by 2002:a05:6a00:1ac7:b0:645:1081:98ec with SMTP id f7-20020a056a001ac700b00645108198ecmr13859308pfv.13.1684758547891; Mon, 22 May 2023 05:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758547; cv=none; d=google.com; s=arc-20160816; b=0KmlV5pGugJ+lLunL3H2IsvVyfGWmzhwmwYLpgHTxn0AMqnxYS8WotYKmXcZyYuaZU sUYFRnyVTEWCddONZqTqb1cHaRUOioVyaaylLjxtBpyg6UvZ/BrRssCD8MLG/QlSH8yr Kv07Tl+g6DlZueyrXBJ7xgk773U48KmN57nPhZ8xPPb0m+da1p9ojI0d+QYmIxEWlX9z Gi2PC7gvyVvMPNmlBihNJ7WrWyshIg/L9sX9qpt/qn0IBy0p8PkT8Y4w7yKgE7GjzP83 nH9OUMDhHjTEAMLfJpu4/W5wezMExzqRTP81kWPVqDFVRf9egWFwyXXLRw5gt52APmEz RjUg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LXWcb5B2+vJzEM1ajF8yrjUWQCkaIrKdZXzgLh1rBzw=; b=BOkUOQ0rrxVyS39q6JhBxlIhNmOnhk0JbpIj2/Uhy5yePU0WVfcuFkrHsLB3q03d34 /ALskdd1oqruKvH/thYNrb3THPjL2UYVIfmnvpXr08LhEf6lUCxTicTodw5OdWtOadzH qtT9dVEPt9TCLv11wXKvKiF3hd/r2TEVLUY94VuD15GsTb0zSuGldajlyY/j6fXiy6So FmcLIqZf51Bv4tqHkVYN9wyEKFAPEeAdQOPRdQJCrVVbN8gRu3wKX4edWL9Yp3wVM9J9 Cgs8o0GrrAJ4zrp3gsjj/hjcLkcfooAATnCr1MXqe8rmdXfJ5EuA7qjJ+Mkrs8zl+DDp 3h3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=khhO8hLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020a638f15000000b0051b718151a4si2436369pgd.201.2023.05.22.05.28.55; Mon, 22 May 2023 05:29:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=khhO8hLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233873AbjEVMTO (ORCPT + 99 others); Mon, 22 May 2023 08:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbjEVMR5 (ORCPT ); Mon, 22 May 2023 08:17:57 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7191BEF; Mon, 22 May 2023 05:16:43 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-96f99222e80so449236066b.1; Mon, 22 May 2023 05:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757794; x=1687349794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LXWcb5B2+vJzEM1ajF8yrjUWQCkaIrKdZXzgLh1rBzw=; b=khhO8hLijzVbaNMGFVCDvnqJ4dImG84zrCI76PV6OxcquPDu4U5AhUaiUPnQN0WOsc EngublP0KhkERGpYyon51lVE+fhOh+8of5CCwMxQhUPiMGCUq4VPQxEOSB0rXpk2SzM2 YnEX5WDiCQEQWLmkTNW0uLJokzkGu2rnCPKWJbRHtGPFf0lJvzlmc4q/AdrtIE74vtgD HHTrqENF4j5Gg+OuH/PA/YvVSaxCmU1rMvLBkcOl+qeY+jpYbcfOLTnLwgaBvkaHmWmA T95oNv4yY5OaB9kQ4FGFCIvBgZskr9F79dhpUv2RW3iy5DGWrKJlQAB7+9CTSIs2QNak Erog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757794; x=1687349794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LXWcb5B2+vJzEM1ajF8yrjUWQCkaIrKdZXzgLh1rBzw=; b=MSfDrmgJTPTwrxy2yoIPfPhUdu/NaxScVSYKR4qN7Ses3jv4Ei+eKyFSzM3d9XEFen VpX4XI/RISfYMVeU++tNLcItE/qRlKaoOkwjmQr3auif+GlRnhsovtvIbBGXl70l92H9 LIZj2Dd4hyTqHHTpKsaXr1nK5CL/L2sR76Npz6J0AoBL7MDpyiU7JKAbRQrtZ/O3rOGX 90SQf5Ci8LeebZILbYircUOtZu/XJHtdDya2nbcPHvq7DsE/5SttD/Jdx1lxTUO2snXd 9viyKuXRUSz61Zz6+0hkuO1sVZMXqqDemH5HtgoKYdmQlB/DsJmLGN4hlUyXUffmekg/ z7mw== X-Gm-Message-State: AC+VfDygBcY0Nc7P34U+j9FgBjA8tQZnJAw+kx2ZWmnYkCtfD9ikrA39 7HgWHpUH9XROsn5N+9MXwTI= X-Received: by 2002:a17:907:7ea3:b0:966:399e:a5a5 with SMTP id qb35-20020a1709077ea300b00966399ea5a5mr8891079ejc.35.1684757793930; Mon, 22 May 2023 05:16:33 -0700 (PDT) Received: from arinc9-PC.. ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id y26-20020a17090614da00b009659fed3612sm2999950ejc.24.2023.05.22.05.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:16:33 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , 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?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 16/30] net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup() Date: Mon, 22 May 2023 15:15:18 +0300 Message-Id: <20230522121532.86610-17-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522121532.86610-1-arinc.unal@arinc9.com> References: <20230522121532.86610-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arınç ÜNAL Move lowering Tx driving of rgmii on port 5 to right before lowering of Tx driving of trgmii on port 6 on mt7530_setup(). This way, the switch should consume less power regardless of port 5 being used. Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index f2c1aa9cf7f7..514e82299537 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -933,10 +933,6 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) /* P5 RGMII TX Clock Control: delay x */ mt7530_write(priv, MT7530_P5RGMIITXCR, CSR_RGMII_TXC_CFG(0x10 + tx_delay)); - - /* reduce P5 RGMII Tx driving, 8mA */ - mt7530_write(priv, MT7530_IO_DRV_CR, - P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1)); } mt7530_write(priv, MT7530_MHWTRAP, val); @@ -2209,6 +2205,10 @@ mt7530_setup(struct dsa_switch *ds) mt7530_pll_setup(priv); + /* Lower P5 RGMII Tx driving, 8mA */ + mt7530_write(priv, MT7530_IO_DRV_CR, + P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1)); + /* Lower Tx driving for TRGMII path */ for (i = 0; i < NUM_TRGMII_CTRL; i++) mt7530_write(priv, MT7530_TRGMII_TD_ODT(i), -- 2.39.2