From patchwork Fri Mar 31 21:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 78009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp871531vqo; Fri, 31 Mar 2023 15:13:56 -0700 (PDT) X-Google-Smtp-Source: AKy350byJeH5Jaqe1PCjnYOvcD8YiyN3sVxhGKCGDewjPNi3CsX08SCBEjqFy8/LIfVWHDbBykSQ X-Received: by 2002:a17:907:6f0d:b0:946:b942:ad6a with SMTP id sy13-20020a1709076f0d00b00946b942ad6amr17572031ejc.38.1680300836303; Fri, 31 Mar 2023 15:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680300836; cv=none; d=google.com; s=arc-20160816; b=dMc9AaTpfHN1emFjAToRERJcdULC4rDwcs/45Q4mbHWTkcvSTvx4HyPN1Xue8I4oTj QTZMhcEfqUhwQzp2bRga1VNQrhm3+pnDFuPclFsDOzRY764fPHkGLNE+HIXtjN2PmHKw ru1AO7xI9i4gTp/AsqMIztntzklo6+0l9lsuC9pBqd8UC1dyqmLAXFZdBmG0VSYfsq7w /a7wYuKltk3WhfwKqMT2LHDYNOgXxvLR9CiyloXfbONAuqgDGgD5ND+D31SSm8cuwYFS LASQWr+MNzqphQxc78Madxob+3kjdY8trnzNggS0o4pkPQL+nANawkhdsVCnvD1feS2k 3fzQ== 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=rCiyg9dGBB6UNsno9U8qc2bm6rLIrDesgavseN/0KQA=; b=axmbIK+1pIJZodZlL6l2zPvGgfafQTPIrLQwBW/wuqxcYBP0dNkpz9CS2z5CDHTz2e gsZUotXRqP1s6VSvtznbfJgHs3+N1V8yE4kI0uqrC2alIrQlIsVfTizl76IWeIW3YADn w5s/ELrXPU9hqRhXIK/GsyRAZEZiEslfWl71+6YaxN5jVkV2lhdvGkhCFZyYMFXx87d4 KowWect1lPlqVlaZHgD1myReCTGqc8VZsdSkphmQ3w3a9PIuxxhG2IVvPoxwNSxCxIlR ziII8eut70Ipr4s57OnaLVmMSJncghUzm+d5oKtii7A1jsraCJxFJD6shjTPYeqHd3lQ DBHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MphePYqV; 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 p8-20020a1709060dc800b009346fbb76fcsi2713602eji.978.2023.03.31.15.13.32; Fri, 31 Mar 2023 15:13:56 -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=MphePYqV; 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 S233454AbjCaV7t (ORCPT + 99 others); Fri, 31 Mar 2023 17:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233375AbjCaV7l (ORCPT ); Fri, 31 Mar 2023 17:59:41 -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 0186C25460 for ; Fri, 31 Mar 2023 14:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680299905; 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=rCiyg9dGBB6UNsno9U8qc2bm6rLIrDesgavseN/0KQA=; b=MphePYqVzunN0IIh48DSki9QkeoqZKkqnPnmpIWZOfG8oUcq9FTA3VE72z0Fw7JVk6HIJZ dC7+893N4ga9Omo+KlJtnFRM84R9hgAdJ7oH8sJoqO9CijUst0Mcl2WGkiOwfDNk+r4GbN UxMizQzfiAb5WxjKUzNqngrpi+2BgIo= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393-Mhn3jwphP6OVM5hS5Bjhtg-1; Fri, 31 Mar 2023 17:58:24 -0400 X-MC-Unique: Mhn3jwphP6OVM5hS5Bjhtg-1 Received: by mail-oo1-f72.google.com with SMTP id w3-20020a4ae083000000b0052645d4a2dfso6436647oos.18 for ; Fri, 31 Mar 2023 14:58:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680299903; 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=rCiyg9dGBB6UNsno9U8qc2bm6rLIrDesgavseN/0KQA=; b=FwmitT5U/Ampv3JsBOSbSs4CNZcf14Mv6ci+VQYpSixlgojBKVo8zAddD5t+4Linov KJjOfMF0+1gAL9q4vmfmwjpl457LRps1bqvWXFEOsxSHIdHtoLEdjGXEzjdmgGicIdQd owY1WHC4aUUoqGTdIyyT8DzTOZeIWBZd/OGZbAbrEPPrNmIpChkSR4RWl38Qm1GXrzgc zCW0AQEOwMJ9BEWLzg7i1inlEqoxN+YEWRQ2WX5QbgtyQ/EHTlbP7EF7EByWPvN6pYLF sAK88ebkUUgnNk1ErMzRnHj8iMUd01F4VSPxukAStjtXVrUSJK4NqXA9KYYMAWdRGqKC 0IJw== X-Gm-Message-State: AAQBX9eUjNuny23rBoq5dgfppZ16R0c+yqG0Aafis+B/Ca/9PNMwn3+p s7apeDynWq/UD7/nY5ikcT2JJjaTifypw4akad4LMjjmzlyJiHM3LeJT7KQzE1zbUIF8HWVmeYJ F8rl5RgHKpbX3T0OhT6GhkhKPO1CjcRtGB7fqc0am7SB/7Ee0rZUT0rrw1UBdSzbmXo6UnB7DYx CQDkFqH+iX X-Received: by 2002:aca:2102:0:b0:389:7b6b:7a3d with SMTP id 2-20020aca2102000000b003897b6b7a3dmr3094801oiz.45.1680299903154; Fri, 31 Mar 2023 14:58:23 -0700 (PDT) X-Received: by 2002:aca:2102:0:b0:389:7b6b:7a3d with SMTP id 2-20020aca2102000000b003897b6b7a3dmr3094773oiz.45.1680299902865; Fri, 31 Mar 2023 14:58:22 -0700 (PDT) Received: from halaney-x13s.attlocal.net (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id g11-20020a4a894b000000b0053bb2ae3a78sm1299277ooi.24.2023.03.31.14.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:58:22 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, richardcochran@gmail.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, netdev@vger.kernel.org, bmasney@redhat.com, echanude@redhat.com, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com, Andrew Halaney Subject: [PATCH v3 1/3] clk: qcom: gcc-sc8280xp: Add EMAC GDSCs Date: Fri, 31 Mar 2023 16:58:02 -0500 Message-Id: <20230331215804.783439-2-ahalaney@redhat.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230331215804.783439-1-ahalaney@redhat.com> References: <20230331215804.783439-1-ahalaney@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-0.2 required=5.0 tests=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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761923129428082526?= X-GMAIL-MSGID: =?utf-8?q?1761923129428082526?= Add the EMAC GDSCs to allow the EMAC hardware to be enabled. Acked-by: Stephen Boyd Reviewed-by: Konrad Dybcio Signed-off-by: Andrew Halaney --- Changes since v2: * Add Konrad's Reviewed-by Changes since v1: * Add Stephen's Acked-by * Explicitly tested on x13s laptop with no noticeable side effect (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