Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86D33C433F5 for ; Fri, 15 Oct 2021 12:41:00 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03EA460F44 for ; Fri, 15 Oct 2021 12:40:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 03EA460F44 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C5688365D; Fri, 15 Oct 2021 14:40:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D6F618365D; Fri, 15 Oct 2021 14:40:54 +0200 (CEST) Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.70.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CE9888365D for ; Fri, 15 Oct 2021 14:40:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kever.yang@rock-chips.com Received: from localhost (unknown [192.168.167.130]) by regular1.263xmail.com (Postfix) with ESMTP id F37961CD3 for ; Fri, 15 Oct 2021 20:40:44 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from [172.16.12.93] (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P3580T139715523102464S1634301644225007_; Fri, 15 Oct 2021 20:40:44 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: kever.yang@rock-chips.com X-SENDER: yk@rock-chips.com X-LOGIN-NAME: kever.yang@rock-chips.com X-FST-TO: chenjh@rock-chips.com X-RCPT-COUNT: 6 X-LOCAL-RCPT-COUNT: 2 X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-UNIQUE-TAG: X-System-Flag: 0 Subject: Re: [PATCH v2] clk: rockchip: rk3568: update clks To: Elaine Zhang , sjg@chromium.org, philipp.tomsich@vrull.eu, lukma@denx.de Cc: u-boot@lists.denx.de, chenjh@rock-chips.com References: <20211012084300.25975-1-zhangqing@rock-chips.com> From: Kever Yang Message-ID: <8609be4b-4b31-9555-9710-3ebee4898a07@rock-chips.com> Date: Fri, 15 Oct 2021 20:40:44 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211012084300.25975-1-zhangqing@rock-chips.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 2021/10/12 下午4:43, Elaine Zhang wrote: > fix up ppll init freq. > support tclk_emmc. > add freq (26M) for mmc device. > fix up the sfc clk rate unit error. > > Change in V2: > remove change id. > > Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Thanks, - Kever > --- > arch/arm/include/asm/arch-rockchip/cru_rk3568.h | 2 +- > drivers/clk/rockchip/clk_rk3568.c | 11 +++++++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3568.h b/arch/arm/include/asm/arch-rockchip/cru_rk3568.h > index 6c59033f03a6..399f19ad21ec 100644 > --- a/arch/arm/include/asm/arch-rockchip/cru_rk3568.h > +++ b/arch/arm/include/asm/arch-rockchip/cru_rk3568.h > @@ -14,7 +14,7 @@ > #define APLL_HZ (816 * MHz) > #define GPLL_HZ (1188 * MHz) > #define CPLL_HZ (1000 * MHz) > -#define PPLL_HZ (100 * MHz) > +#define PPLL_HZ (200 * MHz) > > /* RK3568 pll id */ > enum rk3568_pll_id { > diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c > index 553c6c0dafbd..d5e45e7602c7 100644 > --- a/drivers/clk/rockchip/clk_rk3568.c > +++ b/drivers/clk/rockchip/clk_rk3568.c > @@ -1441,6 +1441,7 @@ static ulong rk3568_sdmmc_set_clk(struct rk3568_clk_priv *priv, > > switch (rate) { > case OSC_HZ: > + case 26 * MHz: > src_clk = CLK_SDMMC_SEL_24M; > break; > case 400 * MHz: > @@ -1507,7 +1508,7 @@ static ulong rk3568_sfc_get_clk(struct rk3568_clk_priv *priv) > case SCLK_SFC_SEL_125M: > return 125 * MHz; > case SCLK_SFC_SEL_150M: > - return 150 * KHz; > + return 150 * MHz; > default: > return -ENOENT; > } > @@ -1534,7 +1535,7 @@ static ulong rk3568_sfc_set_clk(struct rk3568_clk_priv *priv, ulong rate) > case 125 * MHz: > src_clk = SCLK_SFC_SEL_125M; > break; > - case 150 * KHz: > + case 150 * MHz: > src_clk = SCLK_SFC_SEL_150M; > break; > default: > @@ -2406,6 +2407,9 @@ static ulong rk3568_clk_get_rate(struct clk *clk) > case BCLK_EMMC: > rate = rk3568_emmc_get_bclk(priv); > break; > + case TCLK_EMMC: > + rate = OSC_HZ; > + break; > #ifndef CONFIG_SPL_BUILD > case ACLK_VOP: > rate = rk3568_aclk_vop_get_clk(priv); > @@ -2582,6 +2586,9 @@ static ulong rk3568_clk_set_rate(struct clk *clk, ulong rate) > case BCLK_EMMC: > ret = rk3568_emmc_set_bclk(priv, rate); > break; > + case TCLK_EMMC: > + ret = OSC_HZ; > + break; > #ifndef CONFIG_SPL_BUILD > case ACLK_VOP: > ret = rk3568_aclk_vop_set_clk(priv, rate);