summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2023-02-03 18:24:36 +0800
committerStefano Babic <sbabic@denx.de>2023-03-30 00:45:39 +0200
commit69c573ca899dec2a58b9d5d3e45177f3be2eba18 (patch)
tree46d8a5b075f9a8d128aa039437425b8d0cb8355b /drivers/power
parent20ba9f252a483d7c2da2e1cf5659e47401c5d77f (diff)
downloadu-boot-69c573ca899dec2a58b9d5d3e45177f3be2eba18.tar.gz
u-boot-69c573ca899dec2a58b9d5d3e45177f3be2eba18.tar.bz2
u-boot-69c573ca899dec2a58b9d5d3e45177f3be2eba18.zip
power: pmic: Add NXP PCA9451A PMIC support
PCA9451A uses similar BUCKs and LDO regulators as PCA9450B/C but has LDO2 and LDO3 removed. So reuse pca9450 PMIC and regulator driver and add new type for PCA9451A. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pmic/pca9450.c1
-rw-r--r--drivers/power/regulator/pca9450.c11
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index 2427abfb7a..e99ece8fb0 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -120,6 +120,7 @@ static const struct udevice_id pca9450_ids[] = {
{ .compatible = "nxp,pca9450a", .data = NXP_CHIP_TYPE_PCA9450A, },
{ .compatible = "nxp,pca9450b", .data = NXP_CHIP_TYPE_PCA9450BC, },
{ .compatible = "nxp,pca9450c", .data = NXP_CHIP_TYPE_PCA9450BC, },
+ { .compatible = "nxp,pca9451a", .data = NXP_CHIP_TYPE_PCA9451A, },
{ }
};
diff --git a/drivers/power/regulator/pca9450.c b/drivers/power/regulator/pca9450.c
index fe1869397c..7ca20d1f7f 100644
--- a/drivers/power/regulator/pca9450.c
+++ b/drivers/power/regulator/pca9450.c
@@ -276,7 +276,8 @@ static int pca9450_regulator_probe(struct udevice *dev)
type = dev_get_driver_data(dev_get_parent(dev));
- if (type != NXP_CHIP_TYPE_PCA9450A && type != NXP_CHIP_TYPE_PCA9450BC) {
+ if (type != NXP_CHIP_TYPE_PCA9450A && type != NXP_CHIP_TYPE_PCA9450BC &&
+ type != NXP_CHIP_TYPE_PCA9451A) {
debug("Unknown PMIC type\n");
return -EINVAL;
}
@@ -291,6 +292,14 @@ static int pca9450_regulator_probe(struct udevice *dev)
continue;
}
+ /* PCA9451A uses BUCK3 in dual-phase and don't have LDO2 and LDO3 */
+ if (type == NXP_CHIP_TYPE_PCA9451A &&
+ (!strcmp(pca9450_reg_data[i].name, "BUCK3") ||
+ !strcmp(pca9450_reg_data[i].name, "LDO2") ||
+ !strcmp(pca9450_reg_data[i].name, "LDO3"))) {
+ continue;
+ }
+
*plat = pca9450_reg_data[i];
return 0;