Lines Matching +full:multi +full:- +full:pmic
5 # SPDX-License-Identifier: GPL-2.0+
9 ------------
11 This document describes the second version of the u-boot's PMIC (Power
16 ----------
18 Boards supported by u-boot are getting increasingly complex. Developers and
20 devices are now available on the board - namely power managers (PMIC), fuel
21 gauges (FG), micro USB interface controllers (MUIC), batteries, multi-function
25 -----------------------------------
27 One package can integrate PMIC and MUIC with different addresses on the I2C bus.
28 The same device - e.g. MAX8997 uses two different I2C busses and addresses.
31 different ICs use different endianess. For this reason struct pmic holds
36 one operation - e.g. PMIC enables LDO.
40 to start charging the battery, use PMIC to reduce board's overall power
43 Up till now u-boot doesn't support device model, so a simple one had to be
50 ./drivers/power/pmic/power_{core files}.c
51 e.g. ./drivers/power/pmic/power_core.c
53 ./drivers/power/pmic/<device_function>/<device_function>_<device_name>.c
54 e.g. ./drivers/power/pmic/pmic_max8997.c
58 The framework classifies devices by their function - separate directories should
62 --------------
64 Everything is a power device described by struct pmic. Even battery is
68 - Block diagram of the hierarchy:
69 -----------------
70 --------| BAT |------------
72 | ----------------- |
75 ----------- ----------------- ---------
78 ----------- ----------------- ---------
83 Definition of the struct pmic is only required with proper name and parameters
84 for communication. This is enough to use the "pmic" command in the u-boot
93 needed (defined at ./include/power/pmic.h):
94 - FG device (struct power_fg):
95 -- *fg_battery_check - check if battery is not above its limits
96 -- *fg_battery_update - update the pmic framework with current
99 - Charger device (struct power_chrq):
100 -- *chrg_type - type/capacity of the charger (including information
102 -- *chrg_bat_present - detection if battery to be charged is
104 -- *chrg_state - status of the charger - if it is enabled or
107 - Battery device (struct power_battery):
108 -- *battery_init - assign proper callbacks to be used by top
110 -- *battery_charge - called from "pmic" command, responsible
115 relies on the PMIC/MUIC HW completely (MAX77693).
118 -- *fg_battery_check -> FG device (fg_max17042.c)
119 -- *fg_battery_update -> FG device (fg_max17042.c)
120 -- *chrg_type -> MUIC device (muic_max8997.c)
121 -- *chrg_bat_present -> PMIC device (pmic_max8997.c)
122 -- *chrg_state -> PMIC device (pmic_max8997.c)
123 -- *battery_init -> BAT device (bat_trats.c)
124 -- *battery_charge -> BAT device (bat_trats.c)
126 Also the struct pmic holds method (*low_power_mode) for reducing board's
127 power consumption when one calls "pmic BAT_TRATS bat charge" command.
130 -----------------------------
136 Then "pmic" command supports reading/writing/dump of device's internal
150 TO DO list (for PMICv3) - up till v2014.04
151 ------------------------------------------
154 This is the main problem when a developer tries to build a multi-boot u-boot