Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2418754rwd; Fri, 26 May 2023 06:25:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7gfxU8kEA2XVuDsw0qdq+LCTrkP8TWWrDNzvReV22Ld0LKz4/5rhdrljE/3/Mhg1Vk/u/V X-Received: by 2002:a17:90a:9304:b0:255:96e4:2eae with SMTP id p4-20020a17090a930400b0025596e42eaemr2351075pjo.46.1685107540698; Fri, 26 May 2023 06:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685107540; cv=none; d=google.com; s=arc-20160816; b=DBTx3EV2/uSKe4zgT3vz3I3jprI2PS3WIsLur5Aifyhg9oieBKx2PaKYGQLvFTpz81 py8uafo0joNYxPForfbXppn4qWd7at27fVYY6VAdR4xnBkBX5+v2+LQoaM6TsMuSobVC tVoyp8DphdXwIadtGiCUOko/KM1e+Hkqk49qzEgu3KoeAS/cQV84Ui6ukjqRiuL6/rpz XHbFbL2ouHIQlV1V5Sj9aDIe1u866GO3FwZsaBn3h5sdW1FNYFLzU/8iHf9GCN3Zaw5r NywNQfYnVAmUGCJ0bW+0isFdTFflFTyLL8ZlIvK/ec4Ai7hmZtB4lggURHC3HN97W9s1 9zHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sGqkPEwwAUavSeei9EN10EkpOiDwc0KPU98JvOkeGrg=; b=wqwoNz+Ff35nqIcgPT27FT3VjpaUXYW5vd0y0sK/PSiUN/BvA3yOUHu9sa55qA0lCk 8vMczgJCJ0W6wFbbWmSEMVS5ISy/Ox2f+TnW1np3kza+AcispBbrNzu7DU86VSXIC6Df 9FoGjc1nN6vN33YZfLo/VJsOVxbTqQoc9U22PY3f79FCVCVlPjskbtE3+58odO1h0sq2 aK3r1TH1uNiRdd9OXqUegaEeFbIUxtAPULNfUB7aWYdoqK7Y1jmk9oxyZLRIR4TSyrXh gGxAeh1dpKzAgAys/xKssrK9CpLPQopu4OpG4t6nKXq6uwOdRWRp5+o949PAAa9MgLOp tLlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oRZs12wP; 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 l131-20020a633e89000000b00534897b70f9si3525881pga.29.2023.05.26.06.25.27; Fri, 26 May 2023 06:25: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=20221208 header.b=oRZs12wP; 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 S243568AbjEZNRr (ORCPT + 99 others); Fri, 26 May 2023 09:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjEZNRp (ORCPT ); Fri, 26 May 2023 09:17:45 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770EAB2; Fri, 26 May 2023 06:17:44 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-96f7bf3cf9eso138697766b.0; Fri, 26 May 2023 06:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685107063; x=1687699063; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=sGqkPEwwAUavSeei9EN10EkpOiDwc0KPU98JvOkeGrg=; b=oRZs12wPYDV4ZHJF/NGbRuAA3DQsHTN2rPOmwlG1CakdIAm4fFKv1vDezhcIABhLEM ohp/IF6ZT7wftcQIwjZOdByfp84lhpPq+uQi6kEqGeIr1BMmfimLmQr1lFL6PR/YuFRF NuksyP51Yr6YDpLOGPyarUIQvMJhFFY5wJ88JSbLd8C6UnlQQFtLktAncD5vfWllTUXZ +t88BERHCrIa/t7QxHQgUvXT+31b9vG3K4HKKnPtEe00tJlFIe9rlBikFC0t2ysxB7as PTxRbahr9QfrisjHshRtTsooX8IH9+5Qcw37OX4CEgXSqf5KfIIN1a/4jfWxwQo8/V/b 356w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685107063; x=1687699063; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sGqkPEwwAUavSeei9EN10EkpOiDwc0KPU98JvOkeGrg=; b=fw9J9tjRy0njJjPPzF+t78Uyyv4/Yw5Jn0u4tXu8q2+65B0XK0cD5SQQFxpojgRvLl PiG9N1QKMdsnutN3G6/pb3d5wGihHJ2va2Bc5szWnYbapVhEnEe9PX8x3q2YWTHAJBvS biFa2Bet92c+A2axt0jqkycnhrbVL0PBNxMgF06VRzYp/CuyA8hYU6yVyiiSgD9hdB/J BHWs0oq40gM1lqcWF24BppJFOgVSNoeZPNe9ithZKCuNfeFb34hCY9G3WXowSLn9x1VS DmohV4MxOV3PI+szdunS60nucObkXzEIsDbg4OFr4wZPTL0ELjZzU9h26B/UzNv2jb6+ 642Q== X-Gm-Message-State: AC+VfDwJ8Ug9WFpDGnbOWyjlSeEU72RK/sGuAZxyJF7Fzr6afF7/0KO0 Q6FAg5/tAa3V6fnrE5NQlds= X-Received: by 2002:a17:907:9345:b0:956:fbd7:bc5e with SMTP id bv5-20020a170907934500b00956fbd7bc5emr2084037ejc.64.1685107062608; Fri, 26 May 2023 06:17:42 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id l13-20020a170906078d00b00968a2286749sm2168353ejc.77.2023.05.26.06.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 06:17:42 -0700 (PDT) Date: Fri, 26 May 2023 16:17:39 +0300 From: Vladimir Oltean To: arinc9.unal@gmail.com Cc: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , 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: Re: [PATCH net-next 16/30] net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup() Message-ID: <20230526131739.5mso5y2d3ieelasf@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-17-arinc.unal@arinc9.com> <20230522121532.86610-17-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230522121532.86610-17-arinc.unal@arinc9.com> <20230522121532.86610-17-arinc.unal@arinc9.com> 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 On Mon, May 22, 2023 at 03:15:18PM +0300, arinc9.unal@gmail.com wrote: > 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 > --- This patch assumes that the MAC has its TXC ticking even when PMCR_TX_EN is unset. Why would it do that? > 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)); If you move code then preserve its alignment to the open parenthesis. > + > /* 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 >