From patchwork Thu Oct 17 03:11:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13839413 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 EAC17D2F7E1 for ; Thu, 17 Oct 2024 03:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=wNosOTgIHyHlJ/O2cQTioP0e+HMKQiAOT0yUIRwpr7Q=; b=nSMVa8yDhWbPd3bUrRbH4MSRkB 2W8jTzogDG17rVgxTr05+i9tGJZR4LBYzsJ147kOXJOaovaFYLlZc3RvionNYT2oejahsHL7QW16r qPrMhWmGT6foQiGLP/JT2Al//P7rELu9UrA0SdrO33le1Cjqj6+1BRZCTBA3calDBcsjYvs6on4O6 bt/IR82g6L6qp7jeGtLa1JXj5xrz98b48Gc5TU4C9v0NSGjbpnPDrIdTCeSxuZgdLEvudTUV8jkly d9wRy774TDIxXcNxUPbolrNcv80K7DgGFfNaTYiLVOh4OlQcKVnaK8yFf5z/gU5KKboxuJpore0mK gGqjIMzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1GxE-0000000Ddj8-38eV; Thu, 17 Oct 2024 03:13:36 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1Gvk-0000000DdUL-1nEs for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 03:12:08 +0000 Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 802D488E1B; Thu, 17 Oct 2024 05:12:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1729134723; bh=wNosOTgIHyHlJ/O2cQTioP0e+HMKQiAOT0yUIRwpr7Q=; h=From:To:Cc:Subject:Date:From; b=NsddcrC1DsO83rFLHFQf8qad3Q1V5IN/EmarqxLMCadbeB/sdN9DUMhS8e9CRflJC uAj8pZesrs1YsVx6xy8thEDeJxYm1RdzrCuWK3I18wL4RpKQ8RU4fqHPWjMwMxo/uW mHowOGo9iJTQ+fBE6Xk6O806PKKniWhbtvJ16fpCcrzgIsDcRyP5DwAHGu4ofy0+r9 I7A3qBMhGAJlw3H7putLDAVMkAG4YdkL9am/bId8l6tNSnivNSd7T/BpHfmSn3J3hV cnSmySnknIEbyoF2WNBdUvi1KutxxbeJAhUJ0EzyHxHpItphHkWyOHI0DphevzhyaK PeWixrh6iAgrw== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: kernel@dh-electronics.com, Marek Vasut , Isaac Scott , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Liu Ying , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Yannic Moog , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz Date: Thu, 17 Oct 2024 05:11:20 +0200 Message-ID: <20241017031146.157996-1-marex@denx.de> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_201204_819609_73796327 X-CRM114-Status: GOOD ( 11.72 ) 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 The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can reach accurate pixel clock of exactly 72.4 MHz. Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi which is 1039.5 MHz, which divides down to inaccurate pixel clock of 74.25 MHz which works for this particular panel by sheer chance. Stop taking that chance and set correct accurate pixel clock frequency instead. Fixes: 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support") Reported-by: Isaac Scott Signed-off-by: Marek Vasut Reviewed-by: Yannic Moog Tested-by: Yannic Moog --- Cc: Conor Dooley Cc: Fabio Estevam Cc: Isaac Scott Cc: Krzysztof Kozlowski Cc: Liu Ying Cc: Pengutronix Kernel Team Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: Yannic Moog Cc: devicetree@vger.kernel.org Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- Note: I do not have the board, but Isaac reported they tested it successfully. TB would be nice. --- .../dts/freescale/imx8mp-phyboard-pollux-rdk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts index 50debe821c421..9c102acb8052c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts @@ -218,6 +218,18 @@ ldb_lvds_ch1: endpoint { }; }; +&media_blk_ctrl { + /* + * The LVDS panel on this device uses 72.4 MHz pixel clock, + * set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB + * serializer and LCDIFv3 scanout engine can reach accurate + * pixel clock of exactly 72.4 MHz. + */ + assigned-clock-rates = <500000000>, <200000000>, + <0>, <0>, <500000000>, + <506800000>; +}; + &snvs_pwrkey { status = "okay"; };