1d1492bbdSJishnu Prakash /* SPDX-License-Identifier: GPL-2.0-only */ 2d1492bbdSJishnu Prakash /* 3d1492bbdSJishnu Prakash * Copyright (c) 2020 The Linux Foundation. All rights reserved. 4d1492bbdSJishnu Prakash */ 5d1492bbdSJishnu Prakash 6d1492bbdSJishnu Prakash #ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H 7d1492bbdSJishnu Prakash #define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H 8d1492bbdSJishnu Prakash 9d1492bbdSJishnu Prakash #ifndef PM8350B_SID 10d1492bbdSJishnu Prakash #define PM8350B_SID 3 11d1492bbdSJishnu Prakash #endif 12d1492bbdSJishnu Prakash 13*b7297d45SDmitry Baryshkov #include <dt-bindings/iio/qcom,spmi-vadc.h> 14*b7297d45SDmitry Baryshkov 15d1492bbdSJishnu Prakash /* ADC channels for PM8350B_ADC for PMIC7 */ 16*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_REF_GND (PM8350B_SID << 8 | ADC7_REF_GND) 17*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_1P25VREF (PM8350B_SID << 8 | ADC7_1P25VREF) 18*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VREF_VADC (PM8350B_SID << 8 | ADC7_VREF_VADC) 19*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_DIE_TEMP (PM8350B_SID << 8 | ADC7_DIE_TEMP) 20d1492bbdSJishnu Prakash 21*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM1 (PM8350B_SID << 8 | ADC7_AMUX_THM1) 22*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM2 (PM8350B_SID << 8 | ADC7_AMUX_THM2) 23*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM3 (PM8350B_SID << 8 | ADC7_AMUX_THM3) 24*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM4 (PM8350B_SID << 8 | ADC7_AMUX_THM4) 25*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM5 (PM8350B_SID << 8 | ADC7_AMUX_THM5) 26*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM6 (PM8350B_SID << 8 | ADC7_AMUX_THM6) 27*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO1 (PM8350B_SID << 8 | ADC7_GPIO1) 28*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO2 (PM8350B_SID << 8 | ADC7_GPIO2) 29*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO3 (PM8350B_SID << 8 | ADC7_GPIO3) 30*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO4 (PM8350B_SID << 8 | ADC7_GPIO4) 31d1492bbdSJishnu Prakash 32*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_CHG_TEMP (PM8350B_SID << 8 | ADC7_CHG_TEMP) 33*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_USB_IN_V_16 (PM8350B_SID << 8 | ADC7_USB_IN_V_16) 34*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VDC_16 (PM8350B_SID << 8 | ADC7_VDC_16) 35*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_CC1_ID (PM8350B_SID << 8 | ADC7_CC1_ID) 36*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VREF_BAT_THERM (PM8350B_SID << 8 | ADC7_VREF_BAT_THERM) 37*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_IIN_FB (PM8350B_SID << 8 | ADC7_IIN_FB) 38d1492bbdSJishnu Prakash 39d1492bbdSJishnu Prakash /* 30k pull-up1 */ 40*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM1_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_30K_PU) 41*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM2_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_30K_PU) 42*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM3_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_30K_PU) 43*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM4_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_30K_PU) 44*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM5_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_30K_PU) 45*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM6_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_30K_PU) 46*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO1_30K_PU (PM8350B_SID << 8 | ADC7_GPIO1_30K_PU) 47*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO2_30K_PU (PM8350B_SID << 8 | ADC7_GPIO2_30K_PU) 48*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO3_30K_PU (PM8350B_SID << 8 | ADC7_GPIO3_30K_PU) 49*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO4_30K_PU (PM8350B_SID << 8 | ADC7_GPIO4_30K_PU) 50*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_CC1_ID_30K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_30K_PU) 51d1492bbdSJishnu Prakash 52d1492bbdSJishnu Prakash /* 100k pull-up2 */ 53*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM1_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_100K_PU) 54*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM2_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_100K_PU) 55*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM3_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_100K_PU) 56*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM4_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_100K_PU) 57*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM5_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_100K_PU) 58*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM6_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_100K_PU) 59*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO1_100K_PU (PM8350B_SID << 8 | ADC7_GPIO1_100K_PU) 60*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO2_100K_PU (PM8350B_SID << 8 | ADC7_GPIO2_100K_PU) 61*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO3_100K_PU (PM8350B_SID << 8 | ADC7_GPIO3_100K_PU) 62*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO4_100K_PU (PM8350B_SID << 8 | ADC7_GPIO4_100K_PU) 63*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_CC1_ID_100K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_100K_PU) 64d1492bbdSJishnu Prakash 65d1492bbdSJishnu Prakash /* 400k pull-up3 */ 66*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM1_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_400K_PU) 67*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM2_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_400K_PU) 68*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM3_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_400K_PU) 69*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM4_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_400K_PU) 70*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM5_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_400K_PU) 71*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_AMUX_THM6_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_400K_PU) 72*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO1_400K_PU (PM8350B_SID << 8 | ADC7_GPIO1_400K_PU) 73*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO2_400K_PU (PM8350B_SID << 8 | ADC7_GPIO2_400K_PU) 74*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO3_400K_PU (PM8350B_SID << 8 | ADC7_GPIO3_400K_PU) 75*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO4_400K_PU (PM8350B_SID << 8 | ADC7_GPIO4_400K_PU) 76*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_CC1_ID_400K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_400K_PU) 77d1492bbdSJishnu Prakash 78d1492bbdSJishnu Prakash /* 1/3 Divider */ 79*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO1_DIV3 (PM8350B_SID << 8 | ADC7_GPIO1_DIV3) 80*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO2_DIV3 (PM8350B_SID << 8 | ADC7_GPIO2_DIV3) 81*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO3_DIV3 (PM8350B_SID << 8 | ADC7_GPIO3_DIV3) 82*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_GPIO4_DIV3 (PM8350B_SID << 8 | ADC7_GPIO4_DIV3) 83d1492bbdSJishnu Prakash 84*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VPH_PWR (PM8350B_SID << 8 | ADC7_VPH_PWR) 85*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VBAT_SNS (PM8350B_SID << 8 | ADC7_VBAT_SNS) 86d1492bbdSJishnu Prakash 87*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_SBUx (PM8350B_SID << 8 | ADC7_SBU) 88*b7297d45SDmitry Baryshkov #define PM8350B_ADC7_VBAT_2S_MID (PM8350B_SID << 8 | ADC7_VBAT_2S_MID) 89d1492bbdSJishnu Prakash 90d1492bbdSJishnu Prakash #endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H */ 91