linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree
@ 2015-10-11 19:46 Lubomir Rintel
  2015-10-15  0:29 ` Eric Anholt
  2015-10-21  3:00 ` Stephen Warren
  0 siblings, 2 replies; 3+ messages in thread
From: Lubomir Rintel @ 2015-10-11 19:46 UTC (permalink / raw)
  To: linux-rpi-kernel
  Cc: Lee Jones, Stephen Warren, Lubomir Rintel, linux-pm, Eric Anholt,
	linux-arm-kernel

This adds a device tree binding for Broadcom BCM2834 CPU frequency control
driven via Raspberry Pi VideoCore 4 firmware interface.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-pm@vger.kernel.org
---
Depends on the RPi Firmware driver submitted on linux-rpi-kernel a while ago. 
Can't see it in arm-soc or linux-next yet though (?). Available in branch 
'rpi-firmware' of https://github.com/anholt/linux

 .../bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt        | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt

diff --git a/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt b/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt
new file mode 100644
index 0000000..eb126d3
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt
@@ -0,0 +1,13 @@
+Raspberry Pi Broadcom BCM2835 CPU frequency control
+
+Required properties:
+
+- compatible : should be "raspberrypi,bcm2835-cpufreq"
+- firmware : the Raspberry Pi firmware node
+
+Example:
+
+cpufreq {
+        compatible = "raspberrypi,bcm2835-cpufreq";
+        firmware = <&firmware>;
+};
-- 
2.4.3

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

* Re: [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree
  2015-10-11 19:46 [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree Lubomir Rintel
@ 2015-10-15  0:29 ` Eric Anholt
  2015-10-21  3:00 ` Stephen Warren
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2015-10-15  0:29 UTC (permalink / raw)
  To: linux-rpi-kernel
  Cc: Lubomir Rintel, Stephen Warren, Lee Jones, linux-arm-kernel,
	linux-pm

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

Lubomir Rintel <lkundrak@v3.sk> writes:

> This adds a device tree binding for Broadcom BCM2834 CPU frequency control
> driven via Raspberry Pi VideoCore 4 firmware interface.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: linux-rpi-kernel@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-pm@vger.kernel.org
> ---
> Depends on the RPi Firmware driver submitted on linux-rpi-kernel a while ago. 
> Can't see it in arm-soc or linux-next yet though (?). Available in branch 
> 'rpi-firmware' of https://github.com/anholt/linux

Looks like the firmware driver slipped through the cracks for 4.3.  I'll
be sending a pull request for it for 4.4.

With the cprman clock driver, we could set CPU frequency natively from
Linux.  What we get from doing things through the VPU right now are that
the MAX (overclock) setting can be set by the user in config.txt, and
the VPU does some watching of thermals to decide when to throttle back
to non-overclock.

Unless we do native thermal control from Linux (which we don't have a
driver for) to get equivalent protection, then I think we should
probably go ahead with the VPU-based cpufreq control.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree
  2015-10-11 19:46 [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree Lubomir Rintel
  2015-10-15  0:29 ` Eric Anholt
@ 2015-10-21  3:00 ` Stephen Warren
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2015-10-21  3:00 UTC (permalink / raw)
  To: Lubomir Rintel
  Cc: linux-rpi-kernel, Lee Jones, linux-pm, Eric Anholt,
	linux-arm-kernel

On 10/11/2015 01:46 PM, Lubomir Rintel wrote:
> This adds a device tree binding for Broadcom BCM2834 CPU frequency control
> driven via Raspberry Pi VideoCore 4 firmware interface.

Oh I see; that DT binding was sent as a separate patch rather than part
of the series...

DT bindings patches need to be sent to the people/lists in the following
MAINTAINERS entry:

OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
M:      Rob Herring <robh+dt@kernel.org>
M:      Pawel Moll <pawel.moll@arm.com>
M:      Mark Rutland <mark.rutland@arm.com>
M:      Ian Campbell <ijc+devicetree@hellion.org.uk>
M:      Kumar Gala <galak@codeaurora.org>
L:      devicetree@vger.kernel.org

> diff --git a/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt b/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt
> new file mode 100644
> index 0000000..eb126d3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/cpufreq/raspberrypi,bcm2835-cpufreq.txt
> @@ -0,0 +1,13 @@
> +Raspberry Pi Broadcom BCM2835 CPU frequency control
> +
> +Required properties:
> +
> +- compatible : should be "raspberrypi,bcm2835-cpufreq"
> +- firmware : the Raspberry Pi firmware node

It'd be best practice to mention the filename of the binding that
defines the firmware. For example:

- firmware : phandle of the Raspberry Pi firmware node, as defined in
  .././arm/bcm/raspberrypi,bcm2835-firmware.txt.

That said, I'm not convinced cpufreq scaling should rely on the firmware
directly, but instead should use the clock API to manipulate the clock.

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

end of thread, other threads:[~2015-10-21  3:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-11 19:46 [PATCH] bcm2835: Add Raspberry Pi CPU frequency control to the device tree Lubomir Rintel
2015-10-15  0:29 ` Eric Anholt
2015-10-21  3:00 ` Stephen Warren

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