1*4882a593SmuzhiyunBinding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis is a part of device tree bindings of MAX77686/MAX77802/MAX77620 4*4882a593Smuzhiyunmulti-function device. More information can be found in MFD DT binding 5*4882a593Smuzhiyundoc as follows: 6*4882a593Smuzhiyun bindings/mfd/max77686.txt for MAX77686 and 7*4882a593Smuzhiyun bindings/mfd/max77802.txt for MAX77802 and 8*4882a593Smuzhiyun bindings/mfd/max77620.txt for MAX77620. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunThe MAX77686 contains three 32.768khz clock outputs that can be controlled 11*4882a593Smuzhiyun(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 12*4882a593Smuzhiyundt-bindings/clock/maxim,max77686.h. 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe MAX77802 contains two 32.768khz clock outputs that can be controlled 16*4882a593Smuzhiyun(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 17*4882a593Smuzhiyundt-bindings/clock/maxim,max77802.h. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunThe MAX77686 contains one 32.768khz clock outputs that can be controlled 20*4882a593Smuzhiyun(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 21*4882a593Smuzhiyundt-bindings/clock/maxim,max77620.h. 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunFollowing properties should be presend in main device node of the MFD chip. 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunRequired properties: 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun- #clock-cells: from common clock binding; shall be set to 1. 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunOptional properties: 30*4882a593Smuzhiyun- clock-output-names: From common clock binding. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunEach clock is assigned an identifier and client nodes can use this identifier 33*4882a593Smuzhiyunto specify the clock which they consume. Following indices are allowed: 34*4882a593Smuzhiyun - 0: 32khz_ap clock (max77686, max77802), 32khz_out0 (max77620) 35*4882a593Smuzhiyun - 1: 32khz_cp clock (max77686, max77802), 36*4882a593Smuzhiyun - 2: 32khz_pmic clock (max77686). 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunClocks are defined as preprocessor macros in above dt-binding header for 39*4882a593Smuzhiyunrespective chips. 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunExample: 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun1. With MAX77686: 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun#include <dt-bindings/clock/maxim,max77686.h> 46*4882a593Smuzhiyun/* ... */ 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun Node of the MFD chip 49*4882a593Smuzhiyun max77686: max77686@9 { 50*4882a593Smuzhiyun compatible = "maxim,max77686"; 51*4882a593Smuzhiyun interrupt-parent = <&wakeup_eint>; 52*4882a593Smuzhiyun interrupts = <26 0>; 53*4882a593Smuzhiyun reg = <0x09>; 54*4882a593Smuzhiyun #clock-cells = <1>; 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun /* ... */ 57*4882a593Smuzhiyun }; 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun Clock consumer node 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun foo@0 { 62*4882a593Smuzhiyun compatible = "bar,foo"; 63*4882a593Smuzhiyun /* ... */ 64*4882a593Smuzhiyun clock-names = "my-clock"; 65*4882a593Smuzhiyun clocks = <&max77686 MAX77686_CLK_PMIC>; 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun2. With MAX77802: 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun#include <dt-bindings/clock/maxim,max77802.h> 71*4882a593Smuzhiyun/* ... */ 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun Node of the MFD chip 74*4882a593Smuzhiyun max77802: max77802@9 { 75*4882a593Smuzhiyun compatible = "maxim,max77802"; 76*4882a593Smuzhiyun interrupt-parent = <&wakeup_eint>; 77*4882a593Smuzhiyun interrupts = <26 0>; 78*4882a593Smuzhiyun reg = <0x09>; 79*4882a593Smuzhiyun #clock-cells = <1>; 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun /* ... */ 82*4882a593Smuzhiyun }; 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun Clock consumer node 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun foo@0 { 87*4882a593Smuzhiyun compatible = "bar,foo"; 88*4882a593Smuzhiyun /* ... */ 89*4882a593Smuzhiyun clock-names = "my-clock"; 90*4882a593Smuzhiyun clocks = <&max77802 MAX77802_CLK_32K_AP>; 91*4882a593Smuzhiyun }; 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun3. With MAX77620: 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun#include <dt-bindings/clock/maxim,max77620.h> 97*4882a593Smuzhiyun/* ... */ 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun Node of the MFD chip 100*4882a593Smuzhiyun max77620: max77620@3c { 101*4882a593Smuzhiyun compatible = "maxim,max77620"; 102*4882a593Smuzhiyun reg = <0x3c>; 103*4882a593Smuzhiyun #clock-cells = <1>; 104*4882a593Smuzhiyun /* ... */ 105*4882a593Smuzhiyun }; 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun Clock consumer node 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun foo@0 { 110*4882a593Smuzhiyun compatible = "bar,foo"; 111*4882a593Smuzhiyun /* ... */ 112*4882a593Smuzhiyun clock-names = "my-clock"; 113*4882a593Smuzhiyun clocks = <&max77620 MAX77620_CLK_32K_OUT0>; 114*4882a593Smuzhiyun }; 115