linux/include/linux/mfd/rt5033-private.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * MFD core driver for Richtek RT5033
 *
 * Copyright (C) 2014 Samsung Electronics, Co., Ltd.
 * Author: Beomho Seo <[email protected]>
 */

#ifndef __RT5033_PRIVATE_H__
#define __RT5033_PRIVATE_H__

enum rt5033_reg {};

/* RT5033 Charger state register */
#define RT5033_CHG_STAT_TYPE_MASK
#define RT5033_CHG_STAT_TYPE_PRE
#define RT5033_CHG_STAT_TYPE_FAST
#define RT5033_CHG_STAT_MASK
#define RT5033_CHG_STAT_DISCHARGING
#define RT5033_CHG_STAT_FULL
#define RT5033_CHG_STAT_CHARGING
#define RT5033_CHG_STAT_NOT_CHARGING

/* RT5033 CHGCTRL1 register */
#define RT5033_CHGCTRL1_IAICR_MASK
#define RT5033_CHGCTRL1_TE_EN_MASK
#define RT5033_CHGCTRL1_HZ_MASK
#define RT5033_CHGCTRL1_MODE_MASK

/* RT5033 CHGCTRL2 register */
#define RT5033_CHGCTRL2_CV_MASK
#define RT5033_CHGCTRL2_CV_SHIFT

/* RT5033 DEVICE_ID register */
#define RT5033_VENDOR_ID_MASK
#define RT5033_CHIP_REV_MASK

/* RT5033 CHGCTRL3 register */
#define RT5033_CHGCTRL3_CFO_EN_MASK
#define RT5033_CHGCTRL3_TIMER_MASK
#define RT5033_CHGCTRL3_TIMER_EN_MASK

/* RT5033 CHGCTRL4 register */
#define RT5033_CHGCTRL4_MIVR_MASK
#define RT5033_CHGCTRL4_IPREC_MASK
#define RT5033_CHGCTRL4_IPREC_SHIFT
#define RT5033_CHGCTRL4_EOC_MASK

/* RT5033 CHGCTRL5 register */
#define RT5033_CHGCTRL5_ICHG_MASK
#define RT5033_CHGCTRL5_ICHG_SHIFT
#define RT5033_CHGCTRL5_VPREC_MASK

/* RT5033 RT CTRL1 register */
#define RT5033_RT_CTRL1_UUG_MASK

/* RT5033 control register */
#define RT5033_CTRL_FCCM_BUCK_MASK
#define RT5033_CTRL_BUCKOMS_MASK
#define RT5033_CTRL_LDOOMS_MASK
#define RT5033_CTRL_SLDOOMS_MASK
#define RT5033_CTRL_EN_BUCK_MASK
#define RT5033_CTRL_EN_LDO_MASK
#define RT5033_CTRL_EN_SAFE_LDO_MASK
#define RT5033_CTRL_LDO_SLEEP_MASK

/* RT5033 BUCK control register */
#define RT5033_BUCK_CTRL_MASK

/* RT5033 LDO control register */
#define RT5033_LDO_CTRL_MASK

/* RT5033 charger property - model, manufacturer */
#define RT5033_CHARGER_MODEL
#define RT5033_MANUFACTURER

/*
 * While RT5033 charger can limit the fast-charge current (as in CHGCTRL1
 * register), AICR mode limits the input current. For example, the AIRC 100
 * mode limits the input current to 100 mA.
 */
#define RT5033_AICR_DISABLE
#define RT5033_AICR_100_MODE
#define RT5033_AICR_500_MODE
#define RT5033_AICR_700_MODE
#define RT5033_AICR_900_MODE
#define RT5033_AICR_1000_MODE
#define RT5033_AICR_1500_MODE
#define RT5033_AICR_2000_MODE

/* RT5033 charger minimum input voltage regulation */
#define RT5033_CHARGER_MIVR_DISABLE
#define RT5033_CHARGER_MIVR_4200MV
#define RT5033_CHARGER_MIVR_4300MV
#define RT5033_CHARGER_MIVR_4400MV
#define RT5033_CHARGER_MIVR_4500MV
#define RT5033_CHARGER_MIVR_4600MV
#define RT5033_CHARGER_MIVR_4700MV
#define RT5033_CHARGER_MIVR_4800MV

