From patchwork Wed May 6 07:50:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1149 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 00CF83F1D2 for ; Wed, 6 May 2020 09:50:51 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f22sf984238pfk.7 for ; Wed, 06 May 2020 00:50:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588751449; cv=pass; d=google.com; s=arc-20160816; b=rQpwa+wwHfw71hXi5NgJgzuow86uQFfYYufm6zQXKHy2U5XcS9XMF7Mfl58ZdfnHzN kiMB5LS556L1ERfoltr3DscdsdrxEUR14dv6O5fF9RBDJsbo1/yaPeGWxim6FR4wy1bp oLIpDyvAXmBhVUONaOyNtjSwEua9XomMXybsaYPoTWeAqin4vnDbQ2QQgdsh0jVJAvtS akUwge46vaYJKip1nW/3yhYxU2ms5/w1TflsnsFcKEpqLeC9k9JxLrCBUnduXc80vw8g x7ROEy70ZPq8ZcOrYmRspvLAP3KWSjnugdRrKHC/bdBHDocBJWhlkURJcRQP3N+VaVt7 vocA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=HW/HUCSzlb/bmNedsPdl1TjYj/+Xo6KZt2NqKfaTVpY=; b=JV4lzqyfYC44SJUYAtQtgxygyd+f5ljH6h+2lLBuGpeFOd6fu6Tzp7QBk2BVgHllRi ijXTwUYVrSw9SVL9VAAYHccUNlnVsnydBL4AryF/SQnnrLSu3FNV84RYwHbSyLVvvte9 c4Y4h8y5UwTvuN8IZRJHpxSIoo2YyLxHMk5B57X16bj7t4novTKh7HJpAr+h4v7r3x9B 5PWNdWlcInT+FvvzaznZE0hLSEXnMdDf+0uDRxmXNSrhV4AWVpYBgXPdNGZ0r5noeDai DnOWI0cW3Pq1C5Cyfl1XjZDfvQ7CkNAikm8MLwVQ/QVdVXr8tbhAuuMRM4LghbRD52g3 76fg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bV0PnJL1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=HW/HUCSzlb/bmNedsPdl1TjYj/+Xo6KZt2NqKfaTVpY=; b=cAtayUf1yy3w8SEtlaGPT33jKisHn4RPjYlVsCKyug5CzjBFXebNGq/iD7+J3U0Md4 Kj7tAc+PZUyDYxMc5OyijG63fGHtlioJI2mPZdNBaRdUVWqdsRWzMwn0n2lWCmVQ9aeW Jacitx1f7G/YnghKy2Omc9ppLS9H4xcQxwzSk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=HW/HUCSzlb/bmNedsPdl1TjYj/+Xo6KZt2NqKfaTVpY=; b=fTQbVXjxPhw4rhSuIeS1r54n08xpjtfaTKvn24oRQ9MkXTB+0ZshiwyOn62m6rNoIv eZx84VlP+s0fSIQviQbDQT/HtOV1mDe3PvJrmANJZShNn7Wh7HrM3QCVtEwVENJtVCtk LA5fUu9qOp6MKWJLAd7Btz9HehzDjqkmKuJlgYXkFOtHbc5go2IrMmLo0r2ptxKaKZbV 1Fz4rxoF0CveUZEEjmhdCztJlD9+haG77ZIgwsPVRhltkRZEFti/u46L0hChT7uRH2a1 X5tbHUIunJjxIKk0AYnjUzXleRFfuEHEKcI/QbKHQAEihy4t8/IUJdF818Ecn/pIH8Of dbPQ== X-Gm-Message-State: AGi0PuarzOHAuhvbVa+doAAM1d3zaJ5un9pXAki9FKnWDCzXfv5kqVUY 5ZzBqU1VB1cJlLerklo6lkmS0o/V X-Google-Smtp-Source: APiQypItcJPeCTru+2HV35UQo170s/FwWJTwOzOsz4hfN3VkX0nQhNYcDOX9I3U0vxzpVhfzuDJ33g== X-Received: by 2002:a17:90a:fa0e:: with SMTP id cm14mr7494649pjb.92.1588751449522; Wed, 06 May 2020 00:50:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:81c8:: with SMTP id t191ls825699pgd.10.gmail; Wed, 06 May 2020 00:50:49 -0700 (PDT) X-Received: by 2002:a62:64cd:: with SMTP id y196mr6608638pfb.116.1588751449015; Wed, 06 May 2020 00:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588751449; cv=none; d=google.com; s=arc-20160816; b=RAQvlKUHYTv7EPpTa9rLJK08WpfacdhPde499FiOJkXP55TaLtSAQK/JaJQcJAak+H cDAPqXWdqkbS8pSl1w4jxcu/fsmMjuQNzceAp/wAKRo/y9Drwdhq5sv5/hPx8WFjEHEn tnBZ2zCTysGin9nqbkyxh+AEc7n/VIReF1QQcYf+C7ff8NqKwJtZIt8IYyH/jjA7ESXv xBja+ErOlQuusb2kYt6kr3rAVy9fCdEMkKP33iyBsg/901nSxoKvJ6OyTr3iR4DrUkIl /tdkhyOuL42hj+Dp7Gvy0IkMHllmbPJSKnDdfyUcbQhax3njKiZ9lw1xfZgQrluMpPBn 6pbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7EuBhc+IxUhTFTnantvXwnfMzqtQXGOpAjLsf0kZ7fc=; b=xISXI+JBa9PmqKlJ4fbj5bwMyiw/u6sXYIvKxFPg2c5Y7tnZQtFRTQE1xBG5gFrq1K QRvI0VMmPJAygfxkzVHSaWJyhvH5PgJs6tTree2VzSl65EKjKRpRZKpHdkfdTH6y/YMm b5nlryGpE1kZ0I6wwEFfjrmaxv4Yj7w0rnGNC8Ke6V6o7uYrIaeGkI6zrp7TejDWl/Fm vI57KLXEdtGcKwGBQIBsRZNwRgM6gqISvWGwyuNWQYXs8fSd4ByzwECNTSL5xL7zVL4r 1tJ6f6xmb58U3ap0mmXVtdZA2TV6c0+gtbIne0TeN7dlfpTVvFfNh+vIn9g+xeGzosW/ aeMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bV0PnJL1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q20sor1599567pfc.98.2020.05.06.00.50.48 for (Google Transport Security); Wed, 06 May 2020 00:50:48 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:6485:: with SMTP id y127mr6613854pfb.11.1588751448068; Wed, 06 May 2020 00:50:48 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:c598:8eeb:af7:7f36]) by smtp.gmail.com with ESMTPSA id y186sm1011133pfy.66.2020.05.06.00.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 00:50:47 -0700 (PDT) From: Jagan Teki To: kever.yang@rock-chips.com, philipp.tomsich@theobroma-systems.com, Simon Glass , Frank Wang , wmc@rock-chips.com, chenjh@rock-chips.com, heiko@sntech.de Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, Belisko Marek , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 1/7] clk: rk3399: Enable/Disable the USB2PHY clk Date: Wed, 6 May 2020 13:20:19 +0530 Message-Id: <20200506075025.1677-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506075025.1677-1-jagan@amarulasolutions.com> References: <20200506075025.1677-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bV0PnJL1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Enable/Disable the USB2PHY clk for rk3399. CLK is clear in enable and set in disable functionality. Signed-off-by: Jagan Teki --- Changes for v2: - none drivers/clk/rockchip/clk_rk3399.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 7feba92f9e..b1c89ea127 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -1091,6 +1091,12 @@ static int rk3399_clk_enable(struct clk *clk) case SCLK_MACREF_OUT: rk_clrreg(&priv->cru->clkgate_con[5], BIT(6)); break; + case SCLK_USB2PHY0_REF: + rk_clrreg(&priv->cru->clkgate_con[6], BIT(5)); + break; + case SCLK_USB2PHY1_REF: + rk_clrreg(&priv->cru->clkgate_con[6], BIT(6)); + break; case ACLK_GMAC: rk_clrreg(&priv->cru->clkgate_con[32], BIT(0)); break; @@ -1167,6 +1173,12 @@ static int rk3399_clk_disable(struct clk *clk) case SCLK_MACREF_OUT: rk_setreg(&priv->cru->clkgate_con[5], BIT(6)); break; + case SCLK_USB2PHY0_REF: + rk_setreg(&priv->cru->clkgate_con[6], BIT(5)); + break; + case SCLK_USB2PHY1_REF: + rk_setreg(&priv->cru->clkgate_con[6], BIT(6)); + break; case ACLK_GMAC: rk_setreg(&priv->cru->clkgate_con[32], BIT(0)); break;