162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This header provides constants for binding nvidia,tegra*-gpio. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below 662306a36Sopenharmony_ci * provide names for this. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * The second cell contains standard flag values specified in gpio.h. 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#ifndef _DT_BINDINGS_GPIO_TEGRA_GPIO_H 1262306a36Sopenharmony_ci#define _DT_BINDINGS_GPIO_TEGRA_GPIO_H 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include <dt-bindings/gpio/gpio.h> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_A 0 1762306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_B 1 1862306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_C 2 1962306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_D 3 2062306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_E 4 2162306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_F 5 2262306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_G 6 2362306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_H 7 2462306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_I 8 2562306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_J 9 2662306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_K 10 2762306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_L 11 2862306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_M 12 2962306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_N 13 3062306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_O 14 3162306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_P 15 3262306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_Q 16 3362306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_R 17 3462306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_S 18 3562306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_T 19 3662306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_U 20 3762306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_V 21 3862306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_W 22 3962306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_X 23 4062306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_Y 24 4162306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_Z 25 4262306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_AA 26 4362306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_BB 27 4462306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_CC 28 4562306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_DD 29 4662306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_EE 30 4762306a36Sopenharmony_ci#define TEGRA_GPIO_PORT_FF 31 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci#define TEGRA_GPIO(port, offset) \ 5062306a36Sopenharmony_ci ((TEGRA_GPIO_PORT_##port * 8) + offset) 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#endif 53