/* RT5033 use internal timer need to set time */
#define RT5033_FAST_CHARGE_TIMER4
#define RT5033_FAST_CHARGE_TIMER6
#define RT5033_FAST_CHARGE_TIMER8
#define RT5033_FAST_CHARGE_TIMER10
#define RT5033_FAST_CHARGE_TIMER12
#define RT5033_FAST_CHARGE_TIMER14
#define RT5033_FAST_CHARGE_TIMER16

#define RT5033_INT_TIMER_DISABLE
#define RT5033_INT_TIMER_ENABLE

/*
 * RT5033 charger opa mode. RT5033 has two opa modes for OTG: charger mode
 * and boost mode.
 */
#define RT5033_CHARGER_MODE
#define RT5033_BOOST_MODE

/* RT5033 charger termination enable */
#define RT5033_TE_DISABLE
#define RT5033_TE_ENABLE

/* RT5033 charger CFO enable */
#define RT5033_CFO_DISABLE
#define RT5033_CFO_ENABLE

/* RT5033 charger constant charge voltage (as in CHGCTRL2 register), uV */
#define RT5033_CHARGER_CONST_VOLTAGE_LIMIT_MIN
#define RT5033_CHARGER_CONST_VOLTAGE_STEP_NUM
#define RT5033_CHARGER_CONST_VOLTAGE_LIMIT_MAX
#define RT5033_CV_MAX_VOLTAGE

/* RT5033 charger pre-charge current limits (as in CHGCTRL4 register), uA */
#define RT5033_CHARGER_PRE_CURRENT_LIMIT_MIN
#define RT5033_CHARGER_PRE_CURRENT_STEP_NUM
#define RT5033_CHARGER_PRE_CURRENT_LIMIT_MAX
#define RT5033_CHG_MAX_PRE_CURRENT

/* RT5033 charger fast-charge current (as in CHGCTRL5 register), uA */
#define RT5033_CHARGER_FAST_CURRENT_MIN
#define RT5033_CHARGER_FAST_CURRENT_STEP_NUM
#define RT5033_CHARGER_FAST_CURRENT_MAX
#define RT5033_CHG_MAX_CURRENT

/*
 * RT5033 charger const-charge end of charger current (
 * as in CHGCTRL4 register), uA
 */
#define RT5033_CHARGER_EOC_MIN
#define RT5033_CHARGER_EOC_REF
#define RT5033_CHARGER_EOC_STEP_NUM1
#define RT5033_CHARGER_EOC_STEP_NUM2
#define RT5033_CHARGER_EOC_MAX

/*
 * RT5033 charger pre-charge threshold volt limits
 * (as in CHGCTRL5 register), uV
 */
#define RT5033_CHARGER_PRE_THRESHOLD_LIMIT_MIN
#define RT5033_CHARGER_PRE_THRESHOLD_STEP_NUM
#define RT5033_CHARGER_PRE_THRESHOLD_LIMIT_MAX

/*
 * RT5033 charger UUG. It enables MOS auto control by H/W charger
 * circuit.
 */
#define RT5033_CHARGER_UUG_DISABLE
#define RT5033_CHARGER_UUG_ENABLE

/* RT5033 charger high impedance mode */
#define RT5033_CHARGER_HZ_DISABLE
#define RT5033_CHARGER_HZ_ENABLE

/* RT5033 regulator BUCK output voltage uV */
#define RT5033_REGULATOR_BUCK_VOLTAGE_MIN
#define RT5033_REGULATOR_BUCK_VOLTAGE_MAX
#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP
#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP_NUM

/* RT5033 regulator LDO output voltage uV */
#define RT5033_REGULATOR_LDO_VOLTAGE_MIN
#define RT5033_REGULATOR_LDO_VOLTAGE_MAX
#define RT5033_REGULATOR_LDO_VOLTAGE_STEP
#define RT5033_REGULATOR_LDO_VOLTAGE_STEP_NUM

/* RT5033 regulator SAFE LDO output voltage uV */
#define RT5033_REGULATOR_SAFE_LDO_VOLTAGE

enum rt5033_fuel_reg {};

/* RT5033 fuel gauge battery present property */
#define RT5033_FUEL_BAT_PRESENT

/* RT5033 PMIC interrupts */
#define RT5033_PMIC_IRQ_BUCKOCP
#define RT5033_PMIC_IRQ_BUCKLV
#define RT5033_PMIC_IRQ_SAFELDOLV
#define RT5033_PMIC_IRQ_LDOLV
#define RT5033_PMIC_IRQ_OT
#define RT5033_PMIC_IRQ_VDDA_UV

#endif /* __RT5033_PRIVATE_H__ */