From: Neil Armstrong <narmstrong@baylibre.com>
To: jbrunet@baylibre.com, khilman@baylibre.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, martin.blumenstingl@googlemail.com,
linux-gpio@vger.kernel.org,
Neil Armstrong <narmstrong@baylibre.com>
Subject: [RFC/RFT v3 00/14] arm64: g12a: add support for DVFS
Date: Mon, 1 Jul 2019 11:12:44 +0200 [thread overview]
Message-ID: <20190701091258.3870-1-narmstrong@baylibre.com> (raw)
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
--
2.21.0
next reply other threads:[~2019-07-01 9:13 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 9:12 Neil Armstrong [this message]
2019-07-01 9:12 ` [RFC/RFT v3 01/14] pinctrl: meson-g12a: add pwm_a on GPIOE_2 pinmux Neil Armstrong
2019-07-02 22:56 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 02/14] clk: core: introduce clk_hw_set_parent() Neil Armstrong
2019-07-02 23:05 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 03/14] clk: meson: regmap: export regmap_div ops functions Neil Armstrong
2019-07-01 9:12 ` [RFC/RFT v3 04/14] clk: meson: eeclk: add setup callback Neil Armstrong
2019-07-02 23:16 ` Martin Blumenstingl
2019-07-03 11:45 ` Neil Armstrong
2019-07-03 12:40 ` Jerome Brunet
2019-07-03 12:57 ` Martin Blumenstingl
2019-07-03 14:17 ` Jerome Brunet
2019-07-26 14:50 ` Neil Armstrong
2019-07-29 7:42 ` Jerome Brunet
2019-07-01 9:12 ` [RFC/RFT v3 05/14] soc: amlogic: meson-clk-measure: protect measure with a mutex Neil Armstrong
2019-07-02 23:01 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 06/14] soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk Neil Armstrong
2019-07-02 22:58 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 07/14] clk: meson: g12a: add notifiers to handle cpu clock change Neil Armstrong
2019-07-02 23:28 ` Martin Blumenstingl
2019-07-03 11:50 ` Neil Armstrong
2019-08-08 4:43 ` Stephen Boyd
2019-07-01 9:12 ` [RFC/RFT v3 08/14] clk: meson: g12a: expose CPUB clock ID for G12B Neil Armstrong
2019-07-02 23:03 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 09/14] arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi Neil Armstrong
2019-07-02 23:54 ` Martin Blumenstingl
2019-07-03 11:51 ` Neil Armstrong
2019-07-03 12:48 ` Jerome Brunet
2019-07-01 9:12 ` [RFC/RFT v3 10/14] arm64: dts: meson-g12-common: add pwm_a on GPIOE_2 pinmux Neil Armstrong
2019-07-02 23:11 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 11/14] arm64: dts: meson-g12a: add cpus OPP table Neil Armstrong
2019-07-02 23:47 ` Martin Blumenstingl
2019-07-03 11:53 ` Neil Armstrong
2019-07-03 12:12 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 12/14] arm64: dts: meson-g12a: enable DVFS on G12A boards Neil Armstrong
2019-07-02 23:43 ` Martin Blumenstingl
2019-07-01 9:12 ` [RFC/RFT v3 13/14] arm64: dts: meson-g12b: add cpus OPP tables Neil Armstrong
2019-07-01 9:12 ` [RFC/RFT v3 14/14] arm64: dts: meson-g12b-odroid-n2: enable DVFS Neil Armstrong
2019-07-02 23:45 ` Martin Blumenstingl
2019-07-03 11:54 ` Neil Armstrong
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=20190701091258.3870-1-narmstrong@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).