110 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ */2/*3 * pv88080-regulator.h - Regulator definitions for PV880804 * Copyright (C) 2016 Powerventure Semiconductor Ltd.5 */6 7#ifndef __PV88080_REGISTERS_H__8#define __PV88080_REGISTERS_H__9 10/* System Control and Event Registers */11#define PV88080_REG_EVENT_A 0x0412#define PV88080_REG_MASK_A 0x0913#define PV88080_REG_MASK_B 0x0A14#define PV88080_REG_MASK_C 0x0B15 16/* Regulator Registers - rev. AA */17#define PV88080AA_REG_HVBUCK_CONF1 0x2D18#define PV88080AA_REG_HVBUCK_CONF2 0x2E19#define PV88080AA_REG_BUCK1_CONF0 0x2720#define PV88080AA_REG_BUCK1_CONF1 0x2821#define PV88080AA_REG_BUCK1_CONF2 0x5922#define PV88080AA_REG_BUCK1_CONF5 0x5C23#define PV88080AA_REG_BUCK2_CONF0 0x2924#define PV88080AA_REG_BUCK2_CONF1 0x2A25#define PV88080AA_REG_BUCK2_CONF2 0x6126#define PV88080AA_REG_BUCK2_CONF5 0x6427#define PV88080AA_REG_BUCK3_CONF0 0x2B28#define PV88080AA_REG_BUCK3_CONF1 0x2C29#define PV88080AA_REG_BUCK3_CONF2 0x6930#define PV88080AA_REG_BUCK3_CONF5 0x6C31 32/* Regulator Registers - rev. BA */33#define PV88080BA_REG_HVBUCK_CONF1 0x3334#define PV88080BA_REG_HVBUCK_CONF2 0x3435#define PV88080BA_REG_BUCK1_CONF0 0x2A36#define PV88080BA_REG_BUCK1_CONF1 0x2C37#define PV88080BA_REG_BUCK1_CONF2 0x5A38#define PV88080BA_REG_BUCK1_CONF5 0x5D39#define PV88080BA_REG_BUCK2_CONF0 0x2D40#define PV88080BA_REG_BUCK2_CONF1 0x2F41#define PV88080BA_REG_BUCK2_CONF2 0x6342#define PV88080BA_REG_BUCK2_CONF5 0x6643#define PV88080BA_REG_BUCK3_CONF0 0x3044#define PV88080BA_REG_BUCK3_CONF1 0x3245#define PV88080BA_REG_BUCK3_CONF2 0x6C46#define PV88080BA_REG_BUCK3_CONF5 0x6F47 48/* PV88080_REG_EVENT_A (addr=0x04) */49#define PV88080_E_VDD_FLT 0x0150#define PV88080_E_OVER_TEMP 0x0251 52/* PV88080_REG_MASK_A (addr=0x09) */53#define PV88080_M_VDD_FLT 0x0154#define PV88080_M_OVER_TEMP 0x0255 56/* PV88080_REG_BUCK1_CONF0 (addr=0x27|0x2A) */57#define PV88080_BUCK1_EN 0x8058#define PV88080_VBUCK1_MASK 0x7F59 60/* PV88080_REG_BUCK2_CONF0 (addr=0x29|0x2D) */61#define PV88080_BUCK2_EN 0x8062#define PV88080_VBUCK2_MASK 0x7F63 64/* PV88080_REG_BUCK3_CONF0 (addr=0x2B|0x30) */65#define PV88080_BUCK3_EN 0x8066#define PV88080_VBUCK3_MASK 0x7F67 68/* PV88080_REG_BUCK1_CONF1 (addr=0x28|0x2C) */69#define PV88080_BUCK1_ILIM_SHIFT 270#define PV88080_BUCK1_ILIM_MASK 0x0C71#define PV88080_BUCK1_MODE_MASK 0x0372 73/* PV88080_REG_BUCK2_CONF1 (addr=0x2A|0x2F) */74#define PV88080_BUCK2_ILIM_SHIFT 275#define PV88080_BUCK2_ILIM_MASK 0x0C76#define PV88080_BUCK2_MODE_MASK 0x0377 78/* PV88080_REG_BUCK3_CONF1 (addr=0x2C|0x32) */79#define PV88080_BUCK3_ILIM_SHIFT 280#define PV88080_BUCK3_ILIM_MASK 0x0C81#define PV88080_BUCK3_MODE_MASK 0x0382 83#define PV88080_BUCK_MODE_SLEEP 0x0084#define PV88080_BUCK_MODE_AUTO 0x0185#define PV88080_BUCK_MODE_SYNC 0x0286 87/* PV88080_REG_HVBUCK_CONF1 (addr=0x2D|0x33) */88#define PV88080_VHVBUCK_MASK 0xFF89 90/* PV88080_REG_HVBUCK_CONF1 (addr=0x2E|0x34) */91#define PV88080_HVBUCK_EN 0x0192 93/* PV88080_REG_BUCK2_CONF2 (addr=0x61|0x63) */94/* PV88080_REG_BUCK3_CONF2 (addr=0x69|0x6C) */95#define PV88080_BUCK_VDAC_RANGE_SHIFT 796#define PV88080_BUCK_VDAC_RANGE_MASK 0x0197 98#define PV88080_BUCK_VDAC_RANGE_1 0x0099#define PV88080_BUCK_VDAC_RANGE_2 0x01100 101/* PV88080_REG_BUCK2_CONF5 (addr=0x64|0x66) */102/* PV88080_REG_BUCK3_CONF5 (addr=0x6C|0x6F) */103#define PV88080_BUCK_VRANGE_GAIN_SHIFT 0104#define PV88080_BUCK_VRANGE_GAIN_MASK 0x01105 106#define PV88080_BUCK_VRANGE_GAIN_1 0x00107#define PV88080_BUCK_VRANGE_GAIN_2 0x01108 109#endif /* __PV88080_REGISTERS_H__ */110