1# Copyright (c) 2021 ATL-Electronics 2# SPDX-License-Identifier: Apache-2.0 3 4config ZEPHYR_HAL_GIGADEVICE_MODULE 5 bool 6 7config GD32_HAS_AF_PINMUX 8 bool 9 help 10 This option should be selected if the series use an AF pinmux model. 11 12config GD32_HAS_AFIO_PINMUX 13 bool 14 help 15 This option should be selected if the series use an AFIO pinmux model. 16 17config HAS_GD32_HAL 18 bool 19 select HAS_CMSIS_CORE if ARM 20 21if HAS_GD32_HAL 22 23choice GD32_HXTAL_FREQUENCY 24 prompt "High speed external oscillator clock frequency" 25 default GD32_HXTAL_FIRMWARE_DEFINED if \ 26 SOC_SERIES_GD32F403 || SOC_SERIES_GD32F4XX || SOC_SERIES_GD32F3X0 27 default GD32_HXTAL_25MHZ if SOC_SERIES_GD32VF103 || SOC_SERIES_GD32E50X 28 default GD32_HXTAL_8MHZ if SOC_SERIES_GD32E10X 29 help 30 Define value of high speed crystal oscillator (HXTAL) in Hz 31 This value sets the frequency of the oscillator. 32 33config GD32_HXTAL_FIRMWARE_DEFINED 34 bool "Firmware defined" 35 depends on !SOC_SERIES_GD32VF103 36 depends on !SOC_SERIES_GD32E10X 37 help 38 Use default frequency defined in firmware for HXTAL 39 This is using for SoCs (e.g. gd32f4xx, gd32f3x0, etc ...) 40 that have default HXTAL definitions in firmware. 41 42config GD32_HXTAL_8MHZ 43 bool "8MHz" 44 depends on SOC_SERIES_GD32VF103 || SOC_SERIES_GD32E10X 45 help 46 Use 8MHz oscillator for HXTAL 47 48config GD32_HXTAL_25MHZ 49 bool "25MHz" 50 depends on SOC_SERIES_GD32VF103 || SOC_SERIES_GD32E10X 51 help 52 Use 25MHz oscillator for HXTAL 53 54endchoice 55 56config GD32_HAS_IRC_32K 57 bool 58 help 59 Use 32KHz oscillator for low speed internal RC Oscillator 60 61config GD32_HAS_IRC_40K 62 bool 63 help 64 Use 40KHz oscillator for low speed internal RC Oscillator 65 66config GD32_LOW_SPEED_IRC_FREQUENCY 67 int 68 default 32000 if GD32_HAS_IRC_32K 69 default 40000 if GD32_HAS_IRC_40K 70 help 71 Define value of low speed internal RC oscillator (IRC) in Hz 72 73config GD32_DBG_SUPPORT 74 bool "Use GD32 Debug features" 75 select USE_GD32_DBG 76 default y 77 help 78 Enable GD32 Debug features. 79 This option makes allows using functions that access to 80 DBG_CTL register such as dbg_periph_enable(). 81 82config USE_GD32_ADC 83 bool 84 help 85 Enable GD32 Analog-to-Digital Converter (ADC) HAL module driver 86 87config USE_GD32_BKP 88 bool 89 help 90 Enable GD32 Backup Registers (BKP) HAL module driver 91 92config USE_GD32_CAN 93 bool 94 help 95 Enable GD32 Controller Area Network (CAN) HAL module driver 96 97config USE_GD32_CEC 98 bool 99 help 100 Enable GD32 Consumer Electronics Control (CEC) HAL module driver 101 102config USE_GD32_CMP 103 bool 104 help 105 Enable GD32 Comparator (CMP) HAL module driver 106 107config USE_GD32_CRC 108 bool 109 help 110 Enable GD32 Cyclic redundancy check calculation unit (CRC) HAL 111 module driver 112 113config USE_GD32_CTC 114 bool 115 help 116 Enable GD32 Clock Trim Controller (CTC) HAL module driver 117 118config USE_GD32_DAC 119 bool 120 help 121 Enable GD32 Digital-to-Analog Converter (DAC) HAL module driver 122 123config USE_GD32_DBG 124 bool 125 help 126 Enable GD32 Debug (DBG) HAL module driver 127 128config USE_GD32_DCI 129 bool 130 help 131 Enable GD32 Digital Camera Interface (DCI) HAL module driver 132 133config USE_GD32_DMA 134 bool 135 help 136 Enable GD32 Direct Memory Access controller (DMA) HAL module driver 137 138config USE_GD32_ENET 139 bool 140 help 141 Enable GD32 Ethernet (ENET) HAL module driver 142 143config USE_GD32_EXMC 144 bool 145 help 146 Enable GD32 External Memory Controller (EXMC) HAL module driver 147 148config USE_GD32_EXTI 149 bool 150 help 151 Enable GD32 Interrupt/Event controller (EXTI) HAL module driver 152 153config USE_GD32_FMC 154 bool 155 help 156 Enable GD32 Flash Memory Controller (FMC) HAL module driver 157 158config USE_GD32_FWDGT 159 bool 160 help 161 Enable GD32 Free Watchdog Timer (FWDGT) HAL module driver 162 163config USE_GD32_GPIO 164 bool 165 default y 166 help 167 Enable GD32 General-purpose and Alternate-Function I/Os 168 (GPIO and AFIO) HAL module driver 169 170config USE_GD32_I2C 171 bool 172 help 173 Enable GD32 Inter-Integrated Circuit Interface (I2C) HAL module driver 174 175config USE_GD32_IPA 176 bool 177 help 178 Enable GD32 Image Processing Accelerator (IPA) HAL module driver 179 180config USE_GD32_IREF 181 bool 182 help 183 Enable GD32 Programmable Current Reference (IREF) HAL module driver 184 185config USE_GD32_MISC 186 bool 187 help 188 Enable GD32 System Utilities (MISC) HAL module driver 189 190config USE_GD32_PMU 191 bool 192 help 193 Enable GD32 Power Management Unit (PMU) HAL module driver 194 195config USE_GD32_RCU 196 bool 197 default y 198 help 199 Enable GD32 Reset and Clock Unit (RCU) HAL module driver 200 201config USE_GD32_RTC 202 bool 203 help 204 Enable GD32 Real-Time Clock (RTC) HAL module driver 205 206config USE_GD32_SDIO 207 bool 208 help 209 Enable GD32 Secure Digital Input/Output interface (SDIO) HAL module 210 driver 211 212config USE_GD32_SPI 213 bool 214 help 215 Enable GD32 Serial Peripheral Interface(SPI) HAL module driver 216 217config USE_GD32_SQPI 218 bool 219 help 220 Enable GD32 Serial/Quad Parallel Interface (SQPI) HAL module driver 221 222config USE_GD32_SHRTIMER 223 bool 224 help 225 Enable GD32 Super High-Resolution Timer (SHRTIMER) HAL module driver 226 227config USE_GD32_SYSCFG 228 bool 229 help 230 Enable GD32 System Configuration (SYSCFG) HAL module driver 231 232config USE_GD32_TIMER 233 bool 234 help 235 Enable GD32 Timer (TIMER) HAL module driver 236 237config USE_GD32_TLI 238 bool 239 help 240 Enable GD32 TFT-LCD Interface (TLI) HAL module driver 241 242config USE_GD32_TMU 243 bool 244 help 245 Enable GD32 Trigonometric Math Unit (TMU) HAL module driver 246 247config USE_GD32_TRNG 248 bool 249 help 250 Enable GD32 True Random Number Generator (TRNG) HAL module driver 251 252config USE_GD32_TSI 253 bool 254 help 255 Enable GD32 Touch Sensing Interface (TSI) HAL module driver 256 257config USE_GD32_USART 258 bool 259 help 260 Enable GD32 Universal Synchronous/Asynchronous Receiver/Transmitter 261 (USART) HAL module driver 262 263config USE_GD32_USBD 264 bool 265 help 266 Enable GD32 Universal Serial Bus full-speed Device interface (USBD) 267 HAL module driver 268 269config USE_GD32_USBFS 270 bool 271 help 272 Enable GD32 Universal Serial Bus on-the-go Full-Speed (USBFS) HAL 273 module driver 274 275config USE_GD32_USBHS 276 bool 277 help 278 Enable GD32 Universal Serial Bus High-Speed interface (USBHS) HAL 279 module driver 280 281config USE_GD32_WWDGT 282 bool 283 help 284 Enable GD32 Window Watchdog Timer (WWDGT) HAL module driver 285 286endif # HAS_GD32_HAL 287