From patchwork Tue May 26 03:32:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1230 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2C06B3FA5A for ; Tue, 26 May 2020 05:33:00 +0200 (CEST) Received: by mail-ot1-f72.google.com with SMTP id k91sf8948509otc.10 for ; Mon, 25 May 2020 20:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1590463979; cv=pass; d=google.com; s=arc-20160816; b=ocOrhP+qQo5UsAVegsg1GBlUO2R51JbXWTNDuH6LbnD1sHiTqA3IzfKcek9AfRgaxU jWvNCd/HEFWEme/fv4rbm7kd5CG5Lcc98T3ez336DZPYnJzwXMI3VKgsZE6XJUp+n+XJ GRaFNb0xtpLnz/4wclTBSu2ls92/6VjTfJqblYNh7upsz/75skgVlzBLd/HRZpdsTfkN 0u2SZ0RxnV+TAsFPiItMYgFZZPxoXvXP8UlX5Y2QDp05gZTL8uxAozy7V7tBRq33ywTm aFkLpkTapyuX19KSZOzUXO1cgYpz4NnMmbZ+lQLAqTA25VJsQTwehdiPyRWyzTVDIAn7 pPhA== 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=/JPPznrSOpATE9p0xk72an2LHyFDMN5jk7SIbYddKho=; b=xe5lR0keEeIEV+zyNnYv9VzFaoeukcqAvtB8LJeBr4VudVfggtqMa7DvuaWXuiNNri YjBJRNaWB3XYkJRLaRvDTVltb1eLBCZzbOFGFpZoGgFwuiCWblIpxcRbzt4r86c5x5y0 xg2hIC3ningSOpGVxmlddvdBbep6+aJkRjZwVsh8dwoMvYMQJzFWSvHaPMCxKzqlyKGq F5duwngwZSlKMWLi3tNBbekfEj24Lf1hUscjfRSxSoTucNitCCEZBf/5oXJNgN5fjIl2 FpLTDjOH6GnLPjavnAtSPzlXDsjtQ/4ZTM600RSfRlh179RGo1m31UQM3v1OQdHlXywq Zvaw== 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=/JPPznrSOpATE9p0xk72an2LHyFDMN5jk7SIbYddKho=; b=GfcySfTSuH83BHxhOj98/GwTczR6zS8mdoI0f+uq3f6Nn/bAv7mBI9Oe1JxDQV+fKm LNG+2aA7xQ7frKYVwFvtRRhBsPkUZ9qSWu3Ry+CAZXUktXH7SmtHOKgJ2qyZ33PEV1hI EM8VdZNeLm0OFltvIio/OFm3l6BCbDq4tMSEI= 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=/JPPznrSOpATE9p0xk72an2LHyFDMN5jk7SIbYddKho=; b=JdDBbPMKQxCuC1HQACgxHC0aEkGftlB1zT+U+fiTXdLqqGUqi7Avr/oRvxfjTs6EUl UMXFOjuUDb3YMEw4W8jUd7S0iz9gP35vIQLAsUv+FPSFBsgGr2/jW+YuKsJyJrclMYlw mBy9K8abNbPfdFHwfE2/OQx780nGjFiSsg20Ska3cCB5G5CB1iQLHYIjgR1wPL9LH1gt 2GVeCABt+FOyaAY7twOiS7G48SKaTIoah8D4C9/dGZtAPig3auS5b0syp+V+iSJUEhfx yIz/5/pb6bZT3bl5b0KB1TAyqvCcBnnKpdoobH40h3UxWh+XVARkNMJK+bnCp3eoiLJn zyIg== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AOAM532ci+Fidao4TU92dlExjRNWfPOEGHGraBDTibJXjivRvwyabQuR hdhxwbs96YRlbUGEk1hTwkgmydCR X-Google-Smtp-Source: ABdhPJwBY3YYjIig7YFG4TnIAYN3lrEjZ9rZHTTVFoz9+pColee5Daug1DZEY/wrGjVXVZsPKve4LQ== X-Received: by 2002:a54:408e:: with SMTP id i14mr12764196oii.93.1590463978996; Mon, 25 May 2020 20:32:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6830:148c:: with SMTP id s12ls576809otq.5.gmail; Mon, 25 May 2020 20:32:58 -0700 (PDT) X-Received: by 2002:a05:6830:1292:: with SMTP id z18mr22709336otp.333.1590463978262; Mon, 25 May 2020 20:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590463978; cv=none; d=google.com; s=arc-20160816; b=0caO1cVrIcPlPnFvric0IhFIlhKB1hmOwziy7KRF01geObYK0zEdGIKTvIwXwNBjqo kviwwItp6X5zlPY1rEBE2icTq94HATZHC3/eREk7EkhFxqcnHKFrHkl+H6oMZ/CrCCMn tJug+ZiTS9C7UGrr/t6cQh7ZEvCkkofAlwx4zX1IXQ6A7yzoZMuw7vC7AQAKG8nCk/Db ETRKRbhAsujp8tOfVP1gdiNh10jW4OGdRN8U7WbVPfKWSK+VsVZUaQv5TzKoKnbUu02Q h3ayyDhmqFMGqfMYnk2fjslSc/3g4LEhQgVLCqiK5bXKCZUeV1BWBYbYKQxhgeTMeB93 Zbgw== 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=jFnqTCBLGkM0WkVnqeoyGo4k9eM5eR8X2FkCOAkJO0I=; b=R3e0QjeIiKeUchH/sCsxuFhoWAF1x/dtL3B30PQDD/kFXUFmv9sxoSxM6i+oGcqNIs bJh2qPAS9A0SNAbjsRXSoZ5pIs27x+OKcaHZ9CdfY+e4mmVw647wFZSo8/q1MEv/P9XG 50+lPiVCcvO27RxDTOvYwQxtSi4+4C7BK10q8FfYd5opkbXvkWeeKE/zxo1nP7O1zPYe 0TAubxXlJCS9i4XFfwFvwSY9yZAFc4XcIwgEdUblK06iK9xAfn+f4DrGH0Wp3N8IVTbM xwGyjcVi3EGutpzOItpfvhzqZ8QNHFfyQa0l08VLrSKrHQ0sbHVFqDJH36G6U/WodzOx R2zw== 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 v64si8870045oib.238.2020.05.25.20.32.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2020 20:32:58 -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.8]) by lucky1.263xmail.com (Postfix) with ESMTP id 6F31DBB702; Tue, 26 May 2020 11:32:26 +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 P21206T140696379496192S1590463941416434_; Tue, 26 May 2020 11:32:25 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <60f496585bcc327a52fb97a3068a3f8a> 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 v6 03/16] clk: rk3399: Enable/Disable TCPHY clocks Date: Tue, 26 May 2020 11:32:07 +0800 Message-Id: <20200526033220.20047-4-frank.wang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200526033220.20047-1-frank.wang@rock-chips.com> References: <20200526033220.20047-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 TCPHY clock for rk3399 platform. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- 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;