1 /* arch/arm/mach-msm/proc_comm.h
3 * Copyright (c) 2007 QUALCOMM Incorporated
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_
17 #define _ARCH_ARM_MACH_MSM_PROC_COMM_H_
26 PCOM_GET_POWER_ON_STATUS
,
27 PCOM_GET_WAKE_UP_STATUS
,
39 PCOM_RPC_GPIO_TLMM_CONFIG_REMOTE
,
40 PCOM_CLKCTL_RPC_ENABLE
,
41 PCOM_CLKCTL_RPC_DISABLE
,
42 PCOM_CLKCTL_RPC_RESET
,
43 PCOM_CLKCTL_RPC_SET_FLAGS
,
44 PCOM_CLKCTL_RPC_SET_RATE
,
45 PCOM_CLKCTL_RPC_MIN_RATE
,
46 PCOM_CLKCTL_RPC_MAX_RATE
,
48 PCOM_CLKCTL_RPC_PLL_REQUEST
,
49 PCOM_CLKCTL_RPC_ENABLED
,
52 PCOM_GPIO_TLMM_CONFIG_GROUP
,
53 PCOM_GPIO_TLMM_UNCONFIG_GROUP
,
54 PCOM_NV_WRITE_BYTES_4_7
,
56 PCOM_GET_FTM_BOOT_COUNT
,
57 PCOM_RPC_GPIO_TLMM_CONFIG_EX
,
69 PCOM_INVALID_STATUS
= 0x0,
76 /* List of VREGs that support the Pull Down Resistor setting. */
78 PM_VREG_PDOWN_MSMA_ID
,
79 PM_VREG_PDOWN_MSMP_ID
,
80 PM_VREG_PDOWN_MSME1_ID
, /* Not supported in Panoramix */
81 PM_VREG_PDOWN_MSMC1_ID
, /* Not supported in PM6620 */
82 PM_VREG_PDOWN_MSMC2_ID
, /* Supported in PM7500 only */
83 PM_VREG_PDOWN_GP3_ID
, /* Supported in PM7500 only */
84 PM_VREG_PDOWN_MSME2_ID
, /* Supported in PM7500 and Panoramix only */
85 PM_VREG_PDOWN_GP4_ID
, /* Supported in PM7500 only */
86 PM_VREG_PDOWN_GP1_ID
, /* Supported in PM7500 only */
87 PM_VREG_PDOWN_TCXO_ID
,
89 PM_VREG_PDOWN_RFTX_ID
,
90 PM_VREG_PDOWN_RFRX1_ID
,
91 PM_VREG_PDOWN_RFRX2_ID
,
92 PM_VREG_PDOWN_SYNT_ID
,
93 PM_VREG_PDOWN_WLAN_ID
,
96 PM_VREG_PDOWN_RUIM_ID
,
97 PM_VREG_PDOWN_MSMC0_ID
, /* Supported in PM6610 only */
98 PM_VREG_PDOWN_GP2_ID
, /* Supported in PM7500 only */
99 PM_VREG_PDOWN_GP5_ID
, /* Supported in PM7500 only */
100 PM_VREG_PDOWN_GP6_ID
, /* Supported in PM7500 only */
102 PM_VREG_PDOWN_RF_VCO_ID
,
103 PM_VREG_PDOWN_MPLL_ID
,
106 PM_VREG_PDOWN_RFUBM_ID
,
109 PM_VREG_PDOWN_RF1_ID
,
110 PM_VREG_PDOWN_RF2_ID
,
111 PM_VREG_PDOWN_RFA_ID
,
112 PM_VREG_PDOWN_CDC2_ID
,
113 PM_VREG_PDOWN_RFTX2_ID
,
114 PM_VREG_PDOWN_USIM_ID
,
115 PM_VREG_PDOWN_USB2P6_ID
,
116 PM_VREG_PDOWN_USB3P3_ID
,
117 PM_VREG_PDOWN_INVALID_ID
,
119 /* backward compatible enums only */
120 PM_VREG_PDOWN_CAM_ID
= PM_VREG_PDOWN_GP1_ID
,
121 PM_VREG_PDOWN_MDDI_ID
= PM_VREG_PDOWN_GP2_ID
,
122 PM_VREG_PDOWN_RUIM2_ID
= PM_VREG_PDOWN_GP3_ID
,
123 PM_VREG_PDOWN_AUX_ID
= PM_VREG_PDOWN_GP4_ID
,
124 PM_VREG_PDOWN_AUX2_ID
= PM_VREG_PDOWN_GP5_ID
,
125 PM_VREG_PDOWN_BT_ID
= PM_VREG_PDOWN_GP6_ID
,
127 PM_VREG_PDOWN_MSME_ID
= PM_VREG_PDOWN_MSME1_ID
,
128 PM_VREG_PDOWN_MSMC_ID
= PM_VREG_PDOWN_MSMC1_ID
,
129 PM_VREG_PDOWN_RFA1_ID
= PM_VREG_PDOWN_RFRX2_ID
,
130 PM_VREG_PDOWN_RFA2_ID
= PM_VREG_PDOWN_RFTX2_ID
,
131 PM_VREG_PDOWN_XO_ID
= PM_VREG_PDOWN_TCXO_ID
134 /* gpio info for PCOM_RPC_GPIO_TLMM_CONFIG_EX */
136 #define GPIO_ENABLE 0
137 #define GPIO_DISABLE 1
140 #define GPIO_OUTPUT 1
142 #define GPIO_NO_PULL 0
143 #define GPIO_PULL_DOWN 1
144 #define GPIO_KEEPER 2
145 #define GPIO_PULL_UP 3
156 #define PCOM_GPIO_CFG(gpio, func, dir, pull, drvstr) \
157 ((((gpio) & 0x3FF) << 4) | \
159 (((dir) & 0x1) << 14) | \
160 (((pull) & 0x3) << 15) | \
161 (((drvstr) & 0xF) << 17))
163 int msm_proc_comm(unsigned cmd
, unsigned *data1
, unsigned *data2
);