From patchwork Wed May 13 07:13:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1184 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 B1A453F1FA for ; Wed, 13 May 2020 09:13:55 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id z19sf4495193pfk.15 for ; Wed, 13 May 2020 00:13:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589354034; cv=pass; d=google.com; s=arc-20160816; b=umxatHYYpeGP+XnRIwrWXvTpxvgH5HgLPds8vx+qkTowTWMlXiQotQbNE0fmk2B5KS lbzpDUPg/6i4YraMmj3deGnHMXQQ9eSlKgIHscwnGA4ZnSEjncZCg7nSyxCUuu08SGof rxVrG9UtWZ/REjwGM5ZG8ZEc8CSiTrvSfIOOzL2pXyyhygqXFrNHwmn62vNVbhBeYfDx n4fLXQ5s2lZtnO3o99vyXpfjLBpWPxAJUWsTf+OCqZWP51x8U3v/hDSif5uTNx+dqSSv xCAZEgn3/WaJ+aIoMClrwJrsF6kA8NJ1KS4Ou2nAJuprI+GZZROZP5maoE3Em7RciWZv s/Ew== 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=dRQ+y5FGhctE7kYi0LgiI2PHxgeinJ2mgDNCeIChPG2GVWj2770h2sthj4QHK8GO3k RhuScDsbvsyZT2aa40EopWYIMt054iOheTFmbMXRGH27AgCcjHg9HVkrXiwPqtDT+Epp dRIYvkjcDol+Otv0KgRJiVKBvEEYeGKYWOCXUXihWaywndM5QZAnGfWQjY7+wutM1a5v tmCGxsm6oZcj7L1IaXclC5NC6+/1jGX9F2/KYsiu6O//C+78zdrpqe/HJL14wLXtc37B iFNEwj6JpaeD3Drao+Qel1+zf/ablEePNge6XV7coeifGKPU5U7shJi80uYfE6o0iWYh Mh7Q== 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=VbrroEfLdi4LT9Vu+9gjU6aYcTOCMaYqVP+MIj8NcYk=; b=fafK3HrCCwZ24wlc5JfJVKg1oK88WV97fGfuD3x3lsNUEEKq9R+hWsYTh1VQ31tpsp xRLzNoMOmYGISywJ2S/3XmodMPbN3u1NqbwFpx6DJlAvOs5j9XeDZVPv1PzwQSMs0zXS CedTmMUJ2AN/S/EcSqGggi0BmLEJ5EMMM8QtY= 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=Zu6uGY9JEOyFWI+KswUL50jAp/r30cP2XHVPFhdRV2RRFShspF3jD+8WS4R9SQFFxh +X75BMqnDjFRLG+dhrg/Q0DSNu8c0EMeyCQ+PMiQ+aTJ4+UBIYNnDP5HD/fwoRNn00xR lWiFwxZmkVgqHM3YUB5C4wtVXCud+yTXfOykUSJe69ksRYKr/U+j7qArgQckf2/M5CLT FII+9T3xKDzMVbYpiTAIclE7zLBmPforSUudJ8BnyIW1yaskTXPKDta7X4Ujv+Jg1OH8 lQrzAQwkZV7fMBc7XztpOdxaN96jUc/kpCtlZ/m0HHEUAMgle1jpc8j1Kv4fhJIZakIl B9iQ== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0Pub3FC9Q/NA8wNW9yjezEkJakk8Eb4v4SOTv0pBFJT0y+L3nuXWj vwdhjIfSPLdlL+ScUk17y/xqEhh4 X-Google-Smtp-Source: APiQypL1Q/pOz3goyfWDpjqsldP+23ztwVoWv/6BHmhpeSEgP3aOv2Dehvi6y2o/rPT6JQWpGcowzw== X-Received: by 2002:a17:90b:1993:: with SMTP id mv19mr34211276pjb.88.1589354034581; Wed, 13 May 2020 00:13:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4c02:: with SMTP id na2ls599875pjb.0.gmail; Wed, 13 May 2020 00:13:52 -0700 (PDT) X-Received: by 2002:a17:90a:254b:: with SMTP id j69mr31166978pje.222.1589354032342; Wed, 13 May 2020 00:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589354032; cv=none; d=google.com; s=arc-20160816; b=lTKJbqsNtlIvinkO/E2a5PLpZ4WkCjfIzuXRzGh7XU/TxTGHnvfQshe4GcokrXtnem SU1a80TI9901FSSes1KHYZK//jPDzSIaCEDQWquFNOhf6LAGHaBBIQCjv9MnI6uZjicW mcEifYXS6jBTa8ah/JFDGG8KM+Ejn9Nu0yi/6NVGzJKAmQ8WDiUL7QPdt6yrIeACrDjk ZjNKLT/P+JQMiwVhG7Y0lro1F/recQPeuYZ1lnEgKSRv084rNqAqBYNyXNqNfJawfBeM 3Ew4oUC6yDb+F9QGkby1NFs7HZG/0FNinA33VhQE+q+9ZcL4LEYnTpEYkQUaom3bMBmF L8TQ== 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=lHzBh5NvBtVUlpydqPHwQ6YeWZFGfnwxNWEQ6q6v9DK3+tEmLafNokgfcZukBs+DIj SSxdLUO3RKlk0vUIx3wFIBvbUaJSbAOaCQpNK5wr+ddgk8dmv86euVkEIherhE+HhUHm ITCzh5MHJQOz1PVws4uSYSKLC1M+iakhCUimdn7kf/nP9wCJeVXJKR0vk6wMamwLmq7e tAXjC80iWCOaoBCkR3tCcGpMZJxD0ILcEoxk+lLh+Xdxc8aMmej6uAS+cTEbs3bTzsXw zojWvWJb+/lhPTR9Weks4BJjcLDAWvFxf9QFtHvoiTluM9laGjmw3tTdQ8A2FLLq5/yp EKSw== 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 15si679047pla.239.2020.05.13.00.13.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 00:13:52 -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.32]) by lucky1.263xmail.com (Postfix) with ESMTP id 4DD1AA4F2A; Wed, 13 May 2020 15:13:50 +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:50 +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 v5 03/16] clk: rk3399: Enable/Disable TCPHY clocks Date: Wed, 13 May 2020 15:13:31 +0800 Message-Id: <20200513071344.5430-4-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.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 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;