1*6cafeaffSjmcneill /* $NetBSD: stm32f4-rcc.h,v 1.1.1.2 2017/11/30 19:40:51 jmcneill Exp $ */ 26029d4abSjmcneill 3*6cafeaffSjmcneill /* SPDX-License-Identifier: GPL-2.0 */ 46029d4abSjmcneill /* 56029d4abSjmcneill * This header provides constants for the STM32F4 RCC IP 66029d4abSjmcneill */ 76029d4abSjmcneill 86029d4abSjmcneill #ifndef _DT_BINDINGS_MFD_STM32F4_RCC_H 96029d4abSjmcneill #define _DT_BINDINGS_MFD_STM32F4_RCC_H 106029d4abSjmcneill 116029d4abSjmcneill /* AHB1 */ 126029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOA 0 136029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOB 1 146029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOC 2 156029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOD 3 166029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOE 4 176029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOF 5 186029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOG 6 196029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOH 7 206029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOI 8 216029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOJ 9 226029d4abSjmcneill #define STM32F4_RCC_AHB1_GPIOK 10 236029d4abSjmcneill #define STM32F4_RCC_AHB1_CRC 12 246029d4abSjmcneill #define STM32F4_RCC_AHB1_BKPSRAM 18 256029d4abSjmcneill #define STM32F4_RCC_AHB1_CCMDATARAM 20 266029d4abSjmcneill #define STM32F4_RCC_AHB1_DMA1 21 276029d4abSjmcneill #define STM32F4_RCC_AHB1_DMA2 22 286029d4abSjmcneill #define STM32F4_RCC_AHB1_DMA2D 23 296029d4abSjmcneill #define STM32F4_RCC_AHB1_ETHMAC 25 306029d4abSjmcneill #define STM32F4_RCC_AHB1_ETHMACTX 26 316029d4abSjmcneill #define STM32F4_RCC_AHB1_ETHMACRX 27 326029d4abSjmcneill #define STM32F4_RCC_AHB1_ETHMACPTP 28 336029d4abSjmcneill #define STM32F4_RCC_AHB1_OTGHS 29 346029d4abSjmcneill #define STM32F4_RCC_AHB1_OTGHSULPI 30 356029d4abSjmcneill 366029d4abSjmcneill #define STM32F4_AHB1_RESET(bit) (STM32F4_RCC_AHB1_##bit + (0x10 * 8)) 376029d4abSjmcneill #define STM32F4_AHB1_CLOCK(bit) (STM32F4_RCC_AHB1_##bit) 386029d4abSjmcneill 396029d4abSjmcneill 406029d4abSjmcneill /* AHB2 */ 416029d4abSjmcneill #define STM32F4_RCC_AHB2_DCMI 0 426029d4abSjmcneill #define STM32F4_RCC_AHB2_CRYP 4 436029d4abSjmcneill #define STM32F4_RCC_AHB2_HASH 5 446029d4abSjmcneill #define STM32F4_RCC_AHB2_RNG 6 456029d4abSjmcneill #define STM32F4_RCC_AHB2_OTGFS 7 466029d4abSjmcneill 476029d4abSjmcneill #define STM32F4_AHB2_RESET(bit) (STM32F4_RCC_AHB2_##bit + (0x14 * 8)) 486029d4abSjmcneill #define STM32F4_AHB2_CLOCK(bit) (STM32F4_RCC_AHB2_##bit + 0x20) 496029d4abSjmcneill 506029d4abSjmcneill /* AHB3 */ 516029d4abSjmcneill #define STM32F4_RCC_AHB3_FMC 0 526029d4abSjmcneill #define STM32F4_RCC_AHB3_QSPI 1 536029d4abSjmcneill 546029d4abSjmcneill #define STM32F4_AHB3_RESET(bit) (STM32F4_RCC_AHB3_##bit + (0x18 * 8)) 556029d4abSjmcneill #define STM32F4_AHB3_CLOCK(bit) (STM32F4_RCC_AHB3_##bit + 0x40) 566029d4abSjmcneill 576029d4abSjmcneill /* APB1 */ 586029d4abSjmcneill #define STM32F4_RCC_APB1_TIM2 0 596029d4abSjmcneill #define STM32F4_RCC_APB1_TIM3 1 606029d4abSjmcneill #define STM32F4_RCC_APB1_TIM4 2 616029d4abSjmcneill #define STM32F4_RCC_APB1_TIM5 3 626029d4abSjmcneill #define STM32F4_RCC_APB1_TIM6 4 636029d4abSjmcneill #define STM32F4_RCC_APB1_TIM7 5 646029d4abSjmcneill #define STM32F4_RCC_APB1_TIM12 6 656029d4abSjmcneill #define STM32F4_RCC_APB1_TIM13 7 666029d4abSjmcneill #define STM32F4_RCC_APB1_TIM14 8 676029d4abSjmcneill #define STM32F4_RCC_APB1_WWDG 11 686029d4abSjmcneill #define STM32F4_RCC_APB1_SPI2 14 696029d4abSjmcneill #define STM32F4_RCC_APB1_SPI3 15 706029d4abSjmcneill #define STM32F4_RCC_APB1_UART2 17 716029d4abSjmcneill #define STM32F4_RCC_APB1_UART3 18 726029d4abSjmcneill #define STM32F4_RCC_APB1_UART4 19 736029d4abSjmcneill #define STM32F4_RCC_APB1_UART5 20 746029d4abSjmcneill #define STM32F4_RCC_APB1_I2C1 21 756029d4abSjmcneill #define STM32F4_RCC_APB1_I2C2 22 766029d4abSjmcneill #define STM32F4_RCC_APB1_I2C3 23 776029d4abSjmcneill #define STM32F4_RCC_APB1_CAN1 25 786029d4abSjmcneill #define STM32F4_RCC_APB1_CAN2 26 796029d4abSjmcneill #define STM32F4_RCC_APB1_PWR 28 806029d4abSjmcneill #define STM32F4_RCC_APB1_DAC 29 816029d4abSjmcneill #define STM32F4_RCC_APB1_UART7 30 826029d4abSjmcneill #define STM32F4_RCC_APB1_UART8 31 836029d4abSjmcneill 846029d4abSjmcneill #define STM32F4_APB1_RESET(bit) (STM32F4_RCC_APB1_##bit + (0x20 * 8)) 856029d4abSjmcneill #define STM32F4_APB1_CLOCK(bit) (STM32F4_RCC_APB1_##bit + 0x80) 866029d4abSjmcneill 876029d4abSjmcneill /* APB2 */ 886029d4abSjmcneill #define STM32F4_RCC_APB2_TIM1 0 896029d4abSjmcneill #define STM32F4_RCC_APB2_TIM8 1 906029d4abSjmcneill #define STM32F4_RCC_APB2_USART1 4 916029d4abSjmcneill #define STM32F4_RCC_APB2_USART6 5 926029d4abSjmcneill #define STM32F4_RCC_APB2_ADC1 8 936029d4abSjmcneill #define STM32F4_RCC_APB2_ADC2 9 946029d4abSjmcneill #define STM32F4_RCC_APB2_ADC3 10 956029d4abSjmcneill #define STM32F4_RCC_APB2_SDIO 11 966029d4abSjmcneill #define STM32F4_RCC_APB2_SPI1 12 976029d4abSjmcneill #define STM32F4_RCC_APB2_SPI4 13 986029d4abSjmcneill #define STM32F4_RCC_APB2_SYSCFG 14 996029d4abSjmcneill #define STM32F4_RCC_APB2_TIM9 16 1006029d4abSjmcneill #define STM32F4_RCC_APB2_TIM10 17 1016029d4abSjmcneill #define STM32F4_RCC_APB2_TIM11 18 1026029d4abSjmcneill #define STM32F4_RCC_APB2_SPI5 20 1036029d4abSjmcneill #define STM32F4_RCC_APB2_SPI6 21 1046029d4abSjmcneill #define STM32F4_RCC_APB2_SAI1 22 1056029d4abSjmcneill #define STM32F4_RCC_APB2_LTDC 26 1066029d4abSjmcneill #define STM32F4_RCC_APB2_DSI 27 1076029d4abSjmcneill 1086029d4abSjmcneill #define STM32F4_APB2_RESET(bit) (STM32F4_RCC_APB2_##bit + (0x24 * 8)) 1096029d4abSjmcneill #define STM32F4_APB2_CLOCK(bit) (STM32F4_RCC_APB2_##bit + 0xA0) 1106029d4abSjmcneill 1116029d4abSjmcneill #endif /* _DT_BINDINGS_MFD_STM32F4_RCC_H */ 112