linux/include/linux/mfd/rk808.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Register definitions for Rockchip's RK808/RK818 PMIC
 *
 * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
 *
 * Author: Chris Zhong <[email protected]>
 * Author: Zhang Qing <[email protected]>
 *
 * Copyright (C) 2016 PHYTEC Messtechnik GmbH
 *
 * Author: Wadim Egorov <[email protected]>
 */

#ifndef __LINUX_REGULATOR_RK808_H
#define __LINUX_REGULATOR_RK808_H

#include <linux/regulator/machine.h>
#include <linux/regmap.h>

/*
 * rk808 Global Register Map.
 */

#define RK808_DCDC1
#define RK808_LDO1
#define RK808_NUM_REGULATORS

enum rk808_reg {};

#define RK808_SECONDS_REG
#define RK808_MINUTES_REG
#define RK808_HOURS_REG
#define RK808_DAYS_REG
#define RK808_MONTHS_REG
#define RK808_YEARS_REG
#define RK808_WEEKS_REG
#define RK808_ALARM_SECONDS_REG
#define RK808_ALARM_MINUTES_REG
#define RK808_ALARM_HOURS_REG
#define RK808_ALARM_DAYS_REG
#define RK808_ALARM_MONTHS_REG
#define RK808_ALARM_YEARS_REG
#define RK808_RTC_CTRL_REG
#define RK808_RTC_STATUS_REG
#define RK808_RTC_INT_REG
#define RK808_RTC_COMP_LSB_REG
#define RK808_RTC_COMP_MSB_REG
#define RK808_ID_MSB
#define RK808_ID_LSB
#define RK808_CLK32OUT_REG
#define RK808_VB_MON_REG
#define RK808_THERMAL_REG
#define RK808_DCDC_EN_REG
#define RK808_LDO_EN_REG
#define RK808_SLEEP_SET_OFF_REG1
#define RK808_SLEEP_SET_OFF_REG2
#define RK808_DCDC_UV_STS_REG
#define RK808_DCDC_UV_ACT_REG
#define RK808_LDO_UV_STS_REG
#define RK808_LDO_UV_ACT_REG
#define RK808_DCDC_PG_REG
#define RK808_LDO_PG_REG
#define RK808_VOUT_MON_TDB_REG
#define RK808_BUCK1_CONFIG_REG
#define RK808_BUCK1_ON_VSEL_REG
#define RK808_BUCK1_SLP_VSEL_REG
#define RK808_BUCK1_DVS_VSEL_REG
#define RK808_BUCK2_CONFIG_REG
#define RK808_BUCK2_ON_VSEL_REG
#define RK808_BUCK2_SLP_VSEL_REG
#define RK808_BUCK2_DVS_VSEL_REG
#define RK808_BUCK3_CONFIG_REG
#define RK808_BUCK4_CONFIG_REG
#define RK808_BUCK4_ON_VSEL_REG
#define RK808_BUCK4_SLP_VSEL_REG
#define RK808_BOOST_CONFIG_REG
#define RK808_LDO1_ON_VSEL_REG
#define RK808_LDO1_SLP_VSEL_REG
#define RK808_LDO2_ON_VSEL_REG
#define RK808_LDO2_SLP_VSEL_REG
#define RK808_LDO3_ON_VSEL_REG
#define RK808_LDO3_SLP_VSEL_REG
#define RK808_LDO4_ON_VSEL_REG
#define RK808_LDO4_SLP_VSEL_REG
#define RK808_LDO5_ON_VSEL_REG
#define RK808_LDO5_SLP_VSEL_REG
#define RK808_LDO6_ON_VSEL_REG
#define RK808_LDO6_SLP_VSEL_REG
#define RK808_LDO7_ON_VSEL_REG
#define RK808_LDO7_SLP_VSEL_REG
#define RK808_LDO8_ON_VSEL_REG
#define RK808_LDO8_SLP_VSEL_REG
#define RK808_DEVCTRL_REG
#define RK808_INT_STS_REG1
#define RK808_INT_STS_MSK_REG1
#define RK808_INT_STS_REG2
#define RK808_INT_STS_MSK_REG2
#define RK808_IO_POL_REG

/* RK816 */
enum rk816_reg {};

enum rk816_irqs {};

/* power channel registers */
#define RK816_DCDC_EN_REG1

#define RK816_DCDC_EN_REG2
#define RK816_BOOST_EN
#define RK816_OTG_EN
#define RK816_BOOST_EN_MSK
#define RK816_OTG_EN_MSK
#define RK816_BUCK_DVS_CONFIRM

#define RK816_LDO_EN_REG1

#define RK816_LDO_EN_REG2

/* interrupt registers and irq definitions */
#define RK816_INT_STS_REG1
#define RK816_INT_STS_MSK_REG1
#define RK816_INT_STS_PWRON_FALL
#define RK816_INT_STS_PWRON_RISE

#define RK816_INT_STS_REG2
#define RK816_INT_STS_MSK_REG2
#define RK816_INT_STS_VB_LOW
#define RK816_INT_STS_PWRON
#define RK816_INT_STS_PWRON_LP
#define RK816_INT_STS_HOTDIE
#define RK816_INT_STS_RTC_ALARM
#define RK816_INT_STS_RTC_PERIOD
#define RK816_INT_STS_USB_OV

#define RK816_INT_STS_REG3
#define RK816_INT_STS_MSK_REG3
#define RK816_INT_STS_PLUG_IN
#define RK816_INT_STS_PLUG_OUT
#define RK816_INT_STS_CHG_OK
#define RK816_INT_STS_CHG_TE
#define RK816_INT_STS_CHG_TS
#define RK816_INT_STS_CHG_CVTLIM
#define RK816_INT_STS_DISCHG_ILIM

#define RK816_IRQ_STS_OFFSET(x)
#define RK816_IRQ_MSK_OFFSET(x)

