62 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. */3 4/*5 * This header provides constants for binding nvidia,tegra194-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_TEGRA194_GPIO_H14#define _DT_BINDINGS_GPIO_TEGRA194_GPIO_H15 16#include <dt-bindings/gpio/gpio.h>17 18/* GPIOs implemented by main GPIO controller */19#define TEGRA194_MAIN_GPIO_PORT_A 020#define TEGRA194_MAIN_GPIO_PORT_B 121#define TEGRA194_MAIN_GPIO_PORT_C 222#define TEGRA194_MAIN_GPIO_PORT_D 323#define TEGRA194_MAIN_GPIO_PORT_E 424#define TEGRA194_MAIN_GPIO_PORT_F 525#define TEGRA194_MAIN_GPIO_PORT_G 626#define TEGRA194_MAIN_GPIO_PORT_H 727#define TEGRA194_MAIN_GPIO_PORT_I 828#define TEGRA194_MAIN_GPIO_PORT_J 929#define TEGRA194_MAIN_GPIO_PORT_K 1030#define TEGRA194_MAIN_GPIO_PORT_L 1131#define TEGRA194_MAIN_GPIO_PORT_M 1232#define TEGRA194_MAIN_GPIO_PORT_N 1333#define TEGRA194_MAIN_GPIO_PORT_O 1434#define TEGRA194_MAIN_GPIO_PORT_P 1535#define TEGRA194_MAIN_GPIO_PORT_Q 1636#define TEGRA194_MAIN_GPIO_PORT_R 1737#define TEGRA194_MAIN_GPIO_PORT_S 1838#define TEGRA194_MAIN_GPIO_PORT_T 1939#define TEGRA194_MAIN_GPIO_PORT_U 2040#define TEGRA194_MAIN_GPIO_PORT_V 2141#define TEGRA194_MAIN_GPIO_PORT_W 2242#define TEGRA194_MAIN_GPIO_PORT_X 2343#define TEGRA194_MAIN_GPIO_PORT_Y 2444#define TEGRA194_MAIN_GPIO_PORT_Z 2545#define TEGRA194_MAIN_GPIO_PORT_FF 2646#define TEGRA194_MAIN_GPIO_PORT_GG 2747 48#define TEGRA194_MAIN_GPIO(port, offset) \49 ((TEGRA194_MAIN_GPIO_PORT_##port * 8) + offset)50 51/* GPIOs implemented by AON GPIO controller */52#define TEGRA194_AON_GPIO_PORT_AA 053#define TEGRA194_AON_GPIO_PORT_BB 154#define TEGRA194_AON_GPIO_PORT_CC 255#define TEGRA194_AON_GPIO_PORT_DD 356#define TEGRA194_AON_GPIO_PORT_EE 457 58#define TEGRA194_AON_GPIO(port, offset) \59 ((TEGRA194_AON_GPIO_PORT_##port * 8) + offset)60 61#endif62