18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * This header provides constants for the STM32F4 RCC IP
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_MFD_STM32F4_RCC_H
78c2ecf20Sopenharmony_ci#define _DT_BINDINGS_MFD_STM32F4_RCC_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/* AHB1 */
108c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOA	0
118c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOB	1
128c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOC	2
138c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOD	3
148c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOE	4
158c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOF	5
168c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOG	6
178c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOH	7
188c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOI	8
198c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOJ	9
208c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_GPIOK	10
218c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_CRC	12
228c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_BKPSRAM	18
238c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_CCMDATARAM	20
248c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_DMA1	21
258c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_DMA2	22
268c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_DMA2D	23
278c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_ETHMAC	25
288c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_ETHMACTX	26
298c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_ETHMACRX	27
308c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_ETHMACPTP	28
318c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_OTGHS		29
328c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB1_OTGHSULPI	30
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#define STM32F4_AHB1_RESET(bit) (STM32F4_RCC_AHB1_##bit + (0x10 * 8))
358c2ecf20Sopenharmony_ci#define STM32F4_AHB1_CLOCK(bit) (STM32F4_RCC_AHB1_##bit)
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci/* AHB2 */
398c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB2_DCMI	0
408c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB2_CRYP	4
418c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB2_HASH	5
428c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB2_RNG	6
438c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB2_OTGFS	7
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#define STM32F4_AHB2_RESET(bit)	(STM32F4_RCC_AHB2_##bit + (0x14 * 8))
468c2ecf20Sopenharmony_ci#define STM32F4_AHB2_CLOCK(bit)	(STM32F4_RCC_AHB2_##bit + 0x20)
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* AHB3 */
498c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB3_FMC	0
508c2ecf20Sopenharmony_ci#define STM32F4_RCC_AHB3_QSPI	1
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci#define STM32F4_AHB3_RESET(bit)	(STM32F4_RCC_AHB3_##bit + (0x18 * 8))
538c2ecf20Sopenharmony_ci#define STM32F4_AHB3_CLOCK(bit)	(STM32F4_RCC_AHB3_##bit + 0x40)
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci/* APB1 */
568c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM2	0
578c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM3	1
588c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM4	2
598c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM5	3
608c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM6	4
618c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM7	5
628c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM12	6
638c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM13	7
648c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_TIM14	8
658c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_WWDG	11
668c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_SPI2	14
678c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_SPI3	15
688c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART2	17
698c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART3	18
708c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART4	19
718c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART5	20
728c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_I2C1	21
738c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_I2C2	22
748c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_I2C3	23
758c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_CAN1	25
768c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_CAN2	26
778c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_PWR	28
788c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_DAC	29
798c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART7	30
808c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB1_UART8	31
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci#define STM32F4_APB1_RESET(bit)	(STM32F4_RCC_APB1_##bit + (0x20 * 8))
838c2ecf20Sopenharmony_ci#define STM32F4_APB1_CLOCK(bit)	(STM32F4_RCC_APB1_##bit + 0x80)
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci/* APB2 */
868c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_TIM1	0
878c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_TIM8	1
888c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_USART1	4
898c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_USART6	5
908c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_ADC1	8
918c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_ADC2	9
928c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_ADC3	10
938c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SDIO	11
948c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SPI1	12
958c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SPI4	13
968c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SYSCFG	14
978c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_TIM9	16
988c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_TIM10	17
998c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_TIM11	18
1008c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SPI5	20
1018c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SPI6	21
1028c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_SAI1	22
1038c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_LTDC	26
1048c2ecf20Sopenharmony_ci#define STM32F4_RCC_APB2_DSI	27
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci#define STM32F4_APB2_RESET(bit)	(STM32F4_RCC_APB2_##bit + (0x24 * 8))
1078c2ecf20Sopenharmony_ci#define STM32F4_APB2_CLOCK(bit)	(STM32F4_RCC_APB2_##bit + 0xA0)
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#endif /* _DT_BINDINGS_MFD_STM32F4_RCC_H */
110