Message ID | 20230313165620.128463-6-ahalaney@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1301200wrd; Mon, 13 Mar 2023 10:06:05 -0700 (PDT) X-Google-Smtp-Source: AK7set/jgoQbRy4WYBfJbligqKEQsGt/PACtPSFcrT91nIYUHQWKZbC8eAK9aVpn4PYFypi7nGSd X-Received: by 2002:a05:6a20:6909:b0:cc:ca9:4fde with SMTP id q9-20020a056a20690900b000cc0ca94fdemr19487029pzj.33.1678727165352; Mon, 13 Mar 2023 10:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678727165; cv=none; d=google.com; s=arc-20160816; b=fs3APfUD7hldwveDXJuIjpSqkPhDsvOkprOE1sIQ8VEfFx9OkwYa4bT1eqGe747RF3 3UDl3/e4pWMK5507vE7OWYpCmMBYAg04nfhEi2oHEooBAISfe4GwUT9hD3O6cK4XNi+x iXjnBxsZ3dfDuWdNhiy7lSXSv3NpP4/aagsQ4SY1Mxdw2gJFfquwXS/Wxd+SOVw+T486 agQmY9JbzylRlBUXK9tXB/9rsKUoWF4+I6dwZdN4rOuWzBLJvsODqONqoBRu7vduTrlb WDWVnTpw2K68F9Lr8ZoYoHeS1D5lFJaeWZkYASDbOpMJpc1mWsOHjhz049cfN+ZqNVCJ cp2Q== 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=FkVDFtAQ2HQaEyizSIOrTNSjW2E/XPvrw+UQkBvQei4=; b=SwB6CbnTgqXbeYfTm8nwz9aXquUejEsQF+qWOgZwVQ2CdoGJFBiclbcJ9DlnFskO9g FH+D2WIKbjnGnXTnAF7HJA6O6+EC1sNfQpI9lC3L6fV6OpsQ9wAD1loMfa8yY4H5U1m/ S0rnHrmHbLE3A5e1b4kIxiMfcwSkaJbHuxWP626ySCMm8nhQ6Q1cJKj10LUrgWXOw2HV JzWGnMjrilJdRK0pozp4CzkymZ5qi5GoGddyXsrOsV1YmG2rW9gHr2VQiaZsUTg685T/ 0vsHiwpzW0B0GGnfiWrQOZQ9sAdn4I08TeMJLrFf9W/KHmrHZjfV0ywLQ6A3+ZxfaCRO 0Wxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QGbbnRdu; 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=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x37-20020a631725000000b004cc67cfc92bsi7084105pgl.97.2023.03.13.10.05.49; Mon, 13 Mar 2023 10:06:05 -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=@redhat.com header.s=mimecast20190719 header.b=QGbbnRdu; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbjCMRAM (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 13:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbjCMQ7g (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 12:59:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A22FC2B288 for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 09:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678726665; 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=FkVDFtAQ2HQaEyizSIOrTNSjW2E/XPvrw+UQkBvQei4=; b=QGbbnRdubhObgNFTX2SPT6calK5Xkzvpn0FFbrsFxx+6Wmp4kAjqjcxMfNxLPUR2BvJ6hz Yq9IyVLSdPhJawLn10HRnt3MAd+gt80Y6ABnm0x7or21Y5kHG2O6OZwQti6IQRetMdyAgK mSNGXwHWuEG+whnVE4QtKevCSIfAT+o= Received: from mail-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-4U2qd09ePhyucpXC617XJw-1; Mon, 13 Mar 2023 12:57:43 -0400 X-MC-Unique: 4U2qd09ePhyucpXC617XJw-1 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-17268e44df1so7500031fac.9 for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 09:57:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678726663; 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=FkVDFtAQ2HQaEyizSIOrTNSjW2E/XPvrw+UQkBvQei4=; b=T3xcLQN013AqL7/KIrT8CwBrNMotLgTd2EPtv0v7Rjw/AIbj/3AaanIWYdggpBROg9 CFmVFPHUAHfAT7HI/adO2km75aiKYVVpS0qZkvB6XyIRqAGDy8gRT2/ToeIno/qFR0lR vo3YBhvG1QbJD7h93t4PefFn7Li5icOLAsa5SuIjYt8qMm8hp3OiFPcmOfER2vt3XZjL IuwwKd9SOSmYr2CI3tf5yvgcLoV9tUt1V9jwhCPrwGEqkPvIO8wotAUy/Ke51clkHNLc DKvjoTnbWZVJcK+iWBTix7ucvAyS/1w5At7O93+3LdfgdBcUPo6YoCArMgiTenitbAJw xWPA== X-Gm-Message-State: AO0yUKVXdG5SsgVtRrRj7+GQWrdqXYkUOxnX/xrC4Y1loH+kXawySAzJ wFZDiz09y4nYOSmS/0y4z13LoxwF8/V5RW1KP+w5Vcr6RuNmV6txIAdFtXyvBqMkJBqLo12tpt9 CZJTj9MVzqyzYu/eocil8LQDclVBrxB2mahqLjA6GWRuHbfeB1kXynm3D6tr9R2VoO6jdbXdX0F 8595VyUwlRlic= X-Received: by 2002:aca:130d:0:b0:378:7c77:6021 with SMTP id e13-20020aca130d000000b003787c776021mr13373626oii.8.1678726662818; Mon, 13 Mar 2023 09:57:42 -0700 (PDT) X-Received: by 2002:aca:130d:0:b0:378:7c77:6021 with SMTP id e13-20020aca130d000000b003787c776021mr13373580oii.8.1678726662434; Mon, 13 Mar 2023 09:57:42 -0700 (PDT) Received: from halaney-x13s.attlocal.net ([2600:1700:1ff0:d0e0::21]) by smtp.gmail.com with ESMTPSA id o2-20020acad702000000b00384d3003fa3sm3365273oig.26.2023.03.13.09.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 09:57:42 -0700 (PDT) From: Andrew Halaney <ahalaney@redhat.com> To: linux-kernel@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux@armlinux.org.uk, veekhee@apple.com, tee.min.tan@linux.intel.com, mohammad.athari.ismail@intel.com, jonathanh@nvidia.com, ruppala@nvidia.com, bmasney@redhat.com, andrey.konovalov@linaro.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com, Andrew Halaney <ahalaney@redhat.com> Subject: [PATCH net-next 05/11] clk: qcom: gcc-sc8280xp: Add EMAC GDSCs Date: Mon, 13 Mar 2023 11:56:14 -0500 Message-Id: <20230313165620.128463-6-ahalaney@redhat.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313165620.128463-1-ahalaney@redhat.com> References: <20230313165620.128463-1-ahalaney@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760273015796663128?= X-GMAIL-MSGID: =?utf-8?q?1760273015796663128?= |
Series |
Add EMAC3 support for sa8540p-ride
|
|
Commit Message
Andrew Halaney
March 13, 2023, 4:56 p.m. UTC
Add the EMAC GDSCs to allow the EMAC hardware to be enabled.
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
drivers/clk/qcom/gcc-sc8280xp.c | 18 ++++++++++++++++++
include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 2 ++
2 files changed, 20 insertions(+)
Comments
Quoting Andrew Halaney (2023-03-13 09:56:14) > Add the EMAC GDSCs to allow the EMAC hardware to be enabled. > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > --- Acked-by: Stephen Boyd <sboyd@kernel.org> I'm not sure if Bjorn Andersson is planning on modifying this file too, so please confirm it can go through netdev tree.
Bjorn, On Mon, Mar 13, 2023 at 03:57:27PM -0700, Stephen Boyd wrote: > Quoting Andrew Halaney (2023-03-13 09:56:14) > > Add the EMAC GDSCs to allow the EMAC hardware to be enabled. > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > --- > > Acked-by: Stephen Boyd <sboyd@kernel.org> > > I'm not sure if Bjorn Andersson is planning on modifying this file too, > so please confirm it can go through netdev tree. > Can you please help respond to Stephen's comment above? I admittedly don't have much experience sending patch series that span across multiple subsystems, so if there's something I should be doing differently (to indicate who takes what patches, etc) in submission please do not hesitate to be overly verbose in instructing me! Thanks, Andrew
On 13.03.2023 17:56, Andrew Halaney wrote: > Add the EMAC GDSCs to allow the EMAC hardware to be enabled. > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > --- Was it tested to not cause issues on access on "normal" 8280xp? AFAICS if there would be any, they would happen at registration time, as gdsc_init already accesses its registers Konrad > drivers/clk/qcom/gcc-sc8280xp.c | 18 ++++++++++++++++++ > include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 2 ++ > 2 files changed, 20 insertions(+) > > diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c > index b3198784e1c3..04a99dbaa57e 100644 > --- a/drivers/clk/qcom/gcc-sc8280xp.c > +++ b/drivers/clk/qcom/gcc-sc8280xp.c > @@ -6873,6 +6873,22 @@ static struct gdsc usb30_sec_gdsc = { > .pwrsts = PWRSTS_RET_ON, > }; > > +static struct gdsc emac_0_gdsc = { > + .gdscr = 0xaa004, > + .pd = { > + .name = "emac_0_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > +}; > + > +static struct gdsc emac_1_gdsc = { > + .gdscr = 0xba004, > + .pd = { > + .name = "emac_1_gdsc", > + }, > + .pwrsts = PWRSTS_OFF_ON, > +}; > + > static struct clk_regmap *gcc_sc8280xp_clocks[] = { > [GCC_AGGRE_NOC_PCIE0_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie0_tunnel_axi_clk.clkr, > [GCC_AGGRE_NOC_PCIE1_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie1_tunnel_axi_clk.clkr, > @@ -7351,6 +7367,8 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = { > [USB30_MP_GDSC] = &usb30_mp_gdsc, > [USB30_PRIM_GDSC] = &usb30_prim_gdsc, > [USB30_SEC_GDSC] = &usb30_sec_gdsc, > + [EMAC_0_GDSC] = &emac_0_gdsc, > + [EMAC_1_GDSC] = &emac_1_gdsc, > }; > > static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { > diff --git a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > index cb2fb638825c..721105ea4fad 100644 > --- a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > +++ b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > @@ -492,5 +492,7 @@ > #define USB30_MP_GDSC 9 > #define USB30_PRIM_GDSC 10 > #define USB30_SEC_GDSC 11 > +#define EMAC_0_GDSC 12 > +#define EMAC_1_GDSC 13 > > #endif
On Tue, Mar 14, 2023 at 04:13:18PM +0100, Konrad Dybcio wrote: > > > On 13.03.2023 17:56, Andrew Halaney wrote: > > Add the EMAC GDSCs to allow the EMAC hardware to be enabled. > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > --- > Was it tested to not cause issues on access on "normal" 8280xp? > AFAICS if there would be any, they would happen at registration > time, as gdsc_init already accesses its registers No, I've only tested this series on the sa8540p-ride. I luckily also am working from an x13s, I will use that to confirm nothing strange happens with this applied before sending v2 and confirm the results. Thanks for the idea, Andrew > > Konrad > > drivers/clk/qcom/gcc-sc8280xp.c | 18 ++++++++++++++++++ > > include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 2 ++ > > 2 files changed, 20 insertions(+) > > > > diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c > > index b3198784e1c3..04a99dbaa57e 100644 > > --- a/drivers/clk/qcom/gcc-sc8280xp.c > > +++ b/drivers/clk/qcom/gcc-sc8280xp.c > > @@ -6873,6 +6873,22 @@ static struct gdsc usb30_sec_gdsc = { > > .pwrsts = PWRSTS_RET_ON, > > }; > > > > +static struct gdsc emac_0_gdsc = { > > + .gdscr = 0xaa004, > > + .pd = { > > + .name = "emac_0_gdsc", > > + }, > > + .pwrsts = PWRSTS_OFF_ON, > > +}; > > + > > +static struct gdsc emac_1_gdsc = { > > + .gdscr = 0xba004, > > + .pd = { > > + .name = "emac_1_gdsc", > > + }, > > + .pwrsts = PWRSTS_OFF_ON, > > +}; > > + > > static struct clk_regmap *gcc_sc8280xp_clocks[] = { > > [GCC_AGGRE_NOC_PCIE0_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie0_tunnel_axi_clk.clkr, > > [GCC_AGGRE_NOC_PCIE1_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie1_tunnel_axi_clk.clkr, > > @@ -7351,6 +7367,8 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = { > > [USB30_MP_GDSC] = &usb30_mp_gdsc, > > [USB30_PRIM_GDSC] = &usb30_prim_gdsc, > > [USB30_SEC_GDSC] = &usb30_sec_gdsc, > > + [EMAC_0_GDSC] = &emac_0_gdsc, > > + [EMAC_1_GDSC] = &emac_1_gdsc, > > }; > > > > static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { > > diff --git a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > > index cb2fb638825c..721105ea4fad 100644 > > --- a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > > +++ b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h > > @@ -492,5 +492,7 @@ > > #define USB30_MP_GDSC 9 > > #define USB30_PRIM_GDSC 10 > > #define USB30_SEC_GDSC 11 > > +#define EMAC_0_GDSC 12 > > +#define EMAC_1_GDSC 13 > > > > #endif >
On Tue, Mar 14, 2023 at 11:08:18AM -0500, Andrew Halaney wrote: > On Tue, Mar 14, 2023 at 04:13:18PM +0100, Konrad Dybcio wrote: > > > > > > On 13.03.2023 17:56, Andrew Halaney wrote: > > > Add the EMAC GDSCs to allow the EMAC hardware to be enabled. > > > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > > --- > > Was it tested to not cause issues on access on "normal" 8280xp? > > AFAICS if there would be any, they would happen at registration > > time, as gdsc_init already accesses its registers > > No, I've only tested this series on the sa8540p-ride. I luckily also am > working from an x13s, I will use that to confirm nothing strange happens > with this applied before sending v2 and confirm the results. > Writing from my x13s with this applied, things seem ok to me :) Thanks, Andrew
diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c index b3198784e1c3..04a99dbaa57e 100644 --- a/drivers/clk/qcom/gcc-sc8280xp.c +++ b/drivers/clk/qcom/gcc-sc8280xp.c @@ -6873,6 +6873,22 @@ static struct gdsc usb30_sec_gdsc = { .pwrsts = PWRSTS_RET_ON, }; +static struct gdsc emac_0_gdsc = { + .gdscr = 0xaa004, + .pd = { + .name = "emac_0_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, +}; + +static struct gdsc emac_1_gdsc = { + .gdscr = 0xba004, + .pd = { + .name = "emac_1_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, +}; + static struct clk_regmap *gcc_sc8280xp_clocks[] = { [GCC_AGGRE_NOC_PCIE0_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie0_tunnel_axi_clk.clkr, [GCC_AGGRE_NOC_PCIE1_TUNNEL_AXI_CLK] = &gcc_aggre_noc_pcie1_tunnel_axi_clk.clkr, @@ -7351,6 +7367,8 @@ static struct gdsc *gcc_sc8280xp_gdscs[] = { [USB30_MP_GDSC] = &usb30_mp_gdsc, [USB30_PRIM_GDSC] = &usb30_prim_gdsc, [USB30_SEC_GDSC] = &usb30_sec_gdsc, + [EMAC_0_GDSC] = &emac_0_gdsc, + [EMAC_1_GDSC] = &emac_1_gdsc, }; static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { diff --git a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h index cb2fb638825c..721105ea4fad 100644 --- a/include/dt-bindings/clock/qcom,gcc-sc8280xp.h +++ b/include/dt-bindings/clock/qcom,gcc-sc8280xp.h @@ -492,5 +492,7 @@ #define USB30_MP_GDSC 9 #define USB30_PRIM_GDSC 10 #define USB30_SEC_GDSC 11 +#define EMAC_0_GDSC 12 +#define EMAC_1_GDSC 13 #endif