AM261x MCU+ SDK
10.02.00
pinmux/am261x/pinmux.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Texas Instruments Incorporated
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
*
8
* Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
*
11
* Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the
14
* distribution.
15
*
16
* Neither the name of Texas Instruments Incorporated nor the names of
17
* its contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*
32
*/
33
63
#ifndef PINMUX_AM261X_H_
64
#define PINMUX_AM261X_H_
65
66
/* ========================================================================== */
67
/* Include Files */
68
/* ========================================================================== */
69
70
#include <stdint.h>
71
72
#ifdef __cplusplus
73
extern
"C"
{
74
#endif
75
76
/* ========================================================================== */
77
/* Macros & Typedefs */
78
/* ========================================================================== */
79
85
#define PINMUX_DOMAIN_ID_MAIN (0U)
86
89
#define PINMUX_END (-1)
90
91
#define PIN_MODE(mode) ((uint32_t) mode)
92
94
#define PIN_FORCE_INPUT_ENABLE (((uint32_t) 0x1U) << 4U)
95
96
#define PIN_FORCE_INPUT_DISABLE (((uint32_t) 0x3U) << 4U)
97
98
#define PIN_FORCE_OUTPUT_ENABLE (((uint32_t) 0x1U) << 6U)
99
100
#define PIN_FORCE_OUTPUT_DISABLE (((uint32_t) 0x3U) << 6U)
101
103
#define PIN_PULL_DISABLE (((uint32_t) 0x1U) << 8U)
104
105
#define PIN_PULL_UP (((uint32_t) 0x1U) << 9U)
106
107
#define PIN_PULL_DOWN (((uint32_t) 0x0U) << 9U)
108
110
#define PIN_SLEW_RATE_HIGH (((uint32_t) 0x0U) << 10U)
111
112
#define PIN_SLEW_RATE_LOW (((uint32_t) 0x1U) << 10U)
113
115
#define PIN_GPIO_R5SS0_0 (((uint32_t) 0x0U) << 16U)
116
117
#define PIN_GPIO_R5SS0_1 (((uint32_t) 0x1U) << 16U)
118
119
#define PIN_GPIO_R5SS1_0 (((uint32_t) 0x2U) << 16U)
120
121
#define PIN_GPIO_R5SS1_1 (((uint32_t) 0x3U) << 16U)
122
124
#define PIN_QUAL_SYNC (((uint32_t) 0x0U) << 18U)
125
126
#define PIN_QUAL_3SAMPLE (((uint32_t) 0x1U) << 18U)
127
128
#define PIN_QUAL_6SAMPLE (((uint32_t) 0x2U) << 18U)
129
130
#define PIN_QUAL_ASYNC (((uint32_t) 0x3U) << 18U)
131
133
#define PIN_INVERT (((uint32_t) 0x1U) << 20U)
134
135
#define PIN_NON_INVERT (((uint32_t) 0x0U) << 20U)
136
137
144
#define PIN_GPIO0 (0x00000000U)
145
#define PIN_GPIO1 (0x00000004U)
146
#define PIN_GPIO2 (0x00000008U)
147
#define PIN_GPIO3 (0x0000000CU)
148
#define PIN_GPIO4 (0x00000010U)
149
#define PIN_GPIO5 (0x00000014U)
150
#define PIN_GPIO6 (0x00000018U)
151
#define PIN_GPIO7 (0x0000001CU)
152
#define PIN_GPIO8 (0x00000020U)
153
#define PIN_GPIO9 (0x00000024U)
154
#define PIN_GPIO10 (0x00000028U)
155
#define PIN_GPIO11 (0x0000002CU)
156
#define PIN_GPIO12 (0x00000030U)
157
#define PIN_GPIO13 (0x00000034U)
158
#define PIN_GPIO14 (0x00000038U)
159
#define PIN_GPIO15 (0x0000003CU)
160
#define PIN_GPIO16 (0x00000040U)
161
#define PIN_GPIO17 (0x00000044U)
162
#define PIN_GPIO18 (0x00000048U)
163
#define PIN_GPIO19 (0x0000004CU)
164
#define PIN_GPIO20 (0x00000050U)
165
#define PIN_GPIO21 (0x00000054U)
166
#define PIN_GPIO22 (0x00000058U)
167
#define PIN_GPIO23 (0x0000005CU)
168
#define PIN_GPIO24 (0x00000060U)
169
#define PIN_GPIO25 (0x00000064U)
170
#define PIN_GPIO26 (0x00000068U)
171
#define PIN_GPIO27 (0x0000006CU)
172
#define PIN_GPIO28 (0x00000070U)
173
#define PIN_GPIO29 (0x00000074U)
174
#define PIN_GPIO30 (0x00000078U)
175
#define PIN_GPIO31 (0x0000007CU)
176
#define PIN_GPIO32 (0x00000080U)
177
#define PIN_GPIO33 (0x00000084U)
178
#define PIN_GPIO34 (0x00000088U)
179
#define PIN_GPIO35 (0x0000008CU)
180
#define PIN_GPIO36 (0x00000090U)
181
#define PIN_GPIO37 (0x00000094U)
182
#define PIN_GPIO38 (0x00000098U)
183
#define PIN_GPIO39 (0x0000009CU)
184
#define PIN_GPIO40 (0x000000A0U)
185
#define PIN_GPIO41 (0x000000A4U)
186
#define PIN_GPIO42 (0x000000A8U)
187
#define PIN_GPIO43 (0x000000ACU)
188
#define PIN_GPIO44 (0x000000B0U)
189
#define PIN_GPIO45 (0x000000B4U)
190
#define PIN_GPIO46 (0x000000B8U)
191
#define PIN_GPIO47 (0x000000BCU)
192
#define PIN_GPIO48 (0x000000C0U)
193
#define PIN_GPIO49 (0x000000C4U)
194
#define PIN_GPIO50 (0x000000C8U)
195
#define PIN_GPIO51 (0x000000CCU)
196
#define PIN_GPIO52 (0x000000D0U)
197
#define PIN_GPIO53 (0x000000D4U)
198
#define PIN_GPIO54 (0x000000D8U)
199
#define PIN_GPIO55 (0x000000DCU)
200
#define PIN_GPIO56 (0x000000E0U)
201
#define PIN_GPIO57 (0x000000E4U)
202
#define PIN_GPIO58 (0x000000E8U)
203
#define PIN_GPIO59 (0x000000ECU)
204
#define PIN_GPIO60 (0x000000F0U)
205
#define PIN_GPIO61 (0x000000F4U)
206
#define PIN_GPIO62 (0x000000F8U)
207
#define PIN_GPIO63 (0x000000FCU)
208
#define PIN_GPIO64 (0x00000100U)
209
#define PIN_GPIO65 (0x00000104U)
210
#define PIN_GPIO66 (0x00000108U)
211
#define PIN_GPIO67 (0x0000010CU)
212
#define PIN_GPIO68 (0x00000110U)
213
#define PIN_GPIO69 (0x00000114U)
214
#define PIN_GPIO70 (0x00000118U)
215
#define PIN_GPIO71 (0x0000011CU)
216
#define PIN_GPIO72 (0x00000120U)
217
#define PIN_GPIO73 (0x00000124U)
218
#define PIN_GPIO74 (0x00000128U)
219
#define PIN_GPIO75 (0x0000012CU)
220
#define PIN_GPIO76 (0x00000130U)
221
#define PIN_GPIO77 (0x00000134U)
222
#define PIN_GPIO78 (0x00000138U)
223
#define PIN_GPIO79 (0x0000013CU)
224
#define PIN_GPIO80 (0x00000140U)
225
#define PIN_GPIO81 (0x00000144U)
226
#define PIN_GPIO82 (0x00000148U)
227
#define PIN_GPIO83 (0x0000014CU)
228
#define PIN_GPIO84 (0x00000150U)
229
#define PIN_GPIO85 (0x00000154U)
230
#define PIN_GPIO86 (0x00000158U)
231
#define PIN_GPIO87 (0x0000015CU)
232
#define PIN_GPIO88 (0x00000160U)
233
#define PIN_GPIO89 (0x00000164U)
234
#define PIN_GPIO90 (0x00000168U)
235
#define PIN_GPIO91 (0x0000016CU)
236
#define PIN_GPIO92 (0x00000170U)
237
#define PIN_GPIO93 (0x00000174U)
238
#define PIN_GPIO94 (0x00000178U)
239
#define PIN_GPIO95 (0x0000017CU)
240
#define PIN_GPIO96 (0x00000180U)
241
#define PIN_GPIO97 (0x00000184U)
242
#define PIN_GPIO98 (0x00000188U)
243
#define PIN_GPIO99 (0x0000018CU)
244
#define PIN_GPIO100 (0x00000190U)
245
#define PIN_GPIO101 (0x00000194U)
246
#define PIN_GPIO102 (0x00000198U)
247
#define PIN_GPIO103 (0x0000019CU)
248
#define PIN_GPIO104 (0x000001A0U)
249
#define PIN_GPIO105 (0x000001A4U)
250
#define PIN_GPIO106 (0x000001A8U)
251
#define PIN_GPIO107 (0x000001ACU)
252
#define PIN_GPIO108 (0x000001B0U)
253
#define PIN_GPIO109 (0x000001B4U)
254
#define PIN_GPIO110 (0x000001B8U)
255
#define PIN_GPIO111 (0x000001BCU)
256
#define PIN_GPIO112 (0x000001C0U)
257
#define PIN_GPIO113 (0x000001C4U)
258
#define PIN_GPIO114 (0x000001C8U)
259
#define PIN_GPIO115 (0x000001CCU)
260
#define PIN_GPIO116 (0x000001D0U)
261
#define PIN_GPIO117 (0x000001D4U)
262
#define PIN_GPIO118 (0x000001D8U)
263
#define PIN_GPIO119 (0x000001DCU)
264
#define PIN_GPIO120 (0x000001E0U)
265
#define PIN_GPIO121 (0x000001E4U)
266
#define PIN_GPIO122 (0x000001E8U)
267
#define PIN_GPIO123 (0x000001ECU)
268
#define PIN_GPIO124 (0x000001F0U)
269
#define PIN_GPIO125 (0x000001F4U)
270
#define PIN_GPIO126 (0x000001F8U)
271
#define PIN_GPIO127 (0x000001FCU)
272
#define PIN_GPIO128 (0x00000200U)
273
#define PIN_GPIO129 (0x00000204U)
274
#define PIN_GPIO130 (0x00000208U)
275
#define PIN_GPIO131 (0x0000020CU)
276
#define PIN_GPIO132 (0x00000210U)
277
#define PIN_GPIO133 (0x00000214U)
278
#define PIN_GPIO134 (0x00000218U)
279
#define PIN_GPIO135 (0x0000021CU)
280
#define PIN_GPIO136 (0x00000220U)
281
#define PIN_GPIO137 (0x00000224U)
282
#define PIN_GPIO138 (0x00000228U)
283
#define PIN_GPIO139 (0x0000022CU)
284
#define PIN_GPIO140 (0x00000230U)
285
#define PIN_WARMRSTn (0x00000234U)
286
#define PIN_SAFETY_ERRORn (0x00000238U)
287
#define PIN_TDI (0x0000023CU)
288
#define PIN_TDO (0x00000240U)
289
#define PIN_TMS (0x00000244U)
290
#define PIN_TCK (0x00000248U)
291
#define PIN_OSPI0_CLKLB (0x0000024CU)
292
#define PIN_OSPI1_CLKLB (0x00000250U)
293
#define PIN_PORz (0x00000254U)
294
#define PIN_XTAL_XI (0x00000258U)
295
#define PIN_XTAL_XO (0x0000025CU)
296
#define PIN_ADC0_AIN0 (0x00000260U)
297
#define PIN_ADC0_AIN1 (0x00000264U)
298
#define PIN_ADC0_AIN2 (0x00000268U)
299
#define PIN_ADC0_AIN3 (0x0000026CU)
300
#define PIN_ADC0_AIN4 (0x00000270U)
301
#define PIN_ADC0_AIN5 (0x00000274U)
302
#define PIN_ADC0_AIN6 (0x00000278U)
303
#define PIN_ADC1_AIN0 (0x0000027CU)
304
#define PIN_ADC1_AIN1 (0x00000280U)
305
#define PIN_ADC1_AIN2 (0x00000284U)
306
#define PIN_ADC1_AIN3 (0x00000288U)
307
#define PIN_ADC1_AIN4 (0x0000028CU)
308
#define PIN_ADC1_AIN5 (0x00000290U)
309
#define PIN_ADC1_AIN6 (0x00000294U)
310
#define PIN_ADC2_AIN0 (0x00000298U)
311
#define PIN_ADC2_AIN1 (0x0000029CU)
312
#define PIN_ADC2_AIN2 (0x000002A0U)
313
#define PIN_ADC2_AIN3 (0x000002A4U)
314
#define PIN_ADC2_AIN4 (0x000002A8U)
315
#define PIN_ADC2_AIN5 (0x000002ACU)
316
#define PIN_ADC2_AIN6 (0x000002B0U)
317
#define PIN_ADC3_AIN0 (0x000002B4U)
318
#define PIN_ADC3_AIN1 (0x000002B8U)
319
#define PIN_ADC3_AIN2 (0x000002BCU)
320
#define PIN_ADC3_AIN3 (0x000002C0U)
321
#define PIN_ADC3_AIN4 (0x000002C4U)
322
#define PIN_ADC3_AIN5 (0x000002C8U)
323
#define PIN_ADC4_AIN0 (0x000002CCU)
324
#define PIN_ADC4_AIN1 (0x000002D0U)
325
#define PIN_ADC4_AIN2 (0x000002D4U)
326
#define PIN_ADC4_AIN3 (0x000002D8U)
327
#define PIN_ADC4_AIN4 (0x000002DCU)
328
#define PIN_ADC4_AIN5 (0x000002E0U)
329
#define PIN_ADC_VREFHISRC0 (0x000002E4U)
330
#define PIN_ADC_VREFLOSRC0 (0x000002E8U)
331
#define PIN_ADC_VREFHI0 (0x000002ECU)
332
#define PIN_ADC_VREFLO0 (0x000002F0U)
333
#define PIN_ADC_VREFHI1 (0x000002F4U)
334
#define PIN_ADC_VREFLO1 (0x000002F8U)
335
#define PIN_ADC_VREFHI2 (0x000002FCU)
336
#define PIN_ADC_VREFLO2 (0x00000300U)
337
#define PIN_ADC_VREFHISRC1 (0x00000304U)
338
#define PIN_ADC_VREFLOSRC1 (0x00000308U)
339
#define PIN_ADC_VREFHI3 (0x0000030CU)
340
#define PIN_ADC_VREFLO3 (0x00000310U)
341
#define PIN_ADC_VREFHI4 (0x00000314U)
342
#define PIN_ADC_VREFLO4 (0x00000318U)
343
#define PIN_ADC_CAL0 (0x0000031CU)
344
#define PIN_ADC_CAL1 (0x00000320U)
345
#define PIN_DAC_VREF0 (0x00000324U)
346
#define PIN_DAC_VREF1 (0x00000328U)
347
#define PIN_DAC_OUT (0x0000032CU)
348
#define PIN_TEMPCAL (0x00000330U)
349
#define PIN_VSYS_MON (0x00000334U)
350
#define PIN_ATESTV0 (0x00000338U)
351
#define PIN_ATESTV1 (0x0000033CU)
352
#define PIN_PMUBYPASS (0x00000340U)
353
#define PIN_USB0_CE (0x00000344U)
354
#define PIN_SDADC0_DP (0x00000348U)
355
#define PIN_SDADC0_DM (0x0000034CU)
356
#define PIN_ADC_CAL2 (0x00000350U)
357
#define PIN_ADC_R0_AIN0 (0x00000354U)
358
#define PIN_ADC_R0_AIN1 (0x00000358U)
359
#define PIN_ADC_R0_AIN2 (0x0000035CU)
360
#define PIN_ADC_R0_AIN3 (0x00000360U)
361
#define PIN_ADC_VREFLO5 (0x00000364U)
362
#define PIN_ADC_VREFHI5 (0x00000368U)
363
#define PIN_ADC_VREFLO6 (0x0000036CU)
364
#define PIN_ADC_VREFHI6 (0x00000370U)
365
#define PIN_ADC_R1_AIN0 (0x00000374U)
366
#define PIN_ADC_R1_AIN1 (0x00000378U)
367
#define PIN_ADC_R1_AIN2 (0x0000037CU)
368
#define PIN_ADC_R1_AIN3 (0x00000380U)
369
#define PIN_ADC_CAL3 (0x00000384U)
370
373
/* ========================================================================== */
374
/* Structures and Enums */
375
/* ========================================================================== */
376
378
typedef
struct
Pinmux_PerCfg
379
{
380
int16_t
offset
;
384
uint32_t
settings
;
394
}
Pinmux_PerCfg_t
;
395
396
/* ========================================================================== */
397
/* Global Variables Declarations */
398
/* ========================================================================== */
399
400
/* None */
401
402
/* ========================================================================== */
403
/* Function Declarations */
404
/* ========================================================================== */
405
416
void
Pinmux_config
(
const
Pinmux_PerCfg_t
*pinmuxCfg, uint32_t domainId);
417
418
/* ========================================================================== */
419
/* Static Function Definitions */
420
/* ========================================================================== */
421
422
/* None */
423
424
#ifdef __cplusplus
425
}
426
#endif
427
428
#endif
/* #ifndef PINMUX_AM64X_H_ */
429
Pinmux_PerCfg_t
Structure defining the pin configuration parameters.
Definition:
pinmux/am261x/pinmux.h:379
Pinmux_config
void Pinmux_config(const Pinmux_PerCfg_t *pinmuxCfg, uint32_t domainId)
This API configures the pinmux based on the domain.
Pinmux_PerCfg_t::offset
int16_t offset
Definition:
pinmux/am261x/pinmux.h:380
Pinmux_PerCfg_t::settings
uint32_t settings
Definition:
pinmux/am261x/pinmux.h:384
source
drivers
pinmux
am261x
pinmux.h
generated by
1.8.20