blob: 0f764bcbcc051141afdafa44a92c35e2348be376 [file] [log] [blame]
Svyatoslav Ryhelaba052b2023-10-27 11:26:10 +03001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright(C) 2023 Svyatoslav Ryhel <clamor95@gmail.com>
4 */
5
6#ifndef _MAX77663_H_
7#define _MAX77663_H_
8
9#define MAX77663_LDO_NUM 9
10#define MAX77663_SD_NUM 5
11
12/* Drivers name */
13#define MAX77663_LDO_DRIVER "max77663_ldo"
14#define MAX77663_SD_DRIVER "max77663_sd"
15
16/* Step-Down (SD) Regulator calculations */
17#define SD_STATUS_MASK 0x30
18
19#define SD0_VOLT_MAX_HEX 0x40
20#define SD1_VOLT_MAX_HEX 0x4c
21#define SD_VOLT_MAX_HEX 0xff
22#define SD_VOLT_MIN_HEX 0x02
23
24#define SD0_VOLT_MAX 1400000
25#define SD1_VOLT_MAX 1550000
26#define SD_VOLT_MAX 3787500
27#define SD_VOLT_MIN 625000
28
29#define SD_VOLT_BASE 600000
30
31/* Low-Dropout Linear (LDO) Regulator calculations */
32#define LDO_STATUS_MASK 0xc0
33#define LDO_VOLT_MASK 0x3f
34#define LDO_VOLT_MAX_HEX 0x3f
35
36#define LDO01_VOLT_MAX 2375000
37#define LDO4_VOLT_MAX 1587500
38#define LDO_VOLT_MAX 3950000
39
40#define LDO_VOLT_BASE 800000
41
42#endif /* _MAX77663_H_ */