diff mbox series

[2/3] ARM: imx: vining2000: Properly discern PFUZE100 and PFUZE200

Message ID 20200115102732.167211-2-marex@denx.de
State Accepted
Commit f3284e401e95e7e8f285d5596236c183aef8abd0
Headers show
Series [1/3] ARM: imx: vining2000: Clean up uSDHC4 setup | expand

Commit Message

Marek Vasut Jan. 15, 2020, 10:27 a.m. UTC
The PFUZE100 and PFUZE200 PMICs can be discerned by bit 0 in DeviceID
register. Print the correct identification of the PMICs.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
Cc: Silvio Fricke <silvio.fricke at softing.com>
Cc: Stefano Babic <sbabic at denx.de>
---
 board/softing/vining_2000/vining_2000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Jan. 20, 2020, 8:18 p.m. UTC | #1
> The PFUZE100 and PFUZE200 PMICs can be discerned by bit 0 in DeviceID
> register. Print the correct identification of the PMICs.
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Silvio Fricke <silvio.fricke at softing.com>
> Cc: Stefano Babic <sbabic at denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index 6dc3fc8b50..c74c06eaee 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -146,7 +146,7 @@  static struct pmic *pfuze_init(unsigned char i2cbus)
 		return NULL;
 
 	pmic_reg_read(p, PFUZE100_DEVICEID, &reg);
-	printf("PMIC:  PFUZE100 ID=0x%02x\n", reg);
+	printf("PMIC:  PFUZE%i00 ID=0x%02x\n", (reg & 1) ? 2 : 1, reg);
 
 	/* Set SW1AB stanby volage to 0.975V */
 	pmic_reg_read(p, PFUZE100_SW1ABSTBY, &reg);