18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This header provides constants for binding aspeed,*-gpio. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * The first cell in Aspeed's GPIO specifier is the GPIO ID. The macros below 68c2ecf20Sopenharmony_ci * provide names for this. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * The second cell contains standard flag values specified in gpio.h. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_GPIO_ASPEED_GPIO_H 128c2ecf20Sopenharmony_ci#define _DT_BINDINGS_GPIO_ASPEED_GPIO_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <dt-bindings/gpio/gpio.h> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_A 0 178c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_B 1 188c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_C 2 198c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_D 3 208c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_E 4 218c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_F 5 228c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_G 6 238c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_H 7 248c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_I 8 258c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_J 9 268c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_K 10 278c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_L 11 288c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_M 12 298c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_N 13 308c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_O 14 318c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_P 15 328c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_Q 16 338c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_R 17 348c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_S 18 358c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_T 19 368c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_U 20 378c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_V 21 388c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_W 22 398c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_X 23 408c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_Y 24 418c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_Z 25 428c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_AA 26 438c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_AB 27 448c2ecf20Sopenharmony_ci#define ASPEED_GPIO_PORT_AC 28 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define ASPEED_GPIO(port, offset) \ 478c2ecf20Sopenharmony_ci ((ASPEED_GPIO_PORT_##port * 8) + offset) 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#endif 50