Skip to contentSkip to conversation

pfuze: Fix the pmic_get() parameter in the DM case

PATCH New Fabio Estevam 3 participants 6 messages Dec 19, 2019 – Dec 28, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pfuze: Fix the pmic_get() parameter in the DM case

Currently the following hang is observed when booting a imx6sx-sdb board:

U-Boot 2020.01-rc5-00004-g643366bcd5 (Dec 19 2019 - 14:56:23 -0300)

CPU:   Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 32C
Reset cause: POR
Model: Freescale i.MX6 SoloX SDB RevB Board
Board: MX6SX SABRE SDB revA
DRAM:  1 GiB

initcall sequence bffd8514 failed at call 87804cc0 (err=-19) ### ERROR ### Please RESET the board ###

When pmic_get() is used with DM the first parameter must be the complete node name plus the unit address.

Fix the pmic_get() parameter to fix the boot regression.

Tested on a imx6sx-sdb and imx6q-sabresd boards.

---
 board/freescale/common/pfuze.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/common/pfuze.c +1 -1
index 03ebe4e7b5..6dca22960b 100644
@@ -136,7 +136,7 @@ struct udevice *pfuze_common_init(void)
 	int ret;
 	unsigned int reg, dev_id, rev_id;
 
-	ret = pmic_get("pfuze100", &dev);
+	ret = pmic_get("pfuze100 at 8", &dev);
 	if (ret == -ENODEV)
 		return NULL;
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 mx6sxsabresd: Adjust the mmcdev after DM conversion

After the DM conversion the boot SD card is now device 3.

Adjust it so that we can boot the kernel again.

While at it avoid a hardcoded mmc dev inside the finduuid script.

---
 include/configs/mx6sxsabresd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/mx6sxsabresd.h +2 -2
index 704d9f3dcb..55aace1c6e 100644
@@ -54,9 +54,9 @@
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
 	"videomode=video=ctfb:x:800,y:480,depth:24,pclk:29850,le:89,ri:164,up:23,lo:10,hs:10,vs:10,sync:0,vmode:0\0" \
-	"mmcdev=2\0" \
+	"mmcdev=3\0" \
 	"mmcpart=1\0" \
-	"finduuid=part uuid mmc 2:2 uuid\0" \
+	"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadbootscript=" \
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 mx6sxsabresd: Adjust the mmcdev after DM conversion

Quoted 4 lines

After the DM conversion the boot SD card is now device 3. Adjust it so that we can boot the kernel again.
While at it avoid a hardcoded mmc dev inside the finduuid script.

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
=====================================================================
#3 lore raw

PATCH 1/2 pfuze: Fix the pmic_get() parameter in the DM case

In reply to Fabio Estevam

Hi Fabio,

Quoted 41 lines · Fabio Estevam

Currently the following hang is observed when booting a imx6sx-sdb board:

U-Boot 2020.01-rc5-00004-g643366bcd5 (Dec 19 2019 - 14:56:23 -0300)

CPU:   Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 32C
Reset cause: POR
Model: Freescale i.MX6 SoloX SDB RevB Board
Board: MX6SX SABRE SDB revA
DRAM:  1 GiB

initcall sequence bffd8514 failed at call 87804cc0 (err=-19) ### ERROR ### Please RESET the board ###

When pmic_get() is used with DM the first parameter must be the complete node name plus the unit address.

Fix the pmic_get() parameter to fix the boot regression.

Tested on a imx6sx-sdb and imx6q-sabresd boards.

---
 board/freescale/common/pfuze.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/common/pfuze.c +1 -2
index 03ebe4e7b5..6dca22960b 100644
@@ -136,7 +136,7 @@ struct udevice *pfuze_common_init(void)
        int ret;
        unsigned int reg, dev_id, rev_id;
 
-       ret = pmic_get("pfuze100", &dev);
+       ret = pmic_get("pfuze100 at 8", &dev);
        if (ret == -ENODEV)
                return NULL;
 
--
Quoted 2 lines

2.17.1

BTW,
there're also other potential places with the same problem:

$ grep -ne pmic_get -r ./board/freescale
./board/freescale/mx6sllevk/mx6sllevk.c:60: ret = pmic_get("pfuze100", &dev);
./board/freescale/imx8mq_evk/spl.c:165: p = pmic_get("PFUZE100");
./board/freescale/mx53loco/mx53loco.c:208: p = pmic_get("DIALOG_PMIC");
./board/freescale/mx53loco/mx53loco.c:251: p = pmic_get("FSL_PMIC");
./board/freescale/mx51evk/mx51evk.c:182: p = pmic_get("FSL_PMIC");
./board/freescale/mx6sxsabreauto/mx6sxsabreauto.c:138: ret =
pmic_get("pfuze100", &dev);
./board/freescale/imx8mm_evk/spl.c:90: ret = pmic_get("pmic at 4b", &dev);
./board/freescale/common/pfuze.c:60: p = pmic_get("PFUZE100");
./board/freescale/common/pfuze.c:139: ret = pmic_get("pfuze100", &dev);
./board/freescale/common/mc34vr500.c:35: p = pmic_get("MC34VR500");
./board/freescale/common/mc34vr500.c:72: p = pmic_get("MC34VR500");
./board/freescale/mx6slevk/mx6slevk.c:148: ret = pmic_get("pfuze100", &dev);
./board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c:75: ret =
pmic_get("pfuze3000", &dev);
./board/freescale/mx31pdk/mx31pdk.c:92: p = pmic_get("FSL_PMIC");
./board/freescale/mx7dsabresd/mx7dsabresd.c:329: ret =
pmic_get("pfuze3000", &dev);
./board/freescale/mx25pdk/mx25pdk.c:145: p = pmic_get("FSL_PMIC");
./board/freescale/mx35pdk/mx35pdk.c:191: struct pmic *p = pmic_get("FSL_PMIC");
./board/freescale/mx35pdk/mx35pdk.c:224: p = pmic_get("FSL_PMIC");
./board/freescale/mx53evk/mx53evk.c:88: p = pmic_get("FSL_PMIC");

Thanks

Signature · 8 lines
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
#4 lore raw

PATCH 1/2 pfuze: Fix the pmic_get() parameter in the DM case

Hi Igor,

Quoted 2 lines · Igor Opaniuk

BTW,
there're also other potential places with the same problem:

Thanks, only the DM usage needs to be fixed. I will send a series fixing them.

Quoted 2 lines
$ grep -ne pmic_get -r ./board/freescale
./board/freescale/mx6sllevk/mx6sllevk.c:60: ret = pmic_get("pfuze100", &dev);

Done.

Quoted 2 lines

./board/freescale/mx6sxsabreauto/mx6sxsabreauto.c:138: ret = pmic_get("pfuze100", &dev);

pmic node is not passed in the device tree from U-Boot.

Will sync with the upstream dts and will fix it after 2020.01.

Quoted 1 line

./board/freescale/mx6slevk/mx6slevk.c:148: ret = pmic_get("pfuze100", &dev);

Done.

Quoted 2 lines

./board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c:75: ret = pmic_get("pfuze3000", &dev);

No PMIC on this board. Will remove it after 2020.01.

Quoted 2 lines

./board/freescale/mx7dsabresd/mx7dsabresd.c:329: ret = pmic_get("pfuze3000", &dev);

Done.

Thanks

#5 lore raw

PATCH 1/2 pfuze: Fix the pmic_get() parameter in the DM case

In reply to Fabio Estevam
Quoted 9 lines

Currently the following hang is observed when booting a imx6sx-sdb board:
U-Boot 2020.01-rc5-00004-g643366bcd5 (Dec 19 2019 - 14:56:23 -0300)

CPU:   Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 32C
Reset cause: POR
Model: Freescale i.MX6 SoloX SDB RevB Board
Board: MX6SX SABRE SDB revA
DRAM:  1 GiB
Quoted 8 lines

initcall sequence bffd8514 failed at call 87804cc0 (err=-19) ### ERROR ### Please RESET the board ###
When pmic_get() is used with DM the first parameter must be the complete node name plus the unit address.
Fix the pmic_get() parameter to fix the boot regression. Tested on a imx6sx-sdb and imx6q-sabresd boards.

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
=====================================================================