1a7d1ecb6SJoel Stanley /* SPDX-License-Identifier: GPL-2.0+ */ 2a7d1ecb6SJoel Stanley /* 3a7d1ecb6SJoel Stanley * This header provides constants for binding aspeed,*-gpio. 4a7d1ecb6SJoel Stanley * 5a7d1ecb6SJoel Stanley * The first cell in Aspeed's GPIO specifier is the GPIO ID. The macros below 6a7d1ecb6SJoel Stanley * provide names for this. 7a7d1ecb6SJoel Stanley * 8a7d1ecb6SJoel Stanley * The second cell contains standard flag values specified in gpio.h. 9a7d1ecb6SJoel Stanley */ 10a7d1ecb6SJoel Stanley 11a7d1ecb6SJoel Stanley #ifndef _DT_BINDINGS_GPIO_ASPEED_GPIO_H 12a7d1ecb6SJoel Stanley #define _DT_BINDINGS_GPIO_ASPEED_GPIO_H 13a7d1ecb6SJoel Stanley 14a7d1ecb6SJoel Stanley #include <dt-bindings/gpio/gpio.h> 15a7d1ecb6SJoel Stanley 16a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_A 0 17a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_B 1 18a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_C 2 19a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_D 3 20a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_E 4 21a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_F 5 22a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_G 6 23a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_H 7 24a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_I 8 25a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_J 9 26a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_K 10 27a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_L 11 28a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_M 12 29a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_N 13 30a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_O 14 31a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_P 15 32a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_Q 16 33a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_R 17 34a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_S 18 35a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_T 19 36a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_U 20 37a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_V 21 38a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_W 22 39a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_X 23 40a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_Y 24 41a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_Z 25 42a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_AA 26 43a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_AB 27 44a7d1ecb6SJoel Stanley #define ASPEED_GPIO_PORT_AC 28 45a7d1ecb6SJoel Stanley 46a7d1ecb6SJoel Stanley #define ASPEED_GPIO(port, offset) \ 47a7d1ecb6SJoel Stanley ((ASPEED_GPIO_PORT_##port * 8) + offset) 48a7d1ecb6SJoel Stanley 49a7d1ecb6SJoel Stanley #endif 50