hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/soc/tegra/pmc.h
....@@ -1,19 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2010 Google, Inc
34 * Copyright (c) 2014 NVIDIA Corporation
45 *
56 * Author:
67 * Colin Cross <ccross@google.com>
7
- *
8
- * This software is licensed under the terms of the GNU General Public
9
- * License version 2, as published by the Free Software Foundation, and
10
- * may be copied, distributed, and modified under those terms.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
178 */
189
1910 #ifndef __SOC_TEGRA_PMC_H__
....@@ -26,11 +17,9 @@
2617 struct clk;
2718 struct reset_control;
2819
29
-#ifdef CONFIG_SMP
3020 bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
3121 int tegra_pmc_cpu_power_on(unsigned int cpuid);
3222 int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
33
-#endif /* CONFIG_SMP */
3423
3524 /*
3625 * powergate and I/O rail APIs
....@@ -90,6 +79,10 @@
9079 TEGRA_IO_PAD_CSID,
9180 TEGRA_IO_PAD_CSIE,
9281 TEGRA_IO_PAD_CSIF,
82
+ TEGRA_IO_PAD_CSIG,
83
+ TEGRA_IO_PAD_CSIH,
84
+ TEGRA_IO_PAD_DAP3,
85
+ TEGRA_IO_PAD_DAP5,
9386 TEGRA_IO_PAD_DBG,
9487 TEGRA_IO_PAD_DEBUG_NONAO,
9588 TEGRA_IO_PAD_DMIC,
....@@ -102,10 +95,15 @@
10295 TEGRA_IO_PAD_EDP,
10396 TEGRA_IO_PAD_EMMC,
10497 TEGRA_IO_PAD_EMMC2,
98
+ TEGRA_IO_PAD_EQOS,
10599 TEGRA_IO_PAD_GPIO,
100
+ TEGRA_IO_PAD_GP_PWM2,
101
+ TEGRA_IO_PAD_GP_PWM3,
106102 TEGRA_IO_PAD_HDMI,
107103 TEGRA_IO_PAD_HDMI_DP0,
108104 TEGRA_IO_PAD_HDMI_DP1,
105
+ TEGRA_IO_PAD_HDMI_DP2,
106
+ TEGRA_IO_PAD_HDMI_DP3,
109107 TEGRA_IO_PAD_HSIC,
110108 TEGRA_IO_PAD_HV,
111109 TEGRA_IO_PAD_LVDS,
....@@ -116,7 +114,14 @@
116114 TEGRA_IO_PAD_PEX_CLK1,
117115 TEGRA_IO_PAD_PEX_CLK2,
118116 TEGRA_IO_PAD_PEX_CLK3,
117
+ TEGRA_IO_PAD_PEX_CLK_2_BIAS,
118
+ TEGRA_IO_PAD_PEX_CLK_2,
119119 TEGRA_IO_PAD_PEX_CNTRL,
120
+ TEGRA_IO_PAD_PEX_CTL2,
121
+ TEGRA_IO_PAD_PEX_L0_RST_N,
122
+ TEGRA_IO_PAD_PEX_L1_RST_N,
123
+ TEGRA_IO_PAD_PEX_L5_RST_N,
124
+ TEGRA_IO_PAD_PWR_CTL,
120125 TEGRA_IO_PAD_SDMMC1,
121126 TEGRA_IO_PAD_SDMMC1_HV,
122127 TEGRA_IO_PAD_SDMMC2,
....@@ -124,10 +129,16 @@
124129 TEGRA_IO_PAD_SDMMC3,
125130 TEGRA_IO_PAD_SDMMC3_HV,
126131 TEGRA_IO_PAD_SDMMC4,
132
+ TEGRA_IO_PAD_SOC_GPIO10,
133
+ TEGRA_IO_PAD_SOC_GPIO12,
134
+ TEGRA_IO_PAD_SOC_GPIO13,
135
+ TEGRA_IO_PAD_SOC_GPIO53,
127136 TEGRA_IO_PAD_SPI,
128137 TEGRA_IO_PAD_SPI_HV,
129138 TEGRA_IO_PAD_SYS_DDC,
130139 TEGRA_IO_PAD_UART,
140
+ TEGRA_IO_PAD_UART4,
141
+ TEGRA_IO_PAD_UART5,
131142 TEGRA_IO_PAD_UFS,
132143 TEGRA_IO_PAD_USB0,
133144 TEGRA_IO_PAD_USB1,
....@@ -141,18 +152,7 @@
141152 #define TEGRA_IO_RAIL_HDMI TEGRA_IO_PAD_HDMI
142153 #define TEGRA_IO_RAIL_LVDS TEGRA_IO_PAD_LVDS
143154
144
-/**
145
- * enum tegra_io_pad_voltage - voltage level of the I/O pad's source rail
146
- * @TEGRA_IO_PAD_1800000UV: 1.8 V
147
- * @TEGRA_IO_PAD_3300000UV: 3.3 V
148
- */
149
-enum tegra_io_pad_voltage {
150
- TEGRA_IO_PAD_1800000UV,
151
- TEGRA_IO_PAD_3300000UV,
152
-};
153
-
154155 #ifdef CONFIG_SOC_TEGRA_PMC
155
-int tegra_powergate_is_powered(unsigned int id);
156156 int tegra_powergate_power_on(unsigned int id);
157157 int tegra_powergate_power_off(unsigned int id);
158158 int tegra_powergate_remove_clamping(unsigned int id);
....@@ -163,24 +163,15 @@
163163
164164 int tegra_io_pad_power_enable(enum tegra_io_pad id);
165165 int tegra_io_pad_power_disable(enum tegra_io_pad id);
166
-int tegra_io_pad_set_voltage(enum tegra_io_pad id,
167
- enum tegra_io_pad_voltage voltage);
168
-int tegra_io_pad_get_voltage(enum tegra_io_pad id);
169166
170167 /* deprecated, use tegra_io_pad_power_{enable,disable}() instead */
171168 int tegra_io_rail_power_on(unsigned int id);
172169 int tegra_io_rail_power_off(unsigned int id);
173170
174
-enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
175171 void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
176172 void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
177173
178174 #else
179
-static inline int tegra_powergate_is_powered(unsigned int id)
180
-{
181
- return -ENOSYS;
182
-}
183
-
184175 static inline int tegra_powergate_power_on(unsigned int id)
185176 {
186177 return -ENOSYS;
....@@ -213,12 +204,6 @@
213204 return -ENOSYS;
214205 }
215206
216
-static inline int tegra_io_pad_set_voltage(enum tegra_io_pad id,
217
- enum tegra_io_pad_voltage voltage)
218
-{
219
- return -ENOSYS;
220
-}
221
-
222207 static inline int tegra_io_pad_get_voltage(enum tegra_io_pad id)
223208 {
224209 return -ENOSYS;
....@@ -234,11 +219,6 @@
234219 return -ENOSYS;
235220 }
236221
237
-static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
238
-{
239
- return TEGRA_SUSPEND_NONE;
240
-}
241
-
242222 static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
243223 {
244224 }
....@@ -249,4 +229,13 @@
249229
250230 #endif /* CONFIG_SOC_TEGRA_PMC */
251231
232
+#if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
233
+enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
234
+#else
235
+static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
236
+{
237
+ return TEGRA_SUSPEND_NONE;
238
+}
239
+#endif
240
+
252241 #endif /* __SOC_TEGRA_PMC_H__ */