1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * AS3711 PMIC MFC driver header
5 * Copyright (C) 2012 Renesas Electronics Corporation
6 * Author: Guennadi Liakhovetski, <g.liakhovetski@gmx.de>
16 /* Register addresses */
17 #define AS3711_SD_1_VOLTAGE 0 /* Digital Step-Down */
18 #define AS3711_SD_2_VOLTAGE 1
19 #define AS3711_SD_3_VOLTAGE 2
20 #define AS3711_SD_4_VOLTAGE 3
21 #define AS3711_LDO_1_VOLTAGE 4 /* Analog LDO */
22 #define AS3711_LDO_2_VOLTAGE 5
23 #define AS3711_LDO_3_VOLTAGE 6 /* Digital LDO */
24 #define AS3711_LDO_4_VOLTAGE 7
25 #define AS3711_LDO_5_VOLTAGE 8
26 #define AS3711_LDO_6_VOLTAGE 9
27 #define AS3711_LDO_7_VOLTAGE 0xa
28 #define AS3711_LDO_8_VOLTAGE 0xb
29 #define AS3711_SD_CONTROL 0x10
30 #define AS3711_GPIO_SIGNAL_OUT 0x20
31 #define AS3711_GPIO_SIGNAL_IN 0x21
32 #define AS3711_SD_CONTROL_1 0x30
33 #define AS3711_SD_CONTROL_2 0x31
34 #define AS3711_CURR_CONTROL 0x40
35 #define AS3711_CURR1_VALUE 0x43
36 #define AS3711_CURR2_VALUE 0x44
37 #define AS3711_CURR3_VALUE 0x45
38 #define AS3711_STEPUP_CONTROL_1 0x50
39 #define AS3711_STEPUP_CONTROL_2 0x51
40 #define AS3711_STEPUP_CONTROL_4 0x53
41 #define AS3711_STEPUP_CONTROL_5 0x54
42 #define AS3711_REG_STATUS 0x73
43 #define AS3711_INTERRUPT_STATUS_1 0x77
44 #define AS3711_INTERRUPT_STATUS_2 0x78
45 #define AS3711_INTERRUPT_STATUS_3 0x79
46 #define AS3711_CHARGER_STATUS_1 0x86
47 #define AS3711_CHARGER_STATUS_2 0x87
48 #define AS3711_ASIC_ID_1 0x90
49 #define AS3711_ASIC_ID_2 0x91
51 #define AS3711_MAX_REG AS3711_ASIC_ID_2
52 #define AS3711_NUM_REGS (AS3711_MAX_REG + 1)
56 AS3711_REGULATOR_SD_1,
57 AS3711_REGULATOR_SD_2,
58 AS3711_REGULATOR_SD_3,
59 AS3711_REGULATOR_SD_4,
60 AS3711_REGULATOR_LDO_1,
61 AS3711_REGULATOR_LDO_2,
62 AS3711_REGULATOR_LDO_3,
63 AS3711_REGULATOR_LDO_4,
64 AS3711_REGULATOR_LDO_5,
65 AS3711_REGULATOR_LDO_6,
66 AS3711_REGULATOR_LDO_7,
67 AS3711_REGULATOR_LDO_8,
77 struct regmap *regmap;
80 #define AS3711_MAX_STEPDOWN 4
81 #define AS3711_MAX_STEPUP 2
82 #define AS3711_MAX_LDO 8
84 enum as3711_su2_feedback {
92 enum as3711_su2_fbprot {
103 struct as3711_regulator_pdata {
104 struct regulator_init_data *init_data[AS3711_REGULATOR_MAX];
107 struct as3711_bl_pdata {
112 enum as3711_su2_feedback su2_feedback;
113 enum as3711_su2_fbprot su2_fbprot;
119 struct as3711_platform_data {
120 struct as3711_regulator_pdata regulator;
121 struct as3711_bl_pdata backlight;