1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Platform configuration options for DA9063
5 * Copyright 2012 Dialog Semiconductor Ltd.
7 * Author: Michal Hajduk, Dialog Semiconductor
8 * Author: Krystian Garbaciak, Dialog Semiconductor
11 #ifndef __MFD_DA9063_PDATA_H__
12 #define __MFD_DA9063_PDATA_H__
14 #include <linux/regulator/machine.h>
17 * Regulator configuration
19 /* DA9063 and DA9063L regulator IDs */
29 /* BCORE1 and BCORE2 in merged mode */
30 DA9063_ID_BCORES_MERGED
,
31 /* BMEM and BIO in merged mode */
32 DA9063_ID_BMEM_BIO_MERGED
,
33 /* When two BUCKs are merged, they cannot be reused separately */
35 /* LDOs on both DA9063 and DA9063L */
42 /* DA9063-only LDOs */
51 /* Regulators platform data */
52 struct da9063_regulator_data
{
54 struct regulator_init_data
*initdata
;
57 struct da9063_regulators_pdata
{
58 unsigned n_regulators
;
59 struct da9063_regulator_data
*regulator_data
;
64 * RGB LED configuration
66 /* LED IDs for flags in struct led_info. */
74 #define DA9063_LED_ID_MASK 0x3
76 /* LED polarity for flags in struct led_info. */
77 #define DA9063_LED_HIGH_LEVEL_ACTIVE 0x0
78 #define DA9063_LED_LOW_LEVEL_ACTIVE 0x4
82 * General PMIC configuration
84 /* HWMON ADC channels configuration */
85 #define DA9063_FLG_FORCE_IN0_MANUAL_MODE 0x0010
86 #define DA9063_FLG_FORCE_IN0_AUTO_MODE 0x0020
87 #define DA9063_FLG_FORCE_IN1_MANUAL_MODE 0x0040
88 #define DA9063_FLG_FORCE_IN1_AUTO_MODE 0x0080
89 #define DA9063_FLG_FORCE_IN2_MANUAL_MODE 0x0100
90 #define DA9063_FLG_FORCE_IN2_AUTO_MODE 0x0200
91 #define DA9063_FLG_FORCE_IN3_MANUAL_MODE 0x0400
92 #define DA9063_FLG_FORCE_IN3_AUTO_MODE 0x0800
94 /* Disable register caching. */
95 #define DA9063_FLG_NO_CACHE 0x0008
99 /* DA9063 platform data */
100 struct da9063_pdata
{
101 int (*init
)(struct da9063
*da9063
);
105 struct da9063_regulators_pdata
*regulators_pdata
;
106 struct led_platform_data
*leds_pdata
;
109 #endif /* __MFD_DA9063_PDATA_H__ */