Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  * pv88080-regulator.h - Regulator definitions for PV88080
0004  * Copyright (C) 2016 Powerventure Semiconductor Ltd.
0005  */
0006 
0007 #ifndef __PV88080_REGISTERS_H__
0008 #define __PV88080_REGISTERS_H__
0009 
0010 /* System Control and Event Registers */
0011 #define PV88080_REG_EVENT_A             0x04
0012 #define PV88080_REG_MASK_A              0x09
0013 #define PV88080_REG_MASK_B              0x0A
0014 #define PV88080_REG_MASK_C              0x0B
0015 
0016 /* Regulator Registers - rev. AA */
0017 #define PV88080AA_REG_HVBUCK_CONF1      0x2D
0018 #define PV88080AA_REG_HVBUCK_CONF2      0x2E
0019 #define PV88080AA_REG_BUCK1_CONF0       0x27
0020 #define PV88080AA_REG_BUCK1_CONF1       0x28
0021 #define PV88080AA_REG_BUCK1_CONF2       0x59
0022 #define PV88080AA_REG_BUCK1_CONF5       0x5C
0023 #define PV88080AA_REG_BUCK2_CONF0       0x29
0024 #define PV88080AA_REG_BUCK2_CONF1       0x2A
0025 #define PV88080AA_REG_BUCK2_CONF2       0x61
0026 #define PV88080AA_REG_BUCK2_CONF5       0x64
0027 #define PV88080AA_REG_BUCK3_CONF0       0x2B
0028 #define PV88080AA_REG_BUCK3_CONF1       0x2C
0029 #define PV88080AA_REG_BUCK3_CONF2       0x69
0030 #define PV88080AA_REG_BUCK3_CONF5       0x6C
0031 
0032 /* Regulator Registers - rev. BA */
0033 #define PV88080BA_REG_HVBUCK_CONF1      0x33
0034 #define PV88080BA_REG_HVBUCK_CONF2      0x34
0035 #define PV88080BA_REG_BUCK1_CONF0       0x2A
0036 #define PV88080BA_REG_BUCK1_CONF1       0x2C
0037 #define PV88080BA_REG_BUCK1_CONF2       0x5A
0038 #define PV88080BA_REG_BUCK1_CONF5       0x5D
0039 #define PV88080BA_REG_BUCK2_CONF0       0x2D
0040 #define PV88080BA_REG_BUCK2_CONF1       0x2F
0041 #define PV88080BA_REG_BUCK2_CONF2       0x63
0042 #define PV88080BA_REG_BUCK2_CONF5       0x66
0043 #define PV88080BA_REG_BUCK3_CONF0       0x30
0044 #define PV88080BA_REG_BUCK3_CONF1       0x32
0045 #define PV88080BA_REG_BUCK3_CONF2       0x6C
0046 #define PV88080BA_REG_BUCK3_CONF5       0x6F
0047 
0048 /* PV88080_REG_EVENT_A (addr=0x04) */
0049 #define PV88080_E_VDD_FLT               0x01
0050 #define PV88080_E_OVER_TEMP             0x02
0051 
0052 /* PV88080_REG_MASK_A (addr=0x09) */
0053 #define PV88080_M_VDD_FLT               0x01
0054 #define PV88080_M_OVER_TEMP             0x02
0055 
0056 /* PV88080_REG_BUCK1_CONF0 (addr=0x27|0x2A) */
0057 #define PV88080_BUCK1_EN                0x80
0058 #define PV88080_VBUCK1_MASK             0x7F
0059 
0060 /* PV88080_REG_BUCK2_CONF0 (addr=0x29|0x2D) */
0061 #define PV88080_BUCK2_EN                0x80
0062 #define PV88080_VBUCK2_MASK             0x7F
0063 
0064 /* PV88080_REG_BUCK3_CONF0 (addr=0x2B|0x30) */
0065 #define PV88080_BUCK3_EN                0x80
0066 #define PV88080_VBUCK3_MASK             0x7F
0067 
0068 /* PV88080_REG_BUCK1_CONF1 (addr=0x28|0x2C) */
0069 #define PV88080_BUCK1_ILIM_SHIFT        2
0070 #define PV88080_BUCK1_ILIM_MASK         0x0C
0071 #define PV88080_BUCK1_MODE_MASK         0x03
0072 
0073 /* PV88080_REG_BUCK2_CONF1 (addr=0x2A|0x2F) */
0074 #define PV88080_BUCK2_ILIM_SHIFT        2
0075 #define PV88080_BUCK2_ILIM_MASK         0x0C
0076 #define PV88080_BUCK2_MODE_MASK         0x03
0077 
0078 /* PV88080_REG_BUCK3_CONF1 (addr=0x2C|0x32) */
0079 #define PV88080_BUCK3_ILIM_SHIFT        2
0080 #define PV88080_BUCK3_ILIM_MASK         0x0C
0081 #define PV88080_BUCK3_MODE_MASK         0x03
0082 
0083 #define PV88080_BUCK_MODE_SLEEP         0x00
0084 #define PV88080_BUCK_MODE_AUTO          0x01
0085 #define PV88080_BUCK_MODE_SYNC          0x02
0086 
0087 /* PV88080_REG_HVBUCK_CONF1 (addr=0x2D|0x33) */
0088 #define PV88080_VHVBUCK_MASK            0xFF
0089 
0090 /* PV88080_REG_HVBUCK_CONF1 (addr=0x2E|0x34) */
0091 #define PV88080_HVBUCK_EN               0x01
0092 
0093 /* PV88080_REG_BUCK2_CONF2 (addr=0x61|0x63) */
0094 /* PV88080_REG_BUCK3_CONF2 (addr=0x69|0x6C) */
0095 #define PV88080_BUCK_VDAC_RANGE_SHIFT   7
0096 #define PV88080_BUCK_VDAC_RANGE_MASK    0x01
0097 
0098 #define PV88080_BUCK_VDAC_RANGE_1       0x00
0099 #define PV88080_BUCK_VDAC_RANGE_2       0x01
0100 
0101 /* PV88080_REG_BUCK2_CONF5 (addr=0x64|0x66) */
0102 /* PV88080_REG_BUCK3_CONF5 (addr=0x6C|0x6F) */
0103 #define PV88080_BUCK_VRANGE_GAIN_SHIFT  0
0104 #define PV88080_BUCK_VRANGE_GAIN_MASK   0x01
0105 
0106 #define PV88080_BUCK_VRANGE_GAIN_1      0x00
0107 #define PV88080_BUCK_VRANGE_GAIN_2      0x01
0108 
0109 #endif  /* __PV88080_REGISTERS_H__ */