Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: "Benoît Monin" <benoit.monin@bootlin.com>
To: "Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Linus Walleij" <linusw@kernel.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-gpio@vger.kernel.org,
	"Benoît Monin" <benoit.monin@bootlin.com>
Subject: [PATCH v2 07/13] clk: eyeq: Skip post-divisor when computing PLL frequency
Date: Tue, 23 Dec 2025 11:02:22 +0100	[thread overview]
Message-ID: <20251223-eyeq6lplus-v2-7-cd1fd21d182c@bootlin.com> (raw)
In-Reply-To: <20251223-eyeq6lplus-v2-0-cd1fd21d182c@bootlin.com>

The output of the PLL is routed before the post-divisor so it should be
ignored when computing the frequency of the PLL, functional change is
implemented to reflect how the clock signal is wired internally.

For the PLL of the EyeQ5, EyeQ6L, and EyeQ6H, this change has no impact
as the post-divisor is either reported as disabled or set to 1. The PLL
frequency is the same before and after the post-divisor.

For the PLL in EyeQ6Lplus, however, the post-divisor is not 1, so it must
be ignored to compute the correct frequency.

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
---
 drivers/clk/clk-eyeq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c
index ea1c3d78e7cd..182b408b6aa4 100644
--- a/drivers/clk/clk-eyeq.c
+++ b/drivers/clk/clk-eyeq.c
@@ -177,8 +177,6 @@ static int eqc_pll_parse_registers(u32 r0, u32 r1, unsigned long *mult,
 
 	*mult = FIELD_GET(PCSR0_INTIN, r0);
 	*div = FIELD_GET(PCSR0_REF_DIV, r0);
-	if (r0 & PCSR0_FOUTPOSTDIV_EN)
-		*div *= FIELD_GET(PCSR0_POST_DIV1, r0) * FIELD_GET(PCSR0_POST_DIV2, r0);
 
 	/* Fractional mode, in 2^20 (0x100000) parts. */
 	if (r0 & PCSR0_DSM_EN) {

-- 
2.52.0


  parent reply	other threads:[~2025-12-23 10:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 10:02 [PATCH v2 00/13] Introducing the Mobileye EyeQ6Lplus SoC Benoît Monin
2025-12-23 10:02 ` [PATCH v2 01/13] dt-bindings: mips: Add " Benoît Monin
2025-12-23 10:02 ` [PATCH v2 02/13] dt-bindings: soc: mobileye: Add EyeQ6Lplus OLB Benoît Monin
2025-12-23 10:02 ` [PATCH v2 03/13] MIPS: Add Mobileye EyeQ6Lplus support Benoît Monin
2025-12-23 10:02 ` [PATCH v2 04/13] reset: eyeq: Add Mobileye EyeQ6Lplus OLB Benoît Monin
2026-01-08  9:56   ` Philipp Zabel
2025-12-23 10:02 ` [PATCH v2 05/13] pinctrl: eyeq5: Use match data Benoît Monin
2025-12-23 10:02 ` [PATCH v2 06/13] pinctrl: eyeq5: Add Mobileye EyeQ6Lplus OLB Benoît Monin
2026-01-02 21:57   ` Linus Walleij
2026-01-02 22:03     ` Thomas Petazzoni
2026-01-03 18:59       ` Linus Walleij
2026-01-03 19:01         ` Linus Walleij
2025-12-23 10:02 ` Benoît Monin [this message]
2025-12-23 10:02 ` [PATCH v2 08/13] clk: eyeq: Adjust PLL accuracy computation Benoît Monin
2025-12-23 10:02 ` [PATCH v2 09/13] clk: eyeq: Add Mobileye EyeQ6Lplus OLB Benoît Monin
2025-12-23 10:02 ` [PATCH v2 10/13] MIPS: Add Mobileye EyeQ6Lplus SoC dtsi Benoît Monin
2025-12-23 10:02 ` [PATCH v2 11/13] MIPS: Add Mobileye EyeQ6Lplus evaluation board dts Benoît Monin
2025-12-23 10:02 ` [PATCH v2 12/13] MIPS: config: add eyeq6lplus_defconfig Benoît Monin
2025-12-23 10:02 ` [PATCH v2 13/13] MAINTAINERS: Mobileye: Add EyeQ6Lplus files Benoît Monin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251223-eyeq6lplus-v2-7-cd1fd21d182c@bootlin.com \
    --to=benoit.monin@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@mobileye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox