From patchwork Mon May 11 07:53:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1165 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3AB633F9E5 for ; Mon, 11 May 2020 09:53:38 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id r5sf8139851pfh.12 for ; Mon, 11 May 2020 00:53:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589183616; cv=pass; d=google.com; s=arc-20160816; b=0EoUl+uzF6Dj1efuxmivjhcX5JHk9PrZt8IQfXR9hlIGGx3ApmYUJGlOwdLNbQNzZG JKKXlij9KHdKWvCytyUL2T2V5Syuc1Wv78YUEaCYQdmaNI8F03VS/2xzf0mse4t6xtDr OXjOYjRSyLzDmBYlydsKEyjWe5gNCSJmRMqVuU0WhPb0ejkEGbVf976EVPF0qFIe/Zq/ 88183zTJMqoctFwey77zBbt30VZSx/Bd/L8qqg9uxOFa6/Jwky9ZKWpAWZu8LXF+ZWCt 9QtWCvLP1OpJSrQDXEdz8H61/J8wDKOMgVg6Cs7JWHakJBYVLlcKt5pyCyWmSw4gGiMF FgWA== 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:sender:dkim-signature; bh=ZUBSKwOld9wPtMKB+15EzXxQ8hCATK15RIOALGUx+PA=; b=sTdo/EUtznyDqqzNPaQElFAjjVll/Q6a2n6xoEEFyMdCYVou5acpKEEMerMmW04u+T Xehe5vXY7CgWbOiBhisS4c5HtMp1Zn9SIanfyBuESrO+N9tp+pLzWtzKH2e6Ts8EZ9KZ wGvAtCncPWpHNgFn1k1doDoYgl/bsC6XtYTjxoo1G61yUJqoRgEIPsA1Xr1ulfEEgj5n 0QlTtNbtH/OUS6tDjSw75j6bU0ecq6n3p/MTMnmTA4Lnn5hp45ICePlv11eN6jezorMk Z8NgX2pz8sCrz+VeSPBxivtYmTu+4Lu88r09qcaZNbeDZNTO1kUwI7D9+ZsfxvkwFN0K OIfw== ARC-Authentication-Results: i=2; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.134 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=sender: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=ZUBSKwOld9wPtMKB+15EzXxQ8hCATK15RIOALGUx+PA=; b=p0CIsf2zfBGoGmI/kfD4AAN6ixVVP80pc1fG8AEXyCmrNac0u3p0eDLJI/ixwysDAG ZqS5BGK4+EzbN5QXqV9ofRb4bz2w+qfmMfWQsR0zQCVg9zCmlvqRBtQd2Vcma09vgxc6 ipssyhykVdhecO5LfK1OO/ZMSmqJfC4OvAsJ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender: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=ZUBSKwOld9wPtMKB+15EzXxQ8hCATK15RIOALGUx+PA=; b=pDDU6FrZy5ntwCH2TBdFaFDbGpYJ/PAhmBQwoc9uZjPQ+M/aEpe9fRER5/77dFx2sI u3mMEInEh491urRhdafmZXhV978ZpMaK59JclsryGsvRT2vIg5d4tre64Lo1eYn9Shuu 6R0VBkHgpZtk1ixq3TWrSarS9ATLUCiQbDyNBE2VxYwkIuMEbI1wE43TBeo4H9nr/gu6 J2h9tkbkBiiYq62+6muBgjlFtvvsiHsp9jdvTa0lzPAofLGicT+ndQUWUYGNU0x684OR tZVa6MG89+rg22CON6yTe8a5FZJ3E/4mzmykmVHjW2g7augIcRFNAbsriYiIP8FqEoYE yJ1g== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0PuZIg3y2yJrGNICZw5eYGQ91ETMgTOxEdT7IHFE4rC8l6fYXJNUI hHtE0RAsbHmK5+6mFk3Ci27jgOR0 X-Google-Smtp-Source: APiQypIWOn+oW8RWEGxIGqbImi58Dd0iUo1V1MOabfkHVqJ+Ujv/Dw1yDASfnLSNq1DnKAs5VFQgUw== X-Received: by 2002:a17:902:fe06:: with SMTP id g6mr14221463plj.105.1589183615868; Mon, 11 May 2020 00:53:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c82:: with SMTP id t2ls4647221plo.5.gmail; Mon, 11 May 2020 00:53:35 -0700 (PDT) X-Received: by 2002:a17:902:b102:: with SMTP id q2mr8492998plr.29.1589183615437; Mon, 11 May 2020 00:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589183615; cv=none; d=google.com; s=arc-20160816; b=dibkSYXqBRf4j0taBVMATp12LWc7gc6kuci1FWmGiw6ur/8PFJPtQRV4PiI7KDqLQY /lCxtfSDbxw7L0ahS4thKFfB7pTss5ZUJDQRnQ0hpMOA02UUsF/H6E12YgA7Vmh1JMNl jaq8qGPcezIwqsnwP4VzHJSDxnqnwE3Er2mOfZmQt4FQqf8jdZNujbZc8i6rBdzHFvv3 fDmCuve4hgA11zUpImlVuOPs40oSiWc16SE/fnCdodhtDAb8YLZd47GkmpIVOe2IHcKf iXlqaX9/i63+IRFxuY3cmLydvjQt5UOujf8kB++yi+uk/Hki9uJWfy7I6RmJVXjH5BU6 1HLQ== 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; bh=pXU7ajYGmatWTl5gCYdERxi57mdgQIg8mIbHRHrNlxk=; b=UOnb8Et1av1lKB+B7KW76wVK7wzxsTAFI3xfk3FrZYcMVxflhAyxKL16KjErjdgj9x OJCrTljS92K57j0JSDuU13KT9ZWZc2yie20yYtD0/hPrPdP5z54pLbzPvARBdKvvstyF 75T9F8a2+8MZiXlD/j7ZoAvjtKCwg80sE4eyKPSIRQhHbdhaJdkbyworQmIlINRWkTIZ IUn9W0OZAwmCwm2nh/ll8RqIXkkkPYJCQAeOu89OBU+YaLCQ1qjYk8w4hOhqayYUQWwP uz+Im7SMHszSj6zOVMsuEaVWGy95Zv4gCpV8zOBFpw2dr6yonh00PSoXu7tPE4lMtU4A P8gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.134 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com Received: from lucky1.263xmail.com (lucky1.263xmail.com. [211.157.147.134]) by mx.google.com with ESMTPS id f22si7103479pgg.342.2020.05.11.00.53.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2020 00:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.134 as permitted sender) client-ip=211.157.147.134; Received: from localhost (unknown [192.168.167.69]) by lucky1.263xmail.com (Postfix) with ESMTP id 45E9BA4C8D; Mon, 11 May 2020 15:53:33 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P27329T140438906509056S1589183610459145_; Mon, 11 May 2020 15:53:33 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <3a74ad31cb8d55cd1d2558ee40d6ae22> X-RL-SENDER: frank.wang@rock-chips.com X-SENDER: wmc@rock-chips.com X-LOGIN-NAME: frank.wang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Frank Wang To: heiko@sntech.de, marex@denx.de, bmeng.cn@gmail.com, philipp.tomsich@theobroma-systems.com, klaus.goger@theobroma-systems.com, jagan@amarulasolutions.com, sjg@chromium.org, kever.yang@rock-chips.com Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, marek.belisko@gmail.com, william.wu@rock-chips.com, jianing.ren@rock-chips.com, chenjh@rock-chips.com, wmc@rock-chips.com Subject: [PATCH v4 01/16] clk: rk3399: Enable/Disable the USB2PHY clk Date: Mon, 11 May 2020 15:53:15 +0800 Message-Id: <20200511075330.26462-2-frank.wang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200511075330.26462-1-frank.wang@rock-chips.com> References: <20200511075330.26462-1-frank.wang@rock-chips.com> X-Original-Sender: frank.wang@rock-chips.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.134 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.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: , From: Jagan Teki Enable/Disable the USB2PHY clk for rk3399. CLK is clear in enable and set in disable functionality. Signed-off-by: Jagan Teki --- 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 5fb72d83c2..b53f2f984e 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;