Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6658448rwr; Tue, 25 Apr 2023 01:33:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6loplJZH13Ly3Bx0Npy45NB0x0eQVRrIwLjDSNGYYg1799F3TnPYggEYUQ2niK0tVR87Ih X-Received: by 2002:a05:6a20:158e:b0:f6:592a:7e3d with SMTP id h14-20020a056a20158e00b000f6592a7e3dmr614729pzj.7.1682411614517; Tue, 25 Apr 2023 01:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682411614; cv=none; d=google.com; s=arc-20160816; b=Y5LnyB2qBGTrw/hWYkGPuFft4zY0xbOG75lKrNIIAqkTBCCSyFNiu8J41ylZtXtemO uznvw8VXCdb0Ibbrx5bJ6hsN5l3SU8cMMSQ8WBlUM3Ybvhs4bdpLNvxlqCuP9WUN72Zz +as752dSUDG+Hkr3ahh2YpXuHksBfrVNrJtTu9zzIy6ipcvpmr1wSnCI/j+n/MsJuh6l vrZ+/nNV1C3mZeKTdosjjpsxFGY3tRlXJsIqs5MhenK07zxqF4wL1s1Lt4DZX+MH23U4 HUFHoArTGel5uCdOmY3OKFldXgzDps9qgvjF9c7L1luQsUhhCujag4iER3qSul4vM2/m w01Q== 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=JLm5jhMS6rFgBzI8z+1W06D+EQwsGdSNOt8/QtnXpBI=; b=D4ZPYVzCoACz3xws1aPLhMKzlU315zWviAIx/K6o+bkCHZbSguzYTwDtRIuFrtcVTy 4S7j2ly2Q/U2oCHupHSfXucSgdbW5u9+rtdXTwdXOC/tQRLRV5cswe76YAPIBLW+1c6E b8FaaEdqUFlZwQ6lmO0GxiIJtZ9NpHDxwvb9nULjv7+ghPRpJPXL/Aux4C7SuMLCfXEh 86yRPuJC1RpA239KvLrebjIJX94+wrVPDENg1JbYCInDKM+hQ3Ltbl5TmLoQ4DOJG+x8 OvLEFFG19GwMQQCWaV2Eky/JnJshMdIvSRD5d92AW8EaJd8f8sg4RuDQr2HLnmWCGvQT iS+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Ap33L6TH; 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 i7-20020a654847000000b0051b1542d6efsi12826077pgs.213.2023.04.25.01.33.22; Tue, 25 Apr 2023 01:33:34 -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=Ap33L6TH; 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 S233652AbjDYIc7 (ORCPT + 99 others); Tue, 25 Apr 2023 04:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbjDYIbp (ORCPT ); Tue, 25 Apr 2023 04:31:45 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301815FF0; Tue, 25 Apr 2023 01:30:46 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-94a34a0b9e2so785275866b.1; Tue, 25 Apr 2023 01:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682411435; x=1685003435; 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=JLm5jhMS6rFgBzI8z+1W06D+EQwsGdSNOt8/QtnXpBI=; b=Ap33L6THf74ai+r6w//IbTznSDtVocBHM7PTMhbUVfihCpZZoQIMHkxxJxGeEJcFC/ m7DTVjUb7UVORIdFwiVaP2fX40jbGS+gPtiHiGOl/PJYrToSEyBp8AYAo8enkovg4GFT 4UNqxOpTWde9ytaO7rCQgHe2y9ifeACQWjT3Bwk2AXYZkf0BHGACL98CiV57oeUR7jr0 uJQO69lTIf9GkCBwWdtWCNNfVIZQkCQw8pFL2zFYnURSiNEGHW21iFFJlv2xR46grMhS YRwwT2rwFyD2euHDZhxdEyl3AQfWZIo0WFToBHaa1RGWxwnjIfqla7zrbTT0UglGusru GM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682411435; x=1685003435; 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=JLm5jhMS6rFgBzI8z+1W06D+EQwsGdSNOt8/QtnXpBI=; b=jmm5LV/nD6x5ZwHeM1QNWB3doP7cJx+48I2AYGvas8LEE81Izle+eH+hNj9lbgqU9L B+uM/T5TTKZ9gSEgShTkx4J+OFloED/iCtTeRFXgjLP1dFa5aXm8ZuVP2RAxwrGPuM5v yw7JBTIlNjqlgqOFuEuEkTC8iyicyPQqGzMceDtuESK/IDdMQ24LOyIslxKo0UaPHsl8 8aNnjrgy4KImGIc8hmav1/ueetWsh65oFoJCcctUWq/2i6qEZfll7n8McsxT9UfE51Ie SgSwvNgz+GtoYdqxNFNiba8PZq3hfIR4XP4LDIZ4OnOerT5/DK257jD2PNL0VVRjkM6o SfaA== X-Gm-Message-State: AAQBX9dw8OH9Ug6r9gslRyJwO6ALEUhK1uWGp/+6XKVc59duvbY2Utkb IdRuMJzJnUIqMlbhlVVX7oQ= X-Received: by 2002:a17:906:170e:b0:947:c221:eb38 with SMTP id c14-20020a170906170e00b00947c221eb38mr12120196eje.13.1682411434710; Tue, 25 Apr 2023 01:30:34 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id mc2-20020a170906eb4200b0094ca077c985sm6439028ejb.213.2023.04.25.01.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 01:30:34 -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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 17/24] net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup() Date: Tue, 25 Apr 2023 11:29:26 +0300 Message-Id: <20230425082933.84654-18-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230425082933.84654-1-arinc.unal@arinc9.com> References: <20230425082933.84654-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 0108af681d50..468c50b3f43b 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -938,10 +938,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); @@ -2214,6 +2210,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