xref: /openbmc/linux/Documentation/devicetree/bindings/clock/brcm,kona-ccu.txt (revision cf40a76e7d5874bb25f4404eecc58a2e033af885)
1*23a71fd6SScott BrandenBroadcom Kona Family Clocks
2*23a71fd6SScott Branden
3*23a71fd6SScott BrandenThis binding is associated with Broadcom SoCs having "Kona" style
4*23a71fd6SScott Brandenclock control units (CCUs).  A CCU is a clock provider that manages
5*23a71fd6SScott Brandena set of clock signals.  Each CCU is represented by a node in the
6*23a71fd6SScott Brandendevice tree.
7*23a71fd6SScott Branden
8*23a71fd6SScott BrandenThis binding uses the common clock binding:
9*23a71fd6SScott Branden    Documentation/devicetree/bindings/clock/clock-bindings.txt
10*23a71fd6SScott Branden
11*23a71fd6SScott BrandenRequired properties:
12*23a71fd6SScott Branden- compatible
13*23a71fd6SScott Branden	Shall have a value of the form "brcm,<model>-<which>-ccu",
14*23a71fd6SScott Branden	where <model> is a Broadcom SoC model number and <which> is
15*23a71fd6SScott Branden	the name of a defined CCU.  For example:
16*23a71fd6SScott Branden	    "brcm,bcm11351-root-ccu"
17*23a71fd6SScott Branden	The compatible strings used for each supported SoC family
18*23a71fd6SScott Branden	are defined below.
19*23a71fd6SScott Branden- reg
20*23a71fd6SScott Branden	Shall define the base and range of the address space
21*23a71fd6SScott Branden	containing clock control registers
22*23a71fd6SScott Branden- #clock-cells
23*23a71fd6SScott Branden	Shall have value <1>.  The permitted clock-specifier values
24*23a71fd6SScott Branden	are defined below.
25*23a71fd6SScott Branden- clock-output-names
26*23a71fd6SScott Branden	Shall be an ordered list of strings defining the names of
27*23a71fd6SScott Branden	the clocks provided by the CCU.
28*23a71fd6SScott Branden
29*23a71fd6SScott BrandenDevice tree example:
30*23a71fd6SScott Branden
31*23a71fd6SScott Branden	slave_ccu: slave_ccu {
32*23a71fd6SScott Branden		compatible = "brcm,bcm11351-slave-ccu";
33*23a71fd6SScott Branden		reg = <0x3e011000 0x0f00>;
34*23a71fd6SScott Branden		#clock-cells = <1>;
35*23a71fd6SScott Branden		clock-output-names = "uartb",
36*23a71fd6SScott Branden				     "uartb2",
37*23a71fd6SScott Branden				     "uartb3",
38*23a71fd6SScott Branden				     "uartb4";
39*23a71fd6SScott Branden	};
40*23a71fd6SScott Branden
41*23a71fd6SScott Branden	ref_crystal_clk: ref_crystal {
42*23a71fd6SScott Branden		#clock-cells = <0>;
43*23a71fd6SScott Branden		compatible = "fixed-clock";
44*23a71fd6SScott Branden		clock-frequency = <26000000>;
45*23a71fd6SScott Branden	};
46*23a71fd6SScott Branden
47*23a71fd6SScott Branden	uart@3e002000 {
48*23a71fd6SScott Branden		compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart";
49*23a71fd6SScott Branden		reg = <0x3e002000 0x1000>;
50*23a71fd6SScott Branden		clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>;
51*23a71fd6SScott Branden		interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
52*23a71fd6SScott Branden		reg-shift = <2>;
53*23a71fd6SScott Branden		reg-io-width = <4>;
54*23a71fd6SScott Branden	};
55*23a71fd6SScott Branden
56*23a71fd6SScott BrandenBCM281XX family
57*23a71fd6SScott Branden---------------
58*23a71fd6SScott BrandenCCU compatible string values for SoCs in the BCM281XX family are:
59*23a71fd6SScott Branden    "brcm,bcm11351-root-ccu"
60*23a71fd6SScott Branden    "brcm,bcm11351-aon-ccu"
61*23a71fd6SScott Branden    "brcm,bcm11351-hub-ccu"
62*23a71fd6SScott Branden    "brcm,bcm11351-master-ccu"
63*23a71fd6SScott Branden    "brcm,bcm11351-slave-ccu"
64*23a71fd6SScott Branden
65*23a71fd6SScott BrandenThe following table defines the set of CCUs and clock specifiers for
66*23a71fd6SScott BrandenBCM281XX family clocks.  When a clock consumer references a clocks,
67*23a71fd6SScott Brandenits symbolic specifier (rather than its numeric index value) should
68*23a71fd6SScott Brandenbe used.  These specifiers are defined in:
69*23a71fd6SScott Branden    "include/dt-bindings/clock/bcm281xx.h"
70*23a71fd6SScott Branden
71*23a71fd6SScott Branden    CCU     Clock           Type    Index   Specifier
72*23a71fd6SScott Branden    ---     -----           ----    -----   ---------
73*23a71fd6SScott Branden    root    frac_1m         peri      0     BCM281XX_ROOT_CCU_FRAC_1M
74*23a71fd6SScott Branden
75*23a71fd6SScott Branden    aon     hub_timer       peri      0     BCM281XX_AON_CCU_HUB_TIMER
76*23a71fd6SScott Branden    aon     pmu_bsc         peri      1     BCM281XX_AON_CCU_PMU_BSC
77*23a71fd6SScott Branden    aon     pmu_bsc_var     peri      2     BCM281XX_AON_CCU_PMU_BSC_VAR
78*23a71fd6SScott Branden
79*23a71fd6SScott Branden    hub     tmon_1m         peri      0     BCM281XX_HUB_CCU_TMON_1M
80*23a71fd6SScott Branden
81*23a71fd6SScott Branden    master  sdio1           peri      0     BCM281XX_MASTER_CCU_SDIO1
82*23a71fd6SScott Branden    master  sdio2           peri      1     BCM281XX_MASTER_CCU_SDIO2
83*23a71fd6SScott Branden    master  sdio3           peri      2     BCM281XX_MASTER_CCU_SDIO3
84*23a71fd6SScott Branden    master  sdio4           peri      3     BCM281XX_MASTER_CCU_SDIO4
85*23a71fd6SScott Branden    master  dmac            peri      4     BCM281XX_MASTER_CCU_DMAC
86*23a71fd6SScott Branden    master  usb_ic          peri      5     BCM281XX_MASTER_CCU_USB_IC
87*23a71fd6SScott Branden    master  hsic2_48m       peri      6     BCM281XX_MASTER_CCU_HSIC_48M
88*23a71fd6SScott Branden    master  hsic2_12m       peri      7     BCM281XX_MASTER_CCU_HSIC_12M
89*23a71fd6SScott Branden
90*23a71fd6SScott Branden    slave   uartb           peri      0     BCM281XX_SLAVE_CCU_UARTB
91*23a71fd6SScott Branden    slave   uartb2          peri      1     BCM281XX_SLAVE_CCU_UARTB2
92*23a71fd6SScott Branden    slave   uartb3          peri      2     BCM281XX_SLAVE_CCU_UARTB3
93*23a71fd6SScott Branden    slave   uartb4          peri      3     BCM281XX_SLAVE_CCU_UARTB4
94*23a71fd6SScott Branden    slave   ssp0            peri      4     BCM281XX_SLAVE_CCU_SSP0
95*23a71fd6SScott Branden    slave   ssp2            peri      5     BCM281XX_SLAVE_CCU_SSP2
96*23a71fd6SScott Branden    slave   bsc1            peri      6     BCM281XX_SLAVE_CCU_BSC1
97*23a71fd6SScott Branden    slave   bsc2            peri      7     BCM281XX_SLAVE_CCU_BSC2
98*23a71fd6SScott Branden    slave   bsc3            peri      8     BCM281XX_SLAVE_CCU_BSC3
99*23a71fd6SScott Branden    slave   pwm             peri      9     BCM281XX_SLAVE_CCU_PWM
100*23a71fd6SScott Branden
101*23a71fd6SScott Branden
102*23a71fd6SScott BrandenBCM21664 family
103*23a71fd6SScott Branden---------------
104*23a71fd6SScott BrandenCCU compatible string values for SoCs in the BCM21664 family are:
105*23a71fd6SScott Branden    "brcm,bcm21664-root-ccu"
106*23a71fd6SScott Branden    "brcm,bcm21664-aon-ccu"
107*23a71fd6SScott Branden    "brcm,bcm21664-master-ccu"
108*23a71fd6SScott Branden    "brcm,bcm21664-slave-ccu"
109*23a71fd6SScott Branden
110*23a71fd6SScott BrandenThe following table defines the set of CCUs and clock specifiers for
111*23a71fd6SScott BrandenBCM21664 family clocks.  When a clock consumer references a clocks,
112*23a71fd6SScott Brandenits symbolic specifier (rather than its numeric index value) should
113*23a71fd6SScott Brandenbe used.  These specifiers are defined in:
114*23a71fd6SScott Branden    "include/dt-bindings/clock/bcm21664.h"
115*23a71fd6SScott Branden
116*23a71fd6SScott Branden    CCU     Clock           Type    Index   Specifier
117*23a71fd6SScott Branden    ---     -----           ----    -----   ---------
118*23a71fd6SScott Branden    root    frac_1m         peri      0     BCM21664_ROOT_CCU_FRAC_1M
119*23a71fd6SScott Branden
120*23a71fd6SScott Branden    aon     hub_timer       peri      0     BCM21664_AON_CCU_HUB_TIMER
121*23a71fd6SScott Branden
122*23a71fd6SScott Branden    master  sdio1           peri      0     BCM21664_MASTER_CCU_SDIO1
123*23a71fd6SScott Branden    master  sdio2           peri      1     BCM21664_MASTER_CCU_SDIO2
124*23a71fd6SScott Branden    master  sdio3           peri      2     BCM21664_MASTER_CCU_SDIO3
125*23a71fd6SScott Branden    master  sdio4           peri      3     BCM21664_MASTER_CCU_SDIO4
126*23a71fd6SScott Branden    master  sdio1_sleep     peri      4     BCM21664_MASTER_CCU_SDIO1_SLEEP
127*23a71fd6SScott Branden    master  sdio2_sleep     peri      5     BCM21664_MASTER_CCU_SDIO2_SLEEP
128*23a71fd6SScott Branden    master  sdio3_sleep     peri      6     BCM21664_MASTER_CCU_SDIO3_SLEEP
129*23a71fd6SScott Branden    master  sdio4_sleep     peri      7     BCM21664_MASTER_CCU_SDIO4_SLEEP
130*23a71fd6SScott Branden
131*23a71fd6SScott Branden    slave   uartb           peri      0     BCM21664_SLAVE_CCU_UARTB
132*23a71fd6SScott Branden    slave   uartb2          peri      1     BCM21664_SLAVE_CCU_UARTB2
133*23a71fd6SScott Branden    slave   uartb3          peri      2     BCM21664_SLAVE_CCU_UARTB3
134*23a71fd6SScott Branden    slave   uartb4          peri      3     BCM21664_SLAVE_CCU_UARTB4
135*23a71fd6SScott Branden    slave   bsc1            peri      4     BCM21664_SLAVE_CCU_BSC1
136*23a71fd6SScott Branden    slave   bsc2            peri      5     BCM21664_SLAVE_CCU_BSC2
137*23a71fd6SScott Branden    slave   bsc3            peri      6     BCM21664_SLAVE_CCU_BSC3
138*23a71fd6SScott Branden    slave   bsc4            peri      7     BCM21664_SLAVE_CCU_BSC4
139