1 /* 2 * Copyright (c) 2024 ENE Technology Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_ENE_KB1200_GPIO_H_ 7 #define ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_ENE_KB1200_GPIO_H_ 8 9 /** 10 * @name GPIO pin voltage flags 11 * 12 * The voltage and driving flags are a Zephyr specific extension of the standard GPIO flags 13 * specified by the Linux GPIO binding for use with the ENE KB1200 SoC. 14 * 15 * @{ 16 * Note: Bits 15 down to 8 are reserved for SoC specific flags. 17 */ 18 19 /** @cond INTERNAL_HIDDEN */ 20 #define KB1200_GPIO_VOLTAGE_POS 8 21 #define KB1200_GPIO_VOLTAGE_MASK (1U << KB1200_GPIO_VOLTAGE_POS) 22 23 #define KB1200_GPIO_DRIVING_POS 9 24 #define KB1200_GPIO_DRIVING_MASK (1U << KB1200_GPIO_DRIVING_POS) 25 /** @endcond */ 26 27 /** Set pin at the default voltage level (3.3V) */ 28 #define KB1200_GPIO_VOLTAGE_DEFAULT (0U << KB1200_GPIO_VOLTAGE_POS) 29 /** Set pin voltage level at 1.8 V */ 30 #define KB1200_GPIO_VOLTAGE_1P8 (1U << KB1200_GPIO_VOLTAGE_POS) 31 32 /** Set pin at the default driving current (4mA) */ 33 #define KB1200_GPIO_DRIVING_DEFAULT (0U << KB1200_GPIO_DRIVING_POS) 34 /** Set pin driving current at 16mA */ 35 #define KB1200_GPIO_DRIVING_16MA (1U << KB1200_GPIO_DRIVING_POS) 36 37 38 /** @} */ 39 40 #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_ENE_KB1200_GPIO_H_ */ 41