From patchwork Mon May 11 07:53:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1169 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E50FD3F1DD for ; Mon, 11 May 2020 09:53:40 +0200 (CEST) Received: by mail-pj1-f71.google.com with SMTP id s6sf16882621pjq.1 for ; Mon, 11 May 2020 00:53:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589183619; cv=pass; d=google.com; s=arc-20160816; b=fxaNGC34Q3RkT6deESaIb66gW3YKdB2xy/bM5RqtQdTw5G0kh5HM4/Z27b3aLpeSm7 bjULLyXPYkOOlOa60ATRA21IUyhNAm7upHJdGgSxq9yrpKAEuhX9Mz8XRKzTrJWcfZRt nYnDElE60XoxlG3uYgXAoRVUyIRB1O5JBSJXGsmvypwU12GwuH3fj8XSW9NjAbJSnvYp IGwmNEKihAtjwndTBncXRgrdBcnOTesOfkBrxs4mUR3K6t4Huujfr9nhPn8K51KAii+W YVXsQbhsqZo68oH0dzsI8vlNfO8xbTbmfafP4e1Im9bRW5BY85QAr4DBSwMfj9Wy9I6k lgog== 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=VbrroEfLdi4LT9Vu+9gjU6aYcTOCMaYqVP+MIj8NcYk=; b=r1DFOEYscOth0b1mQbCfmpD6jnOvSCf+0PpFqHKindRDFC5viqs+XckVPhVKLAjbIb 25QgW1/l1XWfNtnqGYNBaF4chk0KU0KHqhumEWQyfb+fxuk55ex6FzRvUZKXw9OjJp3A Iv82b1Pi9w1MqWZ6QucZCPEYIY6SQFcD7Mc8oK4Os+MvUX9GrBFk2tNEp+0ApM6O4Ymq MfE82VlqABRWMizXsKyYiqk3T9ifeWOu7v6M/+FD3PQF7DvlUbR+vnkcfsL9zoLQlmyE U7FSPvC5q3kC7QSnnrHjPCEm+F0/EqD1O40nZM6W/eXKJdtwf0Okn7Z7YJglPSZNnzmI Z6cA== ARC-Authentication-Results: i=2; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 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=VbrroEfLdi4LT9Vu+9gjU6aYcTOCMaYqVP+MIj8NcYk=; b=SekH4lIBdOL8mBzGOmYpE2kEFqlgixNiJ8AlJ3FhhhJsAT7DyJni71D870/EfACKyy QmZnn1HHMik6ynfYXxwt9jfiotqFrY7+VWX1E8EFwa97qgFhp2aUifOvae6L6mf/Yudc f1QLPXUeovrUtfXrlXIe7JIwOOKvRf95Rbl2c= 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=VbrroEfLdi4LT9Vu+9gjU6aYcTOCMaYqVP+MIj8NcYk=; b=l/tUav6q44THMi4fJzEQSTpCTnV8iGPmlAWNFuuAEOPc1twatCInEyRcIwjUrRi6PP ZlIEMYYLqQmJ4+S/0EnbhyunY54LKZitNmqj9CKbcj5unYRRyZOKcgWKooEkRJdkQDDD yz/WMoJO8j/8HaS3CFXc257XnLM1i6BaZqBndqCA8tuwmCleRD3TlQXNDsbv5OytkGIN Zxw/i/F28RiL0klGCdQQar19Oc8KhFk/cNJeeIIV5xzfUK26he88w4zoR+Asjbs215ww EhssgFcBo/DMkndzPEqbL1X++Nz/MBPNqsQroRa6Ku6EonUmoML9sUupbDiGvyF7vsnO H4aA== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0PuZSJStnjKcROnL/qLhahstsbd5vwOQkJrbNyEiGXR4dhgXRDenH tQD2+HXNyN9k/KMy1rmZDtDcII6W X-Google-Smtp-Source: APiQypKTmulfm8ViCmz4adsOynmAAXn27pVYRAEKqVuZkanXYcILODc7J74jtdSS496maW2anGOkgw== X-Received: by 2002:a17:902:74cb:: with SMTP id f11mr14503042plt.171.1589183619615; Mon, 11 May 2020 00:53:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2944:: with SMTP id p65ls135529pgp.2.gmail; Mon, 11 May 2020 00:53:39 -0700 (PDT) X-Received: by 2002:a63:ed02:: with SMTP id d2mr13579396pgi.119.1589183619059; Mon, 11 May 2020 00:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589183619; cv=none; d=google.com; s=arc-20160816; b=vTFRx+LND3di6H9Kcq2MXiJ0UF6y4ncdAvh/IB4UzP6HVSVw7WRJMcoQQN4Vf567Ya e2reuL9oqyaFpArXW/a0N2VhGZJapUT8bBBxjT389Q5UnPz9h7hsv26DaBjJJapBvBGk hA2O3y+vn0SVnyahUo0zryl1lXZ2uv7qqrZW/LRm7pfJf1M8vLg0a3WoEN6Guv1eU1uK PKBQ4j9YNtvHhcC8o+PMSmZY9dSWRDxOxlBxghed1lCgQ1ssKnT4Z8fnA08Nl1ZCxpU1 GTwiODlHw8YGOtlFVpZ2g1p+jZb6JY9NM/jIKa6OIjzGiGHCEuSxYbi1LKTv2eNg7/3O dLVA== 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=jKU85SHa10bWtGHnX4BI2iJtxErlsF4mk6Wlf2D4FSo=; b=TJxkYTR9c2x/zQlxQHnQLDUkN2BGln95Wqj8V7Ftep3A4u7WTDz0djqk1HCfGqovGt 1uWy5GO38wnvDn3Wmx+z1FlU83Jy6rdeHX45bXSW+ArNRz+lY0CrKLxhOvu3rni8Xz2D jpHeIoKkqDgrKZgh2ldmY7PaavDC9B/6ghNLPwU5UR1q6K3vcwCU40XksBtIDpBl6pAL CUKKFuAKkmjPNAm8TPPB5BAKR3mpl/PpB8MVm9f6xdV+skbwP64ZBtJ7v1O1WdI21ssS 3C1GdVz9zMkrOnLEVQqxqOHSJrfFdA+wYrPeuTQkI4LMqe03KID1wqjwRyqID8+mz5vg 6abQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com Received: from lucky1.263xmail.com (lucky1.263xmail.com. [211.157.147.132]) by mx.google.com with ESMTPS id v24si1192572pgo.424.2020.05.11.00.53.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2020 00:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) client-ip=211.157.147.132; Received: from localhost (unknown [192.168.167.69]) by lucky1.263xmail.com (Postfix) with ESMTP id 70083CD5DA; Mon, 11 May 2020 15:53:36 +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:34 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: 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 03/16] clk: rk3399: Enable/Disable TCPHY clocks Date: Mon, 11 May 2020 15:53:17 +0800 Message-Id: <20200511075330.26462-4-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.132 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 TCPHY clock for rk3399 platform. Signed-off-by: Jagan Teki --- drivers/clk/rockchip/clk_rk3399.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 98fc6a3267..06232f1903 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -1144,6 +1144,18 @@ static int rk3399_clk_enable(struct clk *clk) case HCLK_HOST1_ARB: rk_clrreg(&priv->cru->clksel_con[20], BIT(8)); break; + case SCLK_UPHY0_TCPDPHY_REF: + rk_clrreg(&priv->cru->clkgate_con[13], BIT(4)); + break; + case SCLK_UPHY0_TCPDCORE: + rk_clrreg(&priv->cru->clkgate_con[13], BIT(5)); + break; + case SCLK_UPHY1_TCPDPHY_REF: + rk_clrreg(&priv->cru->clkgate_con[13], BIT(6)); + break; + case SCLK_UPHY1_TCPDCORE: + rk_clrreg(&priv->cru->clkgate_con[13], BIT(7)); + break; case SCLK_PCIEPHY_REF: rk_clrreg(&priv->cru->clksel_con[18], BIT(10)); break; @@ -1226,6 +1238,18 @@ static int rk3399_clk_disable(struct clk *clk) case HCLK_HOST1_ARB: rk_setreg(&priv->cru->clksel_con[20], BIT(8)); break; + case SCLK_UPHY0_TCPDPHY_REF: + rk_setreg(&priv->cru->clkgate_con[13], BIT(4)); + break; + case SCLK_UPHY0_TCPDCORE: + rk_setreg(&priv->cru->clkgate_con[13], BIT(5)); + break; + case SCLK_UPHY1_TCPDPHY_REF: + rk_setreg(&priv->cru->clkgate_con[13], BIT(6)); + break; + case SCLK_UPHY1_TCPDCORE: + rk_setreg(&priv->cru->clkgate_con[13], BIT(7)); + break; case SCLK_PCIEPHY_REF: rk_clrreg(&priv->cru->clksel_con[18], BIT(10)); break;