Skip to content

PolarFire SoC reset controller & clock cleanups

Conor Dooley linux-clk linux-devicetree linux-riscv lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest14 patches 5 repliesIn review
  2. v413 patches 12 repliesSuperseded
  3. v313 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v212 patches14 repliesSuperseded
v114 patches7 repliesSuperseded

Changes in v5 from the cover letter

- use the alternative macro Claudiu suggested for patch 1
- drop a ~useless intermediate variable in mpfs_deassert()

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14clk: microchip: mpfs: fix clk_cfg array bounds violationdrivers/clk/microchip/clk-mpfs.c+6 -13 replies
2/14clk: microchip: mpfs: make the rtc's ahb clock criticaldrivers/clk/microchip/clk-mpfs.c+3 -10 replies
3/14dt-bindings: clk: microchip: mpfs: add reset controller supportDocumentation/devicetree/bindings/clock/microchip,mpfs.yaml+15 -20 replies
4/14clk: microchip: mpfs: add reset controllerdrivers/clk/microchip/Kconfig drivers/clk/microchip/clk-mpfs.c include/soc/microchip/mpfs.h+107 -120 replies
5/14reset: add polarfire soc reset supportdrivers/reset/Kconfig drivers/reset/Makefile drivers/reset/reset-mpfs.c+165 -10 replies
6/14MAINTAINERS: add polarfire soc reset controllerMAINTAINERS+1 -00 replies
7/14riscv: dts: microchip: add mpfs specific macb reset supportarch/riscv/boot/dts/microchip/mpfs.dtsi+5 -21 reply
8/14clk: microchip: mpfs: add MSS pll's set & round ratedrivers/clk/microchip/clk-mpfs.c+54 -00 replies
9/14clk: microchip: mpfs: move id & offset out of clock structsdrivers/clk/microchip/clk-mpfs.c+15 -150 replies
10/14clk: microchip: mpfs: simplify control reg accessdrivers/clk/microchip/clk-mpfs.c+17 -250 replies
11/14clk: microchip: mpfs: delete 2 line mpfs_clk_register_foo()drivers/clk/microchip/clk-mpfs.c+6 -270 replies
12/14clk: microchip: mpfs: convert cfg_clk to clk_dividerdrivers/clk/microchip/clk-mpfs.c+8 -680 replies
13/14clk: microchip: mpfs: convert periph_clk to clk_gatedrivers/clk/microchip/clk-mpfs.c+6 -660 replies
14/14clk: microchip: mpfs: update module authorship & licencingdrivers/clk/microchip/clk-mpfs.c+7 -30 replies

Reviews trailers per patch

13 of 14 patches have a Reviewed-by or Acked-by.

PatchRob HerringDaire McNamaraClaudiu BezneaPhilipp Zabel
1/14R-b
2/14
3/14R-b R-b
4/14R-b R-b
5/14R-b R-b R-b A-b
6/14R-b
7/14R-b
8/14R-b R-b
9/14R-b R-b
10/14R-b R-b
11/14R-b R-b
12/14R-b R-b
13/14R-b R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/14] PolarFire SoC reset controller & clock cleanups

@Stephen, even if you do not take the rest of the series for v6.1, the first patch is a bugfix for boot failures that can be trigged with v6.0 so even if you have reservations about the aux device stuff, I would appreciate if you would take the first patch.

Unfortunately, the rest of the series does have a conflict with/depends on the fix - so if you do take it on -fixes could you do it as a commit on top of -rc1 so the rest of the series will apply?

Thanks,
Conor.

Original Cover:
Hey all,

Kinda two things happening in this series, but I sent it together to ensure the second part would apply correctly.

The first is the reset controller that I promised after discovering the issue triggered by CONFIG_PM & the phy not coming up correctly. I have now removed all the messing with resets from clock enable/disable functions & now use the aux bus to set up a reset controller driver. Since I needed something to test it, I hooked up the reset for the Cadence MACB on PolarFire SoC. This has been split into a second series for v2 (and is now in v6.0-rcN):
https://lore.kernel.org/all/[email protected]/

The second part adds rate control for the MSS PLL clock, followed by some simplifications to the driver & conversions of some custom structs to the corresponding structs in the framework.

I'll take the dts patch myself when the rest of this is okay-ed. Thanks,
Conor.

Changes since v4:
- use the alternative macro Claudiu suggested for patch 1
- drop a ~useless intermediate variable in mpfs_deassert()

Changes since v3:
- return results directly in probe() & reset_controller_register()

Changes since v2:
- reorder reset Makefile/Kconfig entries
- fix a pre-existing bug exposed by clang with this series applied
- add Padmarao who co-authored the original driver to the authors

Conor Dooley (14):
clk: microchip: mpfs: fix clk_cfg array bounds violation
clk: microchip: mpfs: make the rtc's ahb clock critical
dt-bindings: clk: microchip: mpfs: add reset controller support
clk: microchip: mpfs: add reset controller
reset: add polarfire soc reset support
MAINTAINERS: add polarfire soc reset controller
riscv: dts: microchip: add mpfs specific macb reset support
clk: microchip: mpfs: add MSS pll's set & round rate
clk: microchip: mpfs: move id & offset out of clock structs
clk: microchip: mpfs: simplify control reg access
clk: microchip: mpfs: delete 2 line mpfs_clk_register_foo()
clk: microchip: mpfs: convert cfg_clk to clk_divider
clk: microchip: mpfs: convert periph_clk to clk_gate
clk: microchip: mpfs: update module authorship & licencing

 .../bindings/clock/microchip,mpfs.yaml        |  17 +-
 MAINTAINERS                                   |   1 +
 arch/riscv/boot/dts/microchip/mpfs.dtsi       |   7 +-
 drivers/clk/microchip/Kconfig                 |   1 +
 drivers/clk/microchip/clk-mpfs.c              | 384 +++++++++---------
 drivers/reset/Kconfig                         |   7 +
 drivers/reset/Makefile                        |   2 +-
 drivers/reset/reset-mpfs.c                    | 157 +++++++
 include/soc/microchip/mpfs.h                  |   8 +
 9 files changed, 388 insertions(+), 196 deletions(-)
 create mode 100644 drivers/reset/reset-mpfs.c

base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868

Signature · 1 line
2.36.1