From patchwork Tue Jun 11 14:50:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 505 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 497443F08A for ; Tue, 11 Jun 2019 16:55:28 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id f25sf9752584pfk.14 for ; Tue, 11 Jun 2019 07:55:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264927; cv=pass; d=google.com; s=arc-20160816; b=Mk7+KBnimzpGtBMTqQato85VO5V4db0UoqkmIIRzU0F805be2e0IrRUI5MQmI7Ryzz zhp0RyR5GZ1YIDmrn0CQNSXBeb/o0T0/XyAAALcTJ7/tu43bNsgvGSEJ/ph2zO6H931i CCdDwrpYMURLkhugLk6RIsdtzJCXLTD/1R8aVfW6bwUxX+t5SuImoXH9F0PIDjoZYBwe KCgI74CbizPXKR/XsusXurJ3DkBA19kPjVAUVkDDyAjIu3WmyYz/wABuVUvQvKWsvGU4 KntxLemh4meh8NZJXa8Cuqx+w7BbACBQTUDt3zQn/Y73a1kKnGFNX5/wtLDKHvDARGLf mJOg== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=l7o6W1jSJPtquAziEV8CvaDe5CtcXVNUO/7jKyjDB1VrwNxMkqE4rbge5D+mSo/4Lu HLAS3YsLNdW5KJlod2yW2wyRoAlAPDjw4iHYQVt/c3XGuSMm4DPLJWdMvGe5dwBq2qZa TU+NcBHQ/MDlzIJEYq2MS2Jsu7fbEvZFOkimnopogNckcy+GpAjegweSReMrw5q7Q/0f pyw9cDsjs1D4a7kndP/pAobBDajeK7pN44CY7Wm0W7rfc9Ki0NjcMo9x/PWCGL1w4XqZ qR8zPlTDE21dNua3XL/d3cCzItRCxg0B6C93tra/0ksU4VrOO8PVBoCIR9ZJe+inMn5W /KkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=DIY2euIEBnoRxJwcBA7IDTgohVth/eDX7nW3VaW6WOYwa/irYvOgF+MM6ypatKCgup 7Yd4p2/HywxKqiZ1TMco2Vv7IQOVcMU7OTJkosc5ivAnZpWiGLvlZE1hZFjyfHt/Thkz Poz9I6BSrjObbTlRpkT+ithALHb6JABE5T9xc= 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: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=nDFl7MbzeQ7oB2bxP4KAMqBqVpITLmNbmheqyIbSd5s=; b=lcMGsCKyAZ5/WRORjgxLelKgVUGMcHe0MUYKJWPCyBdm1uTwd+HH+IDXZotWppYTPK 1++o+FxkwZClgak/BEX7RAZa7+uUGZooUSM3Hq1abEjJjwM2zdOGRPjL0PJOjLHvnKjB 8IitnuU8j4Ceb0CawL2SkQLE9jj3qkizPotAbROKjpD5zSZVYn7+64TQmGe1OHYeDAV+ SPz/ZQaGf4zfQC3dhEvE2+ps+cVyHjwaRy0iP3HZTgztOKzy0sq8wZTcdK9wKcOoaXTV n3JgQ3jMg24i6g/z8qKCKtDXrIMM4yl+WBunkg7msD+y3Aws/KaD6pZTfdnQYk63c4CR cTAA== X-Gm-Message-State: APjAAAWNYyXFYjTzxcunzL0J2/sZBaoG+yIkUGsyBxrv/EEORZB1zwVK dL/eWvjxaaaYKKarxfDAZU06U8ZZ X-Google-Smtp-Source: APXvYqyZ4Q+uATjrBGkKC/WI7uX4sQjA2pzktudwsLyhd96Om549uNCykaTy5XWXE3fu3vKDeNLh+Q== X-Received: by 2002:a17:902:d20f:: with SMTP id t15mr9295039ply.11.1560264927128; Tue, 11 Jun 2019 07:55:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:35c5:: with SMTP id r63ls865689pjb.0.gmail; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) X-Received: by 2002:a17:90a:2e89:: with SMTP id r9mr27179286pjd.117.1560264926837; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264926; cv=none; d=google.com; s=arc-20160816; b=hFZjKYHF/3H71qlL6UZxO6viwbYjy+yTmnV8uiFA/BxxJVQ1XbxxG5swlmljqwjCuX EChcmD3b4q+yl0Sv+Q+uifHASiVKmUW+dGEkKLgpAwTQS8fNW/tfdzsSXKG7Jo95cpzO 25u0AGE452GtI4MLNeUwrIeRNkVoryWct5SXDR2i8+EERo3YwgZA/qPLQ+NDpH6BieoF WJpjbKzTnIKVvtXPD0421UEqq4skbYcDCAXBBYexN6TllI/cHORP0b38XwLMPuXYubWb N8Zb+4iKX6yZOB0hPVKY910Z7XdBsl1dk4vTsfwNhz8Qr5i4FcbyjW8kZbYg1JgHeF/l cYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nmwFUqUOCS8iVkKDxNTkju/mBzepfxNYBfFL/J8gC6k=; b=J92kUvzkXGUu2QXx+mx40AU5rwuyC/n3Wsa4rS6/1q0ZKhodPXJPSLxU23pkhCsjU2 qkmEZ7ni1c72GARUyfcS1VfRSbUca1rLSfXhbpraX345gdO0po4C2SiWZJSHS16i6DB9 CDcs6NvXK+3NOtlypSRXfr4QpvWmP9DOZWWjhPzHhN8ViB52/n0KfDjxC0xmhcmYmHro 5BgBPSglp0Kio3bmFB4TgCUtX53QWIDbTd+b0ecDn5ucN0QBAvlUnAx0tOhp0E7fbf0I MiwGDkKaQd3O7UCI8meyk3DZ1uS7qz30NjW1JhPA4WIK4ztNxheCkXnCRuaRyIZYtQlO xCCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e33sor15508811pld.12.2019.06.11.07.55.26 for (Google Transport Security); Tue, 11 Jun 2019 07:55:26 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:70c4:: with SMTP id l4mr40759268plt.171.1560264926408; Tue, 11 Jun 2019 07:55:26 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:25 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 54/92] clk: rockchip: rk3399: Set 50MHz ddr clock Date: Tue, 11 Jun 2019 20:20:57 +0530 Message-Id: <20190611145135.21399-55-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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LjnB6IpZ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.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: , Add support for setting 50MHz 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 5d1ad94e85..1de21c9f3e 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -827,6 +827,10 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru, /* clk_ddrc == DPLL = 24MHz / refdiv * fbdiv / postdiv1 / postdiv2 */ switch (set_rate) { + case 50 * MHz: + dpll_cfg = (struct pll_div) + {.refdiv = 1, .fbdiv = 12, .postdiv1 = 3, .postdiv2 = 2}; + break; case 200 * MHz: dpll_cfg = (struct pll_div) {.refdiv = 1, .fbdiv = 50, .postdiv1 = 6, .postdiv2 = 1};