linux/drivers/regulator/pv88080-regulator.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * pv88080-regulator.h - Regulator definitions for PV88080
 * Copyright (C) 2016 Powerventure Semiconductor Ltd.
 */

#ifndef __PV88080_REGISTERS_H__
#define __PV88080_REGISTERS_H__

/* System Control and Event Registers */
#define PV88080_REG_EVENT_A
#define PV88080_REG_MASK_A
#define PV88080_REG_MASK_B
#define PV88080_REG_MASK_C

/* Regulator Registers - rev. AA */
#define PV88080AA_REG_HVBUCK_CONF1
#define PV88080AA_REG_HVBUCK_CONF2
#define PV88080AA_REG_BUCK1_CONF0
#define PV88080AA_REG_BUCK1_CONF1
#define PV88080AA_REG_BUCK1_CONF2
#define PV88080AA_REG_BUCK1_CONF5
#define PV88080AA_REG_BUCK2_CONF0
#define PV88080AA_REG_BUCK2_CONF1
#define PV88080AA_REG_BUCK2_CONF2
#define PV88080AA_REG_BUCK2_CONF5
#define PV88080AA_REG_BUCK3_CONF0
#define PV88080AA_REG_BUCK3_CONF1
#define PV88080AA_REG_BUCK3_CONF2
#define PV88080AA_REG_BUCK3_CONF5

/* Regulator Registers - rev. BA */
#define PV88080BA_REG_HVBUCK_CONF1
#define PV88080BA_REG_HVBUCK_CONF2
#define PV88080BA_REG_BUCK1_CONF0
#define PV88080BA_REG_BUCK1_CONF1
#define PV88080BA_REG_BUCK1_CONF2
#define PV88080BA_REG_BUCK1_CONF5
#define PV88080BA_REG_BUCK2_CONF0
#define PV88080BA_REG_BUCK2_CONF1
#define PV88080BA_REG_BUCK2_CONF2
#define PV88080BA_REG_BUCK2_CONF5
#define PV88080BA_REG_BUCK3_CONF0
#define PV88080BA_REG_BUCK3_CONF1
#define PV88080BA_REG_BUCK3_CONF2
#define PV88080BA_REG_BUCK3_CONF5

/* PV88080_REG_EVENT_A (addr=0x04) */
#define PV88080_E_VDD_FLT
#define PV88080_E_OVER_TEMP

/* PV88080_REG_MASK_A (addr=0x09) */
#define PV88080_M_VDD_FLT
#define PV88080_M_OVER_TEMP

/* PV88080_REG_BUCK1_CONF0 (addr=0x27|0x2A) */
#define PV88080_BUCK1_EN
#define PV88080_VBUCK1_MASK

/* PV88080_REG_BUCK2_CONF0 (addr=0x29|0x2D) */
#define PV88080_BUCK2_EN
#define PV88080_VBUCK2_MASK

/* PV88080_REG_BUCK3_CONF0 (addr=0x2B|0x30) */
#define PV88080_BUCK3_EN
#define PV88080_VBUCK3_MASK

/* PV88080_REG_BUCK1_CONF1 (addr=0x28|0x2C) */
#define PV88080_BUCK1_ILIM_SHIFT
#define PV88080_BUCK1_ILIM_MASK
#define PV88080_BUCK1_MODE_MASK

/* PV88080_REG_BUCK2_CONF1 (addr=0x2A|0x2F) */
#define PV88080_BUCK2_ILIM_SHIFT
#define PV88080_BUCK2_ILIM_MASK
#define PV88080_BUCK2_MODE_MASK

/* PV88080_REG_BUCK3_CONF1 (addr=0x2C|0x32) */
#define PV88080_BUCK3_ILIM_SHIFT
#define PV88080_BUCK3_ILIM_MASK
#define PV88080_BUCK3_MODE_MASK

#define PV88080_BUCK_MODE_SLEEP
#define PV88080_BUCK_MODE_AUTO
#define PV88080_BUCK_MODE_SYNC

/* PV88080_REG_HVBUCK_CONF1 (addr=0x2D|0x33) */
#define PV88080_VHVBUCK_MASK

/* PV88080_REG_HVBUCK_CONF1 (addr=0x2E|0x34) */
#define PV88080_HVBUCK_EN

/* PV88080_REG_BUCK2_CONF2 (addr=0x61|0x63) */
/* PV88080_REG_BUCK3_CONF2 (addr=0x69|0x6C) */
#define PV88080_BUCK_VDAC_RANGE_SHIFT
#define PV88080_BUCK_VDAC_RANGE_MASK

#define PV88080_BUCK_VDAC_RANGE_1
#define PV88080_BUCK_VDAC_RANGE_2

/* PV88080_REG_BUCK2_CONF5 (addr=0x64|0x66) */
/* PV88080_REG_BUCK3_CONF5 (addr=0x6C|0x6F) */
#define PV88080_BUCK_VRANGE_GAIN_SHIFT
#define PV88080_BUCK_VRANGE_GAIN_MASK

#define PV88080_BUCK_VRANGE_GAIN_1
#define PV88080_BUCK_VRANGE_GAIN_2

#endif	/* __PV88080_REGISTERS_H__ */