1 /* 2 * Copyright (c) 2023 Antmicro <www.antmicro.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** @file 8 * @brief Silabs EFM32GG12B MCU pin definitions. 9 * 10 * This file contains pin configuration data required by different MCU 11 * modules to correctly configure GPIO controller. 12 */ 13 14 #ifndef _SILABS_EFM32GG12B_SOC_PINMAP_H_ 15 #define _SILABS_EFM32GG12B_SOC_PINMAP_H_ 16 17 #include <zephyr/devicetree.h> 18 #include <soc.h> 19 #include <em_gpio.h> 20 21 #define GPIO_NODE DT_INST(0, silabs_gecko_gpio) 22 #if DT_NODE_HAS_PROP(GPIO_NODE, location_swo) 23 #define SWO_LOCATION DT_PROP(GPIO_NODE, location_swo) 24 #endif 25 26 #ifdef CONFIG_GPIO_GECKO 27 /* Serial Wire Output (SWO) */ 28 #if (SWO_LOCATION == 0) 29 #define PIN_SWO {gpioPortF, 2, gpioModePushPull, 1} 30 #elif (SWO_LOCATION == 1) 31 #define PIN_SWO {gpioPortC, 15, gpioModePushPull, 1} 32 #elif (SWO_LOCATION == 2) 33 #define PIN_SWO {gpioPortD, 1, gpioModePushPull, 1} 34 #elif (SWO_LOCATION == 3) 35 #define PIN_SWO {gpioPortD, 2, gpioModePushPull, 1} 36 #elif (SWO_LOCATION >= 4) 37 #error ("Invalid SWO pin location") 38 #endif 39 #endif /* CONFIG_GPIO_GECKO */ 40 41 #endif /* _SILABS_EFM32GG12B_SOC_PINMAP_H_ */ 42