linux/include/dt-bindings/iio/qcom,spmi-vadc.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2012-2014,2018,2020 The Linux Foundation. All rights reserved.
 */

#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_H
#define _DT_BINDINGS_QCOM_SPMI_VADC_H

/* Voltage ADC channels */
#define VADC_USBIN
#define VADC_DCIN
#define VADC_VCHG_SNS
#define VADC_SPARE1_03
#define VADC_USB_ID_MV
#define VADC_VCOIN
#define VADC_VBAT_SNS
#define VADC_VSYS
#define VADC_DIE_TEMP
#define VADC_REF_625MV
#define VADC_REF_1250MV
#define VADC_CHG_TEMP
#define VADC_SPARE1
#define VADC_SPARE2
#define VADC_GND_REF
#define VADC_VDD_VADC

#define VADC_P_MUX1_1_1
#define VADC_P_MUX2_1_1
#define VADC_P_MUX3_1_1
#define VADC_P_MUX4_1_1
#define VADC_P_MUX5_1_1
#define VADC_P_MUX6_1_1
#define VADC_P_MUX7_1_1
#define VADC_P_MUX8_1_1
#define VADC_P_MUX9_1_1
#define VADC_P_MUX10_1_1
#define VADC_P_MUX11_1_1
#define VADC_P_MUX12_1_1
#define VADC_P_MUX13_1_1
#define VADC_P_MUX14_1_1
#define VADC_P_MUX15_1_1
#define VADC_P_MUX16_1_1

#define VADC_P_MUX1_1_3
#define VADC_P_MUX2_1_3
#define VADC_P_MUX3_1_3
#define VADC_P_MUX4_1_3
#define VADC_P_MUX5_1_3
#define VADC_P_MUX6_1_3
#define VADC_P_MUX7_1_3
#define VADC_P_MUX8_1_3
#define VADC_P_MUX9_1_3
#define VADC_P_MUX10_1_3
#define VADC_P_MUX11_1_3
#define VADC_P_MUX12_1_3
#define VADC_P_MUX13_1_3
#define VADC_P_MUX14_1_3
#define VADC_P_MUX15_1_3
#define VADC_P_MUX16_1_3

#define VADC_LR_MUX1_BAT_THERM
#define VADC_LR_MUX2_BAT_ID
#define VADC_LR_MUX3_XO_THERM
#define VADC_LR_MUX4_AMUX_THM1
#define VADC_LR_MUX5_AMUX_THM2
#define VADC_LR_MUX6_AMUX_THM3
#define VADC_LR_MUX7_HW_ID
#define VADC_LR_MUX8_AMUX_THM4
#define VADC_LR_MUX9_AMUX_THM5
#define VADC_LR_MUX10_USB_ID
#define VADC_AMUX_PU1
#define VADC_AMUX_PU2
#define VADC_LR_MUX3_BUF_XO_THERM

#define VADC_LR_MUX1_PU1_BAT_THERM
#define VADC_LR_MUX2_PU1_BAT_ID
#define VADC_LR_MUX3_PU1_XO_THERM
#define VADC_LR_MUX4_PU1_AMUX_THM1
#define VADC_LR_MUX5_PU1_AMUX_THM2
#define VADC_LR_MUX6_PU1_AMUX_THM3
#define VADC_LR_MUX7_PU1_AMUX_HW_ID
#define VADC_LR_MUX8_PU1_AMUX_THM4
#define VADC_LR_MUX9_PU1_AMUX_THM5
#define VADC_LR_MUX10_PU1_AMUX_USB_ID
#define VADC_LR_MUX3_BUF_PU1_XO_THERM

#define VADC_LR_MUX1_PU2_BAT_THERM
#define VADC_LR_MUX2_PU2_BAT_ID
#define VADC_LR_MUX3_PU2_XO_THERM
#define VADC_LR_MUX4_PU2_AMUX_THM1
#define VADC_LR_MUX5_PU2_AMUX_THM2
#define VADC_LR_MUX6_PU2_AMUX_THM3
#define VADC_LR_MUX7_PU2_AMUX_HW_ID
#define VADC_LR_MUX8_PU2_AMUX_THM4
#define VADC_LR_MUX9_PU2_AMUX_THM5
#define VADC_LR_MUX10_PU2_AMUX_USB_ID
#define VADC_LR_MUX3_BUF_PU2_XO_THERM

#define VADC_LR_MUX1_PU1_PU2_BAT_THERM
#define VADC_LR_MUX2_PU1_PU2_BAT_ID
#define VADC_LR_MUX3_PU1_PU2_XO_THERM
#define VADC_LR_MUX4_PU1_PU2_AMUX_THM1
#define VADC_LR_MUX5_PU1_PU2_AMUX_THM2
#define VADC_LR_MUX6_PU1_PU2_AMUX_THM3
#define VADC_LR_MUX7_PU1_PU2_AMUX_HW_ID
#define VADC_LR_MUX8_PU1_PU2_AMUX_THM4
#define VADC_LR_MUX9_PU1_PU2_AMUX_THM5
#define VADC_LR_MUX10_PU1_PU2_AMUX_USB_ID
#define VADC_LR_MUX3_BUF_PU1_PU2_XO_THERM

/* ADC channels for SPMI PMIC5 */

#define ADC5_REF_GND
#define ADC5_1P25VREF
#define ADC5_VREF_VADC
#define ADC5_VREF_VADC5_DIV_3
#define ADC5_VPH_PWR
#define ADC5_VBAT_SNS
#define ADC5_VCOIN
#define ADC5_DIE_TEMP
#define ADC5_USB_IN_I
#define ADC5_USB_IN_V_16
#define ADC5_CHG_TEMP
#define ADC5_BAT_THERM
#define ADC5_BAT_ID
#define ADC5_XO_THERM
#define ADC5_AMUX_THM1
#define ADC5_AMUX_THM2
#define ADC5_AMUX_THM3
#define ADC5_AMUX_THM4
#define ADC5_AMUX_THM5
#define ADC5_GPIO1
#define ADC5_GPIO2
#define ADC5_GPIO3
#define ADC5_GPIO4
#define ADC5_GPIO5
#define ADC5_GPIO6
#define ADC5_GPIO7
#define ADC5_SBUx
#define ADC5_MID_CHG_DIV6
#define ADC5_OFF

/* 30k pull-up1 */
#define ADC5_BAT_THERM_30K_PU
#define ADC5_BAT_ID_30K_PU
#define ADC5_XO_THERM_30K_PU
#define ADC5_AMUX_THM1_30K_PU
#define ADC5_AMUX_THM2_30K_PU
#define ADC5_AMUX_THM3_30K_PU
#define ADC5_AMUX_THM4_30K_PU
#define ADC5_AMUX_THM5_30K_PU
#define ADC5_GPIO1_30K_PU
#define ADC5_GPIO2_30K_PU
#define ADC5_GPIO3_30K_PU
#define ADC5_GPIO4_30K_PU
#define ADC5_GPIO5_30K_PU
#define ADC5_GPIO6_30K_PU
#define ADC5_GPIO7_30K_PU
#define ADC5_SBUx_30K_PU

/* 100k pull-up2 */
#define ADC5_BAT_THERM_100K_PU
#define ADC5_BAT_ID_100K_PU
#define ADC5_XO_THERM_100K_PU
#define ADC5_AMUX_THM1_100K_PU
#define ADC5_AMUX_THM2_100K_PU
#define ADC5_AMUX_THM3_100K_PU
#define ADC5_AMUX_THM4_100K_PU
#define ADC5_AMUX_THM5_100K_PU
#define ADC5_GPIO1_100K_PU
#define ADC5_GPIO2_100K_PU
#define ADC5_GPIO3_100K_PU
#define ADC5_GPIO4_100K_PU
#define ADC5_GPIO5_100K_PU
#define ADC5_GPIO6_100K_PU
#define ADC5_GPIO7_100K_PU
#define ADC5_SBUx_100K_PU

/* 400k pull-up3 */
#define ADC5_BAT_THERM_400K_PU
#define ADC5_BAT_ID_400K_PU
#define ADC5_XO_THERM_400K_PU
#define ADC5_AMUX_THM1_400K_PU
#define ADC5_AMUX_THM2_400K_PU
#define ADC5_AMUX_THM3_400K_PU
#define ADC5_AMUX_THM4_400K_PU
#define ADC5_AMUX_THM5_400K_PU
#define ADC5_GPIO1_400K_PU
#define ADC5_GPIO2_400K_PU
#define ADC5_GPIO3_400K_PU
#define ADC5_GPIO4_400K_PU
#define ADC5_GPIO5_400K_PU
#define ADC5_GPIO6_400K_PU
#define ADC5_GPIO7_400K_PU
#define ADC5_SBUx_400K_PU

/* 1/3 Divider */
#define ADC5_GPIO1_DIV3
#define ADC5_GPIO2_DIV3
#define ADC5_GPIO3_DIV3
#define ADC5_GPIO4_DIV3
#define ADC5_GPIO5_DIV3
#define ADC5_GPIO6_DIV3
#define ADC5_GPIO7_DIV3
#define ADC5_SBUx_DIV3

/* Current and combined current/voltage channels */
#define ADC5_INT_EXT_ISENSE
#define ADC5_PARALLEL_ISENSE
#define ADC5_CUR_REPLICA_VDS
#define ADC5_CUR_SENS_BATFET_VDS_OFFSET
#define ADC5_CUR_SENS_REPLICA_VDS_OFFSET
#define ADC5_EXT_SENS_OFFSET

#define ADC5_INT_EXT_ISENSE_VBAT_VDATA
#define ADC5_INT_EXT_ISENSE_VBAT_IDATA
#define ADC5_EXT_ISENSE_VBAT_VDATA
#define ADC5_EXT_ISENSE_VBAT_IDATA
#define ADC5_PARALLEL_ISENSE_VBAT_VDATA
#define ADC5_PARALLEL_ISENSE_VBAT_IDATA

#define ADC5_MAX_CHANNEL

/* ADC channels for ADC for PMIC7 */

#define ADC7_REF_GND
#define ADC7_1P25VREF
#define ADC7_VREF_VADC
#define ADC7_DIE_TEMP

#define ADC7_AMUX_THM1
#define ADC7_AMUX_THM2
#define ADC7_AMUX_THM3
#define ADC7_AMUX_THM4
#define ADC7_AMUX_THM5
#define ADC7_AMUX_THM6
#define ADC7_GPIO1
#define ADC7_GPIO2
#define ADC7_GPIO3
#define ADC7_GPIO4

#define ADC7_SMB_TEMP
#define ADC7_CHG_TEMP
#define ADC7_USB_IN_V_16
#define ADC7_VDC_16
#define ADC7_CC1_ID
#define ADC7_VREF_BAT_THERM
#define ADC7_IIN_FB
#define ADC7_ICHG_SMB
#define ADC7_IIN_SMB

/* 30k pull-up1 */
#define ADC7_AMUX_THM1_30K_PU
#define ADC7_AMUX_THM2_30K_PU
#define ADC7_AMUX_THM3_30K_PU
#define ADC7_AMUX_THM4_30K_PU
#define ADC7_AMUX_THM5_30K_PU
#define ADC7_AMUX_THM6_30K_PU
#define ADC7_GPIO1_30K_PU
#define ADC7_GPIO2_30K_PU
#define ADC7_GPIO3_30K_PU
#define ADC7_GPIO4_30K_PU
#define ADC7_CC1_ID_30K_PU

/* 100k pull-up2 */
#define ADC7_AMUX_THM1_100K_PU
#define ADC7_AMUX_THM2_100K_PU
#define ADC7_AMUX_THM3_100K_PU
#define ADC7_AMUX_THM4_100K_PU
#define ADC7_AMUX_THM5_100K_PU
#define ADC7_AMUX_THM6_100K_PU
#define ADC7_GPIO1_100K_PU
#define ADC7_GPIO2_100K_PU
#define ADC7_GPIO3_100K_PU
#define ADC7_GPIO4_100K_PU
#define ADC7_CC1_ID_100K_PU

/* 400k pull-up3 */
#define ADC7_AMUX_THM1_400K_PU
#define ADC7_AMUX_THM2_400K_PU
#define ADC7_AMUX_THM3_400K_PU
#define ADC7_AMUX_THM4_400K_PU
#define ADC7_AMUX_THM5_400K_PU
#define ADC7_AMUX_THM6_400K_PU
#define ADC7_GPIO1_400K_PU
#define ADC7_GPIO2_400K_PU
#define ADC7_GPIO3_400K_PU
#define ADC7_GPIO4_400K_PU
#define ADC7_CC1_ID_400K_PU

/* 1/3 Divider */
#define ADC7_GPIO1_DIV3
#define ADC7_GPIO2_DIV3
#define ADC7_GPIO3_DIV3
#define ADC7_GPIO4_DIV3

#define ADC7_VPH_PWR
#define ADC7_VBAT_SNS

#define ADC7_SBUx
#define ADC7_VBAT_2S_MID

#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_H */