~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/soc/tegra/pmc.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/soc/tegra/pmc.h (Architecture sparc) and /include/soc/tegra/pmc.h (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Copyright (c) 2010 Google, Inc                   3  * Copyright (c) 2010 Google, Inc
  4  * Copyright (c) 2014 NVIDIA Corporation            4  * Copyright (c) 2014 NVIDIA Corporation
  5  *                                                  5  *
  6  * Author:                                          6  * Author:
  7  *      Colin Cross <ccross@google.com>             7  *      Colin Cross <ccross@google.com>
  8  */                                                 8  */
  9                                                     9 
 10 #ifndef __SOC_TEGRA_PMC_H__                        10 #ifndef __SOC_TEGRA_PMC_H__
 11 #define __SOC_TEGRA_PMC_H__                        11 #define __SOC_TEGRA_PMC_H__
 12                                                    12 
 13 #include <linux/reboot.h>                          13 #include <linux/reboot.h>
 14                                                    14 
 15 #include <soc/tegra/pm.h>                          15 #include <soc/tegra/pm.h>
 16                                                    16 
 17 struct clk;                                        17 struct clk;
 18 struct reset_control;                              18 struct reset_control;
 19                                                    19 
 20 bool tegra_pmc_cpu_is_powered(unsigned int cpu     20 bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
 21 int tegra_pmc_cpu_power_on(unsigned int cpuid)     21 int tegra_pmc_cpu_power_on(unsigned int cpuid);
 22 int tegra_pmc_cpu_remove_clamping(unsigned int     22 int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
 23                                                    23 
 24 /*                                                 24 /*
 25  * powergate and I/O rail APIs                     25  * powergate and I/O rail APIs
 26  */                                                26  */
 27                                                    27 
 28 #define TEGRA_POWERGATE_CPU     0                  28 #define TEGRA_POWERGATE_CPU     0
 29 #define TEGRA_POWERGATE_3D      1                  29 #define TEGRA_POWERGATE_3D      1
 30 #define TEGRA_POWERGATE_VENC    2                  30 #define TEGRA_POWERGATE_VENC    2
 31 #define TEGRA_POWERGATE_PCIE    3                  31 #define TEGRA_POWERGATE_PCIE    3
 32 #define TEGRA_POWERGATE_VDEC    4                  32 #define TEGRA_POWERGATE_VDEC    4
 33 #define TEGRA_POWERGATE_L2      5                  33 #define TEGRA_POWERGATE_L2      5
 34 #define TEGRA_POWERGATE_MPE     6                  34 #define TEGRA_POWERGATE_MPE     6
 35 #define TEGRA_POWERGATE_HEG     7                  35 #define TEGRA_POWERGATE_HEG     7
 36 #define TEGRA_POWERGATE_SATA    8                  36 #define TEGRA_POWERGATE_SATA    8
 37 #define TEGRA_POWERGATE_CPU1    9                  37 #define TEGRA_POWERGATE_CPU1    9
 38 #define TEGRA_POWERGATE_CPU2    10                 38 #define TEGRA_POWERGATE_CPU2    10
 39 #define TEGRA_POWERGATE_CPU3    11                 39 #define TEGRA_POWERGATE_CPU3    11
 40 #define TEGRA_POWERGATE_CELP    12                 40 #define TEGRA_POWERGATE_CELP    12
 41 #define TEGRA_POWERGATE_3D1     13                 41 #define TEGRA_POWERGATE_3D1     13
 42 #define TEGRA_POWERGATE_CPU0    14                 42 #define TEGRA_POWERGATE_CPU0    14
 43 #define TEGRA_POWERGATE_C0NC    15                 43 #define TEGRA_POWERGATE_C0NC    15
 44 #define TEGRA_POWERGATE_C1NC    16                 44 #define TEGRA_POWERGATE_C1NC    16
 45 #define TEGRA_POWERGATE_SOR     17                 45 #define TEGRA_POWERGATE_SOR     17
 46 #define TEGRA_POWERGATE_DIS     18                 46 #define TEGRA_POWERGATE_DIS     18
 47 #define TEGRA_POWERGATE_DISB    19                 47 #define TEGRA_POWERGATE_DISB    19
 48 #define TEGRA_POWERGATE_XUSBA   20                 48 #define TEGRA_POWERGATE_XUSBA   20
 49 #define TEGRA_POWERGATE_XUSBB   21                 49 #define TEGRA_POWERGATE_XUSBB   21
 50 #define TEGRA_POWERGATE_XUSBC   22                 50 #define TEGRA_POWERGATE_XUSBC   22
 51 #define TEGRA_POWERGATE_VIC     23                 51 #define TEGRA_POWERGATE_VIC     23
 52 #define TEGRA_POWERGATE_IRAM    24                 52 #define TEGRA_POWERGATE_IRAM    24
 53 #define TEGRA_POWERGATE_NVDEC   25                 53 #define TEGRA_POWERGATE_NVDEC   25
 54 #define TEGRA_POWERGATE_NVJPG   26                 54 #define TEGRA_POWERGATE_NVJPG   26
 55 #define TEGRA_POWERGATE_AUD     27                 55 #define TEGRA_POWERGATE_AUD     27
 56 #define TEGRA_POWERGATE_DFD     28                 56 #define TEGRA_POWERGATE_DFD     28
 57 #define TEGRA_POWERGATE_VE2     29                 57 #define TEGRA_POWERGATE_VE2     29
 58 #define TEGRA_POWERGATE_MAX     TEGRA_POWERGAT     58 #define TEGRA_POWERGATE_MAX     TEGRA_POWERGATE_VE2
 59                                                    59 
 60 #define TEGRA_POWERGATE_3D0     TEGRA_POWERGAT     60 #define TEGRA_POWERGATE_3D0     TEGRA_POWERGATE_3D
 61                                                    61 
 62 /**                                                62 /**
 63  * enum tegra_io_pad - I/O pad group identifie     63  * enum tegra_io_pad - I/O pad group identifier
 64  *                                                 64  *
 65  * I/O pins on Tegra SoCs are grouped into so-     65  * I/O pins on Tegra SoCs are grouped into so-called I/O pads. Each such pad
 66  * can be used to control the common voltage s     66  * can be used to control the common voltage signal level and power state of
 67  * the pins of the given pad.                      67  * the pins of the given pad.
 68  */                                                68  */
 69 enum tegra_io_pad {                                69 enum tegra_io_pad {
 70         TEGRA_IO_PAD_AUDIO,                        70         TEGRA_IO_PAD_AUDIO,
 71         TEGRA_IO_PAD_AUDIO_HV,                     71         TEGRA_IO_PAD_AUDIO_HV,
 72         TEGRA_IO_PAD_BB,                           72         TEGRA_IO_PAD_BB,
 73         TEGRA_IO_PAD_CAM,                          73         TEGRA_IO_PAD_CAM,
 74         TEGRA_IO_PAD_COMP,                         74         TEGRA_IO_PAD_COMP,
 75         TEGRA_IO_PAD_CONN,                         75         TEGRA_IO_PAD_CONN,
 76         TEGRA_IO_PAD_CSIA,                         76         TEGRA_IO_PAD_CSIA,
 77         TEGRA_IO_PAD_CSIB,                         77         TEGRA_IO_PAD_CSIB,
 78         TEGRA_IO_PAD_CSIC,                         78         TEGRA_IO_PAD_CSIC,
 79         TEGRA_IO_PAD_CSID,                         79         TEGRA_IO_PAD_CSID,
 80         TEGRA_IO_PAD_CSIE,                         80         TEGRA_IO_PAD_CSIE,
 81         TEGRA_IO_PAD_CSIF,                         81         TEGRA_IO_PAD_CSIF,
 82         TEGRA_IO_PAD_CSIG,                         82         TEGRA_IO_PAD_CSIG,
 83         TEGRA_IO_PAD_CSIH,                         83         TEGRA_IO_PAD_CSIH,
 84         TEGRA_IO_PAD_DAP3,                         84         TEGRA_IO_PAD_DAP3,
 85         TEGRA_IO_PAD_DAP5,                         85         TEGRA_IO_PAD_DAP5,
 86         TEGRA_IO_PAD_DBG,                          86         TEGRA_IO_PAD_DBG,
 87         TEGRA_IO_PAD_DEBUG_NONAO,                  87         TEGRA_IO_PAD_DEBUG_NONAO,
 88         TEGRA_IO_PAD_DMIC,                         88         TEGRA_IO_PAD_DMIC,
 89         TEGRA_IO_PAD_DMIC_HV,                      89         TEGRA_IO_PAD_DMIC_HV,
 90         TEGRA_IO_PAD_DP,                           90         TEGRA_IO_PAD_DP,
 91         TEGRA_IO_PAD_DSI,                          91         TEGRA_IO_PAD_DSI,
 92         TEGRA_IO_PAD_DSIB,                         92         TEGRA_IO_PAD_DSIB,
 93         TEGRA_IO_PAD_DSIC,                         93         TEGRA_IO_PAD_DSIC,
 94         TEGRA_IO_PAD_DSID,                         94         TEGRA_IO_PAD_DSID,
 95         TEGRA_IO_PAD_EDP,                          95         TEGRA_IO_PAD_EDP,
 96         TEGRA_IO_PAD_EMMC,                         96         TEGRA_IO_PAD_EMMC,
 97         TEGRA_IO_PAD_EMMC2,                        97         TEGRA_IO_PAD_EMMC2,
 98         TEGRA_IO_PAD_EQOS,                         98         TEGRA_IO_PAD_EQOS,
 99         TEGRA_IO_PAD_GPIO,                         99         TEGRA_IO_PAD_GPIO,
100         TEGRA_IO_PAD_GP_PWM2,                     100         TEGRA_IO_PAD_GP_PWM2,
101         TEGRA_IO_PAD_GP_PWM3,                     101         TEGRA_IO_PAD_GP_PWM3,
102         TEGRA_IO_PAD_HDMI,                        102         TEGRA_IO_PAD_HDMI,
103         TEGRA_IO_PAD_HDMI_DP0,                    103         TEGRA_IO_PAD_HDMI_DP0,
104         TEGRA_IO_PAD_HDMI_DP1,                    104         TEGRA_IO_PAD_HDMI_DP1,
105         TEGRA_IO_PAD_HDMI_DP2,                    105         TEGRA_IO_PAD_HDMI_DP2,
106         TEGRA_IO_PAD_HDMI_DP3,                    106         TEGRA_IO_PAD_HDMI_DP3,
107         TEGRA_IO_PAD_HSIC,                        107         TEGRA_IO_PAD_HSIC,
108         TEGRA_IO_PAD_HV,                          108         TEGRA_IO_PAD_HV,
109         TEGRA_IO_PAD_LVDS,                        109         TEGRA_IO_PAD_LVDS,
110         TEGRA_IO_PAD_MIPI_BIAS,                   110         TEGRA_IO_PAD_MIPI_BIAS,
111         TEGRA_IO_PAD_NAND,                        111         TEGRA_IO_PAD_NAND,
112         TEGRA_IO_PAD_PEX_BIAS,                    112         TEGRA_IO_PAD_PEX_BIAS,
113         TEGRA_IO_PAD_PEX_CLK_BIAS,                113         TEGRA_IO_PAD_PEX_CLK_BIAS,
114         TEGRA_IO_PAD_PEX_CLK1,                    114         TEGRA_IO_PAD_PEX_CLK1,
115         TEGRA_IO_PAD_PEX_CLK2,                    115         TEGRA_IO_PAD_PEX_CLK2,
116         TEGRA_IO_PAD_PEX_CLK3,                    116         TEGRA_IO_PAD_PEX_CLK3,
117         TEGRA_IO_PAD_PEX_CLK_2_BIAS,              117         TEGRA_IO_PAD_PEX_CLK_2_BIAS,
118         TEGRA_IO_PAD_PEX_CLK_2,                   118         TEGRA_IO_PAD_PEX_CLK_2,
119         TEGRA_IO_PAD_PEX_CNTRL,                   119         TEGRA_IO_PAD_PEX_CNTRL,
120         TEGRA_IO_PAD_PEX_CTL2,                    120         TEGRA_IO_PAD_PEX_CTL2,
121         TEGRA_IO_PAD_PEX_L0_RST,                  121         TEGRA_IO_PAD_PEX_L0_RST,
122         TEGRA_IO_PAD_PEX_L1_RST,                  122         TEGRA_IO_PAD_PEX_L1_RST,
123         TEGRA_IO_PAD_PEX_L5_RST,                  123         TEGRA_IO_PAD_PEX_L5_RST,
124         TEGRA_IO_PAD_PWR_CTL,                     124         TEGRA_IO_PAD_PWR_CTL,
125         TEGRA_IO_PAD_SDMMC1,                      125         TEGRA_IO_PAD_SDMMC1,
126         TEGRA_IO_PAD_SDMMC1_HV,                   126         TEGRA_IO_PAD_SDMMC1_HV,
127         TEGRA_IO_PAD_SDMMC2,                      127         TEGRA_IO_PAD_SDMMC2,
128         TEGRA_IO_PAD_SDMMC2_HV,                   128         TEGRA_IO_PAD_SDMMC2_HV,
129         TEGRA_IO_PAD_SDMMC3,                      129         TEGRA_IO_PAD_SDMMC3,
130         TEGRA_IO_PAD_SDMMC3_HV,                   130         TEGRA_IO_PAD_SDMMC3_HV,
131         TEGRA_IO_PAD_SDMMC4,                      131         TEGRA_IO_PAD_SDMMC4,
132         TEGRA_IO_PAD_SOC_GPIO10,                  132         TEGRA_IO_PAD_SOC_GPIO10,
133         TEGRA_IO_PAD_SOC_GPIO12,                  133         TEGRA_IO_PAD_SOC_GPIO12,
134         TEGRA_IO_PAD_SOC_GPIO13,                  134         TEGRA_IO_PAD_SOC_GPIO13,
135         TEGRA_IO_PAD_SOC_GPIO53,                  135         TEGRA_IO_PAD_SOC_GPIO53,
136         TEGRA_IO_PAD_SPI,                         136         TEGRA_IO_PAD_SPI,
137         TEGRA_IO_PAD_SPI_HV,                      137         TEGRA_IO_PAD_SPI_HV,
138         TEGRA_IO_PAD_SYS_DDC,                     138         TEGRA_IO_PAD_SYS_DDC,
139         TEGRA_IO_PAD_UART,                        139         TEGRA_IO_PAD_UART,
140         TEGRA_IO_PAD_UART4,                       140         TEGRA_IO_PAD_UART4,
141         TEGRA_IO_PAD_UART5,                       141         TEGRA_IO_PAD_UART5,
142         TEGRA_IO_PAD_UFS,                         142         TEGRA_IO_PAD_UFS,
143         TEGRA_IO_PAD_USB0,                        143         TEGRA_IO_PAD_USB0,
144         TEGRA_IO_PAD_USB1,                        144         TEGRA_IO_PAD_USB1,
145         TEGRA_IO_PAD_USB2,                        145         TEGRA_IO_PAD_USB2,
146         TEGRA_IO_PAD_USB3,                        146         TEGRA_IO_PAD_USB3,
147         TEGRA_IO_PAD_USB_BIAS,                    147         TEGRA_IO_PAD_USB_BIAS,
148         TEGRA_IO_PAD_AO_HV,                       148         TEGRA_IO_PAD_AO_HV,
149 };                                                149 };
150                                                   150 
151 #ifdef CONFIG_SOC_TEGRA_PMC                       151 #ifdef CONFIG_SOC_TEGRA_PMC
152 int tegra_powergate_power_on(unsigned int id);    152 int tegra_powergate_power_on(unsigned int id);
153 int tegra_powergate_power_off(unsigned int id)    153 int tegra_powergate_power_off(unsigned int id);
154 int tegra_powergate_remove_clamping(unsigned i    154 int tegra_powergate_remove_clamping(unsigned int id);
155                                                   155 
156 /* Must be called with clk disabled, and retur    156 /* Must be called with clk disabled, and returns with clk enabled */
157 int tegra_powergate_sequence_power_up(unsigned    157 int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk,
158                                       struct r    158                                       struct reset_control *rst);
159                                                   159 
160 int tegra_io_pad_power_enable(enum tegra_io_pa    160 int tegra_io_pad_power_enable(enum tegra_io_pad id);
161 int tegra_io_pad_power_disable(enum tegra_io_p    161 int tegra_io_pad_power_disable(enum tegra_io_pad id);
162                                                   162 
163 void tegra_pmc_set_suspend_mode(enum tegra_sus    163 void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
164 void tegra_pmc_enter_suspend_mode(enum tegra_s    164 void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
165                                                   165 
166 bool tegra_pmc_core_domain_state_synced(void);    166 bool tegra_pmc_core_domain_state_synced(void);
167                                                   167 
168 #else                                             168 #else
169 static inline int tegra_powergate_power_on(uns    169 static inline int tegra_powergate_power_on(unsigned int id)
170 {                                                 170 {
171         return -ENOSYS;                           171         return -ENOSYS;
172 }                                                 172 }
173                                                   173 
174 static inline int tegra_powergate_power_off(un    174 static inline int tegra_powergate_power_off(unsigned int id)
175 {                                                 175 {
176         return -ENOSYS;                           176         return -ENOSYS;
177 }                                                 177 }
178                                                   178 
179 static inline int tegra_powergate_remove_clamp    179 static inline int tegra_powergate_remove_clamping(unsigned int id)
180 {                                                 180 {
181         return -ENOSYS;                           181         return -ENOSYS;
182 }                                                 182 }
183                                                   183 
184 static inline int tegra_powergate_sequence_pow    184 static inline int tegra_powergate_sequence_power_up(unsigned int id,
185                                                   185                                                     struct clk *clk,
186                                                   186                                                     struct reset_control *rst)
187 {                                                 187 {
188         return -ENOSYS;                           188         return -ENOSYS;
189 }                                                 189 }
190                                                   190 
191 static inline int tegra_io_pad_power_enable(en    191 static inline int tegra_io_pad_power_enable(enum tegra_io_pad id)
192 {                                                 192 {
193         return -ENOSYS;                           193         return -ENOSYS;
194 }                                                 194 }
195                                                   195 
196 static inline int tegra_io_pad_power_disable(e    196 static inline int tegra_io_pad_power_disable(enum tegra_io_pad id)
197 {                                                 197 {
198         return -ENOSYS;                           198         return -ENOSYS;
199 }                                                 199 }
200                                                   200 
201 static inline int tegra_io_pad_get_voltage(enu    201 static inline int tegra_io_pad_get_voltage(enum tegra_io_pad id)
202 {                                                 202 {
203         return -ENOSYS;                           203         return -ENOSYS;
204 }                                                 204 }
205                                                   205 
206 static inline void tegra_pmc_set_suspend_mode(    206 static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
207 {                                                 207 {
208 }                                                 208 }
209                                                   209 
210 static inline void tegra_pmc_enter_suspend_mod    210 static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
211 {                                                 211 {
212 }                                                 212 }
213                                                   213 
214 static inline bool tegra_pmc_core_domain_state    214 static inline bool tegra_pmc_core_domain_state_synced(void)
215 {                                                 215 {
216         return false;                             216         return false;
217 }                                                 217 }
218                                                   218 
219 #endif /* CONFIG_SOC_TEGRA_PMC */                 219 #endif /* CONFIG_SOC_TEGRA_PMC */
220                                                   220 
221 #if defined(CONFIG_SOC_TEGRA_PMC) && defined(C    221 #if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
222 enum tegra_suspend_mode tegra_pmc_get_suspend_    222 enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
223 #else                                             223 #else
224 static inline enum tegra_suspend_mode tegra_pm    224 static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
225 {                                                 225 {
226         return TEGRA_SUSPEND_NONE;                226         return TEGRA_SUSPEND_NONE;
227 }                                                 227 }
228 #endif                                            228 #endif
229                                                   229 
230 #endif /* __SOC_TEGRA_PMC_H__ */                  230 #endif /* __SOC_TEGRA_PMC_H__ */
231                                                   231 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php