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_PM8350_H
78c2ecf20Sopenharmony_ci#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef PM8350_SID
108c2ecf20Sopenharmony_ci#define PM8350_SID					1
118c2ecf20Sopenharmony_ci#endif
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* ADC channels for PM8350_ADC for PMIC7 */
148c2ecf20Sopenharmony_ci#define PM8350_ADC7_REF_GND			(PM8350_SID << 8 | 0x0)
158c2ecf20Sopenharmony_ci#define PM8350_ADC7_1P25VREF			(PM8350_SID << 8 | 0x01)
168c2ecf20Sopenharmony_ci#define PM8350_ADC7_VREF_VADC			(PM8350_SID << 8 | 0x02)
178c2ecf20Sopenharmony_ci#define PM8350_ADC7_DIE_TEMP			(PM8350_SID << 8 | 0x03)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1			(PM8350_SID << 8 | 0x04)
208c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2			(PM8350_SID << 8 | 0x05)
218c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3			(PM8350_SID << 8 | 0x06)
228c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4			(PM8350_SID << 8 | 0x07)
238c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5			(PM8350_SID << 8 | 0x08)
248c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO1			(PM8350_SID << 8 | 0x0a)
258c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO2			(PM8350_SID << 8 | 0x0b)
268c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO3			(PM8350_SID << 8 | 0x0c)
278c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO4			(PM8350_SID << 8 | 0x0d)
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci/* 30k pull-up1 */
308c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_30K_PU		(PM8350_SID << 8 | 0x24)
318c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_30K_PU		(PM8350_SID << 8 | 0x25)
328c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_30K_PU		(PM8350_SID << 8 | 0x26)
338c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_30K_PU		(PM8350_SID << 8 | 0x27)
348c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_30K_PU		(PM8350_SID << 8 | 0x28)
358c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO1_30K_PU		(PM8350_SID << 8 | 0x2a)
368c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO2_30K_PU		(PM8350_SID << 8 | 0x2b)
378c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO3_30K_PU		(PM8350_SID << 8 | 0x2c)
388c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO4_30K_PU		(PM8350_SID << 8 | 0x2d)
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* 100k pull-up2 */
418c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_100K_PU		(PM8350_SID << 8 | 0x44)
428c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_100K_PU		(PM8350_SID << 8 | 0x45)
438c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_100K_PU		(PM8350_SID << 8 | 0x46)
448c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_100K_PU		(PM8350_SID << 8 | 0x47)
458c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_100K_PU		(PM8350_SID << 8 | 0x48)
468c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO1_100K_PU		(PM8350_SID << 8 | 0x4a)
478c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO2_100K_PU		(PM8350_SID << 8 | 0x4b)
488c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO3_100K_PU		(PM8350_SID << 8 | 0x4c)
498c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO4_100K_PU		(PM8350_SID << 8 | 0x4d)
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci/* 400k pull-up3 */
528c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_400K_PU		(PM8350_SID << 8 | 0x64)
538c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_400K_PU		(PM8350_SID << 8 | 0x65)
548c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_400K_PU		(PM8350_SID << 8 | 0x66)
558c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_400K_PU		(PM8350_SID << 8 | 0x67)
568c2ecf20Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_400K_PU		(PM8350_SID << 8 | 0x68)
578c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO1_400K_PU		(PM8350_SID << 8 | 0x6a)
588c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO2_400K_PU		(PM8350_SID << 8 | 0x6b)
598c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO3_400K_PU		(PM8350_SID << 8 | 0x6c)
608c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO4_400K_PU		(PM8350_SID << 8 | 0x6d)
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci/* 1/3 Divider */
638c2ecf20Sopenharmony_ci#define PM8350_ADC7_GPIO4_DIV3			(PM8350_SID << 8 | 0x8d)
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci#define PM8350_ADC7_VPH_PWR			(PM8350_SID << 8 | 0x8e)
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H */
68