Skip to content

arm64: g12a: add support for DVFS

Neil Armstrong linux-amlogic linux-arm-kernel linux-clk linux-gpio lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 25 repliesIn review
  2. v214 patches 6 repliesSuperseded
  3. v114 patches 8 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14pinctrl: meson-g12a: add pwm_a on GPIOE_2 pinmuxdrivers/pinctrl/meson/pinctrl-meson-g12a.c+9 -01 reply
2/14clk: core: introduce clk_hw_set_parent()drivers/clk/clk.c include/linux/clk-provider.h+7 -01 reply
3/14clk: meson: regmap: export regmap_div ops functionsdrivers/clk/meson/clk-regmap.c drivers/clk/meson/clk-regmap.h+11 -40 replies
4/14clk: meson: eeclk: add setup callbackdrivers/clk/meson/meson-eeclk.c drivers/clk/meson/meson-eeclk.h+7 -07 replies
5/14soc: amlogic: meson-clk-measure: protect measure with a mutexdrivers/soc/amlogic/meson-clk-measure.c+11 -11 reply
6/14soc: amlogic: meson-clk-measure: add G12B second cluster cpu clkdrivers/soc/amlogic/meson-clk-measure.c+2 -01 reply
7/14clk: meson: g12a: add notifiers to handle cpu clock changedrivers/clk/meson/g12a.c+468 -323 replies
8/14clk: meson: g12a: expose CPUB clock ID for G12Binclude/dt-bindings/clock/g12a-clkc.h+1 -01 reply
9/14arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsiarch/arm64/boot/dts/amlogic/meson-g12-common.dtsi arch/arm64/boot/dts/amlogic/meson-g12a.dtsi arch/arm64/boot/dts/amlogic/meson-g12b.dtsi+2440 -24053 replies
10/14arm64: dts: meson-g12-common: add pwm_a on GPIOE_2 pinmuxarch/arm64/boot/dts/amlogic/meson-g12-common.dtsi+8 -01 reply
11/14arm64: dts: meson-g12a: add cpus OPP tablearch/arm64/boot/dts/amlogic/meson-g12a.dtsi+60 -03 replies
12/14arm64: dts: meson-g12a: enable DVFS on G12A boardsarch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts+161 -01 reply
13/14arm64: dts: meson-g12b: add cpus OPP tablesarch/arm64/boot/dts/amlogic/meson-g12b.dtsi+115 -00 replies
14/14arm64: dts: meson-g12b-odroid-n2: enable DVFSarch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts+96 -02 replies

Reviews trailers per patch

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

PatchKevin HilmanMartin Blumenstingl
1/14R-b R-b
2/14A-b
3/14
4/14
5/14R-b R-b
6/14R-b R-b
7/14
8/14R-b
9/14
10/14R-b
11/14
12/14R-b
13/14
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [RFC/RFT v3 00/14] arm64: g12a: add support for DVFS

The G12A/G12B Socs embeds a specific clock tree for each CPU cluster :
cpu_clk / cpub_clk

|   \- cpu_clk_dyn
|      |  \- cpu_clk_premux0
|      |        |- cpu_clk_postmux0
|      |        |    |- cpu_clk_dyn0_div
|      |        |    \- xtal/fclk_div2/fclk_div3
|      |        \- xtal/fclk_div2/fclk_div3
|      \- cpu_clk_premux1
|            |- cpu_clk_postmux1
|            |    |- cpu_clk_dyn1_div
|            |    \- xtal/fclk_div2/fclk_div3
|            \- xtal/fclk_div2/fclk_div3

\ sys_pll / sys1_pll

This patchset adds notifiers on cpu_clk / cpub_clk, cpu_clk_dyn, cpu_clk_premux0 and sys_pll / sys1_pll to permit change frequency of the CPU clock in a safe way as recommended by the vendor Documentation and reference code.

This patchset :
- introduces needed core and meson clk changes
- adds support for the G12B second cluster clock measurer ids
- protects clock measurer from cooncurent measures
- adds the clock notifiers
- moves the G12A DT to a common g12a-common dtsi
- adds the G12A and G12B OPPs
- enables DVFS on all supported boards

Dependencies:
- PWM AO input order fix at [1]
- PWM enhancements from Martin at [2]

Changes since RFT/RFC v2 at [4]:
- Rebased on linux-amlogic v5.3/dt64 and clk-meson v5.3/drivers trees
- fixed mesure/measure in patch 5
- added Kevin's review tags

Changes since RFT/RFC v1 at [3]:
- Added EXPORT_SYMBOL_GPL() to clk_hw_set_parent
- Added missing static to g12b_cpub_clk_mux0_div_ops and g12a_cpu_clk_mux_nb
- Simplified g12a_cpu_clk_mux_notifier_cb() without switch/case
- Fixed typo in "this the current path" in g12a.c
- Fixed G12B dtsi by adding back the sdio quirk
- Fixed G12A dtsi unwanted sdio quirk removal
- Fixed various checkpatch errors

[1] https://patchwork.kernel.org/patch/11006835/
[2] https://patchwork.kernel.org/patch/11006835/
[3] https://patchwork.kernel.org/cover/11006929/
[4] https://patchwork.kernel.org/cover/11017273/

Neil Armstrong (14):
pinctrl: meson-g12a: add pwm_a on GPIOE_2 pinmux
clk: core: introduce clk_hw_set_parent()
clk: meson: regmap: export regmap_div ops functions
clk: meson: eeclk: add setup callback
soc: amlogic: meson-clk-measure: protect measure with a mutex
soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk
clk: meson: g12a: add notifiers to handle cpu clock change
clk: meson: g12a: expose CPUB clock ID for G12B
arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi
arm64: dts: meson-g12-common: add pwm_a on GPIOE_2 pinmux
arm64: dts: meson-g12a: add cpus OPP table
arm64: dts: meson-g12a: enable DVFS on G12A boards
arm64: dts: meson-g12b: add cpus OPP tables
arm64: dts: meson-g12b-odroid-n2: enable DVFS

 .../boot/dts/amlogic/meson-g12-common.dtsi    | 2416 ++++++++++++++++
 .../boot/dts/amlogic/meson-g12a-sei510.dts    |   55 +
 .../boot/dts/amlogic/meson-g12a-u200.dts      |   54 +
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   |   52 +
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 2455 +----------------
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts |   96 +
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi   |  145 +-
 drivers/clk/clk.c                             |    6 +
 drivers/clk/meson/clk-regmap.c                |   10 +-
 drivers/clk/meson/clk-regmap.h                |    5 +
 drivers/clk/meson/g12a.c                      |  500 +++-
 drivers/clk/meson/meson-eeclk.c               |    6 +
 drivers/clk/meson/meson-eeclk.h               |    1 +
 drivers/pinctrl/meson/pinctrl-meson-g12a.c    |    9 +
 drivers/soc/amlogic/meson-clk-measure.c       |   14 +-
 include/dt-bindings/clock/g12a-clkc.h         |    1 +
 include/linux/clk-provider.h                  |    1 +
 17 files changed, 3390 insertions(+), 2436 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
Signature · 1 line
2.21.0