Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: max77686: Add DT binding details for PMIC MAX77620

Maxim has used the same clock IP on multiple PMICs like MAX77686,
MAX77802, MAX77620. Only differences are the number of clocks
from these PMICs like MAX77686 has 3 clocks output, MAX776802 have
two clock output and MAX77620 has one clock output.

Add clock binding details and DT example for the MAX77620.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@dowhile0.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Laxman Dewangan and committed by
Stephen Boyd
e581245d 24f668de

+63 -10
+42 -10
Documentation/devicetree/bindings/clock/maxim,max77686.txt
··· 1 - Binding for Maxim MAX77686/MAX77802 32k clock generator block 1 + Binding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block 2 2 3 - This is a part of device tree bindings of MAX77686/MAX77802 multi-function 4 - device. More information can be found in bindings/mfd/max77686.txt file for 5 - MAX77686 and bindings/mfd/max77802.txt for MAX77802. 3 + This is a part of device tree bindings of MAX77686/MAX77802/MAX77620 4 + multi-function device. More information can be found in MFD DT binding 5 + doc as follows: 6 + bindings/mfd/max77686.txt for MAX77686 and 7 + bindings/mfd/max77802.txt for MAX77802 and 8 + bindings/mfd/max77620.txt for MAX77620. 6 9 7 10 The MAX77686 contains three 32.768khz clock outputs that can be controlled 8 - (gated/ungated) over I2C. 11 + (gated/ungated) over I2C. Clocks are defined as preprocessor macros in 12 + dt-bindings/clock/maxim,max77686.h. 13 + 9 14 10 15 The MAX77802 contains two 32.768khz clock outputs that can be controlled 11 - (gated/ungated) over I2C. 16 + (gated/ungated) over I2C. Clocks are defined as preprocessor macros in 17 + dt-bindings/clock/maxim,max77802.h. 18 + 19 + The MAX77686 contains one 32.768khz clock outputs that can be controlled 20 + (gated/ungated) over I2C. Clocks are defined as preprocessor macros in 21 + dt-bindings/clock/maxim,max77620.h. 12 22 13 23 Following properties should be presend in main device node of the MFD chip. 14 24 ··· 31 21 32 22 Each clock is assigned an identifier and client nodes can use this identifier 33 23 to specify the clock which they consume. Following indices are allowed: 34 - - 0: 32khz_ap clock (max77686, max77802), 24 + - 0: 32khz_ap clock (max77686, max77802), 32khz_out0 (max77620) 35 25 - 1: 32khz_cp clock (max77686, max77802), 36 26 - 2: 32khz_pmic clock (max77686). 37 27 38 - Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max77686.h 39 - header for MAX77686 and dt-bindings/clock/maxim,max77802.h for MAX77802 and can 40 - be used in device tree sources. 28 + Clocks are defined as preprocessor macros in above dt-binding header for 29 + respective chips. 41 30 42 31 Example: 43 32 ··· 88 79 /* ... */ 89 80 clock-names = "my-clock"; 90 81 clocks = <&max77802 MAX77802_CLK_32K_AP>; 82 + }; 83 + 84 + 85 + 3. With MAX77620: 86 + 87 + #include <dt-bindings/clock/maxim,max77620.h> 88 + /* ... */ 89 + 90 + Node of the MFD chip 91 + max77620: max77620@3c { 92 + compatible = "maxim,max77620"; 93 + reg = <0x3c>; 94 + #clock-cells = <1>; 95 + /* ... */ 96 + }; 97 + 98 + Clock consumer node 99 + 100 + foo@0 { 101 + compatible = "bar,foo"; 102 + /* ... */ 103 + clock-names = "my-clock"; 104 + clocks = <&max77620 MAX77620_CLK_32K_OUT0>; 91 105 };
+21
include/dt-bindings/clock/maxim,max77620.h
··· 1 + /* 2 + * Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * Device Tree binding constants clocks for the Maxim 77620 PMIC. 9 + */ 10 + 11 + #ifndef _DT_BINDINGS_CLOCK_MAXIM_MAX77620_CLOCK_H 12 + #define _DT_BINDINGS_CLOCK_MAXIM_MAX77620_CLOCK_H 13 + 14 + /* Fixed rate clocks. */ 15 + 16 + #define MAX77620_CLK_32K_OUT0 0 17 + 18 + /* Total number of clocks. */ 19 + #define MAX77620_CLKS_NUM (MAX77620_CLK_32K_OUT0 + 1) 20 + 21 + #endif /* _DT_BINDINGS_CLOCK_MAXIM_MAX77620_CLOCK_H */