public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v1 0/6] clk: microchip: mpfs: incremental fixes
@ 2022-10-25  7:58 Conor Dooley
  2022-10-25  7:58 ` [PATCH v1 1/6] dt-bindings: clk: add missing clk ids for microchip mpfs Conor Dooley
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Conor Dooley @ 2022-10-25  7:58 UTC (permalink / raw)
  To: Rick Chen, Leo, Lukasz Majewski, Sean Anderson
  Cc: Conor Dooley, Padmarao Begari, u-boot

Hey All,
When trying to sync the Linux device tree with U-Boot, the clock driver's
expectation that the input clock it gets is the mss pll presented itself
as a problem. The mss pll is not a fixed frequency clock and the Linux
devicetree has the actual off-chip oscillator & the clock driver there
uses that. This had gone un-noticed in the original dt upstreaming to
Linux and I noticed it while upstreaming the clock driver there.

I order to switch the clock driver over to using the real reference, we
first need to switch over from reading a property of what we assume to be
a fixed-frequency clock in the device tree to using clk_get_rate() and
fix the parentage of the "periph" clocks to represent their actual
relationships to their parents rather than using this fixed-frequency
clock in the devicetree to determine their rates.

With that done, we can then introduce a small driver for the msspll
itself, which we will use if the corrected devicetree node for the clock
controller is present.

There are some more fixes required, specifically handling of the mtimer
clock and of the refclk for the rtc which I have not addressed here, but
will deal with in a follow-up series. I've omitted these fixes here to
do just what is needed to unblock the dt sync.

Thanks,
Conor.

Conor Dooley (6):
  dt-bindings: clk: add missing clk ids for microchip mpfs
  clk: microchip: mpfs: convert parent rate acquistion to get_get_rate()
  clk: microchip: mpfs: fix reference clock handling
  clk: microchip: mpfs: fix periph clk parentage
  clk: microchip: mpfs: fix criticality of peripheral clocks
  riscv: dts: fix the mpfs's reference clock frequency

 arch/riscv/dts/microchip-mpfs-icicle-kit.dts  |   4 +
 arch/riscv/dts/microchip-mpfs.dtsi            |  14 +--
 drivers/clk/microchip/Makefile                |   2 +-
 drivers/clk/microchip/mpfs_clk.c              |  37 ++++--
 drivers/clk/microchip/mpfs_clk.h              |  20 +--
 drivers/clk/microchip/mpfs_clk_cfg.c          |   7 +-
 drivers/clk/microchip/mpfs_clk_msspll.c       | 119 ++++++++++++++++++
 drivers/clk/microchip/mpfs_clk_periph.c       |  96 +++++++-------
 .../dt-bindings/clock/microchip-mpfs-clock.h  |   3 +
 9 files changed, 229 insertions(+), 73 deletions(-)
 create mode 100644 drivers/clk/microchip/mpfs_clk_msspll.c

-- 
2.38.0


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

end of thread, other threads:[~2022-11-02 16:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25  7:58 [PATCH v1 0/6] clk: microchip: mpfs: incremental fixes Conor Dooley
2022-10-25  7:58 ` [PATCH v1 1/6] dt-bindings: clk: add missing clk ids for microchip mpfs Conor Dooley
2022-11-02 11:19   ` Leo Liang
2022-11-02 13:20   ` Padmarao.Begari
2022-10-25  7:58 ` [PATCH v1 2/6] clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() Conor Dooley
2022-11-02 11:20   ` Leo Liang
2022-11-02 13:20   ` Padmarao.Begari
2022-11-02 16:41     ` Conor Dooley
2022-10-25  7:58 ` [PATCH v1 3/6] clk: microchip: mpfs: fix reference clock handling Conor Dooley
2022-11-02 11:21   ` Leo Liang
2022-11-02 13:20   ` Padmarao.Begari
2022-10-25  7:58 ` [PATCH v1 4/6] clk: microchip: mpfs: fix periph clk parentage Conor Dooley
2022-11-02 11:21   ` Leo Liang
2022-11-02 13:20   ` Padmarao.Begari
2022-10-25  7:58 ` [PATCH v1 5/6] clk: microchip: mpfs: fix criticality of peripheral clocks Conor Dooley
2022-11-02 11:22   ` Leo Liang
2022-11-02 13:20   ` Padmarao.Begari
2022-10-25  7:58 ` [PATCH v1 6/6] riscv: dts: fix the mpfs's reference clock frequency Conor Dooley
2022-11-02 11:22   ` Leo Liang
2022-11-02 13:21   ` Padmarao.Begari

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