0001 Texas Instruments clkctrl clock binding
0002
0003 Texas Instruments SoCs can have a clkctrl clock controller for each
0004 interconnect target module. The clkctrl clock controller manages functional
0005 and interface clocks for each module. Each clkctrl controller can also
0006 gate one or more optional functional clocks for a module, and can have one
0007 or more clock muxes. There is a clkctrl clock controller typically for each
0008 interconnect target module on omap4 and later variants.
0009
0010 The clock consumers can specify the index of the clkctrl clock using
0011 the hardware offset from the clkctrl instance register space. The optional
0012 clocks can be specified by clkctrl hardware offset and the index of the
0013 optional clock.
0014
0015 For more information, please see the Linux clock framework binding at
0016 Documentation/devicetree/bindings/clock/clock-bindings.txt.
0017
0018 Required properties :
0019 - compatible : shall be "ti,clkctrl" or a clock domain specific name:
0020 "ti,clkctrl-l4-cfg"
0021 "ti,clkctrl-l4-per"
0022 "ti,clkctrl-l4-secure"
0023 "ti,clkctrl-l4-wkup"
0024 - clock-output-names : from common clock binding
0025 - #clock-cells : shall contain 2 with the first entry being the instance
0026 offset from the clock domain base and the second being the
0027 clock index
0028 - reg : clock registers
0029
0030 Example: Clock controller node on omap 4430:
0031
0032 &cm2 {
0033 l4per: cm@1400 {
0034 cm_l4per@0 {
0035 cm_l4per_clkctrl: clock@20 {
0036 compatible = "ti,clkctrl";
0037 clock-output-names = "l4_per";
0038 reg = <0x20 0x1b0>;
0039 #clock-cells = <2>;
0040 };
0041 };
0042 };
0043 };
0044
0045 Example: Preprocessor helper macros in dt-bindings/clock/ti-clkctrl.h
0046
0047 #define OMAP4_CLKCTRL_OFFSET 0x20
0048 #define OMAP4_CLKCTRL_INDEX(offset) ((offset) - OMAP4_CLKCTRL_OFFSET)
0049 #define MODULEMODE_HWCTRL 1
0050 #define MODULEMODE_SWCTRL 2
0051
0052 #define OMAP4_GPTIMER10_CLKTRL OMAP4_CLKCTRL_INDEX(0x28)
0053 #define OMAP4_GPTIMER11_CLKTRL OMAP4_CLKCTRL_INDEX(0x30)
0054 #define OMAP4_GPTIMER2_CLKTRL OMAP4_CLKCTRL_INDEX(0x38)
0055 ...
0056 #define OMAP4_GPIO2_CLKCTRL OMAP_CLKCTRL_INDEX(0x60)
0057
0058 Example: Clock consumer node for GPIO2:
0059
0060 &gpio2 {
0061 clocks = <&cm_l4per_clkctrl OMAP4_GPIO2_CLKCTRL 0
0062 &cm_l4per_clkctrl OMAP4_GPIO2_CLKCTRL 8>;
0063 };