From patchwork Tue Aug 28 18:55:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Urja Rannikko X-Patchwork-Id: 10578943 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 B5B1814BD for ; Tue, 28 Aug 2018 18:59:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A51142A94C for ; Tue, 28 Aug 2018 18:59:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97DCA2A96B; Tue, 28 Aug 2018 18:59:06 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 3290B2A94C for ; Tue, 28 Aug 2018 18:59:06 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=EqKXsUJQyJBUTRdo7CzAyAHttkd0nZbGeiN/cb/3ek0=; b=K4PHsYfpv/PaGA/pMj+Z5oyJ8j NjeyCtow5S7be1YBnUm+ERoNnVonk4Sq2gAPIF8I+3EJ5aXILnjXNhmgsidw3+JkNqV0Bamdak+BO lrIeTIFQtzN4O59d2v/Gmsx5OS/pUnTcLJ6jwWoUqw6oqsFb3ezcQyE+HHgWnWrO0+ZalKG7+KaeR OfwrAYlwBdj5icKAzQQnlpHdJ1ZU///1dHdTHxVy54inOkbTqyqEDt3VXIS4+Kl8kd+VxWzyEdBp9 GrhZZW5cEieuvjMYD5Nhlchog3BR2r+xE3vLXuk9dRhSd3wk4erqu8tXf4BiDHNbW1DgE+C1tp3+H GX3oMdiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fujCV-0004gW-4f; Tue, 28 Aug 2018 18:58:51 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fujAw-00043v-NQ for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2018 18:57:17 +0000 Received: by mail-wr1-x441.google.com with SMTP id u12-v6so2522019wrr.4 for ; Tue, 28 Aug 2018 11:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FuMijDmeISbFVX6Jnkf6+lUHA6vRO5LA0/82lHe1+os=; b=Sc9AN2WZ6OzizF7wF2uQKhhznu4rxavckpkPiQH0ypAwQUZdMaw68cfQ5eqsWQo4Z0 hLg9GDvdETLlTOI8nmk8S5qpTzkpB7+cSWeOKWhQL6uiuoV8EDpxiJcucw+pYMg5Dxz2 JIkTo/tvv6vHCsLXl6YeNIllO84yelWtCUTZcEku6W89IM093PyRoWfRB2AwyosHg7om x3tnaxb1wCFSL7KImsIErUqsA5+lIwqNJwRDcQzwYkb3MFn5+aZB594MFRNozPQFlwEm 4g7qU/PA6vGGhpt0KG/4yQJrfwZYux1pB7mXCe2MO0IdWKIL+rf6WRarVrbaXFWJiYX2 OA7w== 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; bh=FuMijDmeISbFVX6Jnkf6+lUHA6vRO5LA0/82lHe1+os=; b=CeqS0qe+irX9yL5CYusQbEXfxCkz7k7W7noITxK61J9H0GVWq3/+gplh6eF2SvrtJh c2WMHM0rClUDrAe5ULKOEH6A9JNaWjLUXFSfZeWfQb3KzKeFM+0uB+iugoatxJEUZESb GK+KG47ZjID3Vh7psQDxeA33eZKKwgvYIIpgNZDE9MYTbLkLcuHmCpJrBUgUYot3Y4/K vinFRDdX2FEj/xJeFY+hZC6PMuHTuKElqGAhmjacslf/5/3nFNm930k+hua7hULksqik 6vCykmEYZTNWfvT9sJjRyJ0u5o6HO+r1cvIOcyGP49KHsjWkjhWHhyGdNcHVN1LDlYme DGGg== X-Gm-Message-State: APzg51DbxkugHX6F4FB1ewptPuPnItDyzLbU79oyS8witlpCPSGiW2Da kKy45C9sc5T+IonESgmlWDZvpmKfKA== X-Google-Smtp-Source: ANB0VdYQVMOgZQVKEEyJSG+M0UIk30wRLjJ8tYJvKm6RCnsJenY5ADiI3bycKibU9D3AXcMtQqfvIQ== X-Received: by 2002:adf:f28c:: with SMTP id k12-v6mr2068642wro.263.1535482622919; Tue, 28 Aug 2018 11:57:02 -0700 (PDT) Received: from localhost.localdomain (esm-84-240-79-214.netplaza.fi. [84.240.79.214]) by smtp.gmail.com with ESMTPSA id x125-v6sm1389843wmg.27.2018.08.28.11.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 11:57:02 -0700 (PDT) From: Urja Rannikko To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/7] clk: rockchip: improve rk3288 pll rates for better hdmi output Date: Tue, 28 Aug 2018 18:55:07 +0000 Message-Id: <20180828185513.13216-2-urjaman@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180828185513.13216-1-urjaman@gmail.com> References: <20180828185513.13216-1-urjaman@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180828_115714_760384_BF2C893C X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Urja Rannikko , devicetree@vger.kernel.org, heiko@sntech.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add and correct PLL rates for better hdmi output. This includes minimizing jitter on 213 MHz for better 71 MHz, 250.5 MHz for better 83.5 MHz, 428 MHz for better 25.175 Mhz, low jitter 273 MHz for better 68.25 mhz, 356 MHz for better 118.68 Mhz and 300MHz. Increase the used Fvco for 308, 324 MHz, 292.5 MHz, 273.6 MHz, 238 MHz and 216 MHz. And add some additional rates allowing to reach better hdmi-related rates in general. These match the rates used by ChromeOS, so have been quite widely tested. Signed-off-by: Urja Rannikko --- drivers/clk/rockchip/clk-rk3288.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c index 450de24a1b42..5a67b7869960 100644 --- a/drivers/clk/rockchip/clk-rk3288.c +++ b/drivers/clk/rockchip/clk-rk3288.c @@ -83,22 +83,43 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = { RK3066_PLL_RATE( 768000000, 1, 64, 2), RK3066_PLL_RATE( 742500000, 8, 495, 2), RK3066_PLL_RATE( 696000000, 1, 58, 2), + RK3066_PLL_RATE_NB(621000000, 1, 207, 8, 1), RK3066_PLL_RATE( 600000000, 1, 50, 2), RK3066_PLL_RATE_NB(594000000, 1, 198, 8, 1), RK3066_PLL_RATE( 552000000, 1, 46, 2), RK3066_PLL_RATE( 504000000, 1, 84, 4), RK3066_PLL_RATE( 500000000, 3, 125, 2), RK3066_PLL_RATE( 456000000, 1, 76, 4), + RK3066_PLL_RATE( 428000000, 1, 107, 6), RK3066_PLL_RATE( 408000000, 1, 68, 4), RK3066_PLL_RATE( 400000000, 3, 100, 2), + RK3066_PLL_RATE_NB( 394000000, 1, 197, 12, 1), RK3066_PLL_RATE( 384000000, 2, 128, 4), RK3066_PLL_RATE( 360000000, 1, 60, 4), + RK3066_PLL_RATE_NB( 356000000, 1, 178, 12, 1), + RK3066_PLL_RATE_NB( 324000000, 1, 189, 14, 1), RK3066_PLL_RATE( 312000000, 1, 52, 4), - RK3066_PLL_RATE( 300000000, 1, 50, 4), - RK3066_PLL_RATE( 297000000, 2, 198, 8), + RK3066_PLL_RATE_NB( 308000000, 1, 154, 12, 1), + RK3066_PLL_RATE_NB( 303000000, 1, 202, 16, 1), + RK3066_PLL_RATE( 300000000, 1, 75, 6), + RK3066_PLL_RATE_NB( 297750000, 2, 397, 16, 1), + RK3066_PLL_RATE_NB( 293250000, 2, 391, 16, 1), + RK3066_PLL_RATE_NB( 292500000, 1, 195, 16, 1), + RK3066_PLL_RATE( 273600000, 1, 114, 10), + RK3066_PLL_RATE_NB( 273000000, 1, 182, 16, 1), + RK3066_PLL_RATE_NB( 270000000, 1, 180, 16, 1), + RK3066_PLL_RATE_NB( 266250000, 2, 355, 16, 1), + RK3066_PLL_RATE_NB( 256500000, 1, 171, 16, 1), RK3066_PLL_RATE( 252000000, 1, 84, 8), - RK3066_PLL_RATE( 216000000, 1, 72, 8), - RK3066_PLL_RATE( 148500000, 2, 99, 8), + RK3066_PLL_RATE_NB( 250500000, 1, 167, 16, 1), + RK3066_PLL_RATE_NB( 243428571, 1, 142, 14, 1), + RK3066_PLL_RATE( 238000000, 1, 119, 12), + RK3066_PLL_RATE_NB( 219750000, 2, 293, 16, 1), + RK3066_PLL_RATE_NB( 216000000, 1, 144, 16, 1), + RK3066_PLL_RATE_NB( 213000000, 1, 142, 16, 1), + RK3066_PLL_RATE( 195428571, 1, 114, 14), + RK3066_PLL_RATE( 160000000, 1, 80, 12), + RK3066_PLL_RATE( 157500000, 1, 105, 16), RK3066_PLL_RATE( 126000000, 1, 84, 16), RK3066_PLL_RATE( 48000000, 1, 64, 32), { /* sentinel */ },