Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp526706qtg; Wed, 5 Apr 2023 13:43:41 -0700 (PDT) X-Google-Smtp-Source: AKy350bCMzdYV8rYZ3aJG1tTAiZFaO1sh9Xjp39ehAmqglHSlGzMRFHFhM2fVOc5118MLpiingR6 X-Received: by 2002:a62:19d8:0:b0:5a8:ad9d:83f with SMTP id 207-20020a6219d8000000b005a8ad9d083fmr6468760pfz.24.1680727420850; Wed, 05 Apr 2023 13:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680727420; cv=none; d=google.com; s=arc-20160816; b=kbtnnp1tro7OYSXGOu+Q4Wrv2HlBUWi1zfoJuOOmbDs3S2W/Hrb3xMewfVswEOsYTP rl+huYYmcczWH1tUAdtgjMje7cF/+WdZnQLSAV6cYl2ASIjYxHasH0I2suIPDFH3aLM4 MVz3QFdtoGiaC8w+4WbunVVFeQM4bvvJ+jLuoehSmfJ4hC8QKiaMz8/b6nBoXKVkNChU iwC4X6ogscafnMo6m5b3VkAudBQ15HprH+SQxpXoc11MXfsFZj9rSs+aTfiEIaoCL/FT xBsFEvtbRDH6nSlz7l1CXx0rKEfRcBHPdlKjxufPbpk3WGyx4DWrUCJqaiIyv6qJ+sJn ZPfQ== 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=L71GAIfC9eueAFpPEM3jN5dqLC94Zw3zCdbNg29s88s=; b=uydmE5AMMG2TEwa8hduyKcMhJRHAThGUaEi+Gf7XW6vyhwShW5CLW7JqqzvopNiSK+ nIzlhl8B5M8+4T0a0JU/XiwzghzG3awxp5I2uyN6Sz4rvouuqfKFuvHA+iqlx4qjOLdn Avql2Ndz20EkuH97DBWQZQ5sWsrlStHJ7b7V6CNiw3usVb3A79FLRdUd7ut9CSGdL6/g 0Kw5XY8GdJXdKCclBKiD0ueKb6Phn95dS1XOORAOWI61hScp1nZoLExOGb1Wvbr4G0mj ynrRLlSqMSD82wT7qtLPycpKjtxbQ8AE3SI/APAh/Ca3ISNilzh5nf63y6BCTV2OVK9e REbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MiTmmxWp; 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 h9-20020a654809000000b0050126b5d089si12809210pgs.386.2023.04.05.13.43.27; Wed, 05 Apr 2023 13:43:40 -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=20210112 header.b=MiTmmxWp; 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 S234598AbjDEUky (ORCPT + 99 others); Wed, 5 Apr 2023 16:40:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233939AbjDEUkS (ORCPT ); Wed, 5 Apr 2023 16:40:18 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 199FA83CC; Wed, 5 Apr 2023 13:39:36 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id l15-20020a05600c4f0f00b003ef6d684102so19157009wmq.3; Wed, 05 Apr 2023 13:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680727172; 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=L71GAIfC9eueAFpPEM3jN5dqLC94Zw3zCdbNg29s88s=; b=MiTmmxWpXe2fE/0oNn2g7hsWoWsYD9g6VdQBcZ51eEukbBygXXyawyTPJyOfz3Z6p0 cP26KmucIcfZDP9eWNZ9t4k0cF8AUAK7UAY9OotSb13c1HaJt06z/q3qZQG3H7y8HLaZ bblYlI9ka+HOwqFjA9pVrrsTSZ+mydgTe2Sx0GM9vIc7WubqO42qrjM/EisAxYuNoQxO ulZq8U4qvEP4vJ9RYD6CeXD/5+JVKy/ZSTvRATHaZYCwxUHyv29Jp3xr9D3szlzLZN0U 2c+L1zloAfqFXxjfTexsA/ojqOrhJj1rcTmrVEm8yWy7/UCp4/amn+U06U3fmp2bjGYn fMGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680727172; 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=L71GAIfC9eueAFpPEM3jN5dqLC94Zw3zCdbNg29s88s=; b=S0ttEVWXZMLZAAjk4xPPhxxJ1EEeDkzKF/GXnZHU9n5+X1X3ayF0xwWqVAmQji7LGu EtE/Jmnj3rdvOoJd0rH7hfbyAiFIslR6EPPimX6E54nCKifnkIjh7p5gm7Pt6qIj6ULO HvOfdANXyiFv8H2To09klLxuAYRu8VoLGSxtyHYuVhR07U9Dh5nRusRcwmJj9WA1nU4n TCvYHxZLI5fRYlWzqr31grkz3i8gXwsUM6g+RXBxq/IGsQKPaeF4c43U5yDlYd3pr9+u hFWEbF0Wxw88LYkefJHSG1/zjXyL7vGKjjOK0a1R4O6q9nCgpkxXDCgMTWlxNxxV8ZOB Q3CA== X-Gm-Message-State: AAQBX9c0QQtNJ8CGK2ckzSBDvCUlu2fMUOcmYekrjoN17fnsyhXZ5Uyu 0aX83v4OGxJZIIeF3WBTKCI= X-Received: by 2002:a05:600c:218d:b0:3eb:9822:f0 with SMTP id e13-20020a05600c218d00b003eb982200f0mr5728897wme.30.1680727172707; Wed, 05 Apr 2023 13:39:32 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id p19-20020a05600c469300b003eda46d6792sm3259867wmo.32.2023.04.05.13.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 13:39:32 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= , 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?= , Ilya Lipnitskiy , Richard van Schagen , Richard van Schagen , Frank Wunderlich , 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 12/12] net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup() Date: Wed, 5 Apr 2023 23:38:59 +0300 Message-Id: <20230405203859.391267-13-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230405203859.391267-1-arinc.unal@arinc9.com> References: <20230405203859.391267-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=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 --- Emphasise on the "should". Arınç --- 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 384e601b2ecd..6fbbdcb5987f 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -956,10 +956,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); @@ -2227,6 +2223,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.37.2