From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Frank Oltmanns <frank@oltmanns.dev>
Cc: "Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>, "Chen-Yu Tsai" <wens@csie.org>,
"Samuel Holland" <samuel@sholland.org>,
"Guido Günther" <agx@sigxcpu.org>,
"Purism Kernel Team" <kernel@puri.sm>,
"Ondrej Jirman" <megi@xff.cz>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Jessica Zhang" <quic_jesszhan@quicinc.com>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/5] clk: sunxi-ng: a64: Add constraints on PLL-VIDEO0's n/m ratio
Date: Wed, 20 Dec 2023 16:12:42 +0100 [thread overview]
Message-ID: <2174554.Mh6RI2rZIc@jernej-laptop> (raw)
In-Reply-To: <87il4t9wi1.fsf@oltmanns.dev>
Dne sreda, 20. december 2023 ob 08:09:28 CET je Frank Oltmanns napisal(a):
>
> On 2023-12-19 at 17:54:19 +0100, Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
> > Dne ponedeljek, 18. december 2023 ob 14:35:22 CET je Frank Oltmanns napisal(a):
> >> The Allwinner A64 manual lists the following constraint for the
> >> PLL-VIDEO0 clock: 8 <= N/M <= 25
> >>
> >> Use this constraint.
> >>
> >> Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
> >> ---
> >> drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 8 ++++++--
> >> 1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
> >> index c034ac027d1c..75d839da446c 100644
> >> --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
> >> +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
> >> @@ -68,7 +68,8 @@ static SUNXI_CCU_NM_WITH_SDM_GATE_LOCK(pll_audio_base_clk, "pll-audio-base",
> >> BIT(28), /* lock */
> >> CLK_SET_RATE_UNGATE);
> >>
> >> -static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST(pll_video0_clk, "pll-video0",
> >> +static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_FEAT_NM_RATIO(pll_video0_clk,
> >> + "pll-video0",
> >> "osc24M", 0x010,
> >> 192000000, /* Minimum rate */
> >> 1008000000, /* Maximum rate */
> >> @@ -80,7 +81,10 @@ static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST(pll_video0_clk, "pll-vid
> >> 297000000, /* frac rate 1 */
> >> BIT(31), /* gate */
> >> BIT(28), /* lock */
> >> - CLK_SET_RATE_UNGATE);
> >> + CLK_SET_RATE_UNGATE,
> >> + CCU_FEATURE_FRACTIONAL |
> >> + CCU_FEATURE_CLOSEST_RATE,
> >
> > Above flags are unrelated change, put them in new patch if needed.
>
> You might notice that I am using a new macro for initializing the
> pll_video0_clk struct:
> New: SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_FEAT_NM_RATIO
> Old: SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST
>
> Setting the two CCU_FEATURE flags is part of the old initialization
> macro.
>
> I'll add SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_NM_RATIO_CLOSEST which
> hopefully resolves the confusion.
I'm in doubt if we need so many macros. How many users of these macro we'll have?
I see that R40 SoC would also need same ratio limits, but other that that, none?
Best regards,
Jernej
>
> Thanks,
> Frank
>
> >
> > Best regards,
> > Jernej
> >
> >> + 8, 25); /* min/max nm ratio */
> >>
> >> static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve",
> >> "osc24M", 0x018,
> >>
> >>
>
next prev parent reply other threads:[~2023-12-20 15:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 13:35 [PATCH 0/5] Pinephone video out fixes (flipping between two frames) Frank Oltmanns
2023-12-18 13:35 ` [PATCH 1/5] clk: sunxi-ng: nkm: Support constraints on m/n ratio and parent rate Frank Oltmanns
2023-12-18 17:26 ` Frank Oltmanns
2023-12-19 16:46 ` Jernej Škrabec
2023-12-20 6:58 ` Frank Oltmanns
2023-12-20 15:09 ` Jernej Škrabec
2023-12-18 13:35 ` [PATCH 2/5] clk: sunxi-ng: a64: Add constraints on PLL-MIPI's n/m " Frank Oltmanns
2023-12-19 16:46 ` Jernej Škrabec
2023-12-18 13:35 ` [PATCH 3/5] clk: sunxi-ng: nm: Support constraints on " Frank Oltmanns
2023-12-19 16:52 ` Jernej Škrabec
2023-12-18 13:35 ` [PATCH 4/5] clk: sunxi-ng: a64: Add constraints on PLL-VIDEO0's n/m ratio Frank Oltmanns
2023-12-19 16:54 ` Jernej Škrabec
2023-12-20 7:09 ` Frank Oltmanns
2023-12-20 15:12 ` Jernej Škrabec [this message]
2023-12-22 7:46 ` Frank Oltmanns
2023-12-31 9:10 ` Frank Oltmanns
2024-01-09 20:29 ` Jernej Škrabec
2023-12-18 13:35 ` [PATCH 5/5] drm/panel: st7703: Drive XBD599 panel at higher clock rate Frank Oltmanns
2023-12-19 17:04 ` Jernej Škrabec
2023-12-20 7:14 ` Frank Oltmanns
2023-12-20 15:18 ` Jernej Škrabec
2023-12-20 18:57 ` Frank Oltmanns
2023-12-22 9:10 ` Frank Oltmanns
2023-12-22 17:36 ` Jernej Škrabec
2023-12-30 21:17 ` Frank Oltmanns
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=2174554.Mh6RI2rZIc@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank@oltmanns.dev \
--cc=kernel@puri.sm \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=megi@xff.cz \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=sam@ravnborg.org \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=tzimmermann@suse.de \
--cc=wens@csie.org \
/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