Linux-Kernel-PMIC-Drivers

Rohm power management IC drivers for Linux kernel.

Drivers Home

This project is maintained by RohmSemiconductor

ROHM Power Management IC BD96802 Linux device drivers.

The ROHM BD96802 “Scalable PMIC” is an automotive grade PMIC which can scale to different applications by allowing chaining of PMICs. BD96802 provides 2 BUCK regulators with configurable, voltages, and safety limits. A watchdog is also included. The BD96802 can be used as a companion PMIC for ROHM BD96801

Linux:

Source Code:

Upstream

The ROHM Finland SWDC has created a Linux driver in collaboration with the Linux kernel community. Driver is included in the Upstream Linux from v6.16-rc1 onwards.

The Linux kernel can be obtained from:

https://www.kernel.org/

or by cloning Linus Torvald’s official linux development tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git

Downstream reference driver:

Currently there is an initial reference driver for Linux available tagged in our Linux git tree as tag scalable-bd96802-unstable-alpha-v0.01. Please note that the driver is intended to be used as a reference design only. No warranty is given and feasibility for target setup must be verified. Driver is also not fully tested and bugs may be hiding. Evaluate at your own risk.

The driver implements same features as the experimental version of BD96801 driver. Below is a summary copied from the BD96801 notes:

This patch series brings initial and experimental support for configuring voltages and safety limits on Linux system. Also a driver for watchdog feeding is included.

The most notable limitation of the linux driver is the inability to control the PMIC state. Most of the configurations can only be done when the BD96801 is in STBY state, and this driver fails to do those configurations when the PMIC is in any other state. These configurations include:

If the control support for STANDBY-only configurations provided by this driver are needed, then it is best to implement the STBY-line handling in this driver to ensure the PMIC is in STBY state when the driver is starting-up. This requires the ‘ALWAYS_ON’ registers to be preprogrammed so that power-rails required by the processor running Linux and this driver are enabled when PMIC is in STBY. Ensuring this configuration and adding the STBY-line handling are not implemented in this driver. User converting this reference driver to a real production driver must take care of it.

The driver supports the basic control of BUCKs and configuring Over/Under-voltage, over-current, over-temperature protections via device-tree. Following constrains are worth noting:

The voltages can be enabled/disabled and protections configured only when the PMIC is in STANDBY state.

The protections can’t be disabled. UVP limit can’t be configured. OVP and OCP limits can be configured.

OVD and UVD for a regulator have common limit. OCP and thermal protections are implemented by turning all INTB notifications fatal. This means that OVD/UVD can not be used together with OCP and thermal protection.

Thermal limits can’t be configured. TSD is fixed to 175 Celsius, and thermal warning is fixed close to 140 Celsius.

This driver has support for

Bugs from this version can be reported in GitHub issue tracker or to matti.vaittinen@fi.rohmeurope.com

Configuration:

Configuration options one may want to enable for kernel build are:

- CONFIG_MFD_ROHM_BD96801
- CONFIG_REGULATOR_BD96801
- CONFIG_BD96801_WATCHDOG
config description subsystem
CONFIG_MFD_ROHM_BD96801 Enables the MFD core driver which handles interrupts and bus access. The core driver also launches the sub device drivers. mfd
CONFIG_REGULATOR_BD96801 Enables the regulator driver which allows the kernel to control PMIC’s regulatos. regulator
CONFIG_BD96801_WATCHDOG Enables the watchdog driver which allows detecting system hang-up and performs an emergency reset to recover from hang-up. watchdog