power: pmic_pca9450: fix PCA9450A I2C address
PATCH v2 1/1 power: pmic_pca9450: fix PCA9450A I2C address
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.
---
Changes for v2:
* Quoting Ye Li
* Merge both function into one as suggested by Ye Li
board/freescale/imx8mp_evk/spl.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 21 +-------------------- include/power/pca9450.h | 3 +-- 3 files changed, 3 insertions(+), 23 deletions(-)
board/freescale/imx8mp_evk/spl.c +1 -1
@@ -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" );
drivers/power/pmic/pmic_pca9450.c +1 -20
@@ -11,26 +11,7 @@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 ();
include/power/pca9450.h +1 -2
@@ -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
Signature · 1 line
2.26.2
Fabio Estevam
reviewerPATCH v2 1/1 power: pmic_pca9450: fix PCA9450A I2C address
Quoted 10 lines · S?bastien Szymanski
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_initandpower_pca9450b_initinto one functionpower_pca9450_init.Signed-off-by S?bastien Szymanski <[email protected]>
PATCH v2 1/1 power: pmic_pca9450: fix PCA9450A I2C address
In reply to Sébastien SzymanskiQuoted 83 lines · S?bastien Szymanski
Caution: EXT Email
Quoting Ye Li from NXP:
????"We have confirmed with PMIC team,
0x35is used only on early chips
????and not used any more.0x25is the final address."Fix it by merging
power_pca9450a_initandpower_pca9450b_initinto one
functionpower_pca9450_init.Signed-off-by S?bastien Szymanski <[email protected]>---
Changes for v2:
?* Quoting Ye Li
?* Merge both function into one as suggested by Ye Li?board/freescale/imx8mp_evk/spl.c??|??2 +- ?drivers/power/pmic/pmic_pca9450.c | 21 +-------------------- ?include/power/pca9450.h???????????|??3 +--?3 files changed, 3 insertions(+), 23 deletions(-)
board/freescale/imx8mp_evk/spl.c +1
-1@@ -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");drivers/power/pmic/pmic_pca9450.c +1
-20@@ -11,26 +11,7 @@ ?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();include/power/pca9450.h +1
-2@@ -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);
Quoted 4 lines
?#endif
--
2.26.2
Best regards,
Ye Li
PATCH v2 1/1 power: pmic_pca9450: fix PCA9450A I2C address
In reply to Sébastien SzymanskiQuoted 8 lines
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_initandpower_pca9450b_initinto one functionpower_pca9450_init.Signed-off-by S?bastien Szymanski <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Ye Li <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================