From patchwork Wed May 13 07:13:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1196 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 522373F066 for ; Wed, 13 May 2020 09:17:51 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id g11sf12067872plo.20 for ; Wed, 13 May 2020 00:17:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589354270; cv=pass; d=google.com; s=arc-20160816; b=PjBo2TKIiqtITZkk1w4DXkVkbSq7WOl9U6Qa07f1JRr4mum2lQay0koNACOydMFBy3 Vh+FY8Q3NjXgKhplGLx6HWFhYIXTVdBcY1WrYN5LsYc/n04T09Te34e9r9WxTZeN6/3Z /I3QEt8k11QRwbYRUSUCWRs8POURfrubbX6yjBMC8i0kDAgzVNaGU/EJoxDIO+mnQ08e 1okPtABToLC+i3f4xf9sQoVF0TJA3pBnAEdLvL9OzsT/MrFqAd1v+KN/CjrlM03mYQmg +jx7T7YSgO14bwbriqZXdMByI8Qund2BO6JjOf76rvCV4Wev1hOCpXmHrXH6zq+tYOvH hKeg== 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=EuK06AhC7prmbD9L3tvlmYMmUuKDK1TCoO5tViI4J6hGB8tppKVTxtA17hkIk5N26W i/IRvOTmvndSbDE/DnXda1UpGjt57Oru6g2uatLT4uQwEFQTh0CwW74qk5lTNrNnyuRN JYYctPOBLvjO8BmtW8el0PdiCjsquDirp9j0hYStqr/GKG9WeAs2Fgq+973c9wngkO4p ekP9Tn55UwsHZT9Y9jkb4yEHvj+08VggVNjHMpxlTWlzKjuloJHLpPP4zmxcNR8J0wNr vVE2AcG/qoRog+TDSK6EeDjWJYoHXhviSI0kpcu9wGlCsRFUYS++1eVSXz0QMHJvAHWE n59Q== ARC-Authentication-Results: i=2; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.130 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=aQKrkN7NKz7gj4Sp1MH7RcDcUn6NhwQ/91kLRiijeOpL46d8MLFdzr59t+BVGVs49u s1JDHJ+Q0YY/pU9thsqfVPRx9MmJZsNLs8EuPKmQ1EzuO6uy1pMrJXjHhRx69zj/nry5 nJ5ChimttLfZ913HUqJaZ18VBo34Aoso5BDB4= 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=kVQOq6YlPP3+BUfB5VY2Hab4AHCkoFEfS9NwU9lVW6UOqgOChYCl5GF6RPRL3DjNWY IRwy7ov+hYFZfPpB8Si1Kj5yl4f9WmJGZyM3Dr8SpiDlnpTKTIJg6gRgHvM8doGengxL 11Q/786QYzSFAurG/p77elIMc0q61TwJceuMTiDg1zFbFY0r4/8t4uSG1VeSkMeOEsvM xDaAbumikZO0KLzRBoUx94iCC+loENKG0Ke+o6Rq0P82inBNvAu8uhqmzT8h/QBwlIRo Pw1fFKztynckC70f3j9He2KYBzMbGPtqa85Re10ZrOk8lry5y0txI1BeI4tM5Jotr8nH gN3A== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0PubnGi5rQcQA+LZcr/6AcyUw1TcQKZ5gQ2rabdjELoyK2JGdKUZD t+mW55tmjtrX2vgJN1K3MX6kqPOE X-Google-Smtp-Source: APiQypLeWAD1Q54rGJqvUn04u0Kw3Ax8jbKZxtvRb5HnEXf4OoZIIzizSHdi/MqsPE6o8JLxUTnxDw== X-Received: by 2002:a17:90a:a012:: with SMTP id q18mr30193784pjp.220.1589354270130; Wed, 13 May 2020 00:17:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8a:: with SMTP id p10ls165322plo.11.gmail; Wed, 13 May 2020 00:17:49 -0700 (PDT) X-Received: by 2002:a17:90a:32a8:: with SMTP id l37mr7582604pjb.13.1589354269481; Wed, 13 May 2020 00:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589354269; cv=none; d=google.com; s=arc-20160816; b=dzjgxwdrP3MtyuerYaYJ7QmTYMcpR8Zs2AOQoDfzYnBMZktj3wLCYdkaXplJMWjZG9 63AOyKpWwf2p9RpcifqF+3R2S9XjuMSuy9WjDchiwgzqV2/AnBjAGPT2OFNSCgdkTo1S tX6lGD/xEvY8q08tKeTTWo1b8CAkadOFxfa/JKRfbPXojAcdXUurmDmP0cbELAHQmaWx +gTTElz2GOEPCfisY/T0e/vOBcnzoA0d98aYb3bkvmPOMHP3LZKalbzt6t11zvJPgQGy 2iflB72gTayDPrPVWkS0U138EYJuMzALqlwvu1hgscz76OS/URQOuPPIvjLSh7VIh76N 5RWA== 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=Ur1LR4bETy/24MaJtdaBTqJP6vgRk5OL/yZJ3JvpPf1iu9rVJ9XcltIVIM13RKC4PW XAPbMDI8NZFr8M3MjmZvSl77i8QeOZ7PEyX0wxWXi/CBtzH337hWo0Hnz9/YfoJLBMK/ rwoLOeGxE82upO998jK7GGbyQhpbv0aTjLSrw8L+ctihzZbVxHsxcGW85JcVrDq5FNtn mkbDGFeIFeIY6QTKbMv2eXVsHHHPMMy0JR2yymxQ9hmb0oejyGLk4sXTw98PYx6lLCMh FDlhdrz1PDh3H4EvUhomL5iOZjhscfj+HdIF77HgLqm/AYcYK5FeUa6HEppLdnJFbPyJ JBMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.130 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com Received: from lucky1.263xmail.com (lucky1.263xmail.com. [211.157.147.130]) by mx.google.com with ESMTPS id cx3si64833pjb.37.2020.05.13.00.17.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 00:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.130 as permitted sender) client-ip=211.157.147.130; Received: from localhost (unknown [192.168.167.32]) by lucky1.263xmail.com (Postfix) with ESMTP id D1BF9B5E2B; Wed, 13 May 2020 15:13:48 +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 P33519T140426061264640S1589354025823852_; Wed, 13 May 2020 15:13:48 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <91b84ca8cd434994c0ce38886bad323e> 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 v5 01/16] clk: rk3399: Enable/Disable the USB2PHY clk Date: Wed, 13 May 2020 15:13:29 +0800 Message-Id: <20200513071344.5430-2-frank.wang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200513071344.5430-1-frank.wang@rock-chips.com> References: <20200513071344.5430-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.130 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 Reviewed-by: Kever Yang --- 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;