Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  * This header provides constants for binding aspeed,*-gpio.
0004  *
0005  * The first cell in Aspeed's GPIO specifier is the GPIO ID. The macros below
0006  * provide names for this.
0007  *
0008  * The second cell contains standard flag values specified in gpio.h.
0009  */
0010 
0011 #ifndef _DT_BINDINGS_GPIO_ASPEED_GPIO_H
0012 #define _DT_BINDINGS_GPIO_ASPEED_GPIO_H
0013 
0014 #include <dt-bindings/gpio/gpio.h>
0015 
0016 #define ASPEED_GPIO_PORT_A 0
0017 #define ASPEED_GPIO_PORT_B 1
0018 #define ASPEED_GPIO_PORT_C 2
0019 #define ASPEED_GPIO_PORT_D 3
0020 #define ASPEED_GPIO_PORT_E 4
0021 #define ASPEED_GPIO_PORT_F 5
0022 #define ASPEED_GPIO_PORT_G 6
0023 #define ASPEED_GPIO_PORT_H 7
0024 #define ASPEED_GPIO_PORT_I 8
0025 #define ASPEED_GPIO_PORT_J 9
0026 #define ASPEED_GPIO_PORT_K 10
0027 #define ASPEED_GPIO_PORT_L 11
0028 #define ASPEED_GPIO_PORT_M 12
0029 #define ASPEED_GPIO_PORT_N 13
0030 #define ASPEED_GPIO_PORT_O 14
0031 #define ASPEED_GPIO_PORT_P 15
0032 #define ASPEED_GPIO_PORT_Q 16
0033 #define ASPEED_GPIO_PORT_R 17
0034 #define ASPEED_GPIO_PORT_S 18
0035 #define ASPEED_GPIO_PORT_T 19
0036 #define ASPEED_GPIO_PORT_U 20
0037 #define ASPEED_GPIO_PORT_V 21
0038 #define ASPEED_GPIO_PORT_W 22
0039 #define ASPEED_GPIO_PORT_X 23
0040 #define ASPEED_GPIO_PORT_Y 24
0041 #define ASPEED_GPIO_PORT_Z 25
0042 #define ASPEED_GPIO_PORT_AA 26
0043 #define ASPEED_GPIO_PORT_AB 27
0044 #define ASPEED_GPIO_PORT_AC 28
0045 
0046 #define ASPEED_GPIO(port, offset) \
0047     ((ASPEED_GPIO_PORT_##port * 8) + offset)
0048 
0049 #endif