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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A6E9C433F5 for ; Tue, 11 Oct 2022 20:42:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4524E847F4; Tue, 11 Oct 2022 22:42:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1665520972; bh=lZolKnG9VEZ4lS9rSJMWJv6uyRd4nm6q82YkRYGNcGQ=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=y0WF+iL5Gk6Wh7PcI7RNaOgw5CapMzFtX5h3lVG8IagagZ19DJhM9rg3gOc/Bfc3L T2wlD3MiqaWSXy/bEqMQt/mxqQXUeJg/UYt9PHScfR+DB8MDWaYh0RVuj359NURUw1 mgAON2DrRVf3hviubS4zeAbP+dOpAEvFeE2SENAfQm7zku8/7zbcCob2MZF4CM1r0W wlmxjgwkUNxVCKjuwKoZXQmIRIycLMn2VF4Ig9gAJ+QylSziCazOnwQ4ITQk7kCZjf h3TOSqdaBI1eNvSlkllZ4SYnlHHS7HK/FY1uS8TvvOO/jfulqF/nepY08tutoFzjsu q4QQGRC+z0QmQ== Received: from tr.lan (ip-86-49-12-201.bb.vodafone.cz [86.49.12.201]) (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 12493847F4; Tue, 11 Oct 2022 22:42:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1665520970; bh=lZolKnG9VEZ4lS9rSJMWJv6uyRd4nm6q82YkRYGNcGQ=; h=From:To:Cc:Subject:Date:From; b=ey6AQEC0UaLKGFMJC8xke5QCjpx8ZslPL1fmZSSwRYPgXMwV3hDGlLAujYry3VdPI CB3XNdI3EnMom7dWeNaS62RATcheZHJy4wkUXxHusv5B2s0eHefpk6Cklbp+Spjaa9 DJxe4qbbAsmR/cBT3n9D4OStdwzRM863Gw4FYTqDiSisy/rIIlxNzPqy0CpjKYLKv3 QZCoaFyPzUGVmG8EK0OpRTnUQSEVy8D28BoAE6CqcLCNl887SIPkJQrRdxqc4iEiBD x6iCXQ7zPosyP8SiFzsDjs4z4kqF30MWMcLXXGIjfN2W9TNrZPNcs89dGwrlnSIORb dZIyk9il2m7oQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Patrice Chotard , Patrick Delaunay Subject: [PATCH] ARM: dts: stm32: Fix and expand PLL configuration comments Date: Tue, 11 Oct 2022 22:42:44 +0200 Message-Id: <20221011204244.268595-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Fix the frequencies listed in PLL configuration comments to match the actual frequencies programmed into hardware. Furthermore, add a comment which explains how those frequencies are calculated, so it won't be necessary to look it up all over the datasheet and make more mistakes in the calculation in the future. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay --- arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 17 ++++++++++++++++- arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi index 8a7156c93bf..b72a2f63f16 100644 --- a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi @@ -190,6 +190,21 @@ CLK_LPTIM45_LSE >; + /* + * cfg = < DIVM1 DIVN P Q R PQR(p,q,r) >; + * frac = < f >; + * + * PRQ(p,q,r) ... for p,q,r: 0-output disabled / 1-output enabled + * DIVN ... actually multiplier, but RCC_PLL1CFGR1 calls the field DIVN + * m ... for PLL1,2: m=2 ; for PLL3,4: m=1 + * XTAL = 24 MHz + * + * VCO = ( XTAL / (DIVM1 + 1) ) * m * ( DIVN + 1 + ( f / 8192 ) ) + * P = VCO / (P + 1) + * Q = VCO / (Q + 1) + * R = VCO / (R + 1) + */ + /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ pll2: st,pll@1 { compatible = "st,stm32mp1-pll"; @@ -208,7 +223,7 @@ u-boot,dm-pre-reloc; }; - /* VCO = 600.0 MHz => P = 50, Q = 50, R = 50 */ + /* VCO = 600.0 MHz => P = 100, Q = 50, R = 50 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; diff --git a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi index 19f4221f876..25a288b0475 100644 --- a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi @@ -144,6 +144,21 @@ CLK_LPTIM45_LSE >; + /* + * cfg = < DIVM1 DIVN P Q R PQR(p,q,r) >; + * frac = < f >; + * + * PRQ(p,q,r) ... for p,q,r: 0-output disabled / 1-output enabled + * DIVN ... actually multiplier, but RCC_PLL1CFGR1 calls the field DIVN + * m ... for PLL1,2: m=2 ; for PLL3,4: m=1 + * XTAL = 24 MHz + * + * VCO = ( XTAL / (DIVM1 + 1) ) * m * ( DIVN + 1 + ( f / 8192 ) ) + * P = VCO / (P + 1) + * Q = VCO / (Q + 1) + * R = VCO / (R + 1) + */ + /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ pll2: st,pll@1 { compatible = "st,stm32mp1-pll"; @@ -162,7 +177,7 @@ u-boot,dm-pre-reloc; }; - /* VCO = 600.0 MHz => P = 99, Q = 74, R = 99 */ + /* VCO = 594.0 MHz => P = 99, Q = 74, R = 99 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; -- 2.35.1