18c2ecf20Sopenharmony_ciBinding for Samsung S2M and S5M family clock generator block 28c2ecf20Sopenharmony_ci============================================================ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThis is a part of device tree bindings for S2M and S5M family multi-function 58c2ecf20Sopenharmony_cidevices. 68c2ecf20Sopenharmony_ciMore information can be found in bindings/mfd/sec-core.txt file. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciThe S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz 98c2ecf20Sopenharmony_cioutputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciTo register these as clocks with common clock framework instantiate under 128c2ecf20Sopenharmony_cimain device node a sub-node named "clocks". 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciIt uses the common clock binding documented in: 158c2ecf20Sopenharmony_ci - Documentation/devicetree/bindings/clock/clock-bindings.txt 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciRequired properties of the "clocks" sub-node: 198c2ecf20Sopenharmony_ci - #clock-cells: should be 1. 208c2ecf20Sopenharmony_ci - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", 218c2ecf20Sopenharmony_ci "samsung,s2mps14-clk", "samsung,s5m8767-clk" 228c2ecf20Sopenharmony_ci The S2MPS15 uses the same compatible as S2MPS13, as both provides similar 238c2ecf20Sopenharmony_ci clocks. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciEach clock is assigned an identifier and client nodes use this identifier 278c2ecf20Sopenharmony_cito specify the clock which they consume. 288c2ecf20Sopenharmony_ci Clock ID Devices 298c2ecf20Sopenharmony_ci ---------------------------------------------------------- 308c2ecf20Sopenharmony_ci 32KhzAP 0 S2MPS11/13/14/15, S5M8767 318c2ecf20Sopenharmony_ci 32KhzCP 1 S2MPS11/13/15, S5M8767 328c2ecf20Sopenharmony_ci 32KhzBT 2 S2MPS11/13/14/15, S5M8767 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciInclude dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines 358c2ecf20Sopenharmony_ciin device tree sources. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciExample: 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci s2mps11_pmic@66 { 418c2ecf20Sopenharmony_ci compatible = "samsung,s2mps11-pmic"; 428c2ecf20Sopenharmony_ci reg = <0x66>; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci s2m_osc: clocks { 458c2ecf20Sopenharmony_ci compatible = "samsung,s2mps11-clk"; 468c2ecf20Sopenharmony_ci #clock-cells = <1>; 478c2ecf20Sopenharmony_ci clock-output-names = "xx", "yy", "zz"; 488c2ecf20Sopenharmony_ci }; 498c2ecf20Sopenharmony_ci }; 50