blob: 749c0d1f60fc2f2ec223d1150e43023dc5a10705 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Przemyslaw Marczak77bee052015-05-13 13:38:35 +02002/*
3 * Copyright (C) 2015 Samsung Electronics
4 * Przemyslaw Marczak <p.marczak@samsung.com>
Przemyslaw Marczak77bee052015-05-13 13:38:35 +02005 */
6
7#ifndef _DT_BINDINGS_SANDBOX_PMIC_H_
8#define _DT_BINDINGS_SANDBOX_PMIC_H_
9
10/*
11 * Sandbox PMIC - prepare reset values
12 * To provide the default (reset) values as in the real hardware,
13 * the registers are set in i2c pmic emul driver's probe() method.
14 * The default values are defined as below.
15 */
16
17/* Buck operation mode IDs */
18#define BUCK_OM_OFF 0
19#define BUCK_OM_ON 1
20#define BUCK_OM_PWM 2
21#define BUCK_OM_COUNT 3
22
23/* Ldo operation mode IDs */
24#define LDO_OM_OFF 0
25#define LDO_OM_ON 1
26#define LDO_OM_SLEEP 2
27#define LDO_OM_STANDBY 3
28#define LDO_OM_COUNT 4
29
30/* [Value uV/uA]/[Mode ID] to register */
31#define VAL2REG(min, step, val) (((val) - (min)) / (step))
32#define VAL2OMREG(x) (x)
33
34#endif