xref: /rk3399_ARM-atf/include/drivers/st/stm32mp2_ddr_regs.h (revision 79629b1a79bd1ee254077d4e76fea05ba73b9bab)
1*79629b1aSNicolas Le Bayon /*
2*79629b1aSNicolas Le Bayon  * Copyright (c) 2021-2024, STMicroelectronics - All Rights Reserved
3*79629b1aSNicolas Le Bayon  *
4*79629b1aSNicolas Le Bayon  * SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
5*79629b1aSNicolas Le Bayon  */
6*79629b1aSNicolas Le Bayon 
7*79629b1aSNicolas Le Bayon #ifndef STM32MP2_DDR_REGS_H
8*79629b1aSNicolas Le Bayon #define STM32MP2_DDR_REGS_H
9*79629b1aSNicolas Le Bayon 
10*79629b1aSNicolas Le Bayon #include <drivers/st/stm32mp_ddrctrl_regs.h>
11*79629b1aSNicolas Le Bayon #include <lib/utils_def.h>
12*79629b1aSNicolas Le Bayon 
13*79629b1aSNicolas Le Bayon /* DDR Physical Interface Control (DDRPHYC) registers*/
14*79629b1aSNicolas Le Bayon struct stm32mp_ddrphy {
15*79629b1aSNicolas Le Bayon 	uint32_t dummy;
16*79629b1aSNicolas Le Bayon } __packed;
17*79629b1aSNicolas Le Bayon 
18*79629b1aSNicolas Le Bayon /* DDRPHY registers offsets */
19*79629b1aSNicolas Le Bayon #define DDRPHY_INITENG0_P0_SEQ0BDISABLEFLAG6	U(0x240004)
20*79629b1aSNicolas Le Bayon #define DDRPHY_INITENG0_P0_PHYINLPX		U(0x2400A0)
21*79629b1aSNicolas Le Bayon #define DDRPHY_DRTUB0_UCCLKHCLKENABLES		U(0x300200)
22*79629b1aSNicolas Le Bayon #define DDRPHY_APBONLY0_MICROCONTMUXSEL		U(0x340000)
23*79629b1aSNicolas Le Bayon 
24*79629b1aSNicolas Le Bayon /* DDRPHY registers fields */
25*79629b1aSNicolas Le Bayon #define DDRPHY_INITENG0_P0_PHYINLPX_PHYINLP3			BIT(0)
26*79629b1aSNicolas Le Bayon #define DDRPHY_DRTUB0_UCCLKHCLKENABLES_UCCLKEN			BIT(0)
27*79629b1aSNicolas Le Bayon #define DDRPHY_DRTUB0_UCCLKHCLKENABLES_HCLKEN			BIT(1)
28*79629b1aSNicolas Le Bayon #define DDRPHY_APBONLY0_MICROCONTMUXSEL_MICROCONTMUXSEL		BIT(0)
29*79629b1aSNicolas Le Bayon 
30*79629b1aSNicolas Le Bayon /* DDRDBG registers offsets */
31*79629b1aSNicolas Le Bayon #define DDRDBG_LP_DISABLE			U(0x0)
32*79629b1aSNicolas Le Bayon #define DDRDBG_BYPASS_PCLKEN			U(0x4)
33*79629b1aSNicolas Le Bayon 
34*79629b1aSNicolas Le Bayon /* DDRDBG registers fields */
35*79629b1aSNicolas Le Bayon #define DDRDBG_LP_DISABLE_LPI_XPI_DISABLE	BIT(0)
36*79629b1aSNicolas Le Bayon #define DDRDBG_LP_DISABLE_LPI_DDRC_DISABLE	BIT(8)
37*79629b1aSNicolas Le Bayon 
38*79629b1aSNicolas Le Bayon #endif /* STM32MP2_DDR_REGS_H */
39