xref: /openbmc/linux/Documentation/devicetree/bindings/clock/ti/gate.txt (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1f60b1ea5STero KristoBinding for Texas Instruments gate clock.
2f60b1ea5STero Kristo
3f60b1ea5STero KristoBinding status: Unstable - ABI compatibility may be broken in the future
4f60b1ea5STero Kristo
5f60b1ea5STero KristoThis binding uses the common clock binding[1]. This clock is
6f60b1ea5STero Kristoquite much similar to the basic gate-clock [2], however,
7f60b1ea5STero Kristoit supports a number of additional features. If no register
8f60b1ea5STero Kristois provided for this clock, the code assumes that a clockdomain
9f60b1ea5STero Kristowill be controlled instead and the corresponding hw-ops for
10f60b1ea5STero Kristothat is used.
11f60b1ea5STero Kristo
12f60b1ea5STero Kristo[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
13*450c787cSConor Dooley[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
14f60b1ea5STero Kristo[3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
15f60b1ea5STero Kristo
16f60b1ea5STero KristoRequired properties:
17f60b1ea5STero Kristo- compatible : shall be one of:
18f60b1ea5STero Kristo  "ti,gate-clock" - basic gate clock
19f60b1ea5STero Kristo  "ti,wait-gate-clock" - gate clock which waits until clock is active before
20f60b1ea5STero Kristo			 returning from clk_enable()
21f60b1ea5STero Kristo  "ti,dss-gate-clock" - gate clock with DSS specific hardware handling
22f60b1ea5STero Kristo  "ti,am35xx-gate-clock" - gate clock with AM35xx specific hardware handling
23f60b1ea5STero Kristo  "ti,clkdm-gate-clock" - clockdomain gate clock, which derives its functional
24f60b1ea5STero Kristo			  clock directly from a clockdomain, see [3] how
25f60b1ea5STero Kristo			  to map clockdomains properly
26f60b1ea5STero Kristo  "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling,
27f60b1ea5STero Kristo			  required for a hardware errata
289fa160cbSTero Kristo  "ti,composite-gate-clock" - composite gate clock, to be part of composite
299fa160cbSTero Kristo			      clock
309fa160cbSTero Kristo  "ti,composite-no-wait-gate-clock" - composite gate clock that does not wait
319fa160cbSTero Kristo				      for clock to be active before returning
329fa160cbSTero Kristo				      from clk_enable()
33f60b1ea5STero Kristo- #clock-cells : from common clock binding; shall be set to 0
34f60b1ea5STero Kristo- clocks : link to phandle of parent clock
35f60b1ea5STero Kristo- reg : offset for register controlling adjustable gate, not needed for
36f60b1ea5STero Kristo	ti,clkdm-gate-clock type
37f60b1ea5STero Kristo
38f60b1ea5STero KristoOptional properties:
39fc3d39d5STony Lindgren- clock-output-names : from common clock binding.
40f60b1ea5STero Kristo- ti,bit-shift : bit shift for programming the clock gate, invalid for
41f60b1ea5STero Kristo		 ti,clkdm-gate-clock type
42f60b1ea5STero Kristo- ti,set-bit-to-disable : inverts default gate programming. Setting the bit
43f60b1ea5STero Kristo  gates the clock and clearing the bit ungates the clock.
44f60b1ea5STero Kristo
45f60b1ea5STero KristoExamples:
46f60b1ea5STero Kristo	mmchs2_fck: mmchs2_fck@48004a00 {
47f60b1ea5STero Kristo		#clock-cells = <0>;
48f60b1ea5STero Kristo		compatible = "ti,gate-clock";
49f60b1ea5STero Kristo		clocks = <&core_96m_fck>;
509fa160cbSTero Kristo		reg = <0x0a00>;
51f60b1ea5STero Kristo		ti,bit-shift = <25>;
52f60b1ea5STero Kristo	};
53f60b1ea5STero Kristo
54f60b1ea5STero Kristo	uart4_fck_am35xx: uart4_fck_am35xx {
55f60b1ea5STero Kristo		#clock-cells = <0>;
56f60b1ea5STero Kristo		compatible = "ti,wait-gate-clock";
57f60b1ea5STero Kristo		clocks = <&core_48m_fck>;
58f60b1ea5STero Kristo		reg = <0x0a00>;
59f60b1ea5STero Kristo		ti,bit-shift = <23>;
60f60b1ea5STero Kristo	};
61f60b1ea5STero Kristo
62f60b1ea5STero Kristo	dss1_alwon_fck_3430es2: dss1_alwon_fck_3430es2@48004e00 {
63f60b1ea5STero Kristo		#clock-cells = <0>;
64f60b1ea5STero Kristo		compatible = "ti,dss-gate-clock";
65f60b1ea5STero Kristo		clocks = <&dpll4_m4x2_ck>;
669fa160cbSTero Kristo		reg = <0x0e00>;
67f60b1ea5STero Kristo		ti,bit-shift = <0>;
68f60b1ea5STero Kristo	};
69f60b1ea5STero Kristo
70f60b1ea5STero Kristo	emac_ick: emac_ick@4800259c {
71f60b1ea5STero Kristo		#clock-cells = <0>;
72f60b1ea5STero Kristo		compatible = "ti,am35xx-gate-clock";
73f60b1ea5STero Kristo		clocks = <&ipss_ick>;
749fa160cbSTero Kristo		reg = <0x059c>;
75f60b1ea5STero Kristo		ti,bit-shift = <1>;
76f60b1ea5STero Kristo	};
77f60b1ea5STero Kristo
78f60b1ea5STero Kristo	emu_src_ck: emu_src_ck {
79f60b1ea5STero Kristo		#clock-cells = <0>;
80f60b1ea5STero Kristo		compatible = "ti,clkdm-gate-clock";
81f60b1ea5STero Kristo		clocks = <&emu_src_mux_ck>;
82f60b1ea5STero Kristo	};
83f60b1ea5STero Kristo
84f60b1ea5STero Kristo	dpll4_m2x2_ck: dpll4_m2x2_ck@48004d00 {
85f60b1ea5STero Kristo		#clock-cells = <0>;
86f60b1ea5STero Kristo		compatible = "ti,hsdiv-gate-clock";
87f60b1ea5STero Kristo		clocks = <&dpll4_m2x2_mul_ck>;
88f60b1ea5STero Kristo		ti,bit-shift = <0x1b>;
899fa160cbSTero Kristo		reg = <0x0d00>;
90f60b1ea5STero Kristo		ti,set-bit-to-disable;
91f60b1ea5STero Kristo	};
929fa160cbSTero Kristo
939fa160cbSTero Kristo	vlynq_gate_fck: vlynq_gate_fck {
949fa160cbSTero Kristo		#clock-cells = <0>;
959fa160cbSTero Kristo		compatible = "ti,composite-gate-clock";
969fa160cbSTero Kristo		clocks = <&core_ck>;
979fa160cbSTero Kristo		ti,bit-shift = <3>;
989fa160cbSTero Kristo		reg = <0x0200>;
999fa160cbSTero Kristo	};
1009fa160cbSTero Kristo
1019fa160cbSTero Kristo	sys_clkout2_src_gate: sys_clkout2_src_gate {
1029fa160cbSTero Kristo		#clock-cells = <0>;
1039fa160cbSTero Kristo		compatible = "ti,composite-no-wait-gate-clock";
1049fa160cbSTero Kristo		clocks = <&core_ck>;
1059fa160cbSTero Kristo		ti,bit-shift = <15>;
1069fa160cbSTero Kristo		reg = <0x0070>;
1079fa160cbSTero Kristo	};
108