Loading Documentation/devicetree/bindings/mfd/s2mps11.txt +12 −10 Original line number Diff line number Diff line * Samsung S2MPS11, S2MPS14 and S2MPU02 Voltage and Current Regulator * Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator The Samsung S2MPS11 is a multi-function device which includes voltage and current regulators, RTC, charger controller and other sub-blocks. It is Loading @@ -7,8 +7,8 @@ interfaced to the host controller using an I2C interface. Each sub-block is addressed by the host system using different I2C slave addresses. Required properties: - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic" or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. Optional properties: Loading @@ -17,8 +17,8 @@ Optional properties: - interrupts: Interrupt specifiers for interrupt sources. Optional nodes: - clocks: s2mps11 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz outputs, so to register these as clocks with common clock framework - clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz outputs, so to register these as clocks with common clock framework instantiate a sub-node named "clocks". It uses the common clock binding documented in : [Documentation/devicetree/bindings/clock/clock-bindings.txt] Loading @@ -30,12 +30,12 @@ Optional nodes: the clock which they consume. Clock ID Devices ---------------------------------------------------------- 32KhzAP 0 S2MPS11, S2MPS14, S5M8767 32KhzCP 1 S2MPS11, S5M8767 32KhzBT 2 S2MPS11, S2MPS14, S5M8767 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps14-clk", "samsung,s5m8767-clk" - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", "samsung,s2mps14-clk", "samsung,s5m8767-clk" - regulators: The regulators of s2mps11 that have to be instantiated should be included in a sub-node named 'regulators'. Regulator nodes included in this Loading Loading @@ -81,12 +81,14 @@ as per the datasheet of s2mps11. - LDOn - valid values for n are: - S2MPS11: 1 to 38 - S2MPS13: 1 to 40 - S2MPS14: 1 to 25 - S2MPU02: 1 to 28 - Example: LDO1, LDO2, LDO28 - BUCKn - valid values for n are: - S2MPS11: 1 to 10 - S2MPS13: 1 to 10 - S2MPS14: 1 to 5 - S2MPU02: 1 to 7 - Example: BUCK1, BUCK2, BUCK9 Loading drivers/clk/clk-s2mps11.c +24 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/clk-provider.h> #include <linux/platform_device.h> #include <linux/mfd/samsung/s2mps11.h> #include <linux/mfd/samsung/s2mps13.h> #include <linux/mfd/samsung/s2mps14.h> #include <linux/mfd/samsung/s5m8767.h> #include <linux/mfd/samsung/core.h> Loading Loading @@ -120,6 +121,24 @@ static struct clk_init_data s2mps11_clks_init[S2MPS11_CLKS_NUM] = { }, }; static struct clk_init_data s2mps13_clks_init[S2MPS11_CLKS_NUM] = { [S2MPS11_CLK_AP] = { .name = "s2mps13_ap", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, [S2MPS11_CLK_CP] = { .name = "s2mps13_cp", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, [S2MPS11_CLK_BT] = { .name = "s2mps13_bt", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, }; static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = { [S2MPS11_CLK_AP] = { .name = "s2mps14_ap", Loading Loading @@ -184,6 +203,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev) s2mps11_reg = S2MPS11_REG_RTC_CTRL; clks_init = s2mps11_clks_init; break; case S2MPS13X: s2mps11_reg = S2MPS13_REG_RTCCTRL; clks_init = s2mps13_clks_init; break; case S2MPS14X: s2mps11_reg = S2MPS14_REG_RTCCTRL; clks_init = s2mps14_clks_init; Loading Loading @@ -279,6 +302,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) static const struct platform_device_id s2mps11_clk_id[] = { { "s2mps11-clk", S2MPS11X}, { "s2mps13-clk", S2MPS13X}, { "s2mps14-clk", S2MPS14X}, { "s5m8767-clk", S5M8767X}, { }, Loading drivers/mfd/sec-core.c +29 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/mfd/samsung/irq.h> #include <linux/mfd/samsung/s2mpa01.h> #include <linux/mfd/samsung/s2mps11.h> #include <linux/mfd/samsung/s2mps13.h> #include <linux/mfd/samsung/s2mps14.h> #include <linux/mfd/samsung/s2mpu02.h> #include <linux/mfd/samsung/s5m8763.h> Loading Loading @@ -74,6 +75,15 @@ static const struct mfd_cell s2mps11_devs[] = { } }; static const struct mfd_cell s2mps13_devs[] = { { .name = "s2mps13-pmic", }, { .name = "s2mps13-rtc", }, { .name = "s2mps13-clk", .of_compatible = "samsung,s2mps13-clk", }, }; static const struct mfd_cell s2mps14_devs[] = { { .name = "s2mps14-pmic", Loading Loading @@ -107,6 +117,9 @@ static const struct of_device_id sec_dt_match[] = { }, { .compatible = "samsung,s2mps11-pmic", .data = (void *)S2MPS11X, }, { .compatible = "samsung,s2mps13-pmic", .data = (void *)S2MPS13X, }, { .compatible = "samsung,s2mps14-pmic", .data = (void *)S2MPS14X, Loading Loading @@ -194,6 +207,15 @@ static const struct regmap_config s2mps11_regmap_config = { .cache_type = REGCACHE_FLAT, }; static const struct regmap_config s2mps13_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = S2MPS13_REG_LDODSCH5, .volatile_reg = s2mps11_volatile, .cache_type = REGCACHE_FLAT, }; static const struct regmap_config s2mps14_regmap_config = { .reg_bits = 8, .val_bits = 8, Loading Loading @@ -325,6 +347,9 @@ static int sec_pmic_probe(struct i2c_client *i2c, case S2MPS11X: regmap = &s2mps11_regmap_config; break; case S2MPS13X: regmap = &s2mps13_regmap_config; break; case S2MPS14X: regmap = &s2mps14_regmap_config; break; Loading Loading @@ -378,6 +403,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, sec_devs = s2mps11_devs; num_sec_devs = ARRAY_SIZE(s2mps11_devs); break; case S2MPS13X: sec_devs = s2mps13_devs; num_sec_devs = ARRAY_SIZE(s2mps13_devs); break; case S2MPS14X: sec_devs = s2mps14_devs; num_sec_devs = ARRAY_SIZE(s2mps14_devs); Loading drivers/mfd/sec-irq.c +17 −6 Original line number Diff line number Diff line Loading @@ -389,14 +389,22 @@ static const struct regmap_irq_chip s2mps11_irq_chip = { .ack_base = S2MPS11_REG_INT1, }; #define S2MPS1X_IRQ_CHIP_COMMON_DATA \ .irqs = s2mps14_irqs, \ .num_irqs = ARRAY_SIZE(s2mps14_irqs), \ .num_regs = 3, \ .status_base = S2MPS14_REG_INT1, \ .mask_base = S2MPS14_REG_INT1M, \ .ack_base = S2MPS14_REG_INT1 \ static const struct regmap_irq_chip s2mps13_irq_chip = { .name = "s2mps13", S2MPS1X_IRQ_CHIP_COMMON_DATA, }; static const struct regmap_irq_chip s2mps14_irq_chip = { .name = "s2mps14", .irqs = s2mps14_irqs, .num_irqs = ARRAY_SIZE(s2mps14_irqs), .num_regs = 3, .status_base = S2MPS14_REG_INT1, .mask_base = S2MPS14_REG_INT1M, .ack_base = S2MPS14_REG_INT1, S2MPS1X_IRQ_CHIP_COMMON_DATA, }; static const struct regmap_irq_chip s2mpu02_irq_chip = { Loading Loading @@ -452,6 +460,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) case S2MPS11X: sec_irq_chip = &s2mps11_irq_chip; break; case S2MPS13X: sec_irq_chip = &s2mps13_irq_chip; break; case S2MPS14X: sec_irq_chip = &s2mps14_irq_chip; break; Loading drivers/regulator/Kconfig +5 −5 Original line number Diff line number Diff line Loading @@ -529,13 +529,13 @@ config REGULATOR_S2MPA01 via I2C bus. S2MPA01 has 10 Bucks and 26 LDO outputs. config REGULATOR_S2MPS11 tristate "Samsung S2MPS11/S2MPS14/S2MPU02 voltage regulator" tristate "Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage regulator" depends on MFD_SEC_CORE help This driver supports a Samsung S2MPS11/S2MPS14/S2MPU02 voltage output regulator via I2C bus. The chip is comprised of high efficient Buck converters including Dual-Phase Buck converter, Buck-Boost converter, various LDOs. This driver supports a Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage output regulator via I2C bus. The chip is comprised of high efficient Buck converters including Dual-Phase Buck converter, Buck-Boost converter, various LDOs. config REGULATOR_S5M8767 tristate "Samsung S5M8767A voltage regulator" Loading Loading
Documentation/devicetree/bindings/mfd/s2mps11.txt +12 −10 Original line number Diff line number Diff line * Samsung S2MPS11, S2MPS14 and S2MPU02 Voltage and Current Regulator * Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator The Samsung S2MPS11 is a multi-function device which includes voltage and current regulators, RTC, charger controller and other sub-blocks. It is Loading @@ -7,8 +7,8 @@ interfaced to the host controller using an I2C interface. Each sub-block is addressed by the host system using different I2C slave addresses. Required properties: - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". - compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic" or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". - reg: Specifies the I2C slave address of the pmic block. It should be 0x66. Optional properties: Loading @@ -17,8 +17,8 @@ Optional properties: - interrupts: Interrupt specifiers for interrupt sources. Optional nodes: - clocks: s2mps11 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz outputs, so to register these as clocks with common clock framework - clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz outputs, so to register these as clocks with common clock framework instantiate a sub-node named "clocks". It uses the common clock binding documented in : [Documentation/devicetree/bindings/clock/clock-bindings.txt] Loading @@ -30,12 +30,12 @@ Optional nodes: the clock which they consume. Clock ID Devices ---------------------------------------------------------- 32KhzAP 0 S2MPS11, S2MPS14, S5M8767 32KhzCP 1 S2MPS11, S5M8767 32KhzBT 2 S2MPS11, S2MPS14, S5M8767 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps14-clk", "samsung,s5m8767-clk" - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", "samsung,s2mps14-clk", "samsung,s5m8767-clk" - regulators: The regulators of s2mps11 that have to be instantiated should be included in a sub-node named 'regulators'. Regulator nodes included in this Loading Loading @@ -81,12 +81,14 @@ as per the datasheet of s2mps11. - LDOn - valid values for n are: - S2MPS11: 1 to 38 - S2MPS13: 1 to 40 - S2MPS14: 1 to 25 - S2MPU02: 1 to 28 - Example: LDO1, LDO2, LDO28 - BUCKn - valid values for n are: - S2MPS11: 1 to 10 - S2MPS13: 1 to 10 - S2MPS14: 1 to 5 - S2MPU02: 1 to 7 - Example: BUCK1, BUCK2, BUCK9 Loading
drivers/clk/clk-s2mps11.c +24 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/clk-provider.h> #include <linux/platform_device.h> #include <linux/mfd/samsung/s2mps11.h> #include <linux/mfd/samsung/s2mps13.h> #include <linux/mfd/samsung/s2mps14.h> #include <linux/mfd/samsung/s5m8767.h> #include <linux/mfd/samsung/core.h> Loading Loading @@ -120,6 +121,24 @@ static struct clk_init_data s2mps11_clks_init[S2MPS11_CLKS_NUM] = { }, }; static struct clk_init_data s2mps13_clks_init[S2MPS11_CLKS_NUM] = { [S2MPS11_CLK_AP] = { .name = "s2mps13_ap", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, [S2MPS11_CLK_CP] = { .name = "s2mps13_cp", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, [S2MPS11_CLK_BT] = { .name = "s2mps13_bt", .ops = &s2mps11_clk_ops, .flags = CLK_IS_ROOT, }, }; static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = { [S2MPS11_CLK_AP] = { .name = "s2mps14_ap", Loading Loading @@ -184,6 +203,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev) s2mps11_reg = S2MPS11_REG_RTC_CTRL; clks_init = s2mps11_clks_init; break; case S2MPS13X: s2mps11_reg = S2MPS13_REG_RTCCTRL; clks_init = s2mps13_clks_init; break; case S2MPS14X: s2mps11_reg = S2MPS14_REG_RTCCTRL; clks_init = s2mps14_clks_init; Loading Loading @@ -279,6 +302,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) static const struct platform_device_id s2mps11_clk_id[] = { { "s2mps11-clk", S2MPS11X}, { "s2mps13-clk", S2MPS13X}, { "s2mps14-clk", S2MPS14X}, { "s5m8767-clk", S5M8767X}, { }, Loading
drivers/mfd/sec-core.c +29 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/mfd/samsung/irq.h> #include <linux/mfd/samsung/s2mpa01.h> #include <linux/mfd/samsung/s2mps11.h> #include <linux/mfd/samsung/s2mps13.h> #include <linux/mfd/samsung/s2mps14.h> #include <linux/mfd/samsung/s2mpu02.h> #include <linux/mfd/samsung/s5m8763.h> Loading Loading @@ -74,6 +75,15 @@ static const struct mfd_cell s2mps11_devs[] = { } }; static const struct mfd_cell s2mps13_devs[] = { { .name = "s2mps13-pmic", }, { .name = "s2mps13-rtc", }, { .name = "s2mps13-clk", .of_compatible = "samsung,s2mps13-clk", }, }; static const struct mfd_cell s2mps14_devs[] = { { .name = "s2mps14-pmic", Loading Loading @@ -107,6 +117,9 @@ static const struct of_device_id sec_dt_match[] = { }, { .compatible = "samsung,s2mps11-pmic", .data = (void *)S2MPS11X, }, { .compatible = "samsung,s2mps13-pmic", .data = (void *)S2MPS13X, }, { .compatible = "samsung,s2mps14-pmic", .data = (void *)S2MPS14X, Loading Loading @@ -194,6 +207,15 @@ static const struct regmap_config s2mps11_regmap_config = { .cache_type = REGCACHE_FLAT, }; static const struct regmap_config s2mps13_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = S2MPS13_REG_LDODSCH5, .volatile_reg = s2mps11_volatile, .cache_type = REGCACHE_FLAT, }; static const struct regmap_config s2mps14_regmap_config = { .reg_bits = 8, .val_bits = 8, Loading Loading @@ -325,6 +347,9 @@ static int sec_pmic_probe(struct i2c_client *i2c, case S2MPS11X: regmap = &s2mps11_regmap_config; break; case S2MPS13X: regmap = &s2mps13_regmap_config; break; case S2MPS14X: regmap = &s2mps14_regmap_config; break; Loading Loading @@ -378,6 +403,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, sec_devs = s2mps11_devs; num_sec_devs = ARRAY_SIZE(s2mps11_devs); break; case S2MPS13X: sec_devs = s2mps13_devs; num_sec_devs = ARRAY_SIZE(s2mps13_devs); break; case S2MPS14X: sec_devs = s2mps14_devs; num_sec_devs = ARRAY_SIZE(s2mps14_devs); Loading
drivers/mfd/sec-irq.c +17 −6 Original line number Diff line number Diff line Loading @@ -389,14 +389,22 @@ static const struct regmap_irq_chip s2mps11_irq_chip = { .ack_base = S2MPS11_REG_INT1, }; #define S2MPS1X_IRQ_CHIP_COMMON_DATA \ .irqs = s2mps14_irqs, \ .num_irqs = ARRAY_SIZE(s2mps14_irqs), \ .num_regs = 3, \ .status_base = S2MPS14_REG_INT1, \ .mask_base = S2MPS14_REG_INT1M, \ .ack_base = S2MPS14_REG_INT1 \ static const struct regmap_irq_chip s2mps13_irq_chip = { .name = "s2mps13", S2MPS1X_IRQ_CHIP_COMMON_DATA, }; static const struct regmap_irq_chip s2mps14_irq_chip = { .name = "s2mps14", .irqs = s2mps14_irqs, .num_irqs = ARRAY_SIZE(s2mps14_irqs), .num_regs = 3, .status_base = S2MPS14_REG_INT1, .mask_base = S2MPS14_REG_INT1M, .ack_base = S2MPS14_REG_INT1, S2MPS1X_IRQ_CHIP_COMMON_DATA, }; static const struct regmap_irq_chip s2mpu02_irq_chip = { Loading Loading @@ -452,6 +460,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) case S2MPS11X: sec_irq_chip = &s2mps11_irq_chip; break; case S2MPS13X: sec_irq_chip = &s2mps13_irq_chip; break; case S2MPS14X: sec_irq_chip = &s2mps14_irq_chip; break; Loading
drivers/regulator/Kconfig +5 −5 Original line number Diff line number Diff line Loading @@ -529,13 +529,13 @@ config REGULATOR_S2MPA01 via I2C bus. S2MPA01 has 10 Bucks and 26 LDO outputs. config REGULATOR_S2MPS11 tristate "Samsung S2MPS11/S2MPS14/S2MPU02 voltage regulator" tristate "Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage regulator" depends on MFD_SEC_CORE help This driver supports a Samsung S2MPS11/S2MPS14/S2MPU02 voltage output regulator via I2C bus. The chip is comprised of high efficient Buck converters including Dual-Phase Buck converter, Buck-Boost converter, various LDOs. This driver supports a Samsung S2MPS11/S2MPS13/S2MPS14/S2MPU02 voltage output regulator via I2C bus. The chip is comprised of high efficient Buck converters including Dual-Phase Buck converter, Buck-Boost converter, various LDOs. config REGULATOR_S5M8767 tristate "Samsung S5M8767A voltage regulator" Loading