All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/9] Introduce OPP modifier for ARM SoCs
@ 2014-03-14 19:25 ` Dave Gerlach
  0 siblings, 0 replies; 30+ messages in thread
From: Dave Gerlach @ 2014-03-14 19:25 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-pm
  Cc: Jisheng Zhang, devicetree, Nishanth Menon, Dave Gerlach,
	Viresh Kumar, Anson Huang, Rafael J. Wysocki, cpufreq, kernel,
	Shawn Guo

There are many SoCs that can have different operating points supported
depending on different conditions even for otherwise identical parts. 
It does not make sense to define many different iterations of a device tree
file for each possible permutation of the same device especially when this data
may exist within the part. 

This proposal introduces a framework and example driver to help in enabling
or disabling appropriate OPPs based on a register value. The information needed
for deciding which OPPs are to be enabled is defined in the device tree in a
table so that one device tree file is able to support any version of the part.
This series is mostly untested besides 335x and only is intended to demonstrate
the approach for dynamically changing available OPPs.

The framework allows other drivers to register themselves and
then through a single function call modify which OPPs are available for a device.

The included opp-modifier-reg driver can already support many different SoCs
that have a manufacturer modifiable register defining which OPPs are possible
on the SoC. This series includes example entries for am335x, am437x, omap4,
dra7, and imx6q. 

The opp-modifier-reg driver expects all possible OPPs to be loaded for the
device already and then is able to modify the table based on the details
passed compared to the defined register.

This RFC only applies to MPU OPPs and only supports modifying the OPP list to
contain supported OPPs during boot but this driver could easily be extended
to support modifying the OPPs of other IPs that have them easily by placing
the hook (in patch 3 here) elsewhere. The hook for opp-modifier was placed
in its current only as a proof of concept; if there is a better location it
should be moved.

This series is tested on am33xx but must be used with 2.x+ silicon as the
earlier revision does not support the same OPPs. Also for the additional OPPs
the maximum voltage supplied by the regulator for the MPU rail on both am335
and am437x would need to be extended but those patches were left out of this
series to focus on opp-modifier.

Comments? Is this a reasonable direction to take?

Dave Gerlach (9):
  opp-modifier: Introduce OPP Modifier Framework
  opp-modifier: Add opp-modifier-reg driver
  PM / OPP: Add hook to modify OPPs after they are loaded.
  ARM: dts: AM33XX: Add opp-modifier device entry and add higher OPPs
  ARM: dts: AM4372: Add opp-modifier device entry and add higher OPPs
  ARM: dts: omap443x: Add opp-modifier entry and add higher OPPs
  ARM: dts: omap4460: Add opp-modifier entry and add higher OPPs
  ARM: dts: dra7: Add opp-modifier device entry and add higher OPPs
  ARM: dts: imx6q: Add opp-modifier device entry

 .../devicetree/bindings/power/opp-modifier.txt     | 111 +++++++++
 arch/arm/boot/dts/am33xx.dtsi                      |  27 ++-
 arch/arm/boot/dts/am4372.dtsi                      |  30 +++
 arch/arm/boot/dts/dra7.dtsi                        |  18 ++
 arch/arm/boot/dts/imx6q.dtsi                       |  18 ++
 arch/arm/boot/dts/omap443x.dtsi                    |  16 ++
 arch/arm/boot/dts/omap4460.dtsi                    |  17 ++
 drivers/base/power/opp.c                           |   8 +
 drivers/power/Makefile                             |   2 +
 drivers/power/opp/Makefile                         |   2 +
 drivers/power/opp/core.c                           | 126 ++++++++++
 drivers/power/opp/opp-modifier-reg.c               | 259 +++++++++++++++++++++
 include/dt-bindings/opp/imx.h                      |  17 ++
 include/dt-bindings/opp/ti.h                       |  33 +++
 include/linux/opp-modifier.h                       |  35 +++
 15 files changed, 717 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/opp-modifier.txt
 create mode 100644 drivers/power/opp/Makefile
 create mode 100644 drivers/power/opp/core.c
 create mode 100644 drivers/power/opp/opp-modifier-reg.c
 create mode 100644 include/dt-bindings/opp/imx.h
 create mode 100644 include/dt-bindings/opp/ti.h
 create mode 100644 include/linux/opp-modifier.h

-- 
1.9.0

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

end of thread, other threads:[~2014-03-25  3:24 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 19:25 [RFC 0/9] Introduce OPP modifier for ARM SoCs Dave Gerlach
2014-03-14 19:25 ` Dave Gerlach
2014-03-14 19:25 ` [RFC 1/9] opp-modifier: Introduce OPP Modifier Framework Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 2/9] opp-modifier: Add opp-modifier-reg driver Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 21:00   ` Rob Herring
2014-03-14 21:00     ` Rob Herring
2014-03-17 14:30     ` Nishanth Menon
2014-03-17 14:30       ` Nishanth Menon
2014-03-17 18:37       ` Rob Herring
2014-03-17 18:37         ` Rob Herring
2014-03-18 15:36         ` Nishanth Menon
2014-03-18 15:36           ` Nishanth Menon
2014-03-25  3:24           ` Dave Gerlach
2014-03-25  3:24             ` Dave Gerlach
2014-03-14 19:25 ` [RFC 3/9] PM / OPP: Add hook to modify OPPs after they are loaded Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 4/9] ARM: dts: AM33XX: Add opp-modifier device entry and add higher OPPs Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 5/9] ARM: dts: AM4372: " Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 6/9] ARM: dts: omap443x: Add opp-modifier " Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 7/9] ARM: dts: omap4460: " Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 8/9] ARM: dts: dra7: Add opp-modifier device " Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach
2014-03-14 19:25 ` [RFC 9/9] ARM: dts: imx6q: Add opp-modifier device entry Dave Gerlach
2014-03-14 19:25   ` Dave Gerlach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.