]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: pmic_pca9450: fix PCA9450A I2C address
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Tue, 30 Jun 2020 13:03:13 +0000 (15:03 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 16 Jul 2020 09:20:14 +0000 (11:20 +0200)
Quoting Ye Li from NXP:

    "We have confirmed with PMIC team, 0x35 is used only on early chips
    and not used any more. 0x25 is the final address."

Fix it by merging power_pca9450a_init and power_pca9450b_init into one
function power_pca9450_init.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
board/freescale/imx8mp_evk/spl.c
drivers/power/pmic/pmic_pca9450.c
include/power/pca9450.h

index 3b3a854e29b40b4c6ea56cc611ef2f699f34f5ae..3214718e62b22ff3587ea862c31e246d4b86f8e8 100644 (file)
@@ -68,7 +68,7 @@ int power_init_board(void)
        struct pmic *p;
        int ret;
 
-       ret = power_pca9450b_init(I2C_PMIC);
+       ret = power_pca9450_init(I2C_PMIC);
        if (ret)
                printf("power init failed");
        p = pmic_get("PCA9450");
index 67a909020068677189a9ea0c08de177629334b56..d4f27428bd117c05a5e8824b097448fddd2d8d6f 100644 (file)
 
 static const char pca9450_name[] = "PCA9450";
 
-int power_pca9450a_init(unsigned char bus)
-{
-       struct pmic *p = pmic_alloc();
-
-       if (!p) {
-               printf("%s: POWER allocation error!\n", __func__);
-               return -ENOMEM;
-       }
-
-       p->name = pca9450_name;
-       p->interface = PMIC_I2C;
-       p->number_of_regs = PCA9450_REG_NUM;
-       p->hw.i2c.addr = 0x35;
-       p->hw.i2c.tx_num = 1;
-       p->bus = bus;
-
-       return 0;
-}
-
-int power_pca9450b_init(unsigned char bus)
+int power_pca9450_init(unsigned char bus)
 {
        struct pmic *p = pmic_alloc();
 
index 5d4f58ca44ebea92f92cac74c47ae40d2918915e..5a9a697d626ac7c414412c50bfeee147072503fc 100644 (file)
@@ -54,7 +54,6 @@ enum {
        PCA9450_REG_NUM,
 };
 
-int power_pca9450a_init(unsigned char bus);
-int power_pca9450b_init(unsigned char bus);
+int power_pca9450_init(unsigned char bus);
 
 #endif