power: pmic: pca9450: fix i2c address for PCA9450A
PATCH 1/1 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.
--- drivers/power/pmic/pca9450.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/power/pmic/pca9450.c +1 -1
@@ -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 , }, { } };
drivers/power/pmic/pmic_pca9450.c +1 -1
@@ -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;
Signature · 1 line
2.17.1
PATCH 1/1 power: pmic: pca9450: fix i2c address for PCA9450A
Quoted 42 lines
Subject: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
Change the I2C Slave Address of the PCA9450A:
0x35-->0x25According 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 is0x25.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 <[email protected]>--- drivers/power/pmic/pca9450.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/power/pmic/pca9450.c +1
-1@@ -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 , }, { } };drivers/power/pmic/pmic_pca9450.c +0
-0
drivers/power/pmic/pmic_pca9450.c int power_pca9450a_init(unsigned char bus) · line 28
Quoted 7 lines
drivers/power/pmic/pmic_pca9450.c +1
-1@@ -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.
Quoted 3 lines
drivers/power/pmic/pmic_pca9450.c +0
-1--2.17.1
PATCH 1/1 power: pmic: pca9450: fix i2c address for PCA9450A
Hi,
Quoted 44 lines · Peng Fan
Quoted 44 lines
Subject: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
Change the I2C Slave Address of the PCA9450A:
0x35-->0x25According 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 is0x25.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 <[email protected]>--- drivers/power/pmic/pca9450.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/power/pmic/pca9450.c +1
-1@@ -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 , }, { } };drivers/power/pmic/pmic_pca9450.c +0
-0@@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) p->name = pca9450_name; p->interface =PMIC_I2C ;
Quoted 8 lines
drivers/power/pmic/pmic_pca9450.c int power_pca9450a_init(unsigned char bus) · line 28
Quoted 5 lines
drivers/power/pmic/pmic_pca9450.c +1
-1p->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_idinto 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.
[1] https://lists.denx.de/pipermail/u-boot/2020-June/418123.html
Regards,
Quoted 7 lines
Reviewed-by Peng Fan <[email protected]>Quoted 3 lines
drivers/power/pmic/pmic_pca9450.c +0
-1--2.17.1
Signature · 2 lines
S?bastien Szymanski, Armadeus Systems Software engineer
PATCH 1/1 power: pmic: pca9450: fix i2c address for PCA9450A
Quoted 56 lines
Subject: Re: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
Hi,
Quoted 43 lines · Peng Fan
Quoted 43 lines
Subject: [PATCH] power: pmic: pca9450: fix i2c address for PCA9450A
Change the I2C Slave Address of the PCA9450A:
0x35-->0x25According 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 is0x25.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 <[email protected]>--- drivers/power/pmic/pca9450.c | 2 +- drivers/power/pmic/pmic_pca9450.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/power/pmic/pca9450.cindex0c9d9a366e..c7f8b80954100644drivers/power/pmic/pca9450.c +1
-1@@ -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 , }, { } };drivers/power/pmic/pmic_pca9450.c +0
-0@@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) p->name = pca9450_name;Quoted 8 lines
drivers/power/pmic/pmic_pca9450.c int power_pca9450a_init(unsigned char bus) · line 28
Quoted 6 lines
drivers/power/pmic/pmic_pca9450.c +1
-1p->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_idinto
Quoted 5 lines
consideration.
Quoted 1 line
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.
Quoted 23 lines
[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=0Regards,
Quoted 7 lines
Reviewed-by Peng Fan <[email protected]>Quoted 3 lines
drivers/power/pmic/pmic_pca9450.c +0
-1--2.17.1
--
S?bastien Szymanski, Armadeus Systems
Software engineer
PATCH 1/1 power: pmic: pca9450: fix i2c address for PCA9450A
In reply to Sébastien SzymanskiHi Sebastien,
Quoted 26 lines
Quoted 18 lines
Quoted 18 lines
index
0c9d9a366e..c7f8b80954100644drivers/power/pmic/pca9450.c +1
-1@@ -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 , }, { } };drivers/power/pmic/pmic_pca9450.c +0
-0@@ -23,7 +23,7 @@ int power_pca9450a_init(unsigned char bus) p->name = pca9450_name;Quoted 8 lines
drivers/power/pmic/pmic_pca9450.c int power_pca9450a_init(unsigned char bus) · line 28
Quoted 6 lines
drivers/power/pmic/pmic_pca9450.c +1
-1p->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_idinto
Quoted 8 lines
consideration.
Quoted 1 line
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.[1] https://lists.denx.de/pipermail/u-boot/2020-June/418123.html
You are right, indeed, the solution to merge the two functions into a single one is more elegant!
Quoted 6 lines
Regards,
Quoted 4 lines
Reviewed-by Peng Fan <[email protected]>Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
--
2.17.1--
S?bastien Szymanski, Armadeus Systems
Software engineer
Regards,
Flavio