/* charger, boost and OTG registers */
#define RK816_OTG_BUCK_LDO_CONFIG_REG
#define RK816_CHRG_CONFIG_REG
#define RK816_BOOST_ON_VESL_REG
#define RK816_BOOST_SLP_VSEL_REG
#define RK816_CHRG_BOOST_CONFIG_REG
#define RK816_SUP_STS_REG
#define RK816_USB_CTRL_REG
#define RK816_CHRG_CTRL(x)
#define RK816_BAT_CTRL_REG
#define RK816_BAT_HTS_TS_REG
#define RK816_BAT_LTS_TS_REG

/* adc and fuel gauge registers */
#define RK816_TS_CTRL_REG
#define RK816_ADC_CTRL_REG
#define RK816_GGCON_REG
#define RK816_GGSTS_REG
#define RK816_ZERO_CUR_ADC_REGH
#define RK816_ZERO_CUR_ADC_REGL
#define RK816_GASCNT_CAL_REG(x)
#define RK816_GASCNT_REG(x)
#define RK816_BAT_CUR_AVG_REGH
#define RK816_BAT_CUR_AVG_REGL
#define RK816_TS_ADC_REGH
#define RK816_TS_ADC_REGL
#define RK816_USB_ADC_REGH
#define RK816_USB_ADC_REGL
#define RK816_BAT_OCV_REGH
#define RK816_BAT_OCV_REGL
#define RK816_BAT_VOL_REGH
#define RK816_BAT_VOL_REGL
#define RK816_RELAX_ENTRY_THRES_REGH
#define RK816_RELAX_ENTRY_THRES_REGL
#define RK816_RELAX_EXIT_THRES_REGH
#define RK816_RELAX_EXIT_THRES_REGL
#define RK816_RELAX_VOL1_REGH
#define RK816_RELAX_VOL1_REGL
#define RK816_RELAX_VOL2_REGH
#define RK816_RELAX_VOL2_REGL
#define RK816_RELAX_CUR1_REGH
#define RK816_RELAX_CUR1_REGL
#define RK816_RELAX_CUR2_REGH
#define RK816_RELAX_CUR2_REGL
#define RK816_CAL_OFFSET_REGH
#define RK816_CAL_OFFSET_REGL
#define RK816_NON_ACT_TIMER_CNT_REG
#define RK816_VCALIB0_REGH
#define RK816_VCALIB0_REGL
#define RK816_VCALIB1_REGH
#define RK816_VCALIB1_REGL
#define RK816_FCC_GASCNT_REG(x)
#define RK816_IOFFSET_REGH
#define RK816_IOFFSET_REGL
#define RK816_SLEEP_CON_SAMP_CUR_REG

/* general purpose data registers 0xe0 ~ 0xf2 */
#define RK816_DATA_REG(x)

/* RK818 */
#define RK818_DCDC1
#define RK818_LDO1
#define RK818_NUM_REGULATORS

enum rk818_reg {};

#define RK818_DCDC_EN_REG
#define RK818_LDO_EN_REG
#define RK818_SLEEP_SET_OFF_REG1
#define RK818_SLEEP_SET_OFF_REG2
#define RK818_DCDC_UV_STS_REG
#define RK818_DCDC_UV_ACT_REG
#define RK818_LDO_UV_STS_REG
#define RK818_LDO_UV_ACT_REG
#define RK818_DCDC_PG_REG
#define RK818_LDO_PG_REG
#define RK818_VOUT_MON_TDB_REG
#define RK818_BUCK1_CONFIG_REG
#define RK818_BUCK1_ON_VSEL_REG
#define RK818_BUCK1_SLP_VSEL_REG
#define RK818_BUCK2_CONFIG_REG
#define RK818_BUCK2_ON_VSEL_REG
#define RK818_BUCK2_SLP_VSEL_REG
#define RK818_BUCK3_CONFIG_REG
#define RK818_BUCK4_CONFIG_REG
#define RK818_BUCK4_ON_VSEL_REG
#define RK818_BUCK4_SLP_VSEL_REG
#define RK818_BOOST_CONFIG_REG
#define RK818_LDO1_ON_VSEL_REG
#define RK818_LDO1_SLP_VSEL_REG
#define RK818_LDO2_ON_VSEL_REG
#define RK818_LDO2_SLP_VSEL_REG
#define RK818_LDO3_ON_VSEL_REG
#define RK818_LDO3_SLP_VSEL_REG
#define RK818_LDO4_ON_VSEL_REG
#define RK818_LDO4_SLP_VSEL_REG
#define RK818_LDO5_ON_VSEL_REG
#define RK818_LDO5_SLP_VSEL_REG
#define RK818_LDO6_ON_VSEL_REG
#define RK818_LDO6_SLP_VSEL_REG
#define RK818_LDO7_ON_VSEL_REG
#define RK818_LDO7_SLP_VSEL_REG
#define RK818_LDO8_ON_VSEL_REG
#define RK818_LDO8_SLP_VSEL_REG
#define RK818_BOOST_LDO9_ON_VSEL_REG
#define RK818_BOOST_LDO9_SLP_VSEL_REG
#define RK818_DEVCTRL_REG
#define RK818_INT_STS_REG1
#define RK818_INT_STS_MSK_REG1
#define RK818_INT_STS_REG2
#define RK818_INT_STS_MSK_REG2
#define RK818_IO_POL_REG
#define RK818_H5V_EN_REG
#define RK818_SLEEP_SET_OFF_REG3
#define RK818_BOOST_LDO9_ON_VSEL_REG
#define RK818_BOOST_LDO9_SLP_VSEL_REG
#define RK818_BOOST_CTRL_REG
#define RK818_DCDC_ILMAX
#define RK818_USB_CTRL_REG

#define RK818_H5V_EN
#define RK818_REF_RDY_CTRL
#define RK818_USB_ILIM_SEL_MASK
#define RK818_USB_ILMIN_2000MA
#define RK818_USB_CHG_SD_VSEL_MASK

/* RK805 */
enum rk805_reg {};

/* CONFIG REGISTER */
#define RK805_VB_MON_REG
#define RK805_THERMAL_REG

/* POWER CHANNELS ENABLE REGISTER */
#define RK805_DCDC_EN_REG
#define RK805_SLP_DCDC_EN_REG
#define RK805_SLP_LDO_EN_REG
#define RK805_LDO_EN_REG

/* BUCK AND LDO CONFIG REGISTER */
#define RK805_BUCK_LDO_SLP_LP_EN_REG
#define RK805_BUCK1_CONFIG_REG
#define RK805_BUCK1_ON_VSEL_REG
#define RK805_BUCK1_SLP_VSEL_REG
#define RK805_BUCK2_CONFIG_REG
#define RK805_BUCK2_ON_VSEL_REG
#define RK805_BUCK2_SLP_VSEL_REG
#define RK805_BUCK3_CONFIG_REG
#define RK805_BUCK4_CONFIG_REG
#define RK805_BUCK4_ON_VSEL_REG
#define RK805_BUCK4_SLP_VSEL_REG
#define RK805_LDO1_ON_VSEL_REG
#define RK805_LDO1_SLP_VSEL_REG
#define RK805_LDO2_ON_VSEL_REG
#define RK805_LDO2_SLP_VSEL_REG
#define RK805_LDO3_ON_VSEL_REG
#define RK805_LDO3_SLP_VSEL_REG

/* INTERRUPT REGISTER */
#define RK805_PWRON_LP_INT_TIME_REG
#define RK805_PWRON_DB_REG
#define RK805_DEV_CTRL_REG
#define RK805_INT_STS_REG
#define RK805_INT_STS_MSK_REG
#define RK805_GPIO_IO_POL_REG
#define RK805_OUT_REG
#define RK805_ON_SOURCE_REG
#define RK805_OFF_SOURCE_REG

#define RK805_NUM_REGULATORS

#define RK805_PWRON_FALL_RISE_INT_EN
#define RK805_PWRON_FALL_RISE_INT_MSK

/* RK805 IRQ Definitions */
#define RK805_IRQ_PWRON_RISE
#define RK805_IRQ_VB_LOW
#define RK805_IRQ_PWRON
#define RK805_IRQ_PWRON_LP
#define RK805_IRQ_HOTDIE
#define RK805_IRQ_RTC_ALARM
#define RK805_IRQ_RTC_PERIOD
#define RK805_IRQ_PWRON_FALL

#define RK805_IRQ_PWRON_RISE_MSK
#define RK805_IRQ_VB_LOW_MSK
#define RK805_IRQ_PWRON_MSK
#define RK805_IRQ_PWRON_LP_MSK
#define RK805_IRQ_HOTDIE_MSK
#define RK805_IRQ_RTC_ALARM_MSK
#define RK805_IRQ_RTC_PERIOD_MSK
#define RK805_IRQ_PWRON_FALL_MSK

#define RK805_PWR_RISE_INT_STATUS
#define RK805_VB_LOW_INT_STATUS
#define RK805_PWRON_INT_STATUS
#define RK805_PWRON_LP_INT_STATUS
#define RK805_HOTDIE_INT_STATUS
#define RK805_ALARM_INT_STATUS
#define RK805_PERIOD_INT_STATUS
#define RK805_PWR_FALL_INT_STATUS

#define RK805_BUCK1_2_ILMAX_MASK
#define RK805_BUCK3_4_ILMAX_MASK
#define RK805_RTC_PERIOD_INT_MASK
#define RK805_RTC_ALARM_INT_MASK
#define RK805_INT_ALARM_EN
#define RK805_INT_TIMER_EN

/* RK806 */
#define RK806_POWER_EN0
#define RK806_POWER_EN1
#define RK806_POWER_EN2
#define RK806_POWER_EN3
#define RK806_POWER_EN4
#define RK806_POWER_EN5
#define RK806_POWER_SLP_EN0
#define RK806_POWER_SLP_EN1
#define RK806_POWER_SLP_EN2
#define RK806_POWER_DISCHRG_EN0
#define RK806_POWER_DISCHRG_EN1
#define RK806_POWER_DISCHRG_EN2
#define RK806_BUCK_FB_CONFIG
#define RK806_SLP_LP_CONFIG
#define RK806_POWER_FPWM_EN0
#define RK806_POWER_FPWM_EN1
#define RK806_BUCK1_CONFIG
#define RK806_BUCK2_CONFIG
#define RK806_BUCK3_CONFIG
#define RK806_BUCK4_CONFIG
#define RK806_BUCK5_CONFIG
#define RK806_BUCK6_CONFIG
#define RK806_BUCK7_CONFIG
#define RK806_BUCK8_CONFIG
#define RK806_BUCK9_CONFIG
#define RK806_BUCK10_CONFIG
#define RK806_BUCK1_ON_VSEL
#define RK806_BUCK2_ON_VSEL
#define RK806_BUCK3_ON_VSEL
#define RK806_BUCK4_ON_VSEL
#define RK806_BUCK5_ON_VSEL
#define RK806_BUCK6_ON_VSEL
#define RK806_BUCK7_ON_VSEL
#define RK806_BUCK8_ON_VSEL
#define RK806_BUCK9_ON_VSEL
#define RK806_BUCK10_ON_VSEL
#define RK806_BUCK1_SLP_VSEL
#define RK806_BUCK2_SLP_VSEL
#define RK806_BUCK3_SLP_VSEL
#define RK806_BUCK4_SLP_VSEL
#define RK806_BUCK5_SLP_VSEL
#define RK806_BUCK6_SLP_VSEL
#define RK806_BUCK7_SLP_VSEL
#define RK806_BUCK8_SLP_VSEL
#define RK806_BUCK9_SLP_VSEL
#define RK806_BUCK10_SLP_VSEL
#define RK806_BUCK_DEBUG1
#define RK806_BUCK_DEBUG2
#define RK806_BUCK_DEBUG3
#define RK806_BUCK_DEBUG4
#define RK806_BUCK_DEBUG5
#define RK806_BUCK_DEBUG6
#define RK806_BUCK_DEBUG7
#define RK806_BUCK_DEBUG8
#define RK806_BUCK_DEBUG9
#define RK806_BUCK_DEBUG10
#define RK806_BUCK_DEBUG11
#define RK806_BUCK_DEBUG12
#define RK806_BUCK_DEBUG13
#define RK806_BUCK_DEBUG14
#define RK806_BUCK_DEBUG15
#define RK806_BUCK_DEBUG16
#define RK806_BUCK_DEBUG17
#define RK806_BUCK_DEBUG18
#define RK806_NLDO_IMAX
#define RK806_NLDO1_ON_VSEL
#define RK806_NLDO2_ON_VSEL
#define RK806_NLDO3_ON_VSEL
#define RK806_NLDO4_ON_VSEL
#define RK806_NLDO5_ON_VSEL
#define RK806_NLDO1_SLP_VSEL
#define RK806_NLDO2_SLP_VSEL
#define RK806_NLDO3_SLP_VSEL
#define RK806_NLDO4_SLP_VSEL
#define RK806_NLDO5_SLP_VSEL
#define RK806_PLDO_IMAX
#define RK806_PLDO1_ON_VSEL
#define RK806_PLDO2_ON_VSEL
#define RK806_PLDO3_ON_VSEL
#define RK806_PLDO4_ON_VSEL
#define RK806_PLDO5_ON_VSEL
#define RK806_PLDO6_ON_VSEL
#define RK806_PLDO1_SLP_VSEL
#define RK806_PLDO2_SLP_VSEL
#define RK806_PLDO3_SLP_VSEL
#define RK806_PLDO4_SLP_VSEL
#define RK806_PLDO5_SLP_VSEL
#define RK806_PLDO6_SLP_VSEL
#define RK806_CHIP_NAME
#define RK806_CHIP_VER
#define RK806_OTP_VER
#define RK806_SYS_STS
#define RK806_SYS_CFG0
#define RK806_SYS_CFG1
#define RK806_SYS_OPTION
#define RK806_SLEEP_CONFIG0
#define RK806_SLEEP_CONFIG1
#define RK806_SLEEP_CTR_SEL0
#define RK806_SLEEP_CTR_SEL1
#define RK806_SLEEP_CTR_SEL2
#define RK806_SLEEP_CTR_SEL3
#define RK806_SLEEP_CTR_SEL4
#define RK806_SLEEP_CTR_SEL5
#define RK806_DVS_CTRL_SEL0
#define RK806_DVS_CTRL_SEL1
#define RK806_DVS_CTRL_SEL2
#define RK806_DVS_CTRL_SEL3
#define RK806_DVS_CTRL_SEL4
#define RK806_DVS_CTRL_SEL5
#define RK806_DVS_START_CTRL
#define RK806_SLEEP_GPIO
#define RK806_SYS_CFG3
#define RK806_ON_SOURCE
#define RK806_OFF_SOURCE
#define RK806_PWRON_KEY
#define RK806_INT_STS0
#define RK806_INT_MSK0
#define RK806_INT_STS1
#define RK806_INT_MSK1
#define RK806_GPIO_INT_CONFIG
#define RK806_DATA_REG0
#define RK806_DATA_REG1
#define RK806_DATA_REG2
#define RK806_DATA_REG3
#define RK806_DATA_REG4
#define RK806_DATA_REG5
#define RK806_DATA_REG6
#define RK806_DATA_REG7
#define RK806_DATA_REG8
#define RK806_DATA_REG9
#define RK806_DATA_REG10
#define RK806_DATA_REG11
#define RK806_DATA_REG12
#define RK806_DATA_REG13
#define RK806_DATA_REG14
#define RK806_DATA_REG15
#define RK806_TM_REG
#define RK806_OTP_EN_REG
#define RK806_FUNC_OTP_EN_REG
#define RK806_TEST_REG1
#define RK806_TEST_REG2
#define RK806_TEST_REG3
#define RK806_TEST_REG4
#define RK806_TEST_REG5
#define RK806_BUCK_VSEL_OTP_REG0
#define RK806_BUCK_VSEL_OTP_REG1
#define RK806_BUCK_VSEL_OTP_REG2
#define RK806_BUCK_VSEL_OTP_REG3
#define RK806_BUCK_VSEL_OTP_REG4
#define RK806_BUCK_VSEL_OTP_REG5
#define RK806_BUCK_VSEL_OTP_REG6
#define RK806_BUCK_VSEL_OTP_REG7
#define RK806_BUCK_VSEL_OTP_REG8
#define RK806_BUCK_VSEL_OTP_REG9
#define RK806_NLDO1_VSEL_OTP_REG0
#define RK806_NLDO1_VSEL_OTP_REG1
#define RK806_NLDO1_VSEL_OTP_REG2
#define RK806_NLDO1_VSEL_OTP_REG3
#define RK806_NLDO1_VSEL_OTP_REG4
#define RK806_PLDO_VSEL_OTP_REG0
#define RK806_PLDO_VSEL_OTP_REG1
#define RK806_PLDO_VSEL_OTP_REG2
#define RK806_PLDO_VSEL_OTP_REG3
#define RK806_PLDO_VSEL_OTP_REG4
#define RK806_PLDO_VSEL_OTP_REG5
#define RK806_BUCK_EN_OTP_REG1
#define RK806_NLDO_EN_OTP_REG1
#define RK806_PLDO_EN_OTP_REG1
#define RK806_BUCK_FB_RES_OTP_REG1
#define RK806_OTP_RESEV_REG0
#define RK806_OTP_RESEV_REG1
#define RK806_OTP_RESEV_REG2
#define RK806_OTP_RESEV_REG3
#define RK806_OTP_RESEV_REG4
#define RK806_BUCK_SEQ_REG0
#define RK806_BUCK_SEQ_REG1
#define RK806_BUCK_SEQ_REG2
#define RK806_BUCK_SEQ_REG3
#define RK806_BUCK_SEQ_REG4
#define RK806_BUCK_SEQ_REG5
#define RK806_BUCK_SEQ_REG6
#define RK806_BUCK_SEQ_REG7
#define RK806_BUCK_SEQ_REG8
#define RK806_BUCK_SEQ_REG9
#define RK806_BUCK_SEQ_REG10
#define RK806_BUCK_SEQ_REG11
#define RK806_BUCK_SEQ_REG12
#define RK806_BUCK_SEQ_REG13
#define RK806_BUCK_SEQ_REG14
#define RK806_BUCK_SEQ_REG15
#define RK806_BUCK_SEQ_REG16
#define RK806_BUCK_SEQ_REG17
#define RK806_HK_TRIM_REG1
#define RK806_HK_TRIM_REG2
#define RK806_BUCK_REF_TRIM_REG1
#define RK806_BUCK_REF_TRIM_REG2
#define RK806_BUCK_REF_TRIM_REG3
#define RK806_BUCK_REF_TRIM_REG4
#define RK806_BUCK_REF_TRIM_REG5
#define RK806_BUCK_OSC_TRIM_REG1
#define RK806_BUCK_OSC_TRIM_REG2
#define RK806_BUCK_OSC_TRIM_REG3
#define RK806_BUCK_OSC_TRIM_REG4
#define RK806_BUCK_OSC_TRIM_REG5
#define RK806_BUCK_TRIM_ZCDIOS_REG1
#define RK806_BUCK_TRIM_ZCDIOS_REG2
#define RK806_NLDO_TRIM_REG1
#define RK806_NLDO_TRIM_REG2
#define RK806_NLDO_TRIM_REG3
#define RK806_PLDO_TRIM_REG1
#define RK806_PLDO_TRIM_REG2
#define RK806_PLDO_TRIM_REG3
#define RK806_TRIM_ICOMP_REG1
#define RK806_TRIM_ICOMP_REG2
#define RK806_EFUSE_CONTROL_REGH
#define RK806_FUSE_PROG_REG
#define RK806_MAIN_FSM_STS_REG
#define RK806_FSM_REG
#define RK806_TOP_RESEV_OFFR
#define RK806_TOP_RESEV_POR
#define RK806_BUCK_VRSN_REG1
#define RK806_BUCK_VRSN_REG2
#define RK806_NLDO_RLOAD_SEL_REG1
#define RK806_PLDO_RLOAD_SEL_REG1
#define RK806_PLDO_RLOAD_SEL_REG2
#define RK806_BUCK_CMIN_MX_REG1
#define RK806_BUCK_CMIN_MX_REG2
#define RK806_BUCK_FREQ_SET_REG1
#define RK806_BUCK_FREQ_SET_REG2
#define RK806_BUCK_RS_MEABS_REG1
#define RK806_BUCK_RS_MEABS_REG2
#define RK806_BUCK_RS_ZDLEB_REG1
#define RK806_BUCK_RS_ZDLEB_REG2
#define RK806_BUCK_RSERVE_REG1
#define RK806_BUCK_RSERVE_REG2
#define RK806_BUCK_RSERVE_REG3
#define RK806_BUCK_RSERVE_REG4
#define RK806_BUCK_RSERVE_REG5

/* INT_STS Register field definitions */
#define RK806_INT_STS_PWRON_FALL
#define RK806_INT_STS_PWRON_RISE
#define RK806_INT_STS_PWRON
#define RK806_INT_STS_PWRON_LP
#define RK806_INT_STS_HOTDIE
#define RK806_INT_STS_VDC_RISE
#define RK806_INT_STS_VDC_FALL
#define RK806_INT_STS_VB_LO
#define RK806_INT_STS_REV0
#define RK806_INT_STS_REV1
#define RK806_INT_STS_REV2
#define RK806_INT_STS_CRC_ERROR
#define RK806_INT_STS_SLP3_GPIO
#define RK806_INT_STS_SLP2_GPIO
#define RK806_INT_STS_SLP1_GPIO
#define RK806_INT_STS_WDT

/* SPI command */
#define RK806_CMD_READ
#define RK806_CMD_WRITE
#define RK806_CMD_CRC_EN
#define RK806_CMD_CRC_DIS
#define RK806_CMD_LEN_MSK
#define RK806_REG_H

#define VERSION_AB

enum rk806_reg_id {};

/* Define the RK806 IRQ numbers */
enum rk806_irqs {};

/* VCC1 Low Voltage Threshold */
enum rk806_lv_sel {};

/* System Shutdown Voltage Select */
enum rk806_uv_sel {};

/* Pin Function */
enum rk806_pwrctrl_fun {};

/* Pin Polarity */
enum rk806_pin_level {};

enum rk806_vsel_ctr_sel {};

enum rk806_dvs_ctr_sel {};

enum rk806_pin_dr_sel {};

#define RK806_INT_POL_MSK
#define RK806_INT_POL_H
#define RK806_INT_POL_L

#define RK806_SLAVE_RESTART_FUN_MSK
#define RK806_SLAVE_RESTART_FUN_EN
#define RK806_SLAVE_RESTART_FUN_OFF

#define RK806_SYS_ENB2_2M_MSK
#define RK806_SYS_ENB2_2M_EN
#define RK806_SYS_ENB2_2M_OFF

enum rk806_int_fun {};

enum rk806_dvs_mode {};

/* RK808 IRQ Definitions */
#define RK808_IRQ_VOUT_LO
#define RK808_IRQ_VB_LO
#define RK808_IRQ_PWRON
#define RK808_IRQ_PWRON_LP
#define RK808_IRQ_HOTDIE
#define RK808_IRQ_RTC_ALARM
#define RK808_IRQ_RTC_PERIOD
#define RK808_IRQ_PLUG_IN_INT
#define RK808_IRQ_PLUG_OUT_INT
#define RK808_NUM_IRQ

#define RK808_IRQ_VOUT_LO_MSK
#define RK808_IRQ_VB_LO_MSK
#define RK808_IRQ_PWRON_MSK
#define RK808_IRQ_PWRON_LP_MSK
#define RK808_IRQ_HOTDIE_MSK
#define RK808_IRQ_RTC_ALARM_MSK
#define RK808_IRQ_RTC_PERIOD_MSK
#define RK808_IRQ_PLUG_IN_INT_MSK
#define RK808_IRQ_PLUG_OUT_INT_MSK

/* RK818 IRQ Definitions */
#define RK818_IRQ_VOUT_LO
#define RK818_IRQ_VB_LO
#define RK818_IRQ_PWRON
#define RK818_IRQ_PWRON_LP
#define RK818_IRQ_HOTDIE
#define RK818_IRQ_RTC_ALARM
#define RK818_IRQ_RTC_PERIOD
#define RK818_IRQ_USB_OV
#define RK818_IRQ_PLUG_IN
#define RK818_IRQ_PLUG_OUT
#define RK818_IRQ_CHG_OK
#define RK818_IRQ_CHG_TE
#define RK818_IRQ_CHG_TS1
#define RK818_IRQ_TS2
#define RK818_IRQ_CHG_CVTLIM
#define RK818_IRQ_DISCHG_ILIM

#define RK818_IRQ_VOUT_LO_MSK
#define RK818_IRQ_VB_LO_MSK
#define RK818_IRQ_PWRON_MSK
#define RK818_IRQ_PWRON_LP_MSK
#define RK818_IRQ_HOTDIE_MSK
#define RK818_IRQ_RTC_ALARM_MSK
#define RK818_IRQ_RTC_PERIOD_MSK
#define RK818_IRQ_USB_OV_MSK
#define RK818_IRQ_PLUG_IN_MSK
#define RK818_IRQ_PLUG_OUT_MSK
#define RK818_IRQ_CHG_OK_MSK
#define RK818_IRQ_CHG_TE_MSK
#define RK818_IRQ_CHG_TS1_MSK
#define RK818_IRQ_TS2_MSK
#define RK818_IRQ_CHG_CVTLIM_MSK
#define RK818_IRQ_DISCHG_ILIM_MSK

#define RK818_NUM_IRQ

#define RK808_VBAT_LOW_2V8
#define RK808_VBAT_LOW_2V9
#define RK808_VBAT_LOW_3V0
#define RK808_VBAT_LOW_3V1
#define RK808_VBAT_LOW_3V2
#define RK808_VBAT_LOW_3V3
#define RK808_VBAT_LOW_3V4
#define RK808_VBAT_LOW_3V5
#define VBAT_LOW_VOL_MASK
#define EN_VABT_LOW_SHUT_DOWN
#define EN_VBAT_LOW_IRQ
#define VBAT_LOW_ACT_MASK

#define BUCK_ILMIN_MASK
#define BOOST_ILMIN_MASK
#define BUCK1_RATE_MASK
#define BUCK2_RATE_MASK
#define MASK_ALL

#define BUCK_UV_ACT_MASK
#define BUCK_UV_ACT_DISABLE

#define SWITCH2_EN
#define SWITCH1_EN
#define DEV_OFF_RST
#define DEV_RST
#define DEV_OFF
#define RTC_STOP

#define VB_LO_ACT
#define VB_LO_SEL_3500MV

#define VOUT_LO_INT
#define CLK32KOUT2_EN

#define TEMP105C
#define TEMP115C
#define TEMP_HOTDIE_MSK
#define SLP_SD_MSK
#define SHUTDOWN_FUN
#define SLEEP_FUN
#define RK8XX_ID_MSK
#define PWM_MODE_MSK
#define FPWM_MODE
#define AUTO_PWM_MODE

enum rk817_reg_id {};

enum rk809_reg_id {};

#define RK817_SECONDS_REG
#define RK817_MINUTES_REG
#define RK817_HOURS_REG
#define RK817_DAYS_REG
#define RK817_MONTHS_REG
#define RK817_YEARS_REG
#define RK817_WEEKS_REG
#define RK817_ALARM_SECONDS_REG
#define RK817_ALARM_MINUTES_REG
#define RK817_ALARM_HOURS_REG
#define RK817_ALARM_DAYS_REG
#define RK817_ALARM_MONTHS_REG
#define RK817_ALARM_YEARS_REG
#define RK817_RTC_CTRL_REG
#define RK817_RTC_STATUS_REG
#define RK817_RTC_INT_REG
#define RK817_RTC_COMP_LSB_REG
#define RK817_RTC_COMP_MSB_REG

/* RK817 Codec Registers */
#define RK817_CODEC_DTOP_VUCTL
#define RK817_CODEC_DTOP_VUCTIME
#define RK817_CODEC_DTOP_LPT_SRST
#define RK817_CODEC_DTOP_DIGEN_CLKE
#define RK817_CODEC_AREF_RTCFG0
#define RK817_CODEC_AREF_RTCFG1
#define RK817_CODEC_AADC_CFG0
#define RK817_CODEC_AADC_CFG1
#define RK817_CODEC_DADC_VOLL
#define RK817_CODEC_DADC_VOLR
#define RK817_CODEC_DADC_SR_ACL0
#define RK817_CODEC_DADC_ALC1
#define RK817_CODEC_DADC_ALC2
#define RK817_CODEC_DADC_NG
#define RK817_CODEC_DADC_HPF
#define RK817_CODEC_DADC_RVOLL
#define RK817_CODEC_DADC_RVOLR
#define RK817_CODEC_AMIC_CFG0
#define RK817_CODEC_AMIC_CFG1
#define RK817_CODEC_DMIC_PGA_GAIN
#define RK817_CODEC_DMIC_LMT1
#define RK817_CODEC_DMIC_LMT2
#define RK817_CODEC_DMIC_NG1
#define RK817_CODEC_DMIC_NG2
#define RK817_CODEC_ADAC_CFG0
#define RK817_CODEC_ADAC_CFG1
#define RK817_CODEC_DDAC_POPD_DACST
#define RK817_CODEC_DDAC_VOLL
#define RK817_CODEC_DDAC_VOLR
#define RK817_CODEC_DDAC_SR_LMT0
#define RK817_CODEC_DDAC_LMT1
#define RK817_CODEC_DDAC_LMT2
#define RK817_CODEC_DDAC_MUTE_MIXCTL
#define RK817_CODEC_DDAC_RVOLL
#define RK817_CODEC_DDAC_RVOLR
#define RK817_CODEC_AHP_ANTI0
#define RK817_CODEC_AHP_ANTI1
#define RK817_CODEC_AHP_CFG0
#define RK817_CODEC_AHP_CFG1
#define RK817_CODEC_AHP_CP
#define RK817_CODEC_ACLASSD_CFG1
#define RK817_CODEC_ACLASSD_CFG2
#define RK817_CODEC_APLL_CFG0
#define RK817_CODEC_APLL_CFG1
#define RK817_CODEC_APLL_CFG2
#define RK817_CODEC_APLL_CFG3
#define RK817_CODEC_APLL_CFG4
#define RK817_CODEC_APLL_CFG5
#define RK817_CODEC_DI2S_CKM
#define RK817_CODEC_DI2S_RSD
#define RK817_CODEC_DI2S_RXCR1
#define RK817_CODEC_DI2S_RXCR2
#define RK817_CODEC_DI2S_RXCMD_TSD
#define RK817_CODEC_DI2S_TXCR1
#define RK817_CODEC_DI2S_TXCR2
#define RK817_CODEC_DI2S_TXCR3_TXCMD

/* RK817_CODEC_DI2S_CKM */
#define RK817_I2S_MODE_MASK
#define RK817_I2S_MODE_MST
#define RK817_I2S_MODE_SLV

/* RK817_CODEC_DDAC_MUTE_MIXCTL */
#define DACMT_MASK
#define DACMT_ENABLE
#define DACMT_DISABLE

/* RK817_CODEC_DI2S_RXCR2 */
#define VDW_RX_24BITS
#define VDW_RX_16BITS

/* RK817_CODEC_DI2S_TXCR2 */
#define VDW_TX_24BITS
#define VDW_TX_16BITS

/* RK817_CODEC_AMIC_CFG0 */
#define MIC_DIFF_MASK
#define MIC_DIFF_DIS
#define MIC_DIFF_EN

/* RK817 Battery Registers */
#define RK817_GAS_GAUGE_ADC_CONFIG0
#define RK817_GG_EN
#define RK817_SYS_VOL_ADC_EN
#define RK817_TS_ADC_EN
#define RK817_USB_VOL_ADC_EN
#define RK817_BAT_VOL_ADC_EN
#define RK817_BAT_CUR_ADC_EN

#define RK817_GAS_GAUGE_ADC_CONFIG1

#define RK817_VOL_CUR_CALIB_UPD

#define RK817_GAS_GAUGE_GG_CON
#define RK817_GAS_GAUGE_GG_STS

#define RK817_BAT_CON
#define RK817_RELAX_VOL_UPD
#define RK817_RELAX_STS

#define RK817_GAS_GAUGE_RELAX_THRE_H
#define RK817_GAS_GAUGE_RELAX_THRE_L
#define RK817_GAS_GAUGE_OCV_THRE_VOL
#define RK817_GAS_GAUGE_OCV_VOL_H
#define RK817_GAS_GAUGE_OCV_VOL_L
#define RK817_GAS_GAUGE_PWRON_VOL_H
#define RK817_GAS_GAUGE_PWRON_VOL_L
#define RK817_GAS_GAUGE_PWRON_CUR_H
#define RK817_GAS_GAUGE_PWRON_CUR_L
#define RK817_GAS_GAUGE_OFF_CNT
#define RK817_GAS_GAUGE_Q_INIT_H3
#define RK817_GAS_GAUGE_Q_INIT_H2
#define RK817_GAS_GAUGE_Q_INIT_L1
#define RK817_GAS_GAUGE_Q_INIT_L0
#define RK817_GAS_GAUGE_Q_PRES_H3
#define RK817_GAS_GAUGE_Q_PRES_H2
#define RK817_GAS_GAUGE_Q_PRES_L1
#define RK817_GAS_GAUGE_Q_PRES_L0
#define RK817_GAS_GAUGE_BAT_VOL_H
#define RK817_GAS_GAUGE_BAT_VOL_L
#define RK817_GAS_GAUGE_BAT_CUR_H
#define RK817_GAS_GAUGE_BAT_CUR_L
#define RK817_GAS_GAUGE_USB_VOL_H
#define RK817_GAS_GAUGE_USB_VOL_L
#define RK817_GAS_GAUGE_SYS_VOL_H
#define RK817_GAS_GAUGE_SYS_VOL_L
#define RK817_GAS_GAUGE_Q_MAX_H3
#define RK817_GAS_GAUGE_Q_MAX_H2
#define RK817_GAS_GAUGE_Q_MAX_L1
#define RK817_GAS_GAUGE_Q_MAX_L0
#define RK817_GAS_GAUGE_SLEEP_CON_SAMP_CUR_H
#define RK817_GAS_GAUGE_SLEEP_CON_SAMP_CUR_L
#define RK817_GAS_GAUGE_CAL_OFFSET_H
#define RK817_GAS_GAUGE_CAL_OFFSET_L
#define RK817_GAS_GAUGE_VCALIB0_H
#define RK817_GAS_GAUGE_VCALIB0_L
#define RK817_GAS_GAUGE_VCALIB1_H
#define RK817_GAS_GAUGE_VCALIB1_L
#define RK817_GAS_GAUGE_IOFFSET_H
#define RK817_GAS_GAUGE_IOFFSET_L
#define RK817_GAS_GAUGE_BAT_R1
#define RK817_GAS_GAUGE_BAT_R2
#define RK817_GAS_GAUGE_BAT_R3
#define RK817_GAS_GAUGE_DATA0
#define RK817_GAS_GAUGE_DATA1
#define RK817_GAS_GAUGE_DATA2
#define RK817_GAS_GAUGE_DATA3
#define RK817_GAS_GAUGE_DATA4
#define RK817_GAS_GAUGE_DATA5
#define RK817_GAS_GAUGE_CUR_ADC_K0

#define RK817_POWER_EN_REG(i)
#define RK817_POWER_SLP_EN_REG(i)

#define RK817_POWER_CONFIG

#define RK817_BUCK_CONFIG_REG(i)

#define RK817_BUCK1_ON_VSEL_REG
#define RK817_BUCK1_SLP_VSEL_REG

#define RK817_BUCK2_CONFIG_REG
#define RK817_BUCK2_ON_VSEL_REG
#define RK817_BUCK2_SLP_VSEL_REG

#define RK817_BUCK3_CONFIG_REG
#define RK817_BUCK3_ON_VSEL_REG
#define RK817_BUCK3_SLP_VSEL_REG

#define RK817_BUCK4_CONFIG_REG
#define RK817_BUCK4_ON_VSEL_REG
#define RK817_BUCK4_SLP_VSEL_REG

#define RK817_LDO_ON_VSEL_REG(idx)
#define RK817_BOOST_OTG_CFG

#define RK817_PMIC_CHRG_OUT
#define RK817_CHRG_VOL_SEL
#define RK817_CHRG_CUR_SEL

#define RK817_PMIC_CHRG_IN
#define RK817_USB_VLIM_EN
#define RK817_USB_VLIM_SEL
#define RK817_USB_ILIM_EN
#define RK817_USB_ILIM_SEL
#define RK817_PMIC_CHRG_TERM
#define RK817_CHRG_TERM_ANA_DIG
#define RK817_CHRG_TERM_ANA_SEL
#define RK817_CHRG_EN

#define RK817_PMIC_CHRG_STS
#define RK817_BAT_EXS
#define RK817_CHG_STS

#define RK817_ID_MSB
#define RK817_ID_LSB

#define RK817_SYS_STS
#define RK817_PLUG_IN_STS

#define RK817_SYS_CFG(i)

#define RK817_ON_SOURCE_REG
#define RK817_OFF_SOURCE_REG

/* INTERRUPT REGISTER */
#define RK817_INT_STS_REG0
#define RK817_INT_STS_MSK_REG0
#define RK817_INT_STS_REG1
#define RK817_INT_STS_MSK_REG1
#define RK817_INT_STS_REG2
#define RK817_INT_STS_MSK_REG2
#define RK817_GPIO_INT_CFG

/* IRQ Definitions */
#define RK817_IRQ_PWRON_FALL
#define RK817_IRQ_PWRON_RISE
#define RK817_IRQ_PWRON
#define RK817_IRQ_PWMON_LP
#define RK817_IRQ_HOTDIE
#define RK817_IRQ_RTC_ALARM
#define RK817_IRQ_RTC_PERIOD
#define RK817_IRQ_VB_LO
#define RK817_IRQ_PLUG_IN
#define RK817_IRQ_PLUG_OUT
#define RK817_IRQ_CHRG_TERM
#define RK817_IRQ_CHRG_TIME
#define RK817_IRQ_CHRG_TS
#define RK817_IRQ_USB_OV
#define RK817_IRQ_CHRG_IN_CLMP
#define RK817_IRQ_BAT_DIS_ILIM
#define RK817_IRQ_GATE_GPIO
#define RK817_IRQ_TS_GPIO
#define RK817_IRQ_CODEC_PD
#define RK817_IRQ_CODEC_PO
#define RK817_IRQ_CLASSD_MUTE_DONE
#define RK817_IRQ_CLASSD_OCP
#define RK817_IRQ_BAT_OVP
#define RK817_IRQ_CHRG_BAT_HI
#define RK817_IRQ_END

/*
 * rtc_ctrl 0xd
 * same as 808, except bit4
 */
#define RK817_RTC_CTRL_RSV4

/* power config 0xb9 */
#define RK817_BUCK3_FB_RES_MSK
#define RK817_BUCK3_FB_RES_INTER
#define RK817_BUCK3_FB_RES_EXT

/* buck config 0xba */
#define RK817_RAMP_RATE_OFFSET
#define RK817_RAMP_RATE_MASK
#define RK817_RAMP_RATE_3MV_PER_US
#define RK817_RAMP_RATE_6_3MV_PER_US
#define RK817_RAMP_RATE_12_5MV_PER_US
#define RK817_RAMP_RATE_25MV_PER_US

/* sys_cfg1 0xf2 */
#define RK817_HOTDIE_TEMP_MSK
#define RK817_HOTDIE_85
#define RK817_HOTDIE_95
#define RK817_HOTDIE_105
#define RK817_HOTDIE_115

#define RK817_TSD_TEMP_MSK
#define RK817_TSD_140
#define RK817_TSD_160

#define RK817_CLK32KOUT2_EN

/* sys_cfg3 0xf4 */
#define RK817_SLPPIN_FUNC_MSK
#define SLPPIN_NULL_FUN
#define SLPPIN_SLP_FUN
#define SLPPIN_DN_FUN
#define SLPPIN_RST_FUN

#define RK817_RST_FUNC_MSK
#define RK817_RST_FUNC_SFT
#define RK817_RST_FUNC_CNT
#define RK817_RST_FUNC_DEV
#define RK817_RST_FUNC_REG

#define RK817_SLPPOL_MSK
#define RK817_SLPPOL_H
#define RK817_SLPPOL_L

/* gpio&int 0xfe */
#define RK817_INT_POL_MSK
#define RK817_INT_POL_H
#define RK817_INT_POL_L
#define RK809_BUCK5_CONFIG(i)

enum {};

enum {};

enum {};

enum {};

enum {};

enum {};

struct rk808 {};

void rk8xx_shutdown(struct device *dev);
int rk8xx_probe(struct device *dev, int variant, unsigned int irq, struct regmap *regmap);
int rk8xx_suspend(struct device *dev);
int rk8xx_resume(struct device *dev);

#endif /* __LINUX_REGULATOR_RK808_H */