Skip to content

Commit 2c74b53

Browse files
anholtbebarino
authored andcommitted
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 <[email protected]> Acked-by: Stephen Warren <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 4f61d8e commit 2c74b53

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Broadcom BCM2835 CPRMAN clocks
2+
3+
This binding uses the common clock binding:
4+
Documentation/devicetree/bindings/clock/clock-bindings.txt
5+
6+
The CPRMAN clock controller generates clocks in the audio power domain
7+
of the BCM2835. There is a level of PLLs deriving from an external
8+
oscillator, a level of PLL dividers that produce channels off of the
9+
few PLLs, and a level of mostly-generic clock generators sourcing from
10+
the PLL channels. Most other hardware components source from the
11+
clock generators, but a few (like the ARM or HDMI) will source from
12+
the PLL dividers directly.
13+
14+
Required 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+
21+
Example:
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+
};

include/dt-bindings/clock/bcm2835.h

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)