diff options
author | Svyatoslav Ryhel | 2023-10-27 11:26:10 +0300 |
---|---|---|
committer | Tom Rini | 2023-11-03 12:37:15 -0400 |
commit | f2ed5849947f1e0dc1578a68b43af7ff928565be (patch) | |
tree | 1d02ad07d91c766a974479de23961578327d4058 /include/power | |
parent | 9b1d277471af2efc7974a6aede5b73f28b1d6287 (diff) |
power: pmic: add the base MAX77663 PMIC support
Add support to bind the regulators/child nodes with the pmic.
Also adds the pmic i2c based read/write functions to access pmic
registers.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/power')
-rw-r--r-- | include/power/max77663.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/power/max77663.h b/include/power/max77663.h new file mode 100644 index 00000000000..0f764bcbcc0 --- /dev/null +++ b/include/power/max77663.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright(C) 2023 Svyatoslav Ryhel <clamor95@gmail.com> + */ + +#ifndef _MAX77663_H_ +#define _MAX77663_H_ + +#define MAX77663_LDO_NUM 9 +#define MAX77663_SD_NUM 5 + +/* Drivers name */ +#define MAX77663_LDO_DRIVER "max77663_ldo" +#define MAX77663_SD_DRIVER "max77663_sd" + +/* Step-Down (SD) Regulator calculations */ +#define SD_STATUS_MASK 0x30 + +#define SD0_VOLT_MAX_HEX 0x40 +#define SD1_VOLT_MAX_HEX 0x4c +#define SD_VOLT_MAX_HEX 0xff +#define SD_VOLT_MIN_HEX 0x02 + +#define SD0_VOLT_MAX 1400000 +#define SD1_VOLT_MAX 1550000 +#define SD_VOLT_MAX 3787500 +#define SD_VOLT_MIN 625000 + +#define SD_VOLT_BASE 600000 + +/* Low-Dropout Linear (LDO) Regulator calculations */ +#define LDO_STATUS_MASK 0xc0 +#define LDO_VOLT_MASK 0x3f +#define LDO_VOLT_MAX_HEX 0x3f + +#define LDO01_VOLT_MAX 2375000 +#define LDO4_VOLT_MAX 1587500 +#define LDO_VOLT_MAX 3950000 + +#define LDO_VOLT_BASE 800000 + +#endif /* _MAX77663_H_ */ |