linux/include/dt-bindings/pinctrl/qcom,pmic-mpp.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * This header provides constants for the Qualcomm PMIC's
 * Multi-Purpose Pin binding.
 */

#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H
#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H

/* power-source */

/* Digital Input/Output: level [PM8058] */
#define PM8058_MPP_VPH
#define PM8058_MPP_S3
#define PM8058_MPP_L2
#define PM8058_MPP_L3

/* Digital Input/Output: level [PM8901] */
#define PM8901_MPP_MSMIO
#define PM8901_MPP_DIG
#define PM8901_MPP_L5
#define PM8901_MPP_S4
#define PM8901_MPP_VPH

/* Digital Input/Output: level [PM8921] */
#define PM8921_MPP_S4
#define PM8921_MPP_L15
#define PM8921_MPP_L17
#define PM8921_MPP_VPH

/* Digital Input/Output: level [PM8821] */
#define PM8821_MPP_1P8
#define PM8821_MPP_VPH

/* Digital Input/Output: level [PM8018] */
#define PM8018_MPP_L4
#define PM8018_MPP_L14
#define PM8018_MPP_S3
#define PM8018_MPP_L6
#define PM8018_MPP_L2
#define PM8018_MPP_L5
#define PM8018_MPP_VPH

/* Digital Input/Output: level [PM8038] */
#define PM8038_MPP_L20
#define PM8038_MPP_L11
#define PM8038_MPP_L5
#define PM8038_MPP_L15
#define PM8038_MPP_L17
#define PM8038_MPP_VPH

#define PM8841_MPP_VPH
#define PM8841_MPP_S3

#define PM8916_MPP_VPH
#define PM8916_MPP_L2
#define PM8916_MPP_L5

#define PM8941_MPP_VPH
#define PM8941_MPP_L1
#define PM8941_MPP_S3
#define PM8941_MPP_L6

#define PMA8084_MPP_VPH
#define PMA8084_MPP_L1
#define PMA8084_MPP_S4
#define PMA8084_MPP_L6

#define PM8994_MPP_VPH
/* Only supported for MPP_05-MPP_08 */
#define PM8994_MPP_L19
#define PM8994_MPP_S4
#define PM8994_MPP_L12

/*
 * Analog Input - Set the source for analog input.
 * To be used with "qcom,amux-route" property
 */
#define PMIC_MPP_AMUX_ROUTE_CH5
#define PMIC_MPP_AMUX_ROUTE_CH6
#define PMIC_MPP_AMUX_ROUTE_CH7
#define PMIC_MPP_AMUX_ROUTE_CH8
#define PMIC_MPP_AMUX_ROUTE_ABUS1
#define PMIC_MPP_AMUX_ROUTE_ABUS2
#define PMIC_MPP_AMUX_ROUTE_ABUS3
#define PMIC_MPP_AMUX_ROUTE_ABUS4

/* Analog Output: level */
#define PMIC_MPP_AOUT_LVL_1V25
#define PMIC_MPP_AOUT_LVL_1V25_2
#define PMIC_MPP_AOUT_LVL_0V625
#define PMIC_MPP_AOUT_LVL_0V3125
#define PMIC_MPP_AOUT_LVL_MPP
#define PMIC_MPP_AOUT_LVL_ABUS1
#define PMIC_MPP_AOUT_LVL_ABUS2
#define PMIC_MPP_AOUT_LVL_ABUS3

/* To be used with "function" */
#define PMIC_MPP_FUNC_NORMAL
#define PMIC_MPP_FUNC_PAIRED
#define PMIC_MPP_FUNC_DTEST1
#define PMIC_MPP_FUNC_DTEST2
#define PMIC_MPP_FUNC_DTEST3
#define PMIC_MPP_FUNC_DTEST4

#endif