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

Merge branches 'ib-mfd-iio-touchscreen-clk-5.16', 'ib-mfd-misc-regulator-5.16' and 'tb-mfd-from-regulator-5.16' into ibs-for-mfd-merged

+1094 -523
-49
Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
··· 1 - Binding for Samsung S2M and S5M family clock generator block 2 - ============================================================ 3 - 4 - This is a part of device tree bindings for S2M and S5M family multi-function 5 - devices. 6 - More information can be found in bindings/mfd/sec-core.txt file. 7 - 8 - The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz 9 - outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs. 10 - 11 - To register these as clocks with common clock framework instantiate under 12 - main device node a sub-node named "clocks". 13 - 14 - It uses the common clock binding documented in: 15 - - Documentation/devicetree/bindings/clock/clock-bindings.txt 16 - 17 - 18 - Required properties of the "clocks" sub-node: 19 - - #clock-cells: should be 1. 20 - - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", 21 - "samsung,s2mps14-clk", "samsung,s5m8767-clk" 22 - The S2MPS15 uses the same compatible as S2MPS13, as both provides similar 23 - clocks. 24 - 25 - 26 - Each clock is assigned an identifier and client nodes use this identifier 27 - to specify the clock which they consume. 28 - Clock ID Devices 29 - ---------------------------------------------------------- 30 - 32KhzAP 0 S2MPS11/13/14/15, S5M8767 31 - 32KhzCP 1 S2MPS11/13/15, S5M8767 32 - 32KhzBT 2 S2MPS11/13/14/15, S5M8767 33 - 34 - Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines 35 - in device tree sources. 36 - 37 - 38 - Example: 39 - 40 - s2mps11_pmic@66 { 41 - compatible = "samsung,s2mps11-pmic"; 42 - reg = <0x66>; 43 - 44 - s2m_osc: clocks { 45 - compatible = "samsung,s2mps11-clk"; 46 - #clock-cells = <1>; 47 - clock-output-names = "xx", "yy", "zz"; 48 - }; 49 - };
+45
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/samsung,s2mps11.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2M and S5M family clock generator block 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz 17 + outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs. 18 + 19 + All available clocks are defined as preprocessor macros in 20 + dt-bindings/clock/samsung,s2mps11.h header. 21 + 22 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 23 + additional information and example. 24 + 25 + properties: 26 + compatible: 27 + enum: 28 + - samsung,s2mps11-clk 29 + - samsung,s2mps13-clk # S2MPS13 and S2MPS15 30 + - samsung,s2mps14-clk 31 + - samsung,s5m8767-clk 32 + 33 + "#clock-cells": 34 + const: 1 35 + 36 + clock-output-names: 37 + minItems: 3 38 + maxItems: 3 39 + description: Names for AP, CP and BT clocks. 40 + 41 + required: 42 + - compatible 43 + - "#clock-cells" 44 + 45 + additionalProperties: false
+91
Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/samsung,s2mpa01.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPA01 Power Management IC 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The Samsung S2MPA01 is a Power Management IC which includes voltage 17 + and current regulators, RTC, clock outputs and other sub-blocks. 18 + 19 + properties: 20 + compatible: 21 + const: samsung,s2mpa01-pmic 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + regulators: 30 + $ref: ../regulator/samsung,s2mpa01.yaml 31 + description: 32 + List of child nodes that specify the regulators. 33 + 34 + wakeup-source: true 35 + 36 + required: 37 + - compatible 38 + - reg 39 + - regulators 40 + 41 + additionalProperties: false 42 + 43 + examples: 44 + - | 45 + #include <dt-bindings/interrupt-controller/irq.h> 46 + 47 + i2c { 48 + #address-cells = <1>; 49 + #size-cells = <0>; 50 + 51 + pmic@66 { 52 + compatible = "samsung,s2mpa01-pmic"; 53 + reg = <0x66>; 54 + 55 + regulators { 56 + ldo1_reg: LDO1 { 57 + regulator-name = "VDD_ALIVE"; 58 + regulator-min-microvolt = <1000000>; 59 + regulator-max-microvolt = <1000000>; 60 + }; 61 + 62 + ldo2_reg: LDO2 { 63 + regulator-name = "VDDQ_MMC2"; 64 + regulator-min-microvolt = <2800000>; 65 + regulator-max-microvolt = <2800000>; 66 + regulator-always-on; 67 + }; 68 + 69 + // ... 70 + 71 + buck1_reg: BUCK1 { 72 + regulator-name = "vdd_mif"; 73 + regulator-min-microvolt = <950000>; 74 + regulator-max-microvolt = <1350000>; 75 + regulator-always-on; 76 + regulator-boot-on; 77 + }; 78 + 79 + buck2_reg: BUCK2 { 80 + regulator-name = "vdd_arm"; 81 + regulator-min-microvolt = <950000>; 82 + regulator-max-microvolt = <1350000>; 83 + regulator-always-on; 84 + regulator-boot-on; 85 + regulator-ramp-delay = <50000>; 86 + }; 87 + 88 + // ... 89 + }; 90 + }; 91 + };
+267
Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/samsung,s2mps11.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The Samsung S2MPS11/13/14/15 and S2MPU02 is a family of Power Management IC 17 + which include voltage and current regulators, RTC, clock outputs and other 18 + sub-blocks. 19 + 20 + properties: 21 + compatible: 22 + enum: 23 + - samsung,s2mps11-pmic 24 + - samsung,s2mps13-pmic 25 + - samsung,s2mps14-pmic 26 + - samsung,s2mps15-pmic 27 + - samsung,s2mpu02-pmic 28 + 29 + clocks: 30 + $ref: ../clock/samsung,s2mps11.yaml 31 + description: 32 + Child node describing clock provider. 33 + 34 + interrupts: 35 + maxItems: 1 36 + 37 + reg: 38 + maxItems: 1 39 + 40 + regulators: 41 + type: object 42 + description: 43 + List of child nodes that specify the regulators. 44 + 45 + samsung,s2mps11-acokb-ground: 46 + description: | 47 + Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so 48 + the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the 49 + power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes 50 + low, the rising ACOKB will trigger power off. 51 + type: boolean 52 + 53 + samsung,s2mps11-wrstbi-ground: 54 + description: | 55 + Indicates that WRSTBI pin of PMIC is pulled down. When the system is 56 + suspended it will always go down thus triggerring unwanted buck warm 57 + reset (setting buck voltages to default values). 58 + type: boolean 59 + 60 + wakeup-source: true 61 + 62 + required: 63 + - compatible 64 + - reg 65 + - regulators 66 + 67 + additionalProperties: false 68 + 69 + allOf: 70 + - if: 71 + properties: 72 + compatible: 73 + contains: 74 + const: samsung,s2mps11-pmic 75 + then: 76 + properties: 77 + regulators: 78 + $ref: ../regulator/samsung,s2mps11.yaml 79 + samsung,s2mps11-wrstbi-ground: false 80 + 81 + - if: 82 + properties: 83 + compatible: 84 + contains: 85 + const: samsung,s2mps13-pmic 86 + then: 87 + properties: 88 + regulators: 89 + $ref: ../regulator/samsung,s2mps13.yaml 90 + samsung,s2mps11-acokb-ground: false 91 + 92 + - if: 93 + properties: 94 + compatible: 95 + contains: 96 + const: samsung,s2mps14-pmic 97 + then: 98 + properties: 99 + regulators: 100 + $ref: ../regulator/samsung,s2mps14.yaml 101 + samsung,s2mps11-acokb-ground: false 102 + samsung,s2mps11-wrstbi-ground: false 103 + 104 + - if: 105 + properties: 106 + compatible: 107 + contains: 108 + const: samsung,s2mps15-pmic 109 + then: 110 + properties: 111 + regulators: 112 + $ref: ../regulator/samsung,s2mps15.yaml 113 + samsung,s2mps11-acokb-ground: false 114 + samsung,s2mps11-wrstbi-ground: false 115 + 116 + - if: 117 + properties: 118 + compatible: 119 + contains: 120 + const: samsung,s2mpu02-pmic 121 + then: 122 + properties: 123 + regulators: 124 + $ref: ../regulator/samsung,s2mpu02.yaml 125 + samsung,s2mps11-acokb-ground: false 126 + samsung,s2mps11-wrstbi-ground: false 127 + 128 + examples: 129 + - | 130 + #include <dt-bindings/interrupt-controller/irq.h> 131 + 132 + i2c { 133 + #address-cells = <1>; 134 + #size-cells = <0>; 135 + 136 + pmic@66 { 137 + compatible = "samsung,s2mps11-pmic"; 138 + reg = <0x66>; 139 + 140 + interrupt-parent = <&gpx0>; 141 + interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 142 + pinctrl-names = "default"; 143 + pinctrl-0 = <&s2mps11_irq>; 144 + samsung,s2mps11-acokb-ground; 145 + wakeup-source; 146 + 147 + clocks { 148 + compatible = "samsung,s2mps11-clk"; 149 + #clock-cells = <1>; 150 + clock-output-names = "s2mps11_ap", "s2mps11_cp", "s2mps11_bt"; 151 + }; 152 + 153 + regulators { 154 + LDO1 { 155 + regulator-name = "vdd_ldo1"; 156 + regulator-min-microvolt = <1000000>; 157 + regulator-max-microvolt = <1000000>; 158 + regulator-always-on; 159 + }; 160 + 161 + LDO4 { 162 + regulator-name = "vdd_adc"; 163 + regulator-min-microvolt = <1800000>; 164 + regulator-max-microvolt = <1800000>; 165 + 166 + regulator-state-mem { 167 + regulator-off-in-suspend; 168 + }; 169 + }; 170 + 171 + // .... 172 + 173 + BUCK1 { 174 + regulator-name = "vdd_mif"; 175 + regulator-min-microvolt = <800000>; 176 + regulator-max-microvolt = <1300000>; 177 + regulator-always-on; 178 + regulator-boot-on; 179 + 180 + regulator-state-mem { 181 + regulator-off-in-suspend; 182 + }; 183 + }; 184 + 185 + BUCK2 { 186 + regulator-name = "vdd_arm"; 187 + regulator-min-microvolt = <800000>; 188 + regulator-max-microvolt = <1500000>; 189 + regulator-always-on; 190 + regulator-boot-on; 191 + regulator-coupled-with = <&buck3_reg>; 192 + regulator-coupled-max-spread = <300000>; 193 + 194 + regulator-state-mem { 195 + regulator-off-in-suspend; 196 + }; 197 + }; 198 + 199 + BUCK3 { 200 + regulator-name = "vdd_int"; 201 + regulator-min-microvolt = <800000>; 202 + regulator-max-microvolt = <1400000>; 203 + regulator-always-on; 204 + regulator-boot-on; 205 + regulator-coupled-with = <&buck2_reg>; 206 + regulator-coupled-max-spread = <300000>; 207 + 208 + regulator-state-mem { 209 + regulator-off-in-suspend; 210 + }; 211 + }; 212 + 213 + // ... 214 + }; 215 + }; 216 + }; 217 + 218 + - | 219 + #include <dt-bindings/interrupt-controller/irq.h> 220 + 221 + i2c { 222 + #address-cells = <1>; 223 + #size-cells = <0>; 224 + 225 + pmic@66 { 226 + compatible = "samsung,s2mps14-pmic"; 227 + reg = <0x66>; 228 + 229 + interrupt-parent = <&gpx0>; 230 + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 231 + wakeup-source; 232 + 233 + clocks { 234 + compatible = "samsung,s2mps14-clk"; 235 + #clock-cells = <1>; 236 + clock-output-names = "s2mps14_ap", "unused", "s2mps14_bt"; 237 + }; 238 + 239 + regulators { 240 + LDO1 { 241 + regulator-name = "VLDO1_1.0V"; 242 + regulator-min-microvolt = <1000000>; 243 + regulator-max-microvolt = <1000000>; 244 + regulator-always-on; 245 + 246 + regulator-state-mem { 247 + regulator-on-in-suspend; 248 + }; 249 + }; 250 + 251 + // ... 252 + 253 + BUCK1 { 254 + regulator-name = "VBUCK1_1.0V"; 255 + regulator-min-microvolt = <800000>; 256 + regulator-max-microvolt = <1000000>; 257 + regulator-always-on; 258 + 259 + regulator-state-mem { 260 + regulator-off-in-suspend; 261 + }; 262 + }; 263 + 264 + // ... 265 + }; 266 + }; 267 + };
+307
Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/samsung,s5m8767.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S5M8767 Power Management IC 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The Samsung S5M8767 is a Power Management IC which includes voltage 17 + and current regulators, RTC, clock outputs and other sub-blocks. 18 + 19 + properties: 20 + compatible: 21 + const: samsung,s5m8767-pmic 22 + 23 + clocks: 24 + $ref: ../clock/samsung,s2mps11.yaml 25 + description: 26 + Child node describing clock provider. 27 + 28 + interrupts: 29 + maxItems: 1 30 + 31 + reg: 32 + maxItems: 1 33 + 34 + regulators: 35 + $ref: ../regulator/samsung,s5m8767.yaml 36 + description: 37 + List of child nodes that specify the regulators. 38 + 39 + s5m8767,pmic-buck2-dvs-voltage: 40 + $ref: /schemas/types.yaml#/definitions/uint32-array 41 + minItems: 8 42 + maxItems: 8 43 + description: | 44 + A set of 8 voltage values in micro-volt (uV) units for buck2 when 45 + changing voltage using gpio dvs. 46 + 47 + s5m8767,pmic-buck3-dvs-voltage: 48 + $ref: /schemas/types.yaml#/definitions/uint32-array 49 + minItems: 8 50 + maxItems: 8 51 + description: | 52 + A set of 8 voltage values in micro-volt (uV) units for buck3 when 53 + changing voltage using gpio dvs. 54 + 55 + s5m8767,pmic-buck4-dvs-voltage: 56 + $ref: /schemas/types.yaml#/definitions/uint32-array 57 + minItems: 8 58 + maxItems: 8 59 + description: | 60 + A set of 8 voltage values in micro-volt (uV) units for buck4 when 61 + changing voltage using gpio dvs. 62 + 63 + s5m8767,pmic-buck-ds-gpios: 64 + minItems: 3 65 + maxItems: 3 66 + description: | 67 + GPIO specifiers for three host gpio's used for selecting GPIO DVS lines. 68 + It is one-to-one mapped to dvs gpio lines. 69 + 70 + s5m8767,pmic-buck2-uses-gpio-dvs: 71 + type: boolean 72 + description: buck2 can be controlled by gpio dvs. 73 + 74 + s5m8767,pmic-buck3-uses-gpio-dvs: 75 + type: boolean 76 + description: buck3 can be controlled by gpio dvs. 77 + 78 + s5m8767,pmic-buck4-uses-gpio-dvs: 79 + type: boolean 80 + description: buck4 can be controlled by gpio dvs. 81 + 82 + s5m8767,pmic-buck-default-dvs-idx: 83 + $ref: /schemas/types.yaml#/definitions/uint32-array 84 + minimum: 0 85 + maximum: 7 86 + default: 0 87 + description: | 88 + Default voltage setting selected from the possible 8 options selectable 89 + by the dvs gpios. The value of this property should be between 0 and 7. 90 + If not specified or if out of range, the default value of this property 91 + is set to 0. 92 + 93 + s5m8767,pmic-buck-dvs-gpios: 94 + minItems: 3 95 + maxItems: 3 96 + description: | 97 + GPIO specifiers for three host gpio's used for dvs. 98 + 99 + vinb1-supply: 100 + description: Power supply for buck1 101 + vinb2-supply: 102 + description: Power supply for buck2 103 + vinb3-supply: 104 + description: Power supply for buck3 105 + vinb4-supply: 106 + description: Power supply for buck4 107 + vinb5-supply: 108 + description: Power supply for buck5 109 + vinb6-supply: 110 + description: Power supply for buck6 111 + vinb7-supply: 112 + description: Power supply for buck7 113 + vinb8-supply: 114 + description: Power supply for buck8 115 + vinb9-supply: 116 + description: Power supply for buck9 117 + 118 + vinl1-supply: 119 + description: Power supply for LDO3, LDO10, LDO26, LDO27 120 + vinl2-supply: 121 + description: Power supply for LDO13, LDO16, LDO25, LDO28 122 + vinl3-supply: 123 + description: Power supply for LDO11, LDO14 124 + vinl4-supply: 125 + description: Power supply for LDO4, LDO9 126 + vinl5-supply: 127 + description: Power supply for LDO12, LDO17, LDO19, LDO23 128 + vinl6-supply: 129 + description: Power supply for LDO18, LDO20, LDO21, LDO24 130 + vinl7-supply: 131 + description: Power supply for LDO5, LDO22 132 + vinl8-supply: 133 + description: Power supply for LDO1, LDO6, LDO7, LDO8, LDO15 134 + vinl9-supply: 135 + description: Power supply for LDO2 136 + 137 + wakeup-source: true 138 + 139 + required: 140 + - compatible 141 + - reg 142 + - regulators 143 + - s5m8767,pmic-buck-ds-gpios 144 + 145 + dependencies: 146 + s5m8767,pmic-buck2-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] 147 + s5m8767,pmic-buck3-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] 148 + s5m8767,pmic-buck4-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] 149 + s5m8767,pmic-buck2-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck2-dvs-voltage' ] 150 + s5m8767,pmic-buck3-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck3-dvs-voltage' ] 151 + s5m8767,pmic-buck4-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck4-dvs-voltage' ] 152 + 153 + additionalProperties: false 154 + 155 + allOf: 156 + - if: 157 + required: 158 + - s5m8767,pmic-buck2-uses-gpio-dvs 159 + then: 160 + properties: 161 + s5m8767,pmic-buck3-uses-gpio-dvs: false 162 + s5m8767,pmic-buck4-uses-gpio-dvs: false 163 + 164 + - if: 165 + required: 166 + - s5m8767,pmic-buck3-uses-gpio-dvs 167 + then: 168 + properties: 169 + s5m8767,pmic-buck2-uses-gpio-dvs: false 170 + s5m8767,pmic-buck4-uses-gpio-dvs: false 171 + 172 + - if: 173 + required: 174 + - s5m8767,pmic-buck4-uses-gpio-dvs 175 + then: 176 + properties: 177 + s5m8767,pmic-buck2-uses-gpio-dvs: false 178 + s5m8767,pmic-buck3-uses-gpio-dvs: false 179 + 180 + examples: 181 + - | 182 + #include <dt-bindings/gpio/gpio.h> 183 + #include <dt-bindings/interrupt-controller/irq.h> 184 + 185 + i2c { 186 + #address-cells = <1>; 187 + #size-cells = <0>; 188 + 189 + pmic@66 { 190 + compatible = "samsung,s5m8767-pmic"; 191 + reg = <0x66>; 192 + 193 + interrupt-parent = <&gpx3>; 194 + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 195 + pinctrl-names = "default"; 196 + pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; 197 + wakeup-source; 198 + 199 + s5m8767,pmic-buck-default-dvs-idx = <3>; 200 + s5m8767,pmic-buck2-uses-gpio-dvs; 201 + 202 + s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>, 203 + <&gpd1 1 GPIO_ACTIVE_LOW>, 204 + <&gpd1 2 GPIO_ACTIVE_LOW>; 205 + 206 + s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, 207 + <&gpx2 4 GPIO_ACTIVE_LOW>, 208 + <&gpx2 5 GPIO_ACTIVE_LOW>; 209 + 210 + s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, 211 + <1250000>, <1200000>, 212 + <1150000>, <1100000>, 213 + <1000000>, <950000>; 214 + 215 + s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, 216 + <1100000>, <1100000>, 217 + <1000000>, <1000000>, 218 + <1000000>, <1000000>; 219 + 220 + s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, 221 + <1200000>, <1200000>, 222 + <1200000>, <1200000>, 223 + <1200000>, <1200000>; 224 + 225 + clocks { 226 + compatible = "samsung,s5m8767-clk"; 227 + #clock-cells = <1>; 228 + clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; 229 + }; 230 + 231 + regulators { 232 + LDO1 { 233 + regulator-name = "VDD_ALIVE"; 234 + regulator-min-microvolt = <1100000>; 235 + regulator-max-microvolt = <1100000>; 236 + regulator-always-on; 237 + regulator-boot-on; 238 + op_mode = <1>; /* Normal Mode */ 239 + }; 240 + 241 + // ... 242 + 243 + BUCK1 { 244 + regulator-name = "VDD_MIF"; 245 + regulator-min-microvolt = <950000>; 246 + regulator-max-microvolt = <1100000>; 247 + regulator-always-on; 248 + regulator-boot-on; 249 + op_mode = <1>; /* Normal Mode */ 250 + }; 251 + 252 + BUCK2 { 253 + regulator-name = "VDD_ARM"; 254 + regulator-min-microvolt = <900000>; 255 + regulator-max-microvolt = <1350000>; 256 + regulator-always-on; 257 + regulator-boot-on; 258 + op_mode = <1>; /* Normal Mode */ 259 + }; 260 + 261 + // ... 262 + }; 263 + }; 264 + }; 265 + 266 + - | 267 + #include <dt-bindings/gpio/gpio.h> 268 + #include <dt-bindings/interrupt-controller/irq.h> 269 + 270 + i2c { 271 + #address-cells = <1>; 272 + #size-cells = <0>; 273 + 274 + pmic@66 { 275 + compatible = "samsung,s5m8767-pmic"; 276 + reg = <0x66>; 277 + 278 + interrupt-parent = <&gpx3>; 279 + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 280 + pinctrl-names = "default"; 281 + pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; 282 + wakeup-source; 283 + 284 + s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, 285 + <&gpx2 4 GPIO_ACTIVE_LOW>, 286 + <&gpx2 5 GPIO_ACTIVE_LOW>; 287 + 288 + clocks { 289 + compatible = "samsung,s5m8767-clk"; 290 + #clock-cells = <1>; 291 + clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; 292 + }; 293 + 294 + regulators { 295 + LDO1 { 296 + regulator-name = "VDD_ALIVE"; 297 + regulator-min-microvolt = <1100000>; 298 + regulator-max-microvolt = <1100000>; 299 + regulator-always-on; 300 + regulator-boot-on; 301 + op_mode = <1>; /* Normal Mode */ 302 + }; 303 + 304 + // ... 305 + }; 306 + }; 307 + };
-86
Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
··· 1 - Binding for Samsung S2M and S5M family multi-function device 2 - ============================================================ 3 - 4 - This is a part of device tree bindings for S2M and S5M family multi-function 5 - devices. 6 - 7 - The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family 8 - of multi-function devices which include voltage and current regulators, RTC, 9 - charger controller, clock outputs and other sub-blocks. It is interfaced 10 - to the host controller using an I2C interface. Each sub-block is usually 11 - addressed by the host system using different I2C slave addresses. 12 - 13 - 14 - This document describes bindings for main device node. Optional sub-blocks 15 - must be a sub-nodes to it. Bindings for them can be found in: 16 - - bindings/regulator/samsung,s2mpa01.txt 17 - - bindings/regulator/samsung,s2mps11.txt 18 - - bindings/regulator/samsung,s5m8767.txt 19 - - bindings/clock/samsung,s2mps11.txt 20 - 21 - 22 - Required properties: 23 - - compatible: Should be one of the following 24 - - "samsung,s2mpa01-pmic", 25 - - "samsung,s2mps11-pmic", 26 - - "samsung,s2mps13-pmic", 27 - - "samsung,s2mps14-pmic", 28 - - "samsung,s2mps15-pmic", 29 - - "samsung,s2mpu02-pmic", 30 - - "samsung,s5m8767-pmic". 31 - - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 32 - 33 - Optional properties: 34 - - interrupts: Interrupt specifiers for interrupt sources. 35 - - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled 36 - down. When the system is suspended it will always go down thus triggerring 37 - unwanted buck warm reset (setting buck voltages to default values). 38 - - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is 39 - connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1 40 - register to turn off the power. Usually the ACOKB is pulled up to VBATT so 41 - when PWRHOLD pin goes low, the rising ACOKB will trigger power off. 42 - 43 - Example: 44 - 45 - s2mps11_pmic@66 { 46 - compatible = "samsung,s2mps11-pmic"; 47 - reg = <0x66>; 48 - 49 - s2m_osc: clocks { 50 - compatible = "samsung,s2mps11-clk"; 51 - #clock-cells = <1>; 52 - clock-output-names = "xx", "yy", "zz"; 53 - }; 54 - 55 - regulators { 56 - ldo1_reg: LDO1 { 57 - regulator-name = "VDD_ABB_3.3V"; 58 - regulator-min-microvolt = <3300000>; 59 - regulator-max-microvolt = <3300000>; 60 - }; 61 - 62 - ldo2_reg: LDO2 { 63 - regulator-name = "VDD_ALIVE_1.1V"; 64 - regulator-min-microvolt = <1100000>; 65 - regulator-max-microvolt = <1100000>; 66 - regulator-always-on; 67 - }; 68 - 69 - buck1_reg: BUCK1 { 70 - regulator-name = "vdd_mif"; 71 - regulator-min-microvolt = <950000>; 72 - regulator-max-microvolt = <1350000>; 73 - regulator-always-on; 74 - regulator-boot-on; 75 - }; 76 - 77 - buck2_reg: BUCK2 { 78 - regulator-name = "vdd_arm"; 79 - regulator-min-microvolt = <950000>; 80 - regulator-max-microvolt = <1350000>; 81 - regulator-always-on; 82 - regulator-boot-on; 83 - regulator-ramp-delay = <50000>; 84 - }; 85 - }; 86 - };
-79
Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
··· 1 - Binding for Samsung S2MPA01 regulator block 2 - =========================================== 3 - 4 - This is a part of device tree bindings for S2M family multi-function devices. 5 - More information can be found in bindings/mfd/sec-core.txt file. 6 - 7 - The S2MPA01 device provide buck and LDO regulators. 8 - 9 - To register these with regulator framework instantiate under main device node 10 - a sub-node named "regulators" with more sub-nodes for each regulator using the 11 - common regulator binding documented in: 12 - - Documentation/devicetree/bindings/regulator/regulator.txt 13 - 14 - 15 - Names of regulators supported by S2MPA01 device: 16 - - LDOn 17 - - valid values for n are 1 to 26 18 - - Example: LDO1, LD02, LDO26 19 - - BUCKn 20 - - valid values for n are 1 to 10. 21 - - Example: BUCK1, BUCK2, BUCK9 22 - Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 23 - as per the datasheet of device. 24 - 25 - 26 - Optional properties of buck regulator nodes under "regulators" sub-node: 27 - - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500 28 - (default), 25000, or 50000. May be 0 for disabling the ramp delay on 29 - BUCK{1,2,3,4}. 30 - 31 - In the absence of the regulator-ramp-delay property, the default ramp 32 - delay will be used. 33 - 34 - Note: Some bucks share the ramp rate setting i.e. same ramp value 35 - will be set for a particular group of bucks so provide the same 36 - regulator-ramp-delay value for them. 37 - Groups sharing ramp rate: 38 - - buck{1,6}, 39 - - buck{2,4}, 40 - - buck{8,9,10}. 41 - 42 - Example: 43 - 44 - s2mpa01_pmic@66 { 45 - compatible = "samsung,s2mpa01-pmic"; 46 - reg = <0x66>; 47 - 48 - regulators { 49 - ldo1_reg: LDO1 { 50 - regulator-name = "VDD_ALIVE"; 51 - regulator-min-microvolt = <1000000>; 52 - regulator-max-microvolt = <1000000>; 53 - }; 54 - 55 - ldo2_reg: LDO2 { 56 - regulator-name = "VDDQ_MMC2"; 57 - regulator-min-microvolt = <2800000>; 58 - regulator-max-microvolt = <2800000>; 59 - regulator-always-on; 60 - }; 61 - 62 - buck1_reg: BUCK1 { 63 - regulator-name = "vdd_mif"; 64 - regulator-min-microvolt = <950000>; 65 - regulator-max-microvolt = <1350000>; 66 - regulator-always-on; 67 - regulator-boot-on; 68 - }; 69 - 70 - buck2_reg: BUCK2 { 71 - regulator-name = "vdd_arm"; 72 - regulator-min-microvolt = <950000>; 73 - regulator-max-microvolt = <1350000>; 74 - regulator-always-on; 75 - regulator-boot-on; 76 - regulator-ramp-delay = <50000>; 77 - }; 78 - }; 79 - };
+62
Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mpa01.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPA01 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPA01 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 26 LDOs 23 + "^LDO([1-9]|1[0-9]|2[0-6])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 10 bucks 34 + "^BUCK([1-9]|10)$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + properties: 42 + regulator-ramp-delay: 43 + enum: [0, 6250, 12500, 25000, 50000] 44 + default: 12500 45 + description: | 46 + May be 0 for disabling the ramp delay on BUCK{1,2,3,4}. 47 + 48 + In the absence of the regulator-ramp-delay property, the default ramp 49 + delay will be used. 50 + 51 + Note: Some bucks share the ramp rate setting i.e. same ramp value 52 + will be set for a particular group of bucks so provide the same 53 + regulator-ramp-delay value for them. 54 + Groups sharing ramp rate: 55 + * buck{1,6}, 56 + * buck{2,4}, 57 + * buck{8,9,10}. 58 + 59 + required: 60 + - regulator-name 61 + 62 + additionalProperties: false
-102
Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
··· 1 - Binding for Samsung S2M family regulator block 2 - ============================================== 3 - 4 - This is a part of device tree bindings for S2M family multi-function devices. 5 - More information can be found in bindings/mfd/sec-core.txt file. 6 - 7 - The S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators. 8 - 9 - To register these with regulator framework instantiate under main device node 10 - a sub-node named "regulators" with more sub-nodes for each regulator using the 11 - common regulator binding documented in: 12 - - Documentation/devicetree/bindings/regulator/regulator.txt 13 - 14 - 15 - Names of regulators supported by different devices: 16 - - LDOn 17 - - valid values for n are: 18 - - S2MPS11: 1 to 38 19 - - S2MPS13: 1 to 40 20 - - S2MPS14: 1 to 25 21 - - S2MPS15: 1 to 27 22 - - S2MPU02: 1 to 28 23 - - Example: LDO1, LDO2, LDO28 24 - - BUCKn 25 - - valid values for n are: 26 - - S2MPS11: 1 to 10 27 - - S2MPS13: 1 to 10 28 - - S2MPS14: 1 to 5 29 - - S2MPS15: 1 to 10 30 - - S2MPU02: 1 to 7 31 - - Example: BUCK1, BUCK2, BUCK9 32 - Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 33 - as per the datasheet of device. 34 - 35 - 36 - Optional properties of the nodes under "regulators" sub-node: 37 - - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500, 38 - 25000 (default) or 50000. 39 - 40 - Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6} 41 - by setting it to <0>. 42 - 43 - Note: On S2MPS11 some bucks share the ramp rate setting i.e. same ramp value 44 - will be set for a particular group of bucks so provide the same 45 - regulator-ramp-delay value for them. 46 - Groups sharing ramp rate: 47 - - buck{1,6}, 48 - - buck{3,4}, 49 - - buck{7,8,10}. 50 - 51 - - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be 52 - configured to external control over GPIO. To turn this feature on this 53 - property must be added to the regulator sub-node: 54 - - samsung,ext-control-gpios: GPIO specifier for one GPIO 55 - controlling this regulator (enable/disable) 56 - Example: 57 - LDO12 { 58 - regulator-name = "V_EMMC_2.8V"; 59 - regulator-min-microvolt = <2800000>; 60 - regulator-max-microvolt = <2800000>; 61 - samsung,ext-control-gpios = <&gpk0 2 0>; 62 - }; 63 - 64 - 65 - Example: 66 - 67 - s2mps11_pmic@66 { 68 - compatible = "samsung,s2mps11-pmic"; 69 - reg = <0x66>; 70 - 71 - regulators { 72 - ldo1_reg: LDO1 { 73 - regulator-name = "VDD_ABB_3.3V"; 74 - regulator-min-microvolt = <3300000>; 75 - regulator-max-microvolt = <3300000>; 76 - }; 77 - 78 - ldo2_reg: LDO2 { 79 - regulator-name = "VDD_ALIVE_1.1V"; 80 - regulator-min-microvolt = <1100000>; 81 - regulator-max-microvolt = <1100000>; 82 - regulator-always-on; 83 - }; 84 - 85 - buck1_reg: BUCK1 { 86 - regulator-name = "vdd_mif"; 87 - regulator-min-microvolt = <950000>; 88 - regulator-max-microvolt = <1350000>; 89 - regulator-always-on; 90 - regulator-boot-on; 91 - }; 92 - 93 - buck2_reg: BUCK2 { 94 - regulator-name = "vdd_arm"; 95 - regulator-min-microvolt = <950000>; 96 - regulator-max-microvolt = <1350000>; 97 - regulator-always-on; 98 - regulator-boot-on; 99 - regulator-ramp-delay = <50000>; 100 - }; 101 - }; 102 - };
+44
Documentation/devicetree/bindings/regulator/samsung,s2mps11.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mps11.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPS11 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPS11 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 38 LDOs 23 + "^LDO([1-9]|[1-2][0-9]|3[0-8])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 10 bucks 34 + "^BUCK([1-9]|10)$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + required: 42 + - regulator-name 43 + 44 + additionalProperties: false
+44
Documentation/devicetree/bindings/regulator/samsung,s2mps13.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mps13.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPS13 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPS13 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 40 LDOs 23 + "^LDO([1-9]|[1-3][0-9]|40)$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 10 bucks 34 + "^BUCK([1-9]|10)$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + required: 42 + - regulator-name 43 + 44 + additionalProperties: false
+44
Documentation/devicetree/bindings/regulator/samsung,s2mps14.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mps14.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPS14 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPS14 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 25 LDOs 23 + "^LDO([1-9]|[1][0-9]|2[0-5])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 5 bucks 34 + "^BUCK[1-5]$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + required: 42 + - regulator-name 43 + 44 + additionalProperties: false
+44
Documentation/devicetree/bindings/regulator/samsung,s2mps15.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mps15.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPS15 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPS15 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 27 LDOs 23 + "^LDO([1-9]|[1][0-9]|2[0-7])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 10 bucks 34 + "^BUCK([1-9]|10)$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + required: 42 + - regulator-name 43 + 44 + additionalProperties: false
+44
Documentation/devicetree/bindings/regulator/samsung,s2mpu02.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s2mpu02.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S2MPU02 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S2MPU02 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 28 LDOs 23 + "^LDO([1-9]|1[0-9]|2[0-8])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + required: 31 + - regulator-name 32 + 33 + # 7 bucks 34 + "^BUCK[1-7]$": 35 + type: object 36 + $ref: regulator.yaml# 37 + unevaluatedProperties: false 38 + description: 39 + Properties for single BUCK regulator. 40 + 41 + required: 42 + - regulator-name 43 + 44 + additionalProperties: false
-145
Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
··· 1 - Binding for Samsung S5M8767 regulator block 2 - =========================================== 3 - 4 - This is a part of device tree bindings for S5M family multi-function devices. 5 - More information can be found in bindings/mfd/sec-core.txt file. 6 - 7 - The S5M8767 device provide buck and LDO regulators. 8 - 9 - To register these with regulator framework instantiate under main device node 10 - a sub-node named "regulators" with more sub-nodes for each regulator using the 11 - common regulator binding documented in: 12 - - Documentation/devicetree/bindings/regulator/regulator.txt 13 - 14 - 15 - Required properties of the main device node (the parent!): 16 - - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 17 - units for buck2 when changing voltage using gpio dvs. Refer to [1] below 18 - for additional information. 19 - 20 - - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 21 - units for buck3 when changing voltage using gpio dvs. Refer to [1] below 22 - for additional information. 23 - 24 - - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 25 - units for buck4 when changing voltage using gpio dvs. Refer to [1] below 26 - for additional information. 27 - 28 - - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used 29 - for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines. 30 - 31 - [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional 32 - property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage' 33 - property should specify atleast one voltage level (which would be a 34 - safe operating voltage). 35 - 36 - If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional 37 - property is specified, then all the eight voltage values for the 38 - 's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified. 39 - 40 - Optional properties of the main device node (the parent!): 41 - - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. 42 - - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs. 43 - - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs. 44 - 45 - Additional properties required if either of the optional properties are used: 46 - 47 - - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from 48 - the possible 8 options selectable by the dvs gpios. The value of this 49 - property should be between 0 and 7. If not specified or if out of range, the 50 - default value of this property is set to 0. 51 - 52 - - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used 53 - for dvs. The format of the gpio specifier depends in the gpio controller. 54 - 55 - 56 - Names of regulators supported by S5M8767 device: 57 - - LDOn 58 - - valid values for n are 1 to 28 59 - - Example: LDO1, LDO2, LDO28 60 - - BUCKn 61 - - valid values for n are 1 to 9. 62 - - Example: BUCK1, BUCK2, BUCK9 63 - Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 64 - as per the datasheet of device. 65 - 66 - 67 - Optional properties of the nodes under "regulators" sub-node: 68 - - op_mode: describes the different operating modes of the LDO's with 69 - power mode change in SOC. The different possible values are, 70 - 0 - always off mode 71 - 1 - on in normal mode 72 - 2 - low power mode 73 - 3 - suspend mode 74 - - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one 75 - GPIO controlling this regulator 76 - (enable/disable); This is valid only 77 - for buck9. 78 - 79 - Example: 80 - 81 - s5m8767_pmic@66 { 82 - compatible = "samsung,s5m8767-pmic"; 83 - reg = <0x66>; 84 - 85 - s5m8767,pmic-buck2-uses-gpio-dvs; 86 - s5m8767,pmic-buck3-uses-gpio-dvs; 87 - s5m8767,pmic-buck4-uses-gpio-dvs; 88 - 89 - s5m8767,pmic-buck-default-dvs-idx = <0>; 90 - 91 - s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */ 92 - <&gpx0 1 0>, /* DVS2 */ 93 - <&gpx0 2 0>; /* DVS3 */ 94 - 95 - s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */ 96 - <&gpx2 4 0>, /* SET2 */ 97 - <&gpx2 5 0>; /* SET3 */ 98 - 99 - s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, 100 - <1250000>, <1200000>, 101 - <1150000>, <1100000>, 102 - <1000000>, <950000>; 103 - 104 - s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, 105 - <1100000>, <1100000>, 106 - <1000000>, <1000000>, 107 - <1000000>, <1000000>; 108 - 109 - s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, 110 - <1200000>, <1200000>, 111 - <1200000>, <1200000>, 112 - <1200000>, <1200000>; 113 - 114 - regulators { 115 - ldo1_reg: LDO1 { 116 - regulator-name = "VDD_ABB_3.3V"; 117 - regulator-min-microvolt = <3300000>; 118 - regulator-max-microvolt = <3300000>; 119 - op_mode = <1>; /* Normal Mode */ 120 - }; 121 - 122 - ldo2_reg: LDO2 { 123 - regulator-name = "VDD_ALIVE_1.1V"; 124 - regulator-min-microvolt = <1100000>; 125 - regulator-max-microvolt = <1100000>; 126 - regulator-always-on; 127 - }; 128 - 129 - buck1_reg: BUCK1 { 130 - regulator-name = "VDD_MIF_1.2V"; 131 - regulator-min-microvolt = <950000>; 132 - regulator-max-microvolt = <1350000>; 133 - regulator-always-on; 134 - regulator-boot-on; 135 - }; 136 - 137 - vemmc_reg: BUCK9 { 138 - regulator-name = "VMEM_VDD_2.8V"; 139 - regulator-min-microvolt = <2800000>; 140 - regulator-max-microvolt = <2800000>; 141 - op_mode = <3>; /* Standby Mode */ 142 - s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>; 143 - }; 144 - }; 145 - };
+74
Documentation/devicetree/bindings/regulator/samsung,s5m8767.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/samsung,s5m8767.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S5M8767 Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for S2M and S5M family of Power 14 + Management IC (PMIC). 15 + 16 + The S5M8767 provides buck and LDO regulators. 17 + 18 + See also Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml for 19 + additional information and example. 20 + 21 + patternProperties: 22 + # 28 LDOs 23 + "^LDO([1-9]|1[0-9]|2[0-8])$": 24 + type: object 25 + $ref: regulator.yaml# 26 + unevaluatedProperties: false 27 + description: 28 + Properties for single LDO regulator. 29 + 30 + properties: 31 + op_mode: 32 + $ref: /schemas/types.yaml#/definitions/uint32 33 + enum: [0, 1, 2, 3] 34 + default: 1 35 + description: | 36 + Describes the different operating modes of the LDO's with power mode 37 + change in SOC. The different possible values are: 38 + 0 - always off mode 39 + 1 - on in normal mode 40 + 2 - low power mode 41 + 3 - suspend mode 42 + 43 + required: 44 + - regulator-name 45 + 46 + # 8 bucks 47 + "^BUCK[1-8]$": 48 + type: object 49 + $ref: regulator.yaml# 50 + unevaluatedProperties: false 51 + description: 52 + Properties for single BUCK regulator. 53 + 54 + required: 55 + - regulator-name 56 + 57 + # 9 buck 58 + "^BUCK9$": 59 + type: object 60 + $ref: regulator.yaml# 61 + unevaluatedProperties: false 62 + description: 63 + Properties for single BUCK regulator. 64 + 65 + properties: 66 + s5m8767,pmic-ext-control-gpios: 67 + maxItems: 1 68 + description: | 69 + GPIO specifier for one GPIO controlling this regulator on/off. 70 + 71 + required: 72 + - regulator-name 73 + 74 + additionalProperties: false
+5 -4
MAINTAINERS
··· 16502 16502 L: linux-kernel@vger.kernel.org 16503 16503 L: linux-samsung-soc@vger.kernel.org 16504 16504 S: Supported 16505 - F: Documentation/devicetree/bindings/clock/samsung,s2mps11.txt 16506 - F: Documentation/devicetree/bindings/mfd/samsung,sec-core.txt 16507 - F: Documentation/devicetree/bindings/regulator/samsung,s2m*.txt 16508 - F: Documentation/devicetree/bindings/regulator/samsung,s5m*.txt 16505 + F: Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml 16506 + F: Documentation/devicetree/bindings/mfd/samsung,s2m*.yaml 16507 + F: Documentation/devicetree/bindings/mfd/samsung,s5m*.yaml 16508 + F: Documentation/devicetree/bindings/regulator/samsung,s2m*.yaml 16509 + F: Documentation/devicetree/bindings/regulator/samsung,s5m*.yaml 16509 16510 F: drivers/clk/clk-s2mps11.c 16510 16511 F: drivers/mfd/sec*.c 16511 16512 F: drivers/regulator/s2m*.c
+5 -11
drivers/mfd/hi6421-spmi-pmic.c
··· 8 8 */ 9 9 10 10 #include <linux/mfd/core.h> 11 - #include <linux/mfd/hi6421-spmi-pmic.h> 12 11 #include <linux/module.h> 13 12 #include <linux/platform_device.h> 14 13 #include <linux/regmap.h> ··· 29 30 static int hi6421_spmi_pmic_probe(struct spmi_device *sdev) 30 31 { 31 32 struct device *dev = &sdev->dev; 33 + struct regmap *regmap; 32 34 int ret; 33 - struct hi6421_spmi_pmic *ddata; 34 - ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); 35 - if (!ddata) 36 - return -ENOMEM; 37 35 38 - ddata->regmap = devm_regmap_init_spmi_ext(sdev, &regmap_config); 39 - if (IS_ERR(ddata->regmap)) 40 - return PTR_ERR(ddata->regmap); 36 + regmap = devm_regmap_init_spmi_ext(sdev, &regmap_config); 37 + if (IS_ERR(regmap)) 38 + return PTR_ERR(regmap); 41 39 42 - ddata->dev = dev; 43 - 44 - dev_set_drvdata(&sdev->dev, ddata); 40 + dev_set_drvdata(&sdev->dev, regmap); 45 41 46 42 ret = devm_mfd_add_devices(&sdev->dev, PLATFORM_DEVID_NONE, 47 43 hi6421v600_devs, ARRAY_SIZE(hi6421v600_devs),
+4 -5
drivers/misc/hi6421v600-irq.c
··· 10 10 #include <linux/bitops.h> 11 11 #include <linux/interrupt.h> 12 12 #include <linux/irq.h> 13 - #include <linux/mfd/hi6421-spmi-pmic.h> 14 13 #include <linux/module.h> 15 14 #include <linux/of_gpio.h> 16 15 #include <linux/platform_device.h> ··· 219 220 struct platform_device *pmic_pdev; 220 221 struct device *dev = &pdev->dev; 221 222 struct hi6421v600_irq *priv; 222 - struct hi6421_spmi_pmic *pmic; 223 + struct regmap *regmap; 223 224 unsigned int virq; 224 225 int i, ret; 225 226 ··· 228 229 * which should first set drvdata. If this doesn't happen, hit 229 230 * a warn on and return. 230 231 */ 231 - pmic = dev_get_drvdata(pmic_dev); 232 - if (WARN_ON(!pmic)) 232 + regmap = dev_get_drvdata(pmic_dev); 233 + if (WARN_ON(!regmap)) 233 234 return -ENODEV; 234 235 235 236 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ··· 237 238 return -ENOMEM; 238 239 239 240 priv->dev = dev; 240 - priv->regmap = pmic->regmap; 241 + priv->regmap = regmap; 241 242 242 243 spin_lock_init(&priv->lock); 243 244
+5 -5
drivers/regulator/hi6421v600-regulator.c
··· 9 9 // Guodong Xu <guodong.xu@linaro.org> 10 10 11 11 #include <linux/delay.h> 12 - #include <linux/mfd/hi6421-spmi-pmic.h> 13 12 #include <linux/module.h> 13 + #include <linux/of.h> 14 14 #include <linux/platform_device.h> 15 15 #include <linux/regmap.h> 16 16 #include <linux/regulator/driver.h> ··· 237 237 struct hi6421_spmi_reg_priv *priv; 238 238 struct hi6421_spmi_reg_info *info; 239 239 struct device *dev = &pdev->dev; 240 - struct hi6421_spmi_pmic *pmic; 240 + struct regmap *regmap; 241 241 struct regulator_dev *rdev; 242 242 int i; 243 243 ··· 246 246 * which should first set drvdata. If this doesn't happen, hit 247 247 * a warn on and return. 248 248 */ 249 - pmic = dev_get_drvdata(pmic_dev); 250 - if (WARN_ON(!pmic)) 249 + regmap = dev_get_drvdata(pmic_dev); 250 + if (WARN_ON(!regmap)) 251 251 return -ENODEV; 252 252 253 253 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ··· 261 261 262 262 config.dev = pdev->dev.parent; 263 263 config.driver_data = priv; 264 - config.regmap = pmic->regmap; 264 + config.regmap = regmap; 265 265 266 266 rdev = devm_regulator_register(dev, &info->desc, &config); 267 267 if (IS_ERR(rdev)) {
+9 -12
drivers/regulator/s5m8767.c
··· 850 850 /* DS4 GPIO */ 851 851 gpio_direction_output(pdata->buck_ds[2], 0x0); 852 852 853 - if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs || 854 - pdata->buck4_gpiodvs) { 855 - regmap_update_bits(s5m8767->iodev->regmap_pmic, 856 - S5M8767_REG_BUCK2CTRL, 1 << 1, 857 - (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1)); 858 - regmap_update_bits(s5m8767->iodev->regmap_pmic, 859 - S5M8767_REG_BUCK3CTRL, 1 << 1, 860 - (pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1)); 861 - regmap_update_bits(s5m8767->iodev->regmap_pmic, 862 - S5M8767_REG_BUCK4CTRL, 1 << 1, 863 - (pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1)); 864 - } 853 + regmap_update_bits(s5m8767->iodev->regmap_pmic, 854 + S5M8767_REG_BUCK2CTRL, 1 << 1, 855 + (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1)); 856 + regmap_update_bits(s5m8767->iodev->regmap_pmic, 857 + S5M8767_REG_BUCK3CTRL, 1 << 1, 858 + (pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1)); 859 + regmap_update_bits(s5m8767->iodev->regmap_pmic, 860 + S5M8767_REG_BUCK4CTRL, 1 << 1, 861 + (pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1)); 865 862 866 863 /* Initialize GPIO DVS registers */ 867 864 for (i = 0; i < 8; i++) {
-25
include/linux/mfd/hi6421-spmi-pmic.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Header file for device driver Hi6421 PMIC 4 - * 5 - * Copyright (c) 2013 Linaro Ltd. 6 - * Copyright (C) 2011 Hisilicon. 7 - * Copyright (c) 2020-2021 Huawei Technologies Co., Ltd 8 - * 9 - * Guodong Xu <guodong.xu@linaro.org> 10 - */ 11 - 12 - #ifndef __HISI_PMIC_H 13 - #define __HISI_PMIC_H 14 - 15 - #include <linux/irqdomain.h> 16 - #include <linux/regmap.h> 17 - 18 - struct hi6421_spmi_pmic { 19 - struct resource *res; 20 - struct device *dev; 21 - void __iomem *regs; 22 - struct regmap *regmap; 23 - }; 24 - 25 - #endif /* __HISI_PMIC_H */