Skip to main content
CErik.1
Associate II
April 8, 2021
Question

Enable charging from VBAT pin in Linux

  • April 8, 2021
  • 4 replies
  • 1844 views

Hello,

I would like to enable battery/capacitor charging from the VBAT pin on an STM32MP1 and also change the charging resistor.

That would be VBE and VBRS of PWR_CR3.

What would be the proper way to enable/disable the charging together with the resistor value from Linux and/or U-boot?

The regulator driver managing PWR_CR3 does not mention VBE or VBRS.

Thanks

This topic has been closed for replies.

4 replies

PatrickF
Technical Moderator
April 28, 2021

Hi,

I think for the moment, these bits are not managed by Device Tree, you could probably modify TF-A for that specific purpose.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
Bernard PUEL
Technical Moderator
August 4, 2021

Hello,

A change request is under discussion in ST to implement it in Device tree. For ST this would be required only in TF-A but would you really need to enable the register settings in u-boot or Linux (or TF-a is enough for your need) ?

CErik.1
CErik.1Author
Associate II
August 4, 2021

Great thanks!

Currently I enable the setting in U-Boot, but any stage is fine (TF-A, U-Boot or Linux) . TF-A would work perfectly fine.

Again thanks!

CErik.1
CErik.1Author
Associate II
August 4, 2021

I missed the reply button. See above.

(Unable to delete)

Bernard PUEL
Technical Moderator
August 4, 2021

Ok thanks for the quick answer.

fyi, in tf-a and optee the function "raw_allowed_access_request()" allows to set these bits.