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: 1113971 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="LjnB6IpZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45NYlR48tLz9s5c for ; Wed, 12 Jun 2019 01:27:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id ECCA7C2219C; Tue, 11 Jun 2019 15:03:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DF8DEC21E35; Tue, 11 Jun 2019 15:03:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 150B4C220C8; Tue, 11 Jun 2019 14:55:31 +0000 (UTC) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by lists.denx.de (Postfix) with ESMTPS id E68D8C21E3A for ; Tue, 11 Jun 2019 14:55:27 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id e5so5223954pls.13 for ; Tue, 11 Jun 2019 07:55:27 -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=nmwFUqUOCS8iVkKDxNTkju/mBzepfxNYBfFL/J8gC6k=; b=LjnB6IpZ0Y+gNjsLl/ftx6TPbz0iUGYoMqMHgW++bbo0ZfPZiOvhyMpCHKqtla3NpL yKbtsJi03n/Wcn7NuA03Mi7ytjpdGOv4jNds7rZM6GzEfPkaP+iDyMMs0mHD8Eit+Ghg m7C3hD91IZl14IOUXokveTSfrk1zzDqDI1iiw= 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=nmwFUqUOCS8iVkKDxNTkju/mBzepfxNYBfFL/J8gC6k=; b=TnuksA6hmHpYPzk9gwJUYsE1mO0yZf99bs6adduHsZeedwvJgbriOINf6ZI2IjggRB PKtzni5JFIWoLA0Yg0/NqaFtLZN2CW+x8Q7ddndsq5berilUEbbl3fOI9C8Wz/IlaSpe tK4gG1dIbtWYVXGIcrkI/axxLS1EQ1y0MF8co499qHw0eNyUyn6/Odx+gLKTGKGuQBhm pnMxuluorKbw2kpwz9UjXCrVJ2WcA1D8xNLEBhEoKWGWhARGpYupP5NvCeozU7nlKn++ Uj4bde0iXSNPHE3RIEjAcGSWLAu8vSunmvlwEBpyYVbkykGin8jfQzudPK+oLPpi6Axe PV0g== X-Gm-Message-State: APjAAAVb5JJMKYHCiYwqCJg0MOK3i6Y0ZPdxReCs3kIWZ3KmnMQ1HC73 dTsMB3oc1uqw8GsTyx/FSMUFqg== X-Google-Smtp-Source: APXvYqxxfDetGSjnhQGFjgOzQqIJ+OjGOS8Osf8b4tK+n2yinV8sxjFGWzIquyVawQp9eXTg7oIGmw== 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 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 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, gajjar04akash@gmail.com Subject: [U-Boot] [PATCH 54/92] clk: rockchip: rk3399: Set 50MHz ddr clock X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" 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};