Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v3 0/6] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq
@ 2023-01-17 13:54 Christian Marangi
  2023-01-17 13:54 ` [PATCH v3 1/6] clk: qcom: gcc-ipq6018: drop redundant F define Christian Marangi
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Christian Marangi @ 2023-01-17 13:54 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Konrad Dybcio, Michael Turquette,
	Stephen Boyd, linux-arm-msm, linux-clk, linux-kernel
  Cc: Christian Marangi

This small series fix a current problem with ipq8074 where the 2 uniphy
port doesn't work in some corner case with some clk configuration. The
port to correctly work require a specific frequency, using the wrong one
results in the port not transmitting data.

With the current code with a requested freq of 125MHz, the frequency is
set to 105MHz. This is caused by the fact that there are 2 different
configuration to set 125MHz and it's always selected the first one that
results in 105MHz.

In the original QSDK code, the frequency configuration selection is
different and the CEIL FLOOR logic is not present. Instead it's used a
BEST approach where the frequency table is checked and then it's checked
if there are duplicate entry.

This proposed implementation is more specific and keep the CEIL FLOOR
logic while maitaining the possibility to provide multiple
configuration.

The first 2 patch drop redundant F entry redefinition.

The 3rd and 4th one try to align rcg2 set rate to what clock core suggest
by using just what determine_clock pass to clk core.

The 5th one implement the change with also some macro description on how
this new implementation works. On determine the old v2 logic is used but
for set the requested parent is used instead of researching.

The 6th one migrate the gcc-ipq8074 driver to this new implementation.

Changes v3:
- Add qcom_find_freq_exact
- Drop re-search on rcg2_set_rate
- Rework multiple conf patch to follow new implementation
Changes v2:
- Out of RFC
- Fix compile warning from buildbot related to F redefinition

Christian Marangi (6):
  clk: qcom: gcc-ipq6018: drop redundant F define
  clk: qcom: gcc-sdm660: drop redundant F define
  clk: qcom: common: add qcom_find_freq_exact
  clk: qcom: clk-rcg2: don't re-search config on rcg2_set_rate
  clk: qcom: clk-rcg2: introduce support for multiple conf for same freq
  clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf

 drivers/clk/qcom/clk-rcg.h     |  14 +++-
 drivers/clk/qcom/clk-rcg2.c    | 140 +++++++++++++++++++++++++++------
 drivers/clk/qcom/common.c      |  17 ++++
 drivers/clk/qcom/common.h      |   2 +
 drivers/clk/qcom/gcc-ipq6018.c |   2 -
 drivers/clk/qcom/gcc-ipq8074.c |  64 +++++++++++----
 drivers/clk/qcom/gcc-sdm660.c  |   2 -
 7 files changed, 196 insertions(+), 45 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-29 22:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 13:54 [PATCH v3 0/6] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq Christian Marangi
2023-01-17 13:54 ` [PATCH v3 1/6] clk: qcom: gcc-ipq6018: drop redundant F define Christian Marangi
2023-01-17 13:54 ` [PATCH v3 2/6] clk: qcom: gcc-sdm660: " Christian Marangi
2023-01-17 13:54 ` [PATCH v3 3/6] clk: qcom: common: add qcom_find_freq_exact Christian Marangi
2023-01-17 13:54 ` [PATCH v3 4/6] clk: qcom: clk-rcg2: don't re-search config on rcg2_set_rate Christian Marangi
2023-03-29 19:52   ` Stephen Boyd
2023-03-29 22:01     ` Dmitry Baryshkov
2023-01-17 13:54 ` [PATCH v3 5/6] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq Christian Marangi
2023-03-29 19:59   ` Stephen Boyd
2023-01-17 13:54 ` [PATCH v3 6/6] clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf Christian Marangi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox