Home | History | Annotate | Line # | Download | only in gpio
      1 /*	$NetBSD: tegra-gpio.h,v 1.1.1.2 2017/11/30 19:40:51 jmcneill Exp $	*/
      2 
      3 /* SPDX-License-Identifier: GPL-2.0 */
      4 /*
      5  * This header provides constants for binding nvidia,tegra*-gpio.
      6  *
      7  * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
      8  * provide names for this.
      9  *
     10  * The second cell contains standard flag values specified in gpio.h.
     11  */
     12 
     13 #ifndef _DT_BINDINGS_GPIO_TEGRA_GPIO_H
     14 #define _DT_BINDINGS_GPIO_TEGRA_GPIO_H
     15 
     16 #include <dt-bindings/gpio/gpio.h>
     17 
     18 #define TEGRA_GPIO_PORT_A 0
     19 #define TEGRA_GPIO_PORT_B 1
     20 #define TEGRA_GPIO_PORT_C 2
     21 #define TEGRA_GPIO_PORT_D 3
     22 #define TEGRA_GPIO_PORT_E 4
     23 #define TEGRA_GPIO_PORT_F 5
     24 #define TEGRA_GPIO_PORT_G 6
     25 #define TEGRA_GPIO_PORT_H 7
     26 #define TEGRA_GPIO_PORT_I 8
     27 #define TEGRA_GPIO_PORT_J 9
     28 #define TEGRA_GPIO_PORT_K 10
     29 #define TEGRA_GPIO_PORT_L 11
     30 #define TEGRA_GPIO_PORT_M 12
     31 #define TEGRA_GPIO_PORT_N 13
     32 #define TEGRA_GPIO_PORT_O 14
     33 #define TEGRA_GPIO_PORT_P 15
     34 #define TEGRA_GPIO_PORT_Q 16
     35 #define TEGRA_GPIO_PORT_R 17
     36 #define TEGRA_GPIO_PORT_S 18
     37 #define TEGRA_GPIO_PORT_T 19
     38 #define TEGRA_GPIO_PORT_U 20
     39 #define TEGRA_GPIO_PORT_V 21
     40 #define TEGRA_GPIO_PORT_W 22
     41 #define TEGRA_GPIO_PORT_X 23
     42 #define TEGRA_GPIO_PORT_Y 24
     43 #define TEGRA_GPIO_PORT_Z 25
     44 #define TEGRA_GPIO_PORT_AA 26
     45 #define TEGRA_GPIO_PORT_BB 27
     46 #define TEGRA_GPIO_PORT_CC 28
     47 #define TEGRA_GPIO_PORT_DD 29
     48 #define TEGRA_GPIO_PORT_EE 30
     49 #define TEGRA_GPIO_PORT_FF 31
     50 
     51 #define TEGRA_GPIO(port, offset) \
     52 	((TEGRA_GPIO_PORT_##port * 8) + offset)
     53 
     54 #endif
     55