aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-09-28 17:22:03 -0400
committerStephen Boyd <sboyd@codeaurora.org>2015-10-01 20:12:14 -0400
commit2c74b5399de730e3155dc3d5a8ad041fba5e93f4 (patch)
tree00b711ac83e9dee9bc08c006e02688eee0ddd1a8
parent4f61d8e220c110de90a02736ceb55e1e398d6be7 (diff)
clk: bcm2835: Add binding docs for the new platform clock driver.
Previously we've only supported a few fixed clocks based on assumptions about how the firmware sets up the clocks, but this binding will let us control the actual (audio power domain) clock manager. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Lee Jones <lee@kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt45
-rw-r--r--include/dt-bindings/clock/bcm2835.h47
2 files changed, 92 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
new file mode 100644
index 000000000000..e56a1df3a9d3
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
@@ -0,0 +1,45 @@
1Broadcom BCM2835 CPRMAN clocks
2
3This binding uses the common clock binding:
4 Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The CPRMAN clock controller generates clocks in the audio power domain
7of the BCM2835. There is a level of PLLs deriving from an external
8oscillator, a level of PLL dividers that produce channels off of the
9few PLLs, and a level of mostly-generic clock generators sourcing from
10the PLL channels. Most other hardware components source from the
11clock generators, but a few (like the ARM or HDMI) will source from
12the PLL dividers directly.
13
14Required properties:
15- compatible: Should be "brcm,bcm2835-cprman"
16- #clock-cells: Should be <1>. The permitted clock-specifier values can be
17 found in include/dt-bindings/clock/bcm2835.h
18- reg: Specifies base physical address and size of the registers
19- clocks: The external oscillator clock phandle
20
21Example:
22
23 clk_osc: clock@3 {
24 compatible = "fixed-clock";
25 reg = <3>;
26 #clock-cells = <0>;
27 clock-output-names = "osc";
28 clock-frequency = <19200000>;
29 };
30
31 clocks: cprman@7e101000 {
32 compatible = "brcm,bcm2835-cprman";
33 #clock-cells = <1>;
34 reg = <0x7e101000 0x2000>;
35 clocks = <&clk_osc>;
36 };
37
38 i2c0: i2c@7e205000 {
39 compatible = "brcm,bcm2835-i2c";
40 reg = <0x7e205000 0x1000>;
41 interrupts = <2 21>;
42 clocks = <&clocks BCM2835_CLOCK_VPU>;
43 #address-cells = <1>;
44 #size-cells = <0>;
45 };
diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h
new file mode 100644
index 000000000000..d323efac7edf
--- /dev/null
+++ b/include/dt-bindings/clock/bcm2835.h
@@ -0,0 +1,47 @@
1/*
2 * Copyright (C) 2015 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation version 2.
7 *
8 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
9 * kind, whether express or implied; without even the implied warranty
10 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#define BCM2835_PLLA 0
15#define BCM2835_PLLB 1
16#define BCM2835_PLLC 2
17#define BCM2835_PLLD 3
18#define BCM2835_PLLH 4
19
20#define BCM2835_PLLA_CORE 5
21#define BCM2835_PLLA_PER 6
22#define BCM2835_PLLB_ARM 7
23#define BCM2835_PLLC_CORE0 8
24#define BCM2835_PLLC_CORE1 9
25#define BCM2835_PLLC_CORE2 10
26#define BCM2835_PLLC_PER 11
27#define BCM2835_PLLD_CORE 12
28#define BCM2835_PLLD_PER 13
29#define BCM2835_PLLH_RCAL 14
30#define BCM2835_PLLH_AUX 15
31#define BCM2835_PLLH_PIX 16
32
33#define BCM2835_CLOCK_TIMER 17
34#define BCM2835_CLOCK_OTP 18
35#define BCM2835_CLOCK_UART 19
36#define BCM2835_CLOCK_VPU 20
37#define BCM2835_CLOCK_V3D 21
38#define BCM2835_CLOCK_ISP 22
39#define BCM2835_CLOCK_H264 23
40#define BCM2835_CLOCK_VEC 24
41#define BCM2835_CLOCK_HSM 25
42#define BCM2835_CLOCK_SDRAM 26
43#define BCM2835_CLOCK_TSENS 27
44#define BCM2835_CLOCK_EMMC 28
45#define BCM2835_CLOCK_PERI_IMAGE 29
46
47#define BCM2835_CLOCK_COUNT 30