1e581245dSLaxman DewanganBinding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block 2b06c6987STomasz Figa 3e581245dSLaxman DewanganThis is a part of device tree bindings of MAX77686/MAX77802/MAX77620 4e581245dSLaxman Dewanganmulti-function device. More information can be found in MFD DT binding 5e581245dSLaxman Dewangandoc as follows: 6e581245dSLaxman Dewangan bindings/mfd/max77686.txt for MAX77686 and 7e581245dSLaxman Dewangan bindings/mfd/max77802.txt for MAX77802 and 8e581245dSLaxman Dewangan bindings/mfd/max77620.txt for MAX77620. 9b06c6987STomasz Figa 10b06c6987STomasz FigaThe MAX77686 contains three 32.768khz clock outputs that can be controlled 11e581245dSLaxman Dewangan(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 12e581245dSLaxman Dewangandt-bindings/clock/maxim,max77686.h. 13e581245dSLaxman Dewangan 14b06c6987STomasz Figa 1524f668deSLaxman DewanganThe MAX77802 contains two 32.768khz clock outputs that can be controlled 16e581245dSLaxman Dewangan(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 17e581245dSLaxman Dewangandt-bindings/clock/maxim,max77802.h. 18e581245dSLaxman Dewangan 19e581245dSLaxman DewanganThe MAX77686 contains one 32.768khz clock outputs that can be controlled 20e581245dSLaxman Dewangan(gated/ungated) over I2C. Clocks are defined as preprocessor macros in 21e581245dSLaxman Dewangandt-bindings/clock/maxim,max77620.h. 2224f668deSLaxman Dewangan 23b06c6987STomasz FigaFollowing properties should be presend in main device node of the MFD chip. 24b06c6987STomasz Figa 25b06c6987STomasz FigaRequired properties: 26fcd0864cSJavier Martinez Canillas 27fcd0864cSJavier Martinez Canillas- #clock-cells: from common clock binding; shall be set to 1. 28fcd0864cSJavier Martinez Canillas 29fcd0864cSJavier Martinez CanillasOptional properties: 30fcd0864cSJavier Martinez Canillas- clock-output-names: From common clock binding. 31fcd0864cSJavier Martinez Canillas 32fcd0864cSJavier Martinez CanillasEach clock is assigned an identifier and client nodes can use this identifier 33fcd0864cSJavier Martinez Canillasto specify the clock which they consume. Following indices are allowed: 34e581245dSLaxman Dewangan - 0: 32khz_ap clock (max77686, max77802), 32khz_out0 (max77620) 3524f668deSLaxman Dewangan - 1: 32khz_cp clock (max77686, max77802), 3624f668deSLaxman Dewangan - 2: 32khz_pmic clock (max77686). 37b06c6987STomasz Figa 38e581245dSLaxman DewanganClocks are defined as preprocessor macros in above dt-binding header for 39e581245dSLaxman Dewanganrespective chips. 40fcd0864cSJavier Martinez Canillas 4124f668deSLaxman DewanganExample: 42b06c6987STomasz Figa 4324f668deSLaxman Dewangan1. With MAX77686: 4424f668deSLaxman Dewangan 4524f668deSLaxman Dewangan#include <dt-bindings/clock/maxim,max77686.h> 4624f668deSLaxman Dewangan/* ... */ 4724f668deSLaxman Dewangan 4824f668deSLaxman Dewangan Node of the MFD chip 4948c926cdSMarco Franchi max77686: max77686@9 { 50b06c6987STomasz Figa compatible = "maxim,max77686"; 51b06c6987STomasz Figa interrupt-parent = <&wakeup_eint>; 52*215e50b0SKrzysztof Kozlowski interrupts = <26 IRQ_TYPE_LEVEL_LOW>; 53b06c6987STomasz Figa reg = <0x09>; 54b06c6987STomasz Figa #clock-cells = <1>; 55b06c6987STomasz Figa 56b06c6987STomasz Figa /* ... */ 57b06c6987STomasz Figa }; 58b06c6987STomasz Figa 5924f668deSLaxman Dewangan Clock consumer node 60b06c6987STomasz Figa 61b06c6987STomasz Figa foo@0 { 62b06c6987STomasz Figa compatible = "bar,foo"; 63b06c6987STomasz Figa /* ... */ 64b06c6987STomasz Figa clock-names = "my-clock"; 65fcd0864cSJavier Martinez Canillas clocks = <&max77686 MAX77686_CLK_PMIC>; 66b06c6987STomasz Figa }; 6724f668deSLaxman Dewangan 6824f668deSLaxman Dewangan2. With MAX77802: 6924f668deSLaxman Dewangan 7024f668deSLaxman Dewangan#include <dt-bindings/clock/maxim,max77802.h> 7124f668deSLaxman Dewangan/* ... */ 7224f668deSLaxman Dewangan 7324f668deSLaxman Dewangan Node of the MFD chip 7448c926cdSMarco Franchi max77802: max77802@9 { 7524f668deSLaxman Dewangan compatible = "maxim,max77802"; 7624f668deSLaxman Dewangan interrupt-parent = <&wakeup_eint>; 77*215e50b0SKrzysztof Kozlowski interrupts = <26 IRQ_TYPE_LEVEL_LOW>; 7824f668deSLaxman Dewangan reg = <0x09>; 7924f668deSLaxman Dewangan #clock-cells = <1>; 8024f668deSLaxman Dewangan 8124f668deSLaxman Dewangan /* ... */ 8224f668deSLaxman Dewangan }; 8324f668deSLaxman Dewangan 8424f668deSLaxman Dewangan Clock consumer node 8524f668deSLaxman Dewangan 8624f668deSLaxman Dewangan foo@0 { 8724f668deSLaxman Dewangan compatible = "bar,foo"; 8824f668deSLaxman Dewangan /* ... */ 8924f668deSLaxman Dewangan clock-names = "my-clock"; 9024f668deSLaxman Dewangan clocks = <&max77802 MAX77802_CLK_32K_AP>; 9124f668deSLaxman Dewangan }; 92e581245dSLaxman Dewangan 93e581245dSLaxman Dewangan 94e581245dSLaxman Dewangan3. With MAX77620: 95e581245dSLaxman Dewangan 96e581245dSLaxman Dewangan#include <dt-bindings/clock/maxim,max77620.h> 97e581245dSLaxman Dewangan/* ... */ 98e581245dSLaxman Dewangan 99e581245dSLaxman Dewangan Node of the MFD chip 100e581245dSLaxman Dewangan max77620: max77620@3c { 101e581245dSLaxman Dewangan compatible = "maxim,max77620"; 102e581245dSLaxman Dewangan reg = <0x3c>; 103e581245dSLaxman Dewangan #clock-cells = <1>; 104e581245dSLaxman Dewangan /* ... */ 105e581245dSLaxman Dewangan }; 106e581245dSLaxman Dewangan 107e581245dSLaxman Dewangan Clock consumer node 108e581245dSLaxman Dewangan 109e581245dSLaxman Dewangan foo@0 { 110e581245dSLaxman Dewangan compatible = "bar,foo"; 111e581245dSLaxman Dewangan /* ... */ 112e581245dSLaxman Dewangan clock-names = "my-clock"; 113e581245dSLaxman Dewangan clocks = <&max77620 MAX77620_CLK_32K_OUT0>; 114e581245dSLaxman Dewangan }; 115