18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2020 The Linux Foundation. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H 78c2ecf20Sopenharmony_ci#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef PM8350B_SID 108c2ecf20Sopenharmony_ci#define PM8350B_SID 3 118c2ecf20Sopenharmony_ci#endif 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* ADC channels for PM8350B_ADC for PMIC7 */ 148c2ecf20Sopenharmony_ci#define PM8350B_ADC7_REF_GND (PM8350B_SID << 8 | 0x0) 158c2ecf20Sopenharmony_ci#define PM8350B_ADC7_1P25VREF (PM8350B_SID << 8 | 0x01) 168c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VREF_VADC (PM8350B_SID << 8 | 0x02) 178c2ecf20Sopenharmony_ci#define PM8350B_ADC7_DIE_TEMP (PM8350B_SID << 8 | 0x03) 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM1 (PM8350B_SID << 8 | 0x04) 208c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM2 (PM8350B_SID << 8 | 0x05) 218c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM3 (PM8350B_SID << 8 | 0x06) 228c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM4 (PM8350B_SID << 8 | 0x07) 238c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM5 (PM8350B_SID << 8 | 0x08) 248c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM6 (PM8350B_SID << 8 | 0x09) 258c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO1 (PM8350B_SID << 8 | 0x0a) 268c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO2 (PM8350B_SID << 8 | 0x0b) 278c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO3 (PM8350B_SID << 8 | 0x0c) 288c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO4 (PM8350B_SID << 8 | 0x0d) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define PM8350B_ADC7_CHG_TEMP (PM8350B_SID << 8 | 0x10) 318c2ecf20Sopenharmony_ci#define PM8350B_ADC7_USB_IN_V_16 (PM8350B_SID << 8 | 0x11) 328c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VDC_16 (PM8350B_SID << 8 | 0x12) 338c2ecf20Sopenharmony_ci#define PM8350B_ADC7_CC1_ID (PM8350B_SID << 8 | 0x13) 348c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VREF_BAT_THERM (PM8350B_SID << 8 | 0x15) 358c2ecf20Sopenharmony_ci#define PM8350B_ADC7_IIN_FB (PM8350B_SID << 8 | 0x17) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* 30k pull-up1 */ 388c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM1_30K_PU (PM8350B_SID << 8 | 0x24) 398c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM2_30K_PU (PM8350B_SID << 8 | 0x25) 408c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM3_30K_PU (PM8350B_SID << 8 | 0x26) 418c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM4_30K_PU (PM8350B_SID << 8 | 0x27) 428c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM5_30K_PU (PM8350B_SID << 8 | 0x28) 438c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM6_30K_PU (PM8350B_SID << 8 | 0x29) 448c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO1_30K_PU (PM8350B_SID << 8 | 0x2a) 458c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO2_30K_PU (PM8350B_SID << 8 | 0x2b) 468c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO3_30K_PU (PM8350B_SID << 8 | 0x2c) 478c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO4_30K_PU (PM8350B_SID << 8 | 0x2d) 488c2ecf20Sopenharmony_ci#define PM8350B_ADC7_CC1_ID_30K_PU (PM8350B_SID << 8 | 0x33) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci/* 100k pull-up2 */ 518c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM1_100K_PU (PM8350B_SID << 8 | 0x44) 528c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM2_100K_PU (PM8350B_SID << 8 | 0x45) 538c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM3_100K_PU (PM8350B_SID << 8 | 0x46) 548c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM4_100K_PU (PM8350B_SID << 8 | 0x47) 558c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM5_100K_PU (PM8350B_SID << 8 | 0x48) 568c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM6_100K_PU (PM8350B_SID << 8 | 0x49) 578c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO1_100K_PU (PM8350B_SID << 8 | 0x4a) 588c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO2_100K_PU (PM8350B_SID << 8 | 0x4b) 598c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO3_100K_PU (PM8350B_SID << 8 | 0x4c) 608c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO4_100K_PU (PM8350B_SID << 8 | 0x4d) 618c2ecf20Sopenharmony_ci#define PM8350B_ADC7_CC1_ID_100K_PU (PM8350B_SID << 8 | 0x53) 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/* 400k pull-up3 */ 648c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM1_400K_PU (PM8350B_SID << 8 | 0x64) 658c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM2_400K_PU (PM8350B_SID << 8 | 0x65) 668c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM3_400K_PU (PM8350B_SID << 8 | 0x66) 678c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM4_400K_PU (PM8350B_SID << 8 | 0x67) 688c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM5_400K_PU (PM8350B_SID << 8 | 0x68) 698c2ecf20Sopenharmony_ci#define PM8350B_ADC7_AMUX_THM6_400K_PU (PM8350B_SID << 8 | 0x69) 708c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO1_400K_PU (PM8350B_SID << 8 | 0x6a) 718c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO2_400K_PU (PM8350B_SID << 8 | 0x6b) 728c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO3_400K_PU (PM8350B_SID << 8 | 0x6c) 738c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO4_400K_PU (PM8350B_SID << 8 | 0x6d) 748c2ecf20Sopenharmony_ci#define PM8350B_ADC7_CC1_ID_400K_PU (PM8350B_SID << 8 | 0x73) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci/* 1/3 Divider */ 778c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO1_DIV3 (PM8350B_SID << 8 | 0x8a) 788c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO2_DIV3 (PM8350B_SID << 8 | 0x8b) 798c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO3_DIV3 (PM8350B_SID << 8 | 0x8c) 808c2ecf20Sopenharmony_ci#define PM8350B_ADC7_GPIO4_DIV3 (PM8350B_SID << 8 | 0x8d) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VPH_PWR (PM8350B_SID << 8 | 0x8e) 838c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VBAT_SNS (PM8350B_SID << 8 | 0x8f) 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define PM8350B_ADC7_SBUx (PM8350B_SID << 8 | 0x94) 868c2ecf20Sopenharmony_ci#define PM8350B_ADC7_VBAT_2S_MID (PM8350B_SID << 8 | 0x96) 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H */ 89