18c2ecf20Sopenharmony_ciBinding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis is a part of device tree bindings of MAX77686/MAX77802/MAX77620
48c2ecf20Sopenharmony_cimulti-function device. More information can be found in MFD DT binding
58c2ecf20Sopenharmony_cidoc as follows:
68c2ecf20Sopenharmony_ci	bindings/mfd/max77686.txt for MAX77686 and
78c2ecf20Sopenharmony_ci	bindings/mfd/max77802.txt for MAX77802 and
88c2ecf20Sopenharmony_ci	bindings/mfd/max77620.txt for MAX77620.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciThe MAX77686 contains three 32.768khz clock outputs that can be controlled
118c2ecf20Sopenharmony_ci(gated/ungated) over I2C. Clocks are defined as preprocessor macros in
128c2ecf20Sopenharmony_cidt-bindings/clock/maxim,max77686.h.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciThe MAX77802 contains two 32.768khz clock outputs that can be controlled
168c2ecf20Sopenharmony_ci(gated/ungated) over I2C. Clocks are defined as preprocessor macros in
178c2ecf20Sopenharmony_cidt-bindings/clock/maxim,max77802.h.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciThe MAX77686 contains one 32.768khz clock outputs that can be controlled
208c2ecf20Sopenharmony_ci(gated/ungated) over I2C. Clocks are defined as preprocessor macros in
218c2ecf20Sopenharmony_cidt-bindings/clock/maxim,max77620.h.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciFollowing properties should be presend in main device node of the MFD chip.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciRequired properties:
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci- #clock-cells: from common clock binding; shall be set to 1.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciOptional properties:
308c2ecf20Sopenharmony_ci- clock-output-names: From common clock binding.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciEach clock is assigned an identifier and client nodes can use this identifier
338c2ecf20Sopenharmony_cito specify the clock which they consume. Following indices are allowed:
348c2ecf20Sopenharmony_ci    - 0: 32khz_ap clock (max77686, max77802), 32khz_out0 (max77620)
358c2ecf20Sopenharmony_ci    - 1: 32khz_cp clock (max77686, max77802),
368c2ecf20Sopenharmony_ci    - 2: 32khz_pmic clock (max77686).
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciClocks are defined as preprocessor macros in above dt-binding header for
398c2ecf20Sopenharmony_cirespective chips.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciExample:
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci1. With MAX77686:
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#include <dt-bindings/clock/maxim,max77686.h>
468c2ecf20Sopenharmony_ci/* ... */
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci	Node of the MFD chip
498c2ecf20Sopenharmony_ci		max77686: max77686@9 {
508c2ecf20Sopenharmony_ci			compatible = "maxim,max77686";
518c2ecf20Sopenharmony_ci			interrupt-parent = <&wakeup_eint>;
528c2ecf20Sopenharmony_ci			interrupts = <26 0>;
538c2ecf20Sopenharmony_ci			reg = <0x09>;
548c2ecf20Sopenharmony_ci			#clock-cells = <1>;
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci			/* ... */
578c2ecf20Sopenharmony_ci		};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci	Clock consumer node
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci		foo@0 {
628c2ecf20Sopenharmony_ci			compatible = "bar,foo";
638c2ecf20Sopenharmony_ci			/* ... */
648c2ecf20Sopenharmony_ci			clock-names = "my-clock";
658c2ecf20Sopenharmony_ci			clocks = <&max77686 MAX77686_CLK_PMIC>;
668c2ecf20Sopenharmony_ci		};
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci2. With MAX77802:
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci#include <dt-bindings/clock/maxim,max77802.h>
718c2ecf20Sopenharmony_ci/* ... */
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci	Node of the MFD chip
748c2ecf20Sopenharmony_ci		max77802: max77802@9 {
758c2ecf20Sopenharmony_ci			compatible = "maxim,max77802";
768c2ecf20Sopenharmony_ci			interrupt-parent = <&wakeup_eint>;
778c2ecf20Sopenharmony_ci			interrupts = <26 0>;
788c2ecf20Sopenharmony_ci			reg = <0x09>;
798c2ecf20Sopenharmony_ci			#clock-cells = <1>;
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci			/* ... */
828c2ecf20Sopenharmony_ci		};
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci	Clock consumer node
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci		foo@0 {
878c2ecf20Sopenharmony_ci			compatible = "bar,foo";
888c2ecf20Sopenharmony_ci			/* ... */
898c2ecf20Sopenharmony_ci			clock-names = "my-clock";
908c2ecf20Sopenharmony_ci			clocks = <&max77802 MAX77802_CLK_32K_AP>;
918c2ecf20Sopenharmony_ci		};
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci3. With MAX77620:
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci#include <dt-bindings/clock/maxim,max77620.h>
978c2ecf20Sopenharmony_ci/* ... */
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci	Node of the MFD chip
1008c2ecf20Sopenharmony_ci		max77620: max77620@3c {
1018c2ecf20Sopenharmony_ci			compatible = "maxim,max77620";
1028c2ecf20Sopenharmony_ci			reg = <0x3c>;
1038c2ecf20Sopenharmony_ci			#clock-cells = <1>;
1048c2ecf20Sopenharmony_ci			/* ... */
1058c2ecf20Sopenharmony_ci		};
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci	Clock consumer node
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci		foo@0 {
1108c2ecf20Sopenharmony_ci			compatible = "bar,foo";
1118c2ecf20Sopenharmony_ci			/* ... */
1128c2ecf20Sopenharmony_ci			clock-names = "my-clock";
1138c2ecf20Sopenharmony_ci			clocks = <&max77620 MAX77620_CLK_32K_OUT0>;
1148c2ecf20Sopenharmony_ci		};
115