From patchwork Tue Jun 11 14:50:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10987341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7117924 for ; Tue, 11 Jun 2019 14:55:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97152284F1 for ; Tue, 11 Jun 2019 14:55:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B1DA286DE; Tue, 11 Jun 2019 14:55:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40B48284F1 for ; Tue, 11 Jun 2019 14:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OMN7aJwXW5Lo/sytI8kJVCJ7BEGFw4F/a3GWWy/EhdE=; b=bzFlhigrnCjB9l G1zM3MrOiwiHPP7CDmWMGxZSlWxPSQTThXw0bRiGue1HHgpAY6fDeX5X1fzQF7irgnT8fYt/i3mn6 TDlx0uiHrls8x7Qx2ucld8hwHXXEE1wYaB8T43/kRO+ZQta0ooD87ZVfNjAhTzTZhTE0sOTg8pRje sIhMB+/OkRDNuY6UHfdeNo8/BBJfLxiALAZXt6wiNaPyTVetLGAdtLlH16+VgsQKxoD0In3V2dhgU tSmUIqyZ8SimsSSmb9zRjp5cJzWTGafFUoGcvrhGBhACHRFy9RVYR09fEdFmnnuxTVhBuCFE2a/0O mLRH2BhYKqiWjmPkadbA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haiBQ-0007Q9-UG; Tue, 11 Jun 2019 14:55:32 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1haiBO-0007Ns-LY for linux-rockchip@lists.infradead.org; Tue, 11 Jun 2019 14:55:31 +0000 Received: by mail-pl1-x643.google.com with SMTP id bh12so5236260plb.4 for ; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VZZq8s/MFgMQ4+KCax6f04xB7tKYUG01ZRKiMSlIBrI=; b=dpJlCAF4nB2sXe4pTDshY+JDucM4o9pomeDL15230IOt3GubJrLMCejywi54/M/XEH gA151hEH6+rYqxLOETqAr6yLvSojZ/YoGE7HJMyFrIirEMuKntCUsjDdjAH6ay2ejtHi ciU/hM9xDpDmXHDW3HxaGokR/Tk7y4vO7WAls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VZZq8s/MFgMQ4+KCax6f04xB7tKYUG01ZRKiMSlIBrI=; b=ogAKcECM/UGDAC2mHbJugiEyiszjXv71iV16C/ZGOu6rZHonC0Vs9v0AeFU2MaVnvt +pENHPkmbEXAglfmBpUD5NTkVvAT4xL6EbUbqyHY+RE2EGrZS3IkbwDBxZdLPQRZfEOP 0JQ2DDKVt1qft9mtifBe1oYI6yu4HY5b/VK25sNDQ/jMVGd9oR8bfgbEdWOsS4k3Rfbj ClwAgo5SEr+bKaUEsexkXgugl9+lOnIjQTvLRrTWDuPxQHCnU5PalrP+twqsCByVAGkX RnqH/eLp2oq1jtCBCEsoIbRZ6TGLto2ZlLlGkCMTZmF6q5tVu0+6KDG3CMIXDkgkh4qE lO/Q== X-Gm-Message-State: APjAAAXSg5rbtaOqBf4ZgGBXwrvmMtFW41iEcU+nRGTc4SHpfTgZNCA+ Y4dLd0Ypl49UvP4lBKguqZ1G2w== X-Google-Smtp-Source: APXvYqyIjvefk9GGkYKTTYabb8QFKZxVBZRVhkf0CvA94l+SSIVdS5rveYbcIDGogcfct/0RhuPeoQ== X-Received: by 2002:a17:902:988a:: with SMTP id s10mr76935799plp.304.1560264930144; Tue, 11 Jun 2019 07:55:30 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:29 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Subject: [PATCH 55/92] clk: rockchip: rk3399: Set 400MHz ddr clock Date: Tue, 11 Jun 2019 20:20:58 +0530 Message-Id: <20190611145135.21399-56-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_075530_733248_0C0D30D3 X-CRM114-Status: UNSURE ( 7.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , gajjar04akash@gmail.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for setting 400MHz ddr clock. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/clk/rockchip/clk_rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 1de21c9f3e..79007b8682 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -839,6 +839,10 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru, dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 100, .postdiv1 = 4, .postdiv2 = 1}; break; + case 400 * MHz: + dpll_cfg = (struct pll_div) + {.refdiv = 1, .fbdiv = 50, .postdiv1 = 3, .postdiv2 = 1}; + break; case 666 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 2, .fbdiv = 111, .postdiv1 = 2, .postdiv2 = 1};