linux/drivers/regulator/da9210-regulator.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * da9210-regulator.h - Regulator definitions for DA9210
 * Copyright (C) 2013  Dialog Semiconductor Ltd.
 */

#ifndef __DA9210_REGISTERS_H__
#define __DA9210_REGISTERS_H__

struct da9210_pdata {};

/* Page selection */
#define DA9210_REG_PAGE_CON

/* System Control and Event Registers */
#define DA9210_REG_STATUS_A
#define DA9210_REG_STATUS_B
#define DA9210_REG_EVENT_A
#define DA9210_REG_EVENT_B
#define DA9210_REG_MASK_A
#define DA9210_REG_MASK_B
#define DA9210_REG_CONTROL_A

/* GPIO Control Registers */
#define DA9210_REG_GPIO_0_1
#define DA9210_REG_GPIO_2_3
#define DA9210_REG_GPIO_4_5
#define DA9210_REG_GPIO_6

/* Regulator Registers */
#define DA9210_REG_BUCK_CONT
#define DA9210_REG_BUCK_ILIM
#define DA9210_REG_BUCK_CONF1
#define DA9210_REG_BUCK_CONF2
#define DA9210_REG_VBACK_AUTO
#define DA9210_REG_VBACK_BASE
#define DA9210_REG_VBACK_MAX_DVC_IF
#define DA9210_REG_VBACK_DVC
#define DA9210_REG_VBUCK_A
#define DA9210_REG_VBUCK_B

/* I2C Interface Settings */
#define DA9210_REG_INTERFACE

/* OTP */
#define DA9210_REG_OPT_COUNT
#define DA9210_REG_OPT_ADDR
#define DA9210_REG_OPT_DATA

/* Customer Trim and Configuration */
#define DA9210_REG_CONFIG_A
#define DA9210_REG_CONFIG_B
#define DA9210_REG_CONFIG_C
#define DA9210_REG_CONFIG_D
#define DA9210_REG_CONFIG_E


/*
 * Registers bits
 */
/* DA9210_REG_PAGE_CON (addr=0x00) */
#define DA9210_PEG_PAGE_SHIFT
#define DA9210_REG_PAGE_MASK
/* On I2C registers 0x00 - 0xFF */
#define DA9210_REG_PAGE0
/* On I2C registers 0x100 - 0x1FF */
#define DA9210_REG_PAGE2
#define DA9210_PAGE_WRITE_MODE
#define DA9210_REPEAT_WRITE_MODE
#define DA9210_PAGE_REVERT

/* DA9210_REG_STATUS_A (addr=0x50) */
#define DA9210_GPI0
#define DA9210_GPI1
#define DA9210_GPI2
#define DA9210_GPI3
#define DA9210_GPI4
#define DA9210_GPI5
#define DA9210_GPI6

/* DA9210_REG_EVENT_A (addr=0x52) */
#define DA9210_E_GPI0
#define DA9210_E_GPI1
#define DA9210_E_GPI2
#define DA9210_E_GPI3
#define DA9210_E_GPI4
#define DA9210_E_GPI5
#define DA9210_E_GPI6

/* DA9210_REG_EVENT_B (addr=0x53) */
#define DA9210_E_OVCURR
#define DA9210_E_NPWRGOOD
#define DA9210_E_TEMP_WARN
#define DA9210_E_TEMP_CRIT
#define DA9210_E_VMAX

/* DA9210_REG_MASK_A (addr=0x54) */
#define DA9210_M_GPI0
#define DA9210_M_GPI1
#define DA9210_M_GPI2
#define DA9210_M_GPI3
#define DA9210_M_GPI4
#define DA9210_M_GPI5
#define DA9210_M_GPI6

/* DA9210_REG_MASK_B (addr=0x55) */
#define DA9210_M_OVCURR
#define DA9210_M_NPWRGOOD
#define DA9210_M_TEMP_WARN
#define DA9210_M_TEMP_CRIT
#define DA9210_M_VMAX

/* DA9210_REG_CONTROL_A (addr=0x56) */
#define DA9210_DEBOUNCING_SHIFT
#define DA9210_DEBOUNCING_MASK
#define DA9210_SLEW_RATE_SHIFT
#define DA9210_SLEW_RATE_MASK
#define DA9210_V_LOCK

/* DA9210_REG_GPIO_0_1 (addr=0x58) */
#define DA9210_GPIO0_PIN_SHIFT
#define DA9210_GPIO0_PIN_MASK
#define DA9210_GPIO0_PIN_GPI
#define DA9210_GPIO0_PIN_GPO_OD
#define DA9210_GPIO0_PIN_GPO
#define DA9210_GPIO0_TYPE
#define DA9210_GPIO0_TYPE_GPI
#define DA9210_GPIO0_TYPE_GPO
#define DA9210_GPIO0_MODE
#define DA9210_GPIO1_PIN_SHIFT
#define DA9210_GPIO1_PIN_MASK
#define DA9210_GPIO1_PIN_GPI
#define DA9210_GPIO1_PIN_VERROR
#define DA9210_GPIO1_PIN_GPO_OD
#define DA9210_GPIO1_PIN_GPO
#define DA9210_GPIO1_TYPE_SHIFT
#define DA9210_GPIO1_TYPE_GPI
#define DA9210_GPIO1_TYPE_GPO
#define DA9210_GPIO1_MODE

/* DA9210_REG_GPIO_2_3 (addr=0x59) */
#define DA9210_GPIO2_PIN_SHIFT
#define DA9210_GPIO2_PIN_MASK
#define DA9210_GPIO2_PIN_GPI
#define DA9210_GPIO5_PIN_BUCK_CLK
#define DA9210_GPIO2_PIN_GPO_OD
#define DA9210_GPIO2_PIN_GPO
#define DA9210_GPIO2_TYPE
#define DA9210_GPIO2_TYPE_GPI
#define DA9210_GPIO2_TYPE_GPO
#define DA9210_GPIO2_MODE
#define DA9210_GPIO3_PIN_SHIFT
#define DA9210_GPIO3_PIN_MASK
#define DA9210_GPIO3_PIN_GPI
#define DA9210_GPIO3_PIN_IERROR
#define DA9210_GPIO3_PIN_GPO_OD
#define DA9210_GPIO3_PIN_GPO
#define DA9210_GPIO3_TYPE_SHIFT
#define DA9210_GPIO3_TYPE_GPI
#define DA9210_GPIO3_TYPE_GPO
#define DA9210_GPIO3_MODE

/* DA9210_REG_GPIO_4_5 (addr=0x5A) */
#define DA9210_GPIO4_PIN_SHIFT
#define DA9210_GPIO4_PIN_MASK
#define DA9210_GPIO4_PIN_GPI
#define DA9210_GPIO4_PIN_GPO_OD
#define DA9210_GPIO4_PIN_GPO
#define DA9210_GPIO4_TYPE
#define DA9210_GPIO4_TYPE_GPI
#define DA9210_GPIO4_TYPE_GPO
#define DA9210_GPIO4_MODE
#define DA9210_GPIO5_PIN_SHIFT
#define DA9210_GPIO5_PIN_MASK
#define DA9210_GPIO5_PIN_GPI
#define DA9210_GPIO5_PIN_INTERFACE
#define DA9210_GPIO5_PIN_GPO_OD
#define DA9210_GPIO5_PIN_GPO
#define DA9210_GPIO5_TYPE_SHIFT
#define DA9210_GPIO5_TYPE_GPI
#define DA9210_GPIO5_TYPE_GPO
#define DA9210_GPIO5_MODE

/* DA9210_REG_GPIO_6 (addr=0x5B) */
#define DA9210_GPIO6_PIN_SHIFT
#define DA9210_GPIO6_PIN_MASK
#define DA9210_GPIO6_PIN_GPI
#define DA9210_GPIO6_PIN_INTERFACE
#define DA9210_GPIO6_PIN_GPO_OD
#define DA9210_GPIO6_PIN_GPO
#define DA9210_GPIO6_TYPE
#define DA9210_GPIO6_TYPE_GPI
#define DA9210_GPIO6_TYPE_GPO
#define DA9210_GPIO6_MODE

/* DA9210_REG_BUCK_CONT (addr=0x5D) */
#define DA9210_BUCK_EN
#define DA9210_BUCK_GPI_SHIFT
#define DA9210_BUCK_GPI_MASK
#define DA9210_BUCK_GPI_OFF
#define DA9210_BUCK_GPI_GPIO0
#define DA9210_BUCK_GPI_GPIO3
#define DA9210_BUCK_GPI_GPIO4
#define DA9210_BUCK_PD_DIS
#define DA9210_VBUCK_SEL
#define DA9210_VBUCK_SEL_A
#define DA9210_VBUCK_SEL_B
#define DA9210_VBUCK_GPI_SHIFT
#define DA9210_VBUCK_GPI_MASK
#define DA9210_VBUCK_GPI_OFF
#define DA9210_VBUCK_GPI_GPIO0
#define DA9210_VBUCK_GPI_GPIO3
#define DA9210_VBUCK_GPI_GPIO4
#define DA9210_DVC_CTRL_EN

/* DA9210_REG_BUCK_ILIM (addr=0xD0) */
#define DA9210_BUCK_ILIM_SHIFT
#define DA9210_BUCK_ILIM_MASK
#define DA9210_BUCK_IALARM

/* DA9210_REG_BUCK_CONF1 (addr=0xD1) */
#define DA9210_BUCK_MODE_SHIFT
#define DA9210_BUCK_MODE_MASK
#define DA9210_BUCK_MODE_MANUAL
#define DA9210_BUCK_MODE_SLEEP
#define DA9210_BUCK_MODE_SYNC
#define DA9210_BUCK_MODE_AUTO
#define DA9210_STARTUP_CTRL_SHIFT
#define DA9210_STARTUP_CTRL_MASK
#define DA9210_PWR_DOWN_CTRL_SHIFT
#define DA9210_PWR_DOWN_CTRL_MASK

/* DA9210_REG_BUCK_CONF2 (addr=0xD2) */
#define DA9210_PHASE_SEL_SHIFT
#define DA9210_PHASE_SEL_MASK
#define DA9210_FREQ_SEL

/* DA9210_REG_BUCK_AUTO (addr=0xD4) */
#define DA9210_VBUCK_AUTO_SHIFT
#define DA9210_VBUCK_AUTO_MASK

/* DA9210_REG_BUCK_BASE (addr=0xD5) */
#define DA9210_VBUCK_BASE_SHIFT
#define DA9210_VBUCK_BASE_MASK

/* DA9210_REG_VBUCK_MAX_DVC_IF (addr=0xD6) */
#define DA9210_VBUCK_MAX_SHIFT
#define DA9210_VBUCK_MAX_MASK
#define DA9210_DVC_STEP_SIZE
#define DA9210_DVC_STEP_SIZE_10MV
#define DA9210_DVC_STEP_SIZE_20MV

/* DA9210_REG_VBUCK_DVC (addr=0xD7) */
#define DA9210_VBUCK_DVC_SHIFT
#define DA9210_VBUCK_DVC_MASK

/* DA9210_REG_VBUCK_A/B (addr=0xD8/0xD9) */
#define DA9210_VBUCK_SHIFT
#define DA9210_VBUCK_MASK
#define DA9210_VBUCK_BIAS
#define DA9210_BUCK_SL

/* DA9210_REG_INTERFACE (addr=0x105) */
#define DA9210_IF_BASE_ADDR_SHIFT
#define DA9210_IF_BASE_ADDR_MASK

/* DA9210_REG_CONFIG_E (addr=0x147) */
#define DA9210_STAND_ALONE

#endif	/* __DA9210_REGISTERS_H__ */