1/* $NetBSD: qcom,pmic-mpp.h,v 1.1.1.2 2017/11/30 19:40:51 jmcneill Exp $ */ 2 3/* SPDX-License-Identifier: GPL-2.0 */ 4/* 5 * This header provides constants for the Qualcomm PMIC's 6 * Multi-Purpose Pin binding. 7 */ 8 9#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H 10#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H 11 12/* power-source */ 13 14/* Digital Input/Output: level [PM8058] */ 15#define PM8058_MPP_VPH 0 16#define PM8058_MPP_S3 1 17#define PM8058_MPP_L2 2 18#define PM8058_MPP_L3 3 19 20/* Digital Input/Output: level [PM8901] */ 21#define PM8901_MPP_MSMIO 0 22#define PM8901_MPP_DIG 1 23#define PM8901_MPP_L5 2 24#define PM8901_MPP_S4 3 25#define PM8901_MPP_VPH 4 26 27/* Digital Input/Output: level [PM8921] */ 28#define PM8921_MPP_S4 1 29#define PM8921_MPP_L15 3 30#define PM8921_MPP_L17 4 31#define PM8921_MPP_VPH 7 32 33/* Digital Input/Output: level [PM8821] */ 34#define PM8821_MPP_1P8 0 35#define PM8821_MPP_VPH 7 36 37/* Digital Input/Output: level [PM8018] */ 38#define PM8018_MPP_L4 0 39#define PM8018_MPP_L14 1 40#define PM8018_MPP_S3 2 41#define PM8018_MPP_L6 3 42#define PM8018_MPP_L2 4 43#define PM8018_MPP_L5 5 44#define PM8018_MPP_VPH 7 45 46/* Digital Input/Output: level [PM8038] */ 47#define PM8038_MPP_L20 0 48#define PM8038_MPP_L11 1 49#define PM8038_MPP_L5 2 50#define PM8038_MPP_L15 3 51#define PM8038_MPP_L17 4 52#define PM8038_MPP_VPH 7 53 54#define PM8841_MPP_VPH 0 55#define PM8841_MPP_S3 2 56 57#define PM8916_MPP_VPH 0 58#define PM8916_MPP_L2 2 59#define PM8916_MPP_L5 3 60 61#define PM8941_MPP_VPH 0 62#define PM8941_MPP_L1 1 63#define PM8941_MPP_S3 2 64#define PM8941_MPP_L6 3 65 66#define PMA8084_MPP_VPH 0 67#define PMA8084_MPP_L1 1 68#define PMA8084_MPP_S4 2 69#define PMA8084_MPP_L6 3 70 71#define PM8994_MPP_VPH 0 72/* Only supported for MPP_05-MPP_08 */ 73#define PM8994_MPP_L19 1 74#define PM8994_MPP_S4 2 75#define PM8994_MPP_L12 3 76 77/* 78 * Analog Input - Set the source for analog input. 79 * To be used with "qcom,amux-route" property 80 */ 81#define PMIC_MPP_AMUX_ROUTE_CH5 0 82#define PMIC_MPP_AMUX_ROUTE_CH6 1 83#define PMIC_MPP_AMUX_ROUTE_CH7 2 84#define PMIC_MPP_AMUX_ROUTE_CH8 3 85#define PMIC_MPP_AMUX_ROUTE_ABUS1 4 86#define PMIC_MPP_AMUX_ROUTE_ABUS2 5 87#define PMIC_MPP_AMUX_ROUTE_ABUS3 6 88#define PMIC_MPP_AMUX_ROUTE_ABUS4 7 89 90/* Analog Output: level */ 91#define PMIC_MPP_AOUT_LVL_1V25 0 92#define PMIC_MPP_AOUT_LVL_1V25_2 1 93#define PMIC_MPP_AOUT_LVL_0V625 2 94#define PMIC_MPP_AOUT_LVL_0V3125 3 95#define PMIC_MPP_AOUT_LVL_MPP 4 96#define PMIC_MPP_AOUT_LVL_ABUS1 5 97#define PMIC_MPP_AOUT_LVL_ABUS2 6 98#define PMIC_MPP_AOUT_LVL_ABUS3 7 99 100/* To be used with "function" */ 101#define PMIC_MPP_FUNC_NORMAL "normal" 102#define PMIC_MPP_FUNC_PAIRED "paired" 103#define PMIC_MPP_FUNC_DTEST1 "dtest1" 104#define PMIC_MPP_FUNC_DTEST2 "dtest2" 105#define PMIC_MPP_FUNC_DTEST3 "dtest3" 106#define PMIC_MPP_FUNC_DTEST4 "dtest4" 107 108#endif 109