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

dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings

Bindings for Samsung S2M and S5M family PMICs are in mess. They are
spread over different files and subdirectories in a non-consistent way.
The devices and respective drivers for them share a lot in common so
everything could be organized in a more readable way.

Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
drivers for this family of devices:
- move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
driver (common for entire family),
- split clock block to clock/samsung,s2mps11.txt,
- split regulator block to regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Michael Turquette <mturquette@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
a13c7c51 f8e3a514

+238 -154
+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 + };
-153
Documentation/devicetree/bindings/mfd/s2mps11.txt
··· 1 - 2 - * Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator 3 - 4 - The Samsung S2MPS11 is a multi-function device which includes voltage and 5 - current regulators, RTC, charger controller and other sub-blocks. It is 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. 8 - 9 - Required properties: 10 - - compatible: Should be one of the following 11 - - "samsung,s2mps11-pmic" 12 - - "samsung,s2mps13-pmic" 13 - - "samsung,s2mps14-pmic" 14 - - "samsung,s2mps15-pmic" 15 - - "samsung,s2mpu02-pmic". 16 - - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 17 - 18 - Optional properties: 19 - - interrupt-parent: Specifies the phandle of the interrupt controller to which 20 - the interrupts from s2mps11 are delivered to. 21 - - interrupts: Interrupt specifiers for interrupt sources. 22 - - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled 23 - down. When the system is suspended it will always go down thus triggerring 24 - unwanted buck warm reset (setting buck voltages to default values). 25 - - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is 26 - connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1 27 - register to turn off the power. Usually the ACOKB is pulled up to VBATT so 28 - when PWRHOLD pin goes low, the rising ACOKB will trigger power off. 29 - 30 - Optional nodes: 31 - - clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768 32 - KHz outputs, so to register these as clocks with common clock framework 33 - instantiate a sub-node named "clocks". It uses the common clock binding 34 - documented in : 35 - [Documentation/devicetree/bindings/clock/clock-bindings.txt] 36 - The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs. 37 - - #clock-cells: should be 1. 38 - 39 - - The following is the list of clocks generated by the controller. Each clock 40 - is assigned an identifier and client nodes use this identifier to specify 41 - the clock which they consume. 42 - Clock ID Devices 43 - ---------------------------------------------------------- 44 - 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767 45 - 32KhzCP 1 S2MPS11, S2MPS13, S2MPS15, S5M8767 46 - 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767 47 - 48 - - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", 49 - "samsung,s2mps14-clk", "samsung,s5m8767-clk" 50 - The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks. 51 - 52 - - regulators: The regulators of s2mps11 that have to be instantiated should be 53 - included in a sub-node named 'regulators'. Regulator nodes included in this 54 - sub-node should be of the format as listed below. 55 - 56 - regulator_name { 57 - [standard regulator constraints....]; 58 - }; 59 - 60 - regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us 61 - 62 - BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly 63 - regulator-ramp-delay = <0> can be used for them to disable ramp delay. 64 - In the absence of the regulator-ramp-delay property, the default ramp 65 - delay will be used. 66 - 67 - NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set 68 - for a particular group of BUCKs. So provide same regulator-ramp-delay<value>. 69 - Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6], 70 - BUCK[3, 4], and BUCK[7, 8, 10] 71 - 72 - On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control 73 - over GPIO. To turn this feature on this property must be added to the regulator 74 - sub-node: 75 - - samsung,ext-control-gpios: GPIO specifier for one GPIO 76 - controlling this regulator (enable/disable); 77 - Example: 78 - LDO12 { 79 - regulator-name = "V_EMMC_2.8V"; 80 - regulator-min-microvolt = <2800000>; 81 - regulator-max-microvolt = <2800000>; 82 - samsung,ext-control-gpios = <&gpk0 2 0>; 83 - }; 84 - 85 - 86 - The regulator constraints inside the regulator nodes use the standard regulator 87 - bindings which are documented elsewhere. 88 - 89 - The following are the names of the regulators that the s2mps11 pmic block 90 - supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 91 - as per the datasheet of s2mps11. 92 - 93 - - LDOn 94 - - valid values for n are: 95 - - S2MPS11: 1 to 38 96 - - S2MPS13: 1 to 40 97 - - S2MPS14: 1 to 25 98 - - S2MPS15: 1 to 27 99 - - S2MPU02: 1 to 28 100 - - Example: LDO1, LDO2, LDO28 101 - - BUCKn 102 - - valid values for n are: 103 - - S2MPS11: 1 to 10 104 - - S2MPS13: 1 to 10 105 - - S2MPS14: 1 to 5 106 - - S2MPS15: 1 to 10 107 - - S2MPU02: 1 to 7 108 - - Example: BUCK1, BUCK2, BUCK9 109 - 110 - Example: 111 - 112 - s2mps11_pmic@66 { 113 - compatible = "samsung,s2mps11-pmic"; 114 - reg = <0x66>; 115 - 116 - s2m_osc: clocks { 117 - compatible = "samsung,s2mps11-clk"; 118 - #clock-cells = <1>; 119 - clock-output-names = "xx", "yy", "zz"; 120 - }; 121 - 122 - regulators { 123 - ldo1_reg: LDO1 { 124 - regulator-name = "VDD_ABB_3.3V"; 125 - regulator-min-microvolt = <3300000>; 126 - regulator-max-microvolt = <3300000>; 127 - }; 128 - 129 - ldo2_reg: LDO2 { 130 - regulator-name = "VDD_ALIVE_1.1V"; 131 - regulator-min-microvolt = <1100000>; 132 - regulator-max-microvolt = <1100000>; 133 - regulator-always-on; 134 - }; 135 - 136 - buck1_reg: BUCK1 { 137 - regulator-name = "vdd_mif"; 138 - regulator-min-microvolt = <950000>; 139 - regulator-max-microvolt = <1350000>; 140 - regulator-always-on; 141 - regulator-boot-on; 142 - }; 143 - 144 - buck2_reg: BUCK2 { 145 - regulator-name = "vdd_arm"; 146 - regulator-min-microvolt = <950000>; 147 - regulator-max-microvolt = <1350000>; 148 - regulator-always-on; 149 - regulator-boot-on; 150 - regulator-ramp-delay = <50000>; 151 - }; 152 - }; 153 - };
+84
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 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,s2mps11.txt 17 + - bindings/clock/samsung,s2mps11.txt 18 + 19 + 20 + Required properties: 21 + - compatible: Should be one of the following 22 + - "samsung,s2mps11-pmic", 23 + - "samsung,s2mps13-pmic", 24 + - "samsung,s2mps14-pmic", 25 + - "samsung,s2mps15-pmic", 26 + - "samsung,s2mpu02-pmic". 27 + - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 28 + 29 + Optional properties: 30 + - interrupt-parent: Specifies the phandle of the interrupt controller to which 31 + the interrupts from s2mps11 are delivered to. 32 + - interrupts: Interrupt specifiers for interrupt sources. 33 + - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled 34 + down. When the system is suspended it will always go down thus triggerring 35 + unwanted buck warm reset (setting buck voltages to default values). 36 + - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is 37 + connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1 38 + register to turn off the power. Usually the ACOKB is pulled up to VBATT so 39 + when PWRHOLD pin goes low, the rising ACOKB will trigger power off. 40 + 41 + Example: 42 + 43 + s2mps11_pmic@66 { 44 + compatible = "samsung,s2mps11-pmic"; 45 + reg = <0x66>; 46 + 47 + s2m_osc: clocks { 48 + compatible = "samsung,s2mps11-clk"; 49 + #clock-cells = <1>; 50 + clock-output-names = "xx", "yy", "zz"; 51 + }; 52 + 53 + regulators { 54 + ldo1_reg: LDO1 { 55 + regulator-name = "VDD_ABB_3.3V"; 56 + regulator-min-microvolt = <3300000>; 57 + regulator-max-microvolt = <3300000>; 58 + }; 59 + 60 + ldo2_reg: LDO2 { 61 + regulator-name = "VDD_ALIVE_1.1V"; 62 + regulator-min-microvolt = <1100000>; 63 + regulator-max-microvolt = <1100000>; 64 + regulator-always-on; 65 + }; 66 + 67 + buck1_reg: BUCK1 { 68 + regulator-name = "vdd_mif"; 69 + regulator-min-microvolt = <950000>; 70 + regulator-max-microvolt = <1350000>; 71 + regulator-always-on; 72 + regulator-boot-on; 73 + }; 74 + 75 + buck2_reg: BUCK2 { 76 + regulator-name = "vdd_arm"; 77 + regulator-min-microvolt = <950000>; 78 + regulator-max-microvolt = <1350000>; 79 + regulator-always-on; 80 + regulator-boot-on; 81 + regulator-ramp-delay = <50000>; 82 + }; 83 + }; 84 + };
+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 + };
+3 -1
MAINTAINERS
··· 9224 9224 F: drivers/rtc/rtc-s5m.c 9225 9225 F: include/linux/mfd/samsung/ 9226 9226 F: Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt 9227 - F: Documentation/devicetree/bindings/mfd/s2mp*.txt 9227 + F: Documentation/devicetree/bindings/mfd/samsung,sec-core.txt 9228 + F: Documentation/devicetree/bindings/regulator/samsung,s2m*.txt 9229 + F: Documentation/devicetree/bindings/clock/samsung,s2mps11.txt 9228 9230 9229 9231 SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS 9230 9232 M: Kyungmin Park <kyungmin.park@samsung.com>