Home | History | Annotate | Line # | Download | only in gpio
      1 /*	$NetBSD: tegra194-gpio.h,v 1.1.1.1 2018/04/28 18:25:53 jmcneill Exp $	*/
      2 
      3 /* SPDX-License-Identifier: GPL-2.0 */
      4 /* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. */
      5 
      6 /*
      7  * This header provides constants for binding nvidia,tegra194-gpio*.
      8  *
      9  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
     10  * provide names for this.
     11  *
     12  * The second cell contains standard flag values specified in gpio.h.
     13  */
     14 
     15 #ifndef _DT_BINDINGS_GPIO_TEGRA194_GPIO_H
     16 #define _DT_BINDINGS_GPIO_TEGRA194_GPIO_H
     17 
     18 #include <dt-bindings/gpio/gpio.h>
     19 
     20 /* GPIOs implemented by main GPIO controller */
     21 #define TEGRA194_MAIN_GPIO_PORT_A 0
     22 #define TEGRA194_MAIN_GPIO_PORT_B 1
     23 #define TEGRA194_MAIN_GPIO_PORT_C 2
     24 #define TEGRA194_MAIN_GPIO_PORT_D 3
     25 #define TEGRA194_MAIN_GPIO_PORT_E 4
     26 #define TEGRA194_MAIN_GPIO_PORT_F 5
     27 #define TEGRA194_MAIN_GPIO_PORT_G 6
     28 #define TEGRA194_MAIN_GPIO_PORT_H 7
     29 #define TEGRA194_MAIN_GPIO_PORT_I 8
     30 #define TEGRA194_MAIN_GPIO_PORT_J 9
     31 #define TEGRA194_MAIN_GPIO_PORT_K 10
     32 #define TEGRA194_MAIN_GPIO_PORT_L 11
     33 #define TEGRA194_MAIN_GPIO_PORT_M 12
     34 #define TEGRA194_MAIN_GPIO_PORT_N 13
     35 #define TEGRA194_MAIN_GPIO_PORT_O 14
     36 #define TEGRA194_MAIN_GPIO_PORT_P 15
     37 #define TEGRA194_MAIN_GPIO_PORT_Q 16
     38 #define TEGRA194_MAIN_GPIO_PORT_R 17
     39 #define TEGRA194_MAIN_GPIO_PORT_S 18
     40 #define TEGRA194_MAIN_GPIO_PORT_T 19
     41 #define TEGRA194_MAIN_GPIO_PORT_U 20
     42 #define TEGRA194_MAIN_GPIO_PORT_V 21
     43 #define TEGRA194_MAIN_GPIO_PORT_W 22
     44 #define TEGRA194_MAIN_GPIO_PORT_X 23
     45 #define TEGRA194_MAIN_GPIO_PORT_Y 24
     46 #define TEGRA194_MAIN_GPIO_PORT_Z 25
     47 #define TEGRA194_MAIN_GPIO_PORT_FF 26
     48 #define TEGRA194_MAIN_GPIO_PORT_GG 27
     49 
     50 #define TEGRA194_MAIN_GPIO(port, offset) \
     51 	((TEGRA194_MAIN_GPIO_PORT_##port * 8) + offset)
     52 
     53 /* GPIOs implemented by AON GPIO controller */
     54 #define TEGRA194_AON_GPIO_PORT_AA 0
     55 #define TEGRA194_AON_GPIO_PORT_BB 1
     56 #define TEGRA194_AON_GPIO_PORT_CC 2
     57 #define TEGRA194_AON_GPIO_PORT_DD 3
     58 #define TEGRA194_AON_GPIO_PORT_EE 4
     59 
     60 #define TEGRA194_AON_GPIO(port, offset) \
     61 	((TEGRA194_AON_GPIO_PORT_##port * 8) + offset)
     62 
     63 #endif
     64