mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
power: pmic: s2mps11: add support for Samsung S2MPU05 PMIC
Samsung S2MPU05 PMIC is used in devices with the Exynos7870 SoC, it houses voltage regulators and an RTC module. Add support for this device variant in the driver, which also binds the corresponding voltage regulator driver. Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
committed by
Peng Fan
parent
defe12f306
commit
bf8f1a984d
@@ -19,11 +19,19 @@ static const struct pmic_child_info s2mps11_pmic_children_info[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct pmic_child_info s2mpu05_pmic_children_info[] = {
|
||||
{ .prefix = S2MPU05_OF_LDO_PREFIX, .driver = S2MPS11_LDO_DRIVER },
|
||||
{ .prefix = S2MPU05_OF_BUCK_PREFIX, .driver = S2MPS11_BUCK_DRIVER },
|
||||
{ },
|
||||
};
|
||||
|
||||
static int s2mps11_reg_count(struct udevice *dev)
|
||||
{
|
||||
switch (dev_get_driver_data(dev)) {
|
||||
case VARIANT_S2MPS11:
|
||||
return S2MPS11_REG_COUNT;
|
||||
case VARIANT_S2MPU05:
|
||||
return S2MPU05_REG_COUNT;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -71,6 +79,9 @@ static int s2mps11_bind(struct udevice *dev)
|
||||
case VARIANT_S2MPS11:
|
||||
pmic_children_info = s2mps11_pmic_children_info;
|
||||
break;
|
||||
case VARIANT_S2MPU05:
|
||||
pmic_children_info = s2mpu05_pmic_children_info;
|
||||
break;
|
||||
default:
|
||||
debug("%s: unknown device type\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -91,6 +102,7 @@ static struct dm_pmic_ops s2mps11_ops = {
|
||||
|
||||
static const struct udevice_id s2mps11_ids[] = {
|
||||
{ .compatible = "samsung,s2mps11-pmic", .data = VARIANT_S2MPS11 },
|
||||
{ .compatible = "samsung,s2mpu05-pmic", .data = VARIANT_S2MPU05 },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user