Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: regulator: npm1300: workaround for LDO HW bug #83790

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seov-nordic
Copy link
Contributor

There is a HW bug in nPM1300 LDO which causes the LDO output voltage to reach its target very slowly in specific cases. This is worked around by performing an additional i2c read shortly after an LDO is enabled.

Comment on lines 100 to 107
ldo-workaround-enabled:
type: boolean
description: |
Enable a SW workaround for LDO bug.
When nPM1300 is in ULP mode, LDO is supplied from VSYS and
then LDO is enabled, it can take long time until the LDO
output has reached its target voltage. To avoid this, an i2c
read is performed shortly after an LDO is enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is DT involved here? Shouldn't this always be enabled as needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bug shows itself only in a very specific case. We cannot know whether this case is present since it involves HW design choices. It is enabled by default to be on a safe side, but if developers know that they don't run into this corner case they can avoid a redundant operation disabling this behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if enabled by default, change the property like this:

nordic,ldo-disable-...

Also, calling this "SW workaround for LDO" feels too generic, is there any associated PAN?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAN/ERRATA is coming soon, would it be okay to add a reference to it later? We'd really like to have a fix in place even without a reference for the time being

@seov-nordic seov-nordic force-pushed the npm1300-LDO-bug-workaround branch 2 times, most recently from 0c37a3f to 89ec756 Compare January 14, 2025 08:46
@kartben kartben assigned gmarull and unassigned kartben Jan 15, 2025
drivers/regulator/regulator_npm1300.c Outdated Show resolved Hide resolved
Comment on lines +100 to +107
nordic,ldo-disable-workaround:
type: boolean
description: |
Disable the SW workaround for LDO bug.
When nPM1300 is in ULP mode, LDO is supplied from VSYS and
then LDO is enabled, it can take long time until the LDO
output has reached its target voltage. To avoid this, an i2c
read is performed shortly after an LDO is enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted to think that this really belongs to Kconfig (as many other erratas), unless we strictly need per-instance control.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't strictly necessary, although it makes sense since each LDO is supplied separately. So while this bug might be present on one in a given design the other might be bug-free.

I was trying to find some information on how erratas are handled in Zephyr, but didn't find much. Is there any documentation you could point me to? I don't have a strong opinion on how we handle this. If it's better to do with Kconfig from your perspective I can do that.

There is a HW bug in nPM1300 LDO which causes the LDO output voltage to
reach its target very slowly in specific cases. This is worked around by
performing an additional i2c read shortly after an LDO is enabled.

Signed-off-by: Sergei Ovchinnikov <[email protected]>
@seov-nordic seov-nordic force-pushed the npm1300-LDO-bug-workaround branch from 89ec756 to f6936ad Compare January 20, 2025 07:01
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, as this seems to need per-instance boot time config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Regulators area: Shields Shields (add-on boards) platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants