kernel-fxtec-pro1x/include/dt-bindings
Alex Elder 1f27f15258 clk: bcm281xx: add initial clock framework support
Add code for device tree support of clocks in the BCM281xx family of
SoCs.  Machines in this family use peripheral clocks implemented by
"Kona" clock control units (CCUs).  (Other Broadcom SoC families use
Kona style CCUs as well, but support for them is not yet upstream.)

A BCM281xx SoC has multiple CCUs, each of which manages a set of
clocks on the SoC.  A Kona peripheral clock is composite clock that
may include a gate, a parent clock multiplexor, and zero, one
or two dividers.  There is a variety of gate types, and many gates
implement hardware-managed gating (often called "auto-gating").
Most dividers divide their input clock signal by an integer value
(one or more).  There are also "fractional" dividers which allow
division by non-integer values.  To accomodate such dividers,
clock rates and dividers are generally maintained by the code in
"scaled" form, which allows integer and fractional dividers to
be handled in a uniform way.

If present, the gate for a Kona peripheral clock must be enabled
when a change is made to its multiplexor or one of its dividers.
Additionally, dividers and multiplexors have trigger registers which
must be used whenever the divider value or selected parent clock is
changed.  The same trigger is often used for a divider and
multiplexor, and a BCM281xx peripheral clock occasionally has two
triggers.

The gate, dividers, and parent clock selector are treated in this
code as "components" of a peripheral clock.  Their functionality is
implemented directly--e.g. the common clock framework gate
implementation is not used for a Kona peripheral clock gate.  (This
has being considered though, and the intention is to evolve this
code to leverage common code as much as possible.)

The source code is divided into three general portions:

    drivers/clk/bcm/clk-kona.h
    drivers/clk/bcm/clk-kona.c
        These implement the basic Kona clock functionality,
        including the clk_ops methods and various routines to
        manipulate registers and interpret their values.  This
        includes some functions used to set clocks to a desired
        initial state (though this feature is only partially
        implemented here).

    drivers/clk/bcm/clk-kona-setup.c
        This contains generic run-time initialization code for
        data structures representing Kona CCUs and clocks.  This
        encapsulates the clock structure initialization that can't
        be done statically.  Note that there is a great deal of
        validity-checking code here, making explicit certain
        assumptions in the code.   This is mostly useful for adding
        new clock definitions and could possibly be disabled for
        production use.

    drivers/clk/bcm/clk-bcm281xx.c
        This file defines the specific CCUs used by BCM281XX family
        SoCs, as well as the specific clocks implemented by each.
        It declares a device tree clock match entry for each CCU
        defined.

    include/dt-bindings/clock/bcm281xx.h
        This file defines the selector (index) values used to
        identify a particular clock provided by a CCU.  It consists
        entirely of C preprocessor constants, to be used by both the
        C source and device tree source files.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
2014-02-24 13:43:46 -05:00
..
clk The first half of the clk framework pull request is made up almost 2014-01-23 18:56:08 -08:00
clock clk: bcm281xx: add initial clock framework support 2014-02-24 13:43:46 -05:00
dma ARM: at91: dt: add header to define at_hdmac configuration 2013-06-15 00:12:30 +02:00
gpio ARM: tegra: add port FF to GPIO IDs 2013-12-16 14:09:16 -07:00
input include: dt-binding: input: create a DT header defining key codes. 2013-08-19 17:30:03 -05:00
interrupt-controller ARM: dt: create a DT header for the GIC 2013-04-05 12:23:24 -06:00
mfd For the 3.13 merge window we have a couple of new drivers for the AMS 2013-11-15 16:37:40 -08:00
pinctrl ARM: SoC board updates for 3.14 2014-01-23 18:48:28 -08:00
pwm pwm: Add PWM polarity flag macro for DT 2013-09-03 13:08:09 +02:00
reset clk: qcom: Add support for MSM8660's global clock controller (GCC) 2014-01-16 12:01:05 -08:00
sound ASoC: imx-audmux: Move definitions to dt-bindings 2013-08-16 11:05:17 +01:00
thermal thermal: introduce device tree parser 2013-12-04 09:31:34 -04:00