60 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. */3 4/*5 * This header provides constants for binding nvidia,tegra234-gpio*.6 *7 * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below8 * provide names for this.9 *10 * The second cell contains standard flag values specified in gpio.h.11 */12 13#ifndef _DT_BINDINGS_GPIO_TEGRA234_GPIO_H14#define _DT_BINDINGS_GPIO_TEGRA234_GPIO_H15 16#include <dt-bindings/gpio/gpio.h>17 18/* GPIOs implemented by main GPIO controller */19#define TEGRA234_MAIN_GPIO_PORT_A 020#define TEGRA234_MAIN_GPIO_PORT_B 121#define TEGRA234_MAIN_GPIO_PORT_C 222#define TEGRA234_MAIN_GPIO_PORT_D 323#define TEGRA234_MAIN_GPIO_PORT_E 424#define TEGRA234_MAIN_GPIO_PORT_F 525#define TEGRA234_MAIN_GPIO_PORT_G 626#define TEGRA234_MAIN_GPIO_PORT_H 727#define TEGRA234_MAIN_GPIO_PORT_I 828#define TEGRA234_MAIN_GPIO_PORT_J 929#define TEGRA234_MAIN_GPIO_PORT_K 1030#define TEGRA234_MAIN_GPIO_PORT_L 1131#define TEGRA234_MAIN_GPIO_PORT_M 1232#define TEGRA234_MAIN_GPIO_PORT_N 1333#define TEGRA234_MAIN_GPIO_PORT_P 1434#define TEGRA234_MAIN_GPIO_PORT_Q 1535#define TEGRA234_MAIN_GPIO_PORT_R 1636#define TEGRA234_MAIN_GPIO_PORT_X 1737#define TEGRA234_MAIN_GPIO_PORT_Y 1838#define TEGRA234_MAIN_GPIO_PORT_Z 1939#define TEGRA234_MAIN_GPIO_PORT_AC 2040#define TEGRA234_MAIN_GPIO_PORT_AD 2141#define TEGRA234_MAIN_GPIO_PORT_AE 2242#define TEGRA234_MAIN_GPIO_PORT_AF 2343#define TEGRA234_MAIN_GPIO_PORT_AG 2444 45#define TEGRA234_MAIN_GPIO(port, offset) \46 ((TEGRA234_MAIN_GPIO_PORT_##port * 8) + offset)47 48/* GPIOs implemented by AON GPIO controller */49#define TEGRA234_AON_GPIO_PORT_AA 050#define TEGRA234_AON_GPIO_PORT_BB 151#define TEGRA234_AON_GPIO_PORT_CC 252#define TEGRA234_AON_GPIO_PORT_DD 353#define TEGRA234_AON_GPIO_PORT_EE 454#define TEGRA234_AON_GPIO_PORT_GG 555 56#define TEGRA234_AON_GPIO(port, offset) \57 ((TEGRA234_AON_GPIO_PORT_##port * 8) + offset)58 59#endif60