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