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