[PATCH next] power: rk8xx: fix display name for RK808

Quentin Schulz foss+uboot at 0leil.net
Mon Jun 17 18:48:51 CEST 2024


From: Quentin Schulz <quentin.schulz at cherry.de>

Commit 2ce40542e0eb ("power: rk8xx: properly print all supported PMICs
name") fixed all PMICs name that were broken but broke the only one that
was not broken already: RK808. This one is a special case because the ID
registers are marked as reserved and always return 0, so the variant
cannot be derived the same way it is done for other PMICs from Rockchip.

Fixes: 2ce40542e0eb ("power: rk8xx: properly print all supported PMICs name")
Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
---
Tested on RK3399 Puma.
---
 drivers/power/pmic/rk8xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 617bb511e4e..4d5a5ceafad 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -281,6 +281,8 @@ static int rk8xx_probe(struct udevice *dev)
 	show_variant = bitfield_extract_by_mask(priv->variant, RK8XX_ID_MSK);
 	switch (priv->variant) {
 	case RK808_ID:
+		/* RK808 ID is 0x0000, so fix show_variant for that PMIC */
+		show_variant = 0x808;
 		break;
 	case RK805_ID:
 	case RK816_ID:

---
base-commit: e242cd95130b64cf91692da41363ac59b25fc08d
change-id: 20240617-rk808-show-variant-2121df41caf7

Best regards,
-- 
Quentin Schulz <quentin.schulz at cherry.de>



More information about the U-Boot mailing list