122347Spst/*	$NetBSD: stm32f4-rcc.h,v 1.1.1.2 2017/11/30 19:40:51 jmcneill Exp $	*/
222347Spst
329964Sache/* SPDX-License-Identifier: GPL-2.0 */
492906Smarkm/*
592906Smarkm * This header provides constants for the STM32F4 RCC IP
622347Spst */
722347Spst
822347Spst#ifndef _DT_BINDINGS_MFD_STM32F4_RCC_H
922347Spst#define _DT_BINDINGS_MFD_STM32F4_RCC_H
1022347Spst
1192906Smarkm/* AHB1 */
1292906Smarkm#define STM32F4_RCC_AHB1_GPIOA	0
1329964Sache#define STM32F4_RCC_AHB1_GPIOB	1
1429964Sache#define STM32F4_RCC_AHB1_GPIOC	2
1529964Sache#define STM32F4_RCC_AHB1_GPIOD	3
1622347Spst#define STM32F4_RCC_AHB1_GPIOE	4
17148506Sache#define STM32F4_RCC_AHB1_GPIOF	5
18148506Sache#define STM32F4_RCC_AHB1_GPIOG	6
1922347Spst#define STM32F4_RCC_AHB1_GPIOH	7
2022347Spst#define STM32F4_RCC_AHB1_GPIOI	8
2122347Spst#define STM32F4_RCC_AHB1_GPIOJ	9
2222347Spst#define STM32F4_RCC_AHB1_GPIOK	10
2322347Spst#define STM32F4_RCC_AHB1_CRC	12
2429964Sache#define STM32F4_RCC_AHB1_BKPSRAM	18
2522347Spst#define STM32F4_RCC_AHB1_CCMDATARAM	20
2622347Spst#define STM32F4_RCC_AHB1_DMA1	21
2722347Spst#define STM32F4_RCC_AHB1_DMA2	22
2822347Spst#define STM32F4_RCC_AHB1_DMA2D	23
2922347Spst#define STM32F4_RCC_AHB1_ETHMAC	25
3022347Spst#define STM32F4_RCC_AHB1_ETHMACTX	26
3122347Spst#define STM32F4_RCC_AHB1_ETHMACRX	27
3222347Spst#define STM32F4_RCC_AHB1_ETHMACPTP	28
3322347Spst#define STM32F4_RCC_AHB1_OTGHS		29
3422347Spst#define STM32F4_RCC_AHB1_OTGHSULPI	30
3522347Spst
3622347Spst#define STM32F4_AHB1_RESET(bit) (STM32F4_RCC_AHB1_##bit + (0x10 * 8))
3722347Spst#define STM32F4_AHB1_CLOCK(bit) (STM32F4_RCC_AHB1_##bit)
3822347Spst
3922347Spst
4022347Spst/* AHB2 */
4122347Spst#define STM32F4_RCC_AHB2_DCMI	0
4222347Spst#define STM32F4_RCC_AHB2_CRYP	4
4322347Spst#define STM32F4_RCC_AHB2_HASH	5
4422347Spst#define STM32F4_RCC_AHB2_RNG	6
4522347Spst#define STM32F4_RCC_AHB2_OTGFS	7
4622347Spst
4722347Spst#define STM32F4_AHB2_RESET(bit)	(STM32F4_RCC_AHB2_##bit + (0x14 * 8))
4822347Spst#define STM32F4_AHB2_CLOCK(bit)	(STM32F4_RCC_AHB2_##bit + 0x20)
4922347Spst
5022347Spst/* AHB3 */
5122347Spst#define STM32F4_RCC_AHB3_FMC	0
5222347Spst#define STM32F4_RCC_AHB3_QSPI	1
5322347Spst
5422347Spst#define STM32F4_AHB3_RESET(bit)	(STM32F4_RCC_AHB3_##bit + (0x18 * 8))
5522347Spst#define STM32F4_AHB3_CLOCK(bit)	(STM32F4_RCC_AHB3_##bit + 0x40)
5622347Spst
5722347Spst/* APB1 */
5822347Spst#define STM32F4_RCC_APB1_TIM2	0
5959118Skris#define STM32F4_RCC_APB1_TIM3	1
6059118Skris#define STM32F4_RCC_APB1_TIM4	2
6159118Skris#define STM32F4_RCC_APB1_TIM5	3
6259118Skris#define STM32F4_RCC_APB1_TIM6	4
6359118Skris#define STM32F4_RCC_APB1_TIM7	5
6492906Smarkm#define STM32F4_RCC_APB1_TIM12	6
6522347Spst#define STM32F4_RCC_APB1_TIM13	7
6659118Skris#define STM32F4_RCC_APB1_TIM14	8
6722347Spst#define STM32F4_RCC_APB1_WWDG	11
6822347Spst#define STM32F4_RCC_APB1_SPI2	14
6922347Spst#define STM32F4_RCC_APB1_SPI3	15
7022347Spst#define STM32F4_RCC_APB1_UART2	17
7122347Spst#define STM32F4_RCC_APB1_UART3	18
7222347Spst#define STM32F4_RCC_APB1_UART4	19
7392906Smarkm#define STM32F4_RCC_APB1_UART5	20
7492906Smarkm#define STM32F4_RCC_APB1_I2C1	21
7592906Smarkm#define STM32F4_RCC_APB1_I2C2	22
7692906Smarkm#define STM32F4_RCC_APB1_I2C3	23
7722347Spst#define STM32F4_RCC_APB1_CAN1	25
7822347Spst#define STM32F4_RCC_APB1_CAN2	26
7922347Spst#define STM32F4_RCC_APB1_PWR	28
8022347Spst#define STM32F4_RCC_APB1_DAC	29
8122347Spst#define STM32F4_RCC_APB1_UART7	30
8222347Spst#define STM32F4_RCC_APB1_UART8	31
8322347Spst
8492906Smarkm#define STM32F4_APB1_RESET(bit)	(STM32F4_RCC_APB1_##bit + (0x20 * 8))
8592906Smarkm#define STM32F4_APB1_CLOCK(bit)	(STM32F4_RCC_APB1_##bit + 0x80)
8692906Smarkm
8792906Smarkm/* APB2 */
8892906Smarkm#define STM32F4_RCC_APB2_TIM1	0
8992906Smarkm#define STM32F4_RCC_APB2_TIM8	1
9092906Smarkm#define STM32F4_RCC_APB2_USART1	4
9122347Spst#define STM32F4_RCC_APB2_USART6	5
9222347Spst#define STM32F4_RCC_APB2_ADC1	8
9322347Spst#define STM32F4_RCC_APB2_ADC2	9
9422347Spst#define STM32F4_RCC_APB2_ADC3	10
9522347Spst#define STM32F4_RCC_APB2_SDIO	11
9629964Sache#define STM32F4_RCC_APB2_SPI1	12
9722347Spst#define STM32F4_RCC_APB2_SPI4	13
9822347Spst#define STM32F4_RCC_APB2_SYSCFG	14
99148506Sache#define STM32F4_RCC_APB2_TIM9	16
10022347Spst#define STM32F4_RCC_APB2_TIM10	17
10129964Sache#define STM32F4_RCC_APB2_TIM11	18
10222347Spst#define STM32F4_RCC_APB2_SPI5	20
10322347Spst#define STM32F4_RCC_APB2_SPI6	21
10422347Spst#define STM32F4_RCC_APB2_SAI1	22
10522347Spst#define STM32F4_RCC_APB2_LTDC	26
10622347Spst#define STM32F4_RCC_APB2_DSI	27
10722347Spst
10822347Spst#define STM32F4_APB2_RESET(bit)	(STM32F4_RCC_APB2_##bit + (0x24 * 8))
10929964Sache#define STM32F4_APB2_CLOCK(bit)	(STM32F4_RCC_APB2_##bit + 0xA0)
11022347Spst
11122347Spst#endif /* _DT_BINDINGS_MFD_STM32F4_RCC_H */
11229964Sache