From: Frank Oltmanns <frank@oltmanns.dev>
To: Andre Przywara <andre.przywara@arm.com>,
Chen-Yu Tsai <wens@csie.org>, Frank Oltmanns <frank@oltmanns.dev>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maxime Ripard <maxime@cerno.tech>,
Michael Turquette <mturquette@baylibre.com>,
Roman Beranek <me@crly.cz>, Samuel Holland <samuel@sholland.org>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: [PATCH v2 0/2] clk: sunxi-ng: Consider alternative parent rates when determining NKM clock rate
Date: Sun, 11 Jun 2023 11:01:41 +0200 [thread overview]
Message-ID: <20230611090143.132257-1-frank@oltmanns.dev> (raw)
This is V2 of a patchset that enables NKM clocks to consider alternative parent
rates and utilize this new feature to adjust the pll-video0 clock on Allwinner
A64.
This allows to achieve an optimal rate for driving the board's panel.
To provide some context, the clock structure involved in this process is as follows:
clock clock type
--------------------------------------
pll-video0 ccu_nm
pll-mipi ccu_nkm
tcon0 ccu_mux
tcon-data-clock sun4i_dclk
The divider between tcon0 and tcon-data-clock is fixed at 4. Therefore, in order
to achieve a rate that closely matches the desired rate of the panel, pll-mipi
needs to operate at a specific rate.
Changes in V2:
- Move optimal parent rate calculation to dedicated function
- Choose a parent rate that does not to overshoot requested rate
- Add comments to ccu_nkm_find_best
- Make sure that best_parent_rate stays at original parent rate in the unlikely
case that all combinations overshoot.
Link to V1:
https://lore.kernel.org/lkml/20230605190745.366882-1-frank@oltmanns.dev/
Frank Oltmanns (2):
clk: sunxi-ng: nkm: consider alternative parent rates when finding
rate
clk: sunxi-ng: a64: allow pll-mipi to set parent's rate
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 3 +-
drivers/clk/sunxi-ng/ccu_nkm.c | 66 +++++++++++++++++++++++----
2 files changed, 60 insertions(+), 9 deletions(-)
--
2.41.0
next reply other threads:[~2023-06-11 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-11 9:01 Frank Oltmanns [this message]
2023-06-11 9:01 ` [PATCH v2 1/2] clk: sunxi-ng: nkm: consider alternative parent rates when finding rate Frank Oltmanns
2023-06-12 8:51 ` Frank Oltmanns
2023-06-12 12:31 ` Maxime Ripard
2023-06-25 10:45 ` Frank Oltmanns
2023-06-26 16:50 ` Maxime Ripard
2023-06-12 12:21 ` Maxime Ripard
2023-06-11 9:01 ` [PATCH v2 2/2] clk: sunxi-ng: a64: allow pll-mipi to set parent's rate 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=20230611090143.132257-1-frank@oltmanns.dev \
--to=frank@oltmanns.dev \
--cc=andre.przywara@arm.com \
--cc=jernej.skrabec@gmail.com \
--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=maxime@cerno.tech \
--cc=me@crly.cz \
--cc=mturquette@baylibre.com \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--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