Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* Strange PMIC behaviour with rohm bd71847 on Ka-Ro tx8m-1610 (imx8mm)
@ 2025-09-09 15:16 Maud Spierings
  2025-09-10  6:25 ` Matti Vaittinen
  0 siblings, 1 reply; 4+ messages in thread
From: Maud Spierings @ 2025-09-09 15:16 UTC (permalink / raw)
  To: mazziesaccount, imx, LW

I have been having some issues running mainline Linux on this specific 
COM. Specifically with the shutdown/reboot behaviour seemingly being 
inverted.

I have now figured out how to make shutdown actually behave like 
shutdown. It seems like something is setting BD718XX_REG_TRANS_COND1 
(0x20) to 0xcf. The only bit of code I can find that touches this 
register is this:
drivers/regulator/bd718x7-regulator.c bd718xx_probe():
use_snvs = of_property_read_bool(pdev->dev.parent->of_node,
                      "rohm,reset-snvs-powered");

/*
  * Change the next stage from poweroff to be READY instead of SNVS
  * for all reset types because OTP loading at READY will clear SEL
  * bit allowing HW defaults for power rails to be used
  */
if (!use_snvs) {
         err = regmap_update_bits(regmap, BD718XX_REG_TRANS_COND1,
                      BD718XX_ON_REQ_POWEROFF_MASK |
                      BD718XX_SWRESET_POWEROFF_MASK |
                      BD718XX_WDOG_POWEROFF_MASK |
                      BD718XX_KEY_L_POWEROFF_MASK,
                      BD718XX_POWOFF_TO_RDY);
         if (err)
                 return dev_err_probe(&pdev->dev, err,
                          "Failed to change reset target\n");

         dev_dbg(&pdev->dev, "Changed all resets from SVNS to READY\n");

}

Even with rohm,reset-snvs-powered set I still end up with 0xcf. I've had 
to add the inverse in an else block to get the desired outcome.

else {
         err = regmap_update_bits(regmap, BD718XX_REG_TRANS_COND1,
                      BD718XX_ON_REQ_POWEROFF_MASK |
                      BD718XX_SWRESET_POWEROFF_MASK |
                      BD718XX_WDOG_POWEROFF_MASK |
                      BD718XX_KEY_L_POWEROFF_MASK,
                      BD718XX_POWOFF_TO_SNVS);
         if (err)
                 return dev_err_probe(&pdev->dev, err,
                          "Failed to change reset target\n");

         dev_dbg(&pdev->dev, "Changed all resets from READY to SNVS\n");
}

In uboot I get:

i2c md 0x4b 0x20.1 0x1
0020: c0    .

So something in the kernel is touching this register when it shouldn't.

I am curious if anyone else with this pmic can confirm this.

I used `i2cget -f -y 0 0x4b 0x20` to get the current value.

As a reference my tree is at [1] I'm using the gocontroll_defconfig that 
is present in there and imx8mm-tx8m-1610-moduline-iv-306-d.dtb.
This dts does not have that property set yet, only have that in my local 
tree.

reboot is still shutting down instead of rebooting but I feel like it is 
going to be a similar story.

Kind regards,
Maud

[1]: https://github.com/GOcontroll/linux/tree/gocontroll-6.12.45


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-10  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 15:16 Strange PMIC behaviour with rohm bd71847 on Ka-Ro tx8m-1610 (imx8mm) Maud Spierings
2025-09-10  6:25 ` Matti Vaittinen
2025-09-10  8:49   ` Maud Spierings
2025-09-10  8:57     ` Matti Vaittinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox