linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] cpufreq support for Raspberry Pi
@ 2019-06-06 14:22 Nicolas Saenz Julienne
  2019-06-06 14:22 ` [PATCH v2 1/7] clk: bcm2835: remove pllb Nicolas Saenz Julienne
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Nicolas Saenz Julienne @ 2019-06-06 14:22 UTC (permalink / raw)
  To: stefan.wahren, linux-kernel
  Cc: mbrugger, viresh.kumar, rjw, sboyd, eric, f.fainelli,
	bcm-kernel-feedback-list, ptesarik, linux-rpi-kernel, ssuloev,
	linux-clk, linux-arm-kernel, mturquette, linux-pm,
	Nicolas Saenz Julienne

Hi all,
this aims at adding cpufreq support to the Raspberry Pi family of
boards.

The series first factors out 'pllb' from clk-bcm2385 and creates a new
clk driver that operates it over RPi's firmware interface[1]. We are
forced to do so as the firmware 'owns' the pll and we're not allowed to
change through the register interface directly as we might race with the
over-temperature and under-voltage protections provided by the firmware.

Next it creates a minimal cpufreq driver that populates the CPU's opp
table, and registers cpufreq-dt. Which is needed as the firmware
controls the max and min frequencies available.

This was tested on a RPi3b+ and RPI2b, both using multi_v7_defconfig and
arm64's defconfig.

@Eric: Even though some things change, namely to properly support being
       built as a module, I still added your Acked-by as it didn't
       change the overall design. I hope it's OK.

That's all,
kind regards,
Nicolas

[1] https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface

---

Changes since v1:
  - Enabled by default on the whole family of devices
  - Added/Fixed module support
  - clk device now registered by firmware driver
  - raspberrypi-cpufreq device now registered by clk driver
  - Reimplemented clk rounding unsing determine_rate()
  - Enabled in configs for arm and arm64

Changes since RFC:
  - Move firmware clk device into own driver

Nicolas Saenz Julienne (7):
  clk: bcm2835: remove pllb
  clk: bcm283x: add driver interfacing with Raspberry Pi's firmware
  firmware: raspberrypi: register clk device
  cpufreq: add driver for Raspbery Pi
  clk: raspberrypi: register platform device for raspberrypi-cpufreq
  ARM: defconfig: enable cpufreq driver for RPi
  arm64: defconfig: enable cpufreq support for RPi3

 arch/arm/configs/bcm2835_defconfig    |   9 +
 arch/arm/configs/multi_v7_defconfig   |   2 +
 arch/arm64/configs/defconfig          |   2 +
 drivers/clk/bcm/Kconfig               |   7 +
 drivers/clk/bcm/Makefile              |   1 +
 drivers/clk/bcm/clk-bcm2835.c         |  28 +--
 drivers/clk/bcm/clk-raspberrypi.c     | 316 ++++++++++++++++++++++++++
 drivers/cpufreq/Kconfig.arm           |   8 +
 drivers/cpufreq/Makefile              |   1 +
 drivers/cpufreq/raspberrypi-cpufreq.c | 100 ++++++++
 drivers/firmware/raspberrypi.c        |  10 +
 11 files changed, 460 insertions(+), 24 deletions(-)
 create mode 100644 drivers/clk/bcm/clk-raspberrypi.c
 create mode 100644 drivers/cpufreq/raspberrypi-cpufreq.c

-- 
2.21.0


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

end of thread, other threads:[~2019-06-08 10:43 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 14:22 [PATCH v2 0/7] cpufreq support for Raspberry Pi Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 1/7] clk: bcm2835: remove pllb Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware Nicolas Saenz Julienne
2019-06-06 14:42   ` Nicolas Saenz Julienne
2019-06-07  9:26   ` Stefan Wahren
2019-06-07  9:42     ` Nicolas Saenz Julienne
2019-06-07 10:04       ` Stefan Wahren
2019-06-06 14:22 ` [PATCH v2 3/7] firmware: raspberrypi: register clk device Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi Nicolas Saenz Julienne
2019-06-06 17:09   ` Stephen Boyd
2019-06-06 17:22     ` Nicolas Saenz Julienne
2019-06-06 17:36       ` Stephen Boyd
2019-06-06 18:10         ` Nicolas Saenz Julienne
2019-06-06 18:23           ` Stephen Boyd
2019-06-06 18:31             ` Nicolas Saenz Julienne
2019-06-07  3:09             ` Viresh Kumar
2019-06-07  9:13               ` Stefan Wahren
2019-06-07 19:02                 ` Stephen Boyd
2019-06-07 11:42   ` Stefan Wahren
2019-06-07 11:57     ` Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq Nicolas Saenz Julienne
2019-06-06 17:05   ` Stephen Boyd
2019-06-06 17:16     ` Nicolas Saenz Julienne
2019-06-06 17:20       ` Stephen Boyd
2019-06-06 14:22 ` [PATCH v2 6/7] ARM: defconfig: enable cpufreq driver for RPi Nicolas Saenz Julienne
2019-06-07 11:30   ` Stefan Wahren
2019-06-06 14:23 ` [PATCH v2 7/7] arm64: defconfig: enable cpufreq support for RPi3 Nicolas Saenz Julienne
2019-06-07 10:19   ` Stefan Wahren
2019-06-07 10:25     ` Nicolas Saenz Julienne
2019-06-08 10:43 ` [PATCH v2 0/7] cpufreq support for Raspberry Pi Stefan Wahren

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