linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] cpufreq: sama7g5: add support for sama7g5
@ 2021-01-05 10:22 Claudiu Beznea
  2021-01-05 10:22 ` [PATCH 1/3] dt-bindings: cpufreq: sama7g5-cpufreq: add dt bindings documentation Claudiu Beznea
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Claudiu Beznea @ 2021-01-05 10:22 UTC (permalink / raw)
  To: rjw, viresh.kumar, robh+dt
  Cc: linux-pm, devicetree, linux-kernel, Claudiu Beznea

Hi,

SAMA7G5 supports run-time changes of CPU frequency. This is done by
changing CPU's PLL. The block diagram explaining the relation b/w
CPU clock and its PLL is as follows:

                         +--------------> cpuck
                         |
               +------+  |    +-----+
  cpupllck --> | pres |--+--> | div |---> mck
               +------+       +-----+

where cpuck is the CPU's clock and mck is the system master clock 0
that feeds some other IPs. All the IPs feed by mck are glich free 
aware.

Because MCK is also feed by cpuplllk the CPUFreq driver needs also
to handle this clock to avoid its under/over clocking: every
time the CPUFreq's .target_index API is called:
- the mck frequency is adjusted to avoid its overclocking/underclocking
- then the cpuck frequency is increased/lowered
- then mck frequency is adjusted to keep the initial 200MHz frequency

Thank you,
Claudiu Beznea

Claudiu Beznea (3):
  dt-bindings: cpufreq: sama7g5-cpufreq: add dt bindings documentation
  cpufreq: sama7g5: add cpufreq driver
  MAINTAINERS: add sama7g5 cpufreq

 .../bindings/cpufreq/cpufreq-sama7g5.yaml          |  80 +++++
 MAINTAINERS                                        |   6 +
 drivers/cpufreq/Kconfig.arm                        |   9 +
 drivers/cpufreq/Makefile                           |   1 +
 drivers/cpufreq/cpufreq-dt-platdev.c               |   2 +
 drivers/cpufreq/sama7g5-cpufreq.c                  | 371 +++++++++++++++++++++
 6 files changed, 469 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml
 create mode 100644 drivers/cpufreq/sama7g5-cpufreq.c

-- 
2.7.4


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

end of thread, other threads:[~2021-01-05 17:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 10:22 [PATCH 0/3] cpufreq: sama7g5: add support for sama7g5 Claudiu Beznea
2021-01-05 10:22 ` [PATCH 1/3] dt-bindings: cpufreq: sama7g5-cpufreq: add dt bindings documentation Claudiu Beznea
2021-01-05 17:04   ` Rob Herring
2021-01-05 10:22 ` [PATCH 2/3] cpufreq: sama7g5: add cpufreq driver Claudiu Beznea
2021-01-05 10:44   ` Viresh Kumar
2021-01-05 11:31     ` Claudiu.Beznea
2021-01-05 10:22 ` [PATCH 3/3] MAINTAINERS: add sama7g5 cpufreq Claudiu Beznea

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).