9 #include "../sf/service.h"
32 PcvModule_SDMMC1 = 20,
33 PcvModule_SDMMC2 = 21,
34 PcvModule_SDMMC3 = 22,
35 PcvModule_SDMMC4 = 23,
39 PcvModule_MSELECT = 27,
40 PcvModule_HDA2CODEC_2X = 28,
41 PcvModule_ACTMON = 29,
42 PcvModule_I2C_SLOW = 30,
46 PcvModule_XUSB_CORE_HOST = 34,
47 PcvModule_XUSB_FALCON = 35,
48 PcvModule_XUSB_FS = 36,
49 PcvModule_XUSB_CORE_DEV = 37,
50 PcvModule_XUSB_SS_HOSTDEV = 38,
55 PcvModule_HOST1X = 43,
56 PcvModule_ENTROPY = 44,
57 PcvModule_SOC_THERM = 45,
63 PcvModule_VI_I2C = 51,
67 PcvModule_UARTAPE = 55,
69 PcvModule_PLLE0_0 = 57,
70 PcvModule_PLLE0_1 = 58,
73 PcvModule_DPAUX1 = 61,
74 PcvModule_MIPI_CAL = 62,
75 PcvModule_UART_FST_MIPI_CAL = 63,
78 PcvModule_SOR_SAFE = 66,
79 PcvModule_XUSB_SS = 67,
80 PcvModule_XUSB_HOST = 68,
81 PcvModule_XUSB_DEV = 69,
82 PcvModule_EXTPERIPH1 = 70,
84 PcvModule_HDA2HDMICODEC = 72,
90 PcvModule_PCIEXCLK = 78,
91 PcvModule_PEX_USB_UPHY = 79,
92 PcvModule_XUSB_PADCTL = 80,
93 PcvModule_APBDMA = 81,
94 PcvModule_USB2_TRK = 82,
95 PcvModule_PLLE0_2 = 83,
96 PcvModule_PLLE0_3 = 84,
98 PcvModule_EXTPERIPH2 = 86,
105 PcvModuleId_CpuBus = 0x40000001,
106 PcvModuleId_GPU = 0x40000002,
107 PcvModuleId_I2S1 = 0x40000003,
108 PcvModuleId_I2S2 = 0x40000004,
109 PcvModuleId_I2S3 = 0x40000005,
110 PcvModuleId_PWM = 0x40000006,
111 PcvModuleId_I2C1 = 0x02000001,
112 PcvModuleId_I2C2 = 0x02000002,
113 PcvModuleId_I2C3 = 0x02000003,
114 PcvModuleId_I2C4 = 0x02000004,
115 PcvModuleId_I2C5 = 0x02000005,
116 PcvModuleId_I2C6 = 0x02000006,
117 PcvModuleId_SPI1 = 0x07000000,
118 PcvModuleId_SPI2 = 0x07000001,
119 PcvModuleId_SPI3 = 0x07000002,
120 PcvModuleId_SPI4 = 0x07000003,
121 PcvModuleId_DISP1 = 0x40000011,
122 PcvModuleId_DISP2 = 0x40000012,
123 PcvModuleId_ISP = 0x40000013,
124 PcvModuleId_VI = 0x40000014,
125 PcvModuleId_SDMMC1 = 0x40000015,
126 PcvModuleId_SDMMC2 = 0x40000016,
127 PcvModuleId_SDMMC3 = 0x40000017,
128 PcvModuleId_SDMMC4 = 0x40000018,
129 PcvModuleId_OWR = 0x40000019,
130 PcvModuleId_CSITE = 0x4000001A,
131 PcvModuleId_TSEC = 0x4000001B,
132 PcvModuleId_MSELECT = 0x4000001C,
133 PcvModuleId_HDA2CODEC_2X = 0x4000001D,
134 PcvModuleId_ACTMON = 0x4000001E,
135 PcvModuleId_I2C_SLOW = 0x4000001F,
136 PcvModuleId_SOR1 = 0x40000020,
137 PcvModuleId_SATA = 0x40000021,
138 PcvModuleId_HDA = 0x40000022,
139 PcvModuleId_XUSB_CORE_HOST = 0x40000023,
140 PcvModuleId_XUSB_FALCON = 0x40000024,
141 PcvModuleId_XUSB_FS = 0x40000025,
142 PcvModuleId_XUSB_CORE_DEV = 0x40000026,
143 PcvModuleId_XUSB_SS_HOSTDEV = 0x40000027,
144 PcvModuleId_UARTA = 0x03000001,
145 PcvModuleId_UARTB = 0x35000405,
146 PcvModuleId_UARTC = 0x3500040F,
147 PcvModuleId_UARTD = 0x37000001,
148 PcvModuleId_HOST1X = 0x4000002C,
149 PcvModuleId_ENTROPY = 0x4000002D,
150 PcvModuleId_SOC_THERM = 0x4000002E,
151 PcvModuleId_VIC = 0x4000002F,
152 PcvModuleId_NVENC = 0x40000030,
153 PcvModuleId_NVJPG = 0x40000031,
154 PcvModuleId_NVDEC = 0x40000032,
155 PcvModuleId_QSPI = 0x40000033,
156 PcvModuleId_VI_I2C = 0x40000034,
157 PcvModuleId_TSECB = 0x40000035,
158 PcvModuleId_APE = 0x40000036,
159 PcvModuleId_ACLK = 0x40000037,
160 PcvModuleId_UARTAPE = 0x40000038,
161 PcvModuleId_EMC = 0x40000039,
162 PcvModuleId_PLLE0_0 = 0x4000003A,
163 PcvModuleId_PLLE0_1 = 0x4000003B,
164 PcvModuleId_DSI = 0x4000003C,
165 PcvModuleId_MAUD = 0x4000003D,
166 PcvModuleId_DPAUX1 = 0x4000003E,
167 PcvModuleId_MIPI_CAL = 0x4000003F,
168 PcvModuleId_UART_FST_MIPI_CAL = 0x40000040,
169 PcvModuleId_OSC = 0x40000041,
170 PcvModuleId_SCLK = 0x40000042,
171 PcvModuleId_SOR_SAFE = 0x40000043,
172 PcvModuleId_XUSB_SS = 0x40000044,
173 PcvModuleId_XUSB_HOST = 0x40000045,
174 PcvModuleId_XUSB_DEV = 0x40000046,
175 PcvModuleId_EXTPERIPH1 = 0x40000047,
176 PcvModuleId_AHUB = 0x40000048,
177 PcvModuleId_HDA2HDMICODEC = 0x40000049,
178 PcvModuleId_PLLP5 = 0x4000004A,
179 PcvModuleId_USBD = 0x4000004B,
180 PcvModuleId_USB2 = 0x4000004C,
181 PcvModuleId_PCIE = 0x4000004D,
182 PcvModuleId_AFI = 0x4000004E,
183 PcvModuleId_PCIEXCLK = 0x4000004F,
184 PcvModuleId_PEX_USB_UPHY = 0x40000050,
185 PcvModuleId_XUSB_PADCTL = 0x40000051,
186 PcvModuleId_APBDMA = 0x40000052,
187 PcvModuleId_USB2_TRK = 0x40000053,
188 PcvModuleId_PLLE0_2 = 0x40000054,
189 PcvModuleId_PLLE0_3 = 0x40000055,
190 PcvModuleId_CEC = 0x40000056,
191 PcvModuleId_EXTPERIPH2 = 0x40000057,
196 PcvClockRatesListType_Invalid = 0,
197 PcvClockRatesListType_Discrete = 1,
198 PcvClockRatesListType_Range = 2,
199 } PcvClockRatesListType;
Result pcvGetPossibleClockRates(PcvModule module, u32 *rates, s32 max_count, PcvClockRatesListType *out_type, s32 *out_count)
Only available on [1.0.0-7.0.1].
Result pcvGetVoltageEnabled(bool *isEnabled, u32 power_domain)
Only available on [1.0.0-7.0.1].
Result pcvGetClockRate(PcvModule module, u32 *out_hz)
Only available on [1.0.0-7.0.1].
Service * pcvGetServiceSession(void)
Gets the Service object for the actual pcv service session.
void pcvExit(void)
Exit pcv.
Result pcvSetVoltageEnabled(u32 power_domain, bool state)
Only available on [1.0.0-7.0.1].
Result pcvInitialize(void)
Initialize pcv.
Result pcvSetClockRate(PcvModule module, u32 hz)
Only available on [1.0.0-7.0.1].
PcvModuleId
Module id returned by [8.0.0+] pcv services See also: https://switchbrew.org/wiki/PCV_services#Module...
Definition: pcv.h:104
Service object structure.
Definition: service.h:14
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21