From patchwork Sun Jul 10 17:52:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Stratiienko X-Patchwork-Id: 12912617 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E542C433EF for ; Sun, 10 Jul 2022 17:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zIrYHWuiQodtyrEkIRFzeV9GpX065KryF4Nbxz6kpM8=; b=ed21PTtGEbM5hA ElILnPJ7hkFwneBSW450gdpIBZSj2nOa8J19dyZtxc6U43NUK4J6ztuUD30QuMfEiYgfWL7pcU/Eb 57RjPa0v2YWLqsXd5AqWNZBxVjbk3dLzaPdiUhCrsV6IhkXgRBidcaOJHTLDurSAs7+Pzawz6fGDj b5Omv+fHjAX9AVhmotAcaeBQf7jl2liBiXp892TveYaQnKx4bDg9//YYwMezNx/6ANfym6VDsYYQf xRoYxdGuPPc+yZ6tmAgx5SjXXBWV5zuHrLG2vuzWUAsEj+Ln29tKnPPTK4xCtN+U1WkTo23OYREv9 PuA8kEIddoogv7U5M/jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAb6q-00CofI-4R; Sun, 10 Jul 2022 17:52:44 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAb6m-00CoeN-Ps for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 17:52:42 +0000 Received: by mail-wr1-x432.google.com with SMTP id n10so4396186wrc.4 for ; Sun, 10 Jul 2022 10:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AeSUffjgrxLIDrHX0WRm/GzkZY58B1bVWJKIzfHMVqY=; b=Fx0xAcxQswDl6PZOZPn4Ig2Gi+z8tQ3eW9sjga5TlDz1ubNvvqGiBOz+y61CqBBRrG 7rtnn+Sw8cpEQvDGJeAhqBOD2vpmj0W+qQamEdEDi+vSGoGM2WYrTOozWjIRgwlYwtTH 6MfIw+1j+v1FJsv8wmAWP03om3TOARE3okCdLHnzZoVhfe95oH++xbARRkV/iuvd7bO1 vuYRUpxD0kMucxII8XXDqzNB1lTZ5so7rodpfMJXSLM3aCUofra54ax6iITHa5BTOes7 8iviher/DChZKOOk2kr2wpZ0HjbcsbHAVb/L7+/mFqPcnWEzJLftQhpIAp9eJCEoPRKC vlBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AeSUffjgrxLIDrHX0WRm/GzkZY58B1bVWJKIzfHMVqY=; b=PZoOaTSUDRR7mey38SRFIq9mXYsSvOMolNvRjW9sHF6Yq+K+LAHRNb8hkeFu49c0FV UgcTchTrB9z2+DCdWGtbMTbDWNJI3wiK1nqivUdFtPnReC28x8qfQkWv0/sUusdGhyB4 9bFoVil5kg1QfhBxTggHjE0dGDEb8ZBy3T9vEb3K9+wWiih1zlPgVqeXGvGxPPqPfYfP UmFMiTWNup8ZmMBWkM2YKC1DQCb0gBlf67BJelns6ms/BzN+S4SppnzWwoSsfJSEqvL6 ljy8mqeSdKZc6Z9qQnY8zCpjiX/Ey17q2hA0RKH4dRhP4Iiwtd/hmKPM2IvV1GfXG0Ro nA3Q== X-Gm-Message-State: AJIora/VoiCiFsui8xcFC6G72U0bQn4LOI+P7jF1XZqx+cuEXFyzjt9S 3plwYJaEBME5uaQsKRHd8TQ= X-Google-Smtp-Source: AGRyM1tO70VRNWP+zx9h+dZMqVSgs/r1nVqGy2ngqLU80XsFfk9kYgm6wOt2MUcya3rcsubm/NQJDA== X-Received: by 2002:a5d:6dab:0:b0:21d:9fc8:3029 with SMTP id u11-20020a5d6dab000000b0021d9fc83029mr4189820wrs.172.1657475558497; Sun, 10 Jul 2022 10:52:38 -0700 (PDT) Received: from roman-Latitude-3400.globallogic.com ([195.234.74.2]) by smtp.gmail.com with ESMTPSA id c8-20020a7bc848000000b003a2e7c13a3asm840346wml.42.2022.07.10.10.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 10:52:38 -0700 (PDT) From: Roman Stratiienko To: samuel@sholland.org Cc: mturquette@baylibre.com, sboyd@kernel.org, mripard@kernel.org, wens@csie.org, jernej.skrabec@gmail.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Roman Stratiienko Subject: [RFC] ccu-sun50i-h6: Bump-up DDR0 PLL to 1800MHz Date: Sun, 10 Jul 2022 20:52:14 +0300 Message-Id: <20220710175214.544748-1-r.stratiienko@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_105240_859989_BAC97821 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org While debugging complex animated composition cases I noticed a glitch which as it turned-out eventually was caused by lack of memory bandwidth. I can't find a DRAMC manual to check what input frequency must be supplied to avoid exceeding the 800MHz LPDDR3 which is installed on my orangepi3 board. But the system is running stable so far. Signed-off-by: Roman Stratiienko --- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c index 750368a86b8b6..abdde80307993 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c @@ -1203,6 +1203,17 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev) val &= ~GENMASK(3, 0); writel(val, reg + gpu_clk.common.reg); + /* + * Increase DDR0 PLL from 1488(default) to 1800MHz. + * (DE3.0 require higher memory bandwidth while displaying + * complex composition at 1920x1080@60FPS) + */ + + val = readl(reg + SUN50I_H6_PLL_DDR0_REG); + val &= ~GENMASK(15, 0); + val |= 74 << 8; + writel(val, reg + SUN50I_H6_PLL_DDR0_REG); + /* Enable the lock bits on all PLLs */ for (i = 0; i < ARRAY_SIZE(pll_regs); i++) { val = readl(reg + pll_regs[i]);