[PATCH] power: pmic: pca9450: fix i2c address for PCA9450A

Peng Fan peng.fan at nxp.com
Mon Jul 13 11:40:02 CEST 2020


> Subject: Re: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
> 
> Hi,
> 
> On 7/13/20 10:47 AM, Peng Fan wrote:
> >> Subject: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
> >>
> >> Change the I2C Slave Address of the PCA9450A:
> >>
> >> 0x35 --> 0x25
> >>
> >> According to the NXP documentation, in the datasheet:
> >>
> >> PCA9450DS.pdf (Rev 1.0 - 19 November 2019)
> >>
> >> in the table 19 "PCA9450 I2C Slave Address) at page 27/96,
> >>
> >> all the PCA9450 have the same I2C address.
> >> In particular, in case of 7-bit Slave Address, the address is 0x25.
> >>
> >> This modification was tested on the imx8mm-evk, with the SOC equipped
> >> with the PCA9450A instead of the previous ROHM BD71847.
> >>
> >> Signed-off-by: Flavio Suligoi <f.suligoi at asem.it>
> >> ---
> >>  drivers/power/pmic/pca9450.c      | 2 +-
> >>  drivers/power/pmic/pmic_pca9450.c | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/power/pmic/pca9450.c
> >> b/drivers/power/pmic/pca9450.c index 0c9d9a366e..c7f8b80954 100644
> >> --- a/drivers/power/pmic/pca9450.c
> >> +++ b/drivers/power/pmic/pca9450.c
> >> @@ -80,7 +80,7 @@ static struct dm_pmic_ops pca9450_ops = {  };
> >>
> >>  static const struct udevice_id pca9450_ids[] = {
> >> -	{ .compatible = "nxp,pca9450a", .data = 0x35, },
> >> +	{ .compatible = "nxp,pca9450a", .data = 0x25, },
> >>  	{ .compatible = "nxp,pca9450b", .data = 0x25, },
> >>  	{ }
> >>  };
> >> diff --git a/drivers/power/pmic/pmic_pca9450.c
> >> b/drivers/power/pmic/pmic_pca9450.c
> >> index 67a9090200..c0fb78c4cd 100644
> >> --- a/drivers/power/pmic/pmic_pca9450.c
> >> +++ b/drivers/power/pmic/pmic_pca9450.c
> >> @@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus)
> >>  	p->name = pca9450_name;
> >>  	p->interface = PMIC_I2C;
> >>  	p->number_of_regs = PCA9450_REG_NUM;
> >> -	p->hw.i2c.addr = 0x35;
> >> +	p->hw.i2c.addr = 0x25;
> >>  	p->hw.i2c.tx_num = 1;
> >>  	p->bus = bus;
> >
> > There was a thread to address this, but not take udevice_id into
> consideration.
> > Your version looks better.
> 
> In that thread [1], it was suggested to merge both function
> power_pca9450{a,b}_init into one function power_pca9450_init.

Oh, I overlooked your v2 patch. Then I leave this to pmic owner to
decide.

Regards,
Peng.

> 
> [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
> enx.de%2Fpipermail%2Fu-boot%2F2020-June%2F418123.html&data=02
> %7C01%7Cpeng.fan%40nxp.com%7C565fe95731cb45c3c3ff08d8270defe0%7
> C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63730228809194003
> 3&sdata=m4KqzUsvwlIK4ZOi9zF0n0ZyJqLi5S4Zi9aidtUKg3M%3D&r
> eserved=0
> 
> Regards,
> 
> >
> > Reviewed-by: Peng Fan <peng.fan at nxp.com>
> >
> >>
> >> --
> >> 2.17.1
> >
> 
> 
> --
> Sébastien Szymanski, Armadeus Systems
> Software engineer


More information about the U-Boot mailing list