NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gpio.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
18 #ifndef INCLUDED_GPIO_H
19 #define INCLUDED_GPIO_H
20 
33 typedef struct QbGpioIoctlRec
34 {
36  NvU32 Port;
38  NvU32 Pin;
40  NvU32 Val;
42 
44 {
45  NvU32 RegPhyAddr;
46  NvU32 RegVirtAddr;
47 };
48 
50 #define GPIO_VAL_SET 1
51 #define GPIO_VAL_RESET 0
53 
59 #define GPIO_IOCTL_SET_VAL 1
61 #define GPIO_IOCTL_RESET_VAL 2
63 #define GPIO_IOCTL_GET_INPUT_VAL 3
65 
66 /* Gpio Pins */
67 #define PIN0 0
68 #define PIN1 1
69 #define PIN2 2
70 #define PIN3 3
71 #define PIN4 4
72 #define PIN5 5
73 #define PIN6 6
74 #define PIN7 7
75 
76 /* Gpio Ports */
77 
78 /* Controller 0 */
79 #define TEGRA_GPIO_PORT_N 0
80 #define TEGRA_GPIO_PORT_O 1
81 #define TEGRA_GPIO_PORT_Q 2
82 #define TEGRA_GPIO_PORT_T 3
83 #define TEGRA_GPIO_PORT_I 4
84 #define TEGRA_GPIO_PORT_R 5
85 
86 /* Controller 1 */
87 #define TEGRA_GPIO_PORT_H 6
88 #define TEGRA_GPIO_PORT_L 7
89 #define TEGRA_GPIO_PORT_X 8
90 #define TEGRA_GPIO_PORT_Y 9
91 
92 /* Controller 2 */
93 #define TEGRA_GPIO_PORT_A 10
94 #define TEGRA_GPIO_PORT_E 11
95 #define TEGRA_GPIO_PORT_F 12
96 #define TEGRA_GPIO_PORT_BB 13
97 
98 /* Controller 3 */
99 #define TEGRA_GPIO_PORT_B 14
100 #define TEGRA_GPIO_PORT_C 15
101 #define TEGRA_GPIO_PORT_D 16
102 
103 /* Controller 4 */
104 #define TEGRA_GPIO_PORT_P 17
105 #define TEGRA_GPIO_PORT_G 18
106 
107 /* Controller 5 */
108 #define TEGRA_GPIO_PORT_J 19
109 #define TEGRA_GPIO_PORT_K 20
110 #define TEGRA_GPIO_PORT_CC 21
111 #define TEGRA_GPIO_PORT_M 22
112 
113 /* Aon Controller */
114 #define TEGRA_GPIO_PORT_S 23
115 #define TEGRA_GPIO_PORT_U 24
116 #define TEGRA_GPIO_PORT_V 25
117 #define TEGRA_GPIO_PORT_W 26
118 #define TEGRA_GPIO_PORT_Z 27
119 #define TEGRA_GPIO_PORT_AA 28
120 #define TEGRA_GPIO_PORT_EE 29
121 #define TEGRA_GPIO_PORT_FF 30
122 #define TEGRA_GPIO_PORT_GG 31
123 /* @note GPIO Port DD is not defined in argpio.h */
124 
128 NvError QbGpioInit(void);
129 
132 #endif // INCLUDED_GPIO_H
struct QbGpioIoctlRec QbGpioIoctl
Holds configurations for the GPIO pin.
NvError QbGpioInit(void)
Registers the GPIO driver to driver framework.
NvU32 Val
Holds the GPIO operation value.
Definition: gpio.h:40
NvU32 RegVirtAddr
Definition: gpio.h:46
NvU32 Pin
Holds the GPIO pin.
Definition: gpio.h:38
NvU32 Port
Holds the GPIO port.
Definition: gpio.h:36
NvU32 RegPhyAddr
Definition: gpio.h:45
Holds configurations for the GPIO pin.
Definition: gpio.h:33