162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2020, The Linux Foundation. All rights reserved. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H 762306a36Sopenharmony_ci#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include <dt-bindings/iio/qcom,spmi-vadc.h> 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* ADC channels for PM8350_ADC for PMIC7 */ 1262306a36Sopenharmony_ci#define PM8350_ADC7_REF_GND(sid) ((sid) << 8 | ADC7_REF_GND) 1362306a36Sopenharmony_ci#define PM8350_ADC7_1P25VREF(sid) ((sid) << 8 | ADC7_1P25VREF) 1462306a36Sopenharmony_ci#define PM8350_ADC7_VREF_VADC(sid) ((sid) << 8 | ADC7_VREF_VADC) 1562306a36Sopenharmony_ci#define PM8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | ADC7_DIE_TEMP) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | ADC7_AMUX_THM1) 1862306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | ADC7_AMUX_THM2) 1962306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | ADC7_AMUX_THM3) 2062306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | ADC7_AMUX_THM4) 2162306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | ADC7_AMUX_THM5) 2262306a36Sopenharmony_ci#define PM8350_ADC7_GPIO1(sid) ((sid) << 8 | ADC7_GPIO1) 2362306a36Sopenharmony_ci#define PM8350_ADC7_GPIO2(sid) ((sid) << 8 | ADC7_GPIO2) 2462306a36Sopenharmony_ci#define PM8350_ADC7_GPIO3(sid) ((sid) << 8 | ADC7_GPIO3) 2562306a36Sopenharmony_ci#define PM8350_ADC7_GPIO4(sid) ((sid) << 8 | ADC7_GPIO4) 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* 30k pull-up1 */ 2862306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_30K_PU) 2962306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_30K_PU) 3062306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_30K_PU) 3162306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_30K_PU) 3262306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_30K_PU) 3362306a36Sopenharmony_ci#define PM8350_ADC7_GPIO1_30K_PU(sid) ((sid) << 8 | ADC7_GPIO1_30K_PU) 3462306a36Sopenharmony_ci#define PM8350_ADC7_GPIO2_30K_PU(sid) ((sid) << 8 | ADC7_GPIO2_30K_PU) 3562306a36Sopenharmony_ci#define PM8350_ADC7_GPIO3_30K_PU(sid) ((sid) << 8 | ADC7_GPIO3_30K_PU) 3662306a36Sopenharmony_ci#define PM8350_ADC7_GPIO4_30K_PU(sid) ((sid) << 8 | ADC7_GPIO4_30K_PU) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* 100k pull-up2 */ 3962306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_100K_PU) 4062306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_100K_PU) 4162306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_100K_PU) 4262306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_100K_PU) 4362306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_100K_PU) 4462306a36Sopenharmony_ci#define PM8350_ADC7_GPIO1_100K_PU(sid) ((sid) << 8 | ADC7_GPIO1_100K_PU) 4562306a36Sopenharmony_ci#define PM8350_ADC7_GPIO2_100K_PU(sid) ((sid) << 8 | ADC7_GPIO2_100K_PU) 4662306a36Sopenharmony_ci#define PM8350_ADC7_GPIO3_100K_PU(sid) ((sid) << 8 | ADC7_GPIO3_100K_PU) 4762306a36Sopenharmony_ci#define PM8350_ADC7_GPIO4_100K_PU(sid) ((sid) << 8 | ADC7_GPIO4_100K_PU) 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci/* 400k pull-up3 */ 5062306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_400K_PU) 5162306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_400K_PU) 5262306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_400K_PU) 5362306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_400K_PU) 5462306a36Sopenharmony_ci#define PM8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_400K_PU) 5562306a36Sopenharmony_ci#define PM8350_ADC7_GPIO1_400K_PU(sid) ((sid) << 8 | ADC7_GPIO1_400K_PU) 5662306a36Sopenharmony_ci#define PM8350_ADC7_GPIO2_400K_PU(sid) ((sid) << 8 | ADC7_GPIO2_400K_PU) 5762306a36Sopenharmony_ci#define PM8350_ADC7_GPIO3_400K_PU(sid) ((sid) << 8 | ADC7_GPIO3_400K_PU) 5862306a36Sopenharmony_ci#define PM8350_ADC7_GPIO4_400K_PU(sid) ((sid) << 8 | ADC7_GPIO4_400K_PU) 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci/* 1/3 Divider */ 6162306a36Sopenharmony_ci#define PM8350_ADC7_GPIO4_DIV3(sid) ((sid) << 8 | ADC7_GPIO4_DIV3) 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci#define PM8350_ADC7_VPH_PWR(sid) ((sid) << 8 | ADC7_VPH_PWR) 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H */ 66