diff options
| author | Suresh Mangipudi <smangipudi@nvidia.com> | 2016-12-23 05:24:57 -0500 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-12 06:13:50 -0500 |
| commit | cd7c4178bae9abf4d6723bf36dc3dcf91daec078 (patch) | |
| tree | a82d073212c2534f798e6079462e26ea67077706 /include/dt-bindings | |
| parent | 1e0e87278fec2c4739bc59161c83b52482ae7bef (diff) | |
tegra: GPIO: Add support for T194 GPIO
Add T194 GPIO tables for AON and MAIN GPIO's
Add new compatible strings for T194 to support AON and MAIN GPIO's
Bug 1842952
Change-Id: I8a90b9067165d348388e558ed2cc9e5517634133
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/1276130
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'include/dt-bindings')
| -rw-r--r-- | include/dt-bindings/gpio/tegra194-gpio.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/include/dt-bindings/gpio/tegra194-gpio.h b/include/dt-bindings/gpio/tegra194-gpio.h new file mode 100644 index 000000000..5d4a481d3 --- /dev/null +++ b/include/dt-bindings/gpio/tegra194-gpio.h | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | /* | ||
| 2 | * This header provides constants for binding nvidia,tegra1i94-gpio*. | ||
| 3 | * | ||
| 4 | * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below | ||
| 5 | * provide names for this. | ||
| 6 | * | ||
| 7 | * The second cell contains standard flag values specified in gpio.h. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _DT_BINDINGS_GPIO_TEGRA194_GPIO_H | ||
| 11 | #define _DT_BINDINGS_GPIO_TEGRA194_GPIO_H | ||
| 12 | |||
| 13 | #include <dt-bindings/gpio/gpio.h> | ||
| 14 | |||
| 15 | /* GPIOs implemented by main GPIO controller */ | ||
| 16 | #define TEGRA194_MAIN_GPIO_PORT_A 0 | ||
| 17 | #define TEGRA194_MAIN_GPIO_PORT_B 1 | ||
| 18 | #define TEGRA194_MAIN_GPIO_PORT_C 2 | ||
| 19 | #define TEGRA194_MAIN_GPIO_PORT_D 3 | ||
| 20 | #define TEGRA194_MAIN_GPIO_PORT_E 4 | ||
| 21 | #define TEGRA194_MAIN_GPIO_PORT_F 5 | ||
| 22 | #define TEGRA194_MAIN_GPIO_PORT_G 6 | ||
| 23 | #define TEGRA194_MAIN_GPIO_PORT_H 7 | ||
| 24 | #define TEGRA194_MAIN_GPIO_PORT_I 8 | ||
| 25 | #define TEGRA194_MAIN_GPIO_PORT_J 9 | ||
| 26 | #define TEGRA194_MAIN_GPIO_PORT_K 10 | ||
| 27 | #define TEGRA194_MAIN_GPIO_PORT_L 11 | ||
| 28 | #define TEGRA194_MAIN_GPIO_PORT_M 12 | ||
| 29 | #define TEGRA194_MAIN_GPIO_PORT_N 13 | ||
| 30 | #define TEGRA194_MAIN_GPIO_PORT_O 14 | ||
| 31 | #define TEGRA194_MAIN_GPIO_PORT_P 15 | ||
| 32 | #define TEGRA194_MAIN_GPIO_PORT_Q 16 | ||
| 33 | #define TEGRA194_MAIN_GPIO_PORT_R 17 | ||
| 34 | #define TEGRA194_MAIN_GPIO_PORT_S 18 | ||
| 35 | #define TEGRA194_MAIN_GPIO_PORT_T 19 | ||
| 36 | #define TEGRA194_MAIN_GPIO_PORT_U 20 | ||
| 37 | #define TEGRA194_MAIN_GPIO_PORT_V 21 | ||
| 38 | #define TEGRA194_MAIN_GPIO_PORT_W 22 | ||
| 39 | #define TEGRA194_MAIN_GPIO_PORT_X 23 | ||
| 40 | #define TEGRA194_MAIN_GPIO_PORT_Y 24 | ||
| 41 | #define TEGRA194_MAIN_GPIO_PORT_Z 25 | ||
| 42 | |||
| 43 | #define TEGRA194_MAIN_GPIO(port, offset) \ | ||
| 44 | ((TEGRA194_MAIN_GPIO_PORT_##port * 8) + offset) | ||
| 45 | |||
| 46 | /* GPIOs implemented by AON GPIO controller */ | ||
| 47 | #define TEGRA194_AON_GPIO_PORT_AA 0 | ||
| 48 | #define TEGRA194_AON_GPIO_PORT_BB 1 | ||
| 49 | #define TEGRA194_AON_GPIO_PORT_CC 2 | ||
| 50 | #define TEGRA194_AON_GPIO_PORT_DD 3 | ||
| 51 | #define TEGRA194_AON_GPIO_PORT_EE 4 | ||
| 52 | #define TEGRA194_AON_GPIO_PORT_FF 5 | ||
| 53 | |||
| 54 | #define TEGRA194_AON_GPIO(port, offset) \ | ||
| 55 | ((TEGRA194_AON_GPIO_PORT_##port * 8) + offset) | ||
| 56 | |||
| 57 | /* All pins */ | ||
| 58 | #define TEGRA_PIN_BASE_ID_A 0 | ||
| 59 | #define TEGRA_PIN_BASE_ID_B 1 | ||
| 60 | #define TEGRA_PIN_BASE_ID_C 2 | ||
| 61 | #define TEGRA_PIN_BASE_ID_D 3 | ||
| 62 | #define TEGRA_PIN_BASE_ID_E 4 | ||
| 63 | #define TEGRA_PIN_BASE_ID_F 5 | ||
| 64 | #define TEGRA_PIN_BASE_ID_G 6 | ||
| 65 | #define TEGRA_PIN_BASE_ID_H 7 | ||
| 66 | #define TEGRA_PIN_BASE_ID_I 8 | ||
| 67 | #define TEGRA_PIN_BASE_ID_J 9 | ||
| 68 | #define TEGRA_PIN_BASE_ID_K 10 | ||
| 69 | #define TEGRA_PIN_BASE_ID_L 11 | ||
| 70 | #define TEGRA_PIN_BASE_ID_M 12 | ||
| 71 | #define TEGRA_PIN_BASE_ID_N 13 | ||
| 72 | #define TEGRA_PIN_BASE_ID_O 14 | ||
| 73 | #define TEGRA_PIN_BASE_ID_P 15 | ||
| 74 | #define TEGRA_PIN_BASE_ID_Q 16 | ||
| 75 | #define TEGRA_PIN_BASE_ID_R 17 | ||
| 76 | #define TEGRA_PIN_BASE_ID_S 18 | ||
| 77 | #define TEGRA_PIN_BASE_ID_T 19 | ||
| 78 | #define TEGRA_PIN_BASE_ID_U 20 | ||
| 79 | #define TEGRA_PIN_BASE_ID_V 21 | ||
| 80 | #define TEGRA_PIN_BASE_ID_W 22 | ||
| 81 | #define TEGRA_PIN_BASE_ID_X 23 | ||
| 82 | #define TEGRA_PIN_BASE_ID_Y 24 | ||
| 83 | #define TEGRA_PIN_BASE_ID_Z 25 | ||
| 84 | #define TEGRA_PIN_BASE_ID_AA 26 | ||
| 85 | #define TEGRA_PIN_BASE_ID_BB 27 | ||
| 86 | #define TEGRA_PIN_BASE_ID_CC 28 | ||
| 87 | #define TEGRA_PIN_BASE_ID_DD 29 | ||
| 88 | #define TEGRA_PIN_BASE_ID_EE 30 | ||
| 89 | #define TEGRA_PIN_BASE_ID_FF 31 | ||
| 90 | |||
| 91 | #define TEGRA_PIN_BASE(port) (TEGRA_PIN_BASE_ID_##port * 8) | ||
| 92 | |||
| 93 | #define TEGRA194_MAIN_GPIO_RANGE(st, end) \ | ||
| 94 | ((TEGRA194_MAIN_GPIO_PORT_##end - TEGRA194_MAIN_GPIO_PORT_##st + 1) * 8) | ||
| 95 | #define TEGRA194_MAIN_GPIO_BASE(port) (TEGRA194_MAIN_GPIO_PORT_##port * 8) | ||
| 96 | |||
| 97 | #define TEGRA194_AON_GPIO_RANGE(st, end) \ | ||
| 98 | ((TEGRA194_AON_GPIO_PORT_##end - TEGRA194_AON_GPIO_PORT_##st + 1) * 8) | ||
| 99 | #define TEGRA194_AON_GPIO_BASE(port) (TEGRA194_AON_GPIO_PORT_##port * 8) | ||
| 100 | |||
| 101 | #endif | ||
