Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 1 | |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 2 | * Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 3 | |
Sachin Kamat | 9a46847 | 2013-11-08 17:05:42 +0530 | [diff] [blame] | 4 | The Samsung S2MPS11 is a multi-function device which includes voltage and |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 5 | current regulators, RTC, charger controller and other sub-blocks. It is |
Sachin Kamat | 9a46847 | 2013-11-08 17:05:42 +0530 | [diff] [blame] | 6 | interfaced to the host controller using an I2C interface. Each sub-block is |
| 7 | addressed by the host system using different I2C slave addresses. |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 8 | |
| 9 | Required properties: |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 10 | - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic" |
| 11 | or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 12 | - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. |
| 13 | |
| 14 | Optional properties: |
| 15 | - interrupt-parent: Specifies the phandle of the interrupt controller to which |
| 16 | the interrupts from s2mps11 are delivered to. |
| 17 | - interrupts: Interrupt specifiers for interrupt sources. |
Krzysztof Kozlowski | 6a4479f | 2015-08-17 08:55:51 +0900 | [diff] [blame] | 18 | - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is |
| 19 | connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1 |
| 20 | register to turn off the power. Usually the ACOKB is pulled up to VBATT so |
| 21 | when PWRHOLD pin goes low, the rising ACOKB will trigger power off. |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 22 | |
| 23 | Optional nodes: |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 24 | - clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 |
| 25 | KHz outputs, so to register these as clocks with common clock framework |
Krzysztof Kozlowski | b6ab7a8 | 2014-03-17 10:19:18 +0100 | [diff] [blame] | 26 | instantiate a sub-node named "clocks". It uses the common clock binding |
| 27 | documented in : |
Yadwinder Singh Brar | 3134bca | 2013-07-07 17:14:21 +0530 | [diff] [blame] | 28 | [Documentation/devicetree/bindings/clock/clock-bindings.txt] |
Krzysztof Kozlowski | b6ab7a8 | 2014-03-17 10:19:18 +0100 | [diff] [blame] | 29 | The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs. |
Yadwinder Singh Brar | 3134bca | 2013-07-07 17:14:21 +0530 | [diff] [blame] | 30 | - #clock-cells: should be 1. |
| 31 | |
| 32 | - The following is the list of clocks generated by the controller. Each clock |
| 33 | is assigned an identifier and client nodes use this identifier to specify |
| 34 | the clock which they consume. |
Krzysztof Kozlowski | b6ab7a8 | 2014-03-17 10:19:18 +0100 | [diff] [blame] | 35 | Clock ID Devices |
| 36 | ---------------------------------------------------------- |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 37 | 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 |
| 38 | 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 |
| 39 | 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 |
Krzysztof Kozlowski | b6ab7a8 | 2014-03-17 10:19:18 +0100 | [diff] [blame] | 40 | |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 41 | - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", |
| 42 | "samsung,s2mps14-clk", "samsung,s5m8767-clk" |
Yadwinder Singh Brar | 3134bca | 2013-07-07 17:14:21 +0530 | [diff] [blame] | 43 | |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 44 | - regulators: The regulators of s2mps11 that have to be instantiated should be |
| 45 | included in a sub-node named 'regulators'. Regulator nodes included in this |
| 46 | sub-node should be of the format as listed below. |
| 47 | |
| 48 | regulator_name { |
| 49 | [standard regulator constraints....]; |
| 50 | }; |
| 51 | |
| 52 | regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us |
| 53 | |
Hayato Suzuki | 24488c3 | 2014-07-02 15:15:32 +0900 | [diff] [blame] | 54 | BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 55 | regulator-ramp-delay = <0> can be used for them to disable ramp delay. |
Sachin Kamat | 9a46847 | 2013-11-08 17:05:42 +0530 | [diff] [blame] | 56 | In the absence of the regulator-ramp-delay property, the default ramp |
| 57 | delay will be used. |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 58 | |
| 59 | NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set |
| 60 | for a particular group of BUCKs. So provide same regulator-ramp-delay<value>. |
| 61 | Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6], |
| 62 | BUCK[3, 4], and BUCK[7, 8, 10] |
| 63 | |
Krzysztof Kozlowski | 9b63cfb | 2014-04-14 10:09:08 +0200 | [diff] [blame] | 64 | On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control |
| 65 | over GPIO. To turn this feature on this property must be added to the regulator |
| 66 | sub-node: |
| 67 | - samsung,ext-control-gpios: GPIO specifier for one GPIO |
| 68 | controlling this regulator (enable/disable); |
| 69 | Example: |
| 70 | LDO12 { |
| 71 | regulator-name = "V_EMMC_2.8V"; |
| 72 | regulator-min-microvolt = <2800000>; |
| 73 | regulator-max-microvolt = <2800000>; |
| 74 | samsung,ext-control-gpios = <&gpk0 2 0>; |
| 75 | }; |
| 76 | |
| 77 | |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 78 | The regulator constraints inside the regulator nodes use the standard regulator |
| 79 | bindings which are documented elsewhere. |
| 80 | |
| 81 | The following are the names of the regulators that the s2mps11 pmic block |
| 82 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number |
| 83 | as per the datasheet of s2mps11. |
| 84 | |
| 85 | - LDOn |
Krzysztof Kozlowski | 8d7c772 | 2014-03-07 11:10:52 +0100 | [diff] [blame] | 86 | - valid values for n are: |
| 87 | - S2MPS11: 1 to 38 |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 88 | - S2MPS13: 1 to 40 |
Krzysztof Kozlowski | 8d7c772 | 2014-03-07 11:10:52 +0100 | [diff] [blame] | 89 | - S2MPS14: 1 to 25 |
Chanwoo Choi | b264fc7 | 2014-06-25 16:14:46 +0900 | [diff] [blame] | 90 | - S2MPU02: 1 to 28 |
Andreas Färber | f18ac1a | 2014-06-23 03:21:19 +0200 | [diff] [blame] | 91 | - Example: LDO1, LDO2, LDO28 |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 92 | - BUCKn |
Krzysztof Kozlowski | 8d7c772 | 2014-03-07 11:10:52 +0100 | [diff] [blame] | 93 | - valid values for n are: |
| 94 | - S2MPS11: 1 to 10 |
Chanwoo Choi | 159a5e92 | 2014-11-18 17:59:43 +0900 | [diff] [blame] | 95 | - S2MPS13: 1 to 10 |
Krzysztof Kozlowski | 8d7c772 | 2014-03-07 11:10:52 +0100 | [diff] [blame] | 96 | - S2MPS14: 1 to 5 |
Chanwoo Choi | b264fc7 | 2014-06-25 16:14:46 +0900 | [diff] [blame] | 97 | - S2MPU02: 1 to 7 |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 98 | - Example: BUCK1, BUCK2, BUCK9 |
| 99 | |
| 100 | Example: |
| 101 | |
| 102 | s2mps11_pmic@66 { |
| 103 | compatible = "samsung,s2mps11-pmic"; |
| 104 | reg = <0x66>; |
| 105 | |
Krzysztof Kozlowski | b6ab7a8 | 2014-03-17 10:19:18 +0100 | [diff] [blame] | 106 | s2m_osc: clocks { |
| 107 | compatible = "samsung,s2mps11-clk"; |
Andreas Färber | c75e083 | 2014-06-23 03:21:20 +0200 | [diff] [blame] | 108 | #clock-cells = <1>; |
Yadwinder Singh Brar | 3134bca | 2013-07-07 17:14:21 +0530 | [diff] [blame] | 109 | clock-output-names = "xx", "yy", "zz"; |
| 110 | }; |
| 111 | |
Yadwinder Singh Brar | aa32aca | 2013-06-29 18:21:20 +0530 | [diff] [blame] | 112 | regulators { |
| 113 | ldo1_reg: LDO1 { |
| 114 | regulator-name = "VDD_ABB_3.3V"; |
| 115 | regulator-min-microvolt = <3300000>; |
| 116 | regulator-max-microvolt = <3300000>; |
| 117 | }; |
| 118 | |
| 119 | ldo2_reg: LDO2 { |
| 120 | regulator-name = "VDD_ALIVE_1.1V"; |
| 121 | regulator-min-microvolt = <1100000>; |
| 122 | regulator-max-microvolt = <1100000>; |
| 123 | regulator-always-on; |
| 124 | }; |
| 125 | |
| 126 | buck1_reg: BUCK1 { |
| 127 | regulator-name = "vdd_mif"; |
| 128 | regulator-min-microvolt = <950000>; |
| 129 | regulator-max-microvolt = <1350000>; |
| 130 | regulator-always-on; |
| 131 | regulator-boot-on; |
| 132 | }; |
| 133 | |
| 134 | buck2_reg: BUCK2 { |
| 135 | regulator-name = "vdd_arm"; |
| 136 | regulator-min-microvolt = <950000>; |
| 137 | regulator-max-microvolt = <1350000>; |
| 138 | regulator-always-on; |
| 139 | regulator-boot-on; |
| 140 | regulator-ramp-delay = <50000>; |
| 141 | }; |
| 142 | }; |
| 143 | }; |