1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
2 /*
3  * Copyright (C) 2018-2019, STMicroelectronics
4  */
5 
6 #ifndef __STM32MP1_ETZPC_H
7 #define __STM32MP1_ETZPC_H
8 
9 /* Define DECPROT IDs for stm32mp1 familly */
10 #ifdef CFG_STM32MP15
11 #define STM32MP1_ETZPC_STGENC_ID	0
12 #define STM32MP1_ETZPC_BKPSRAM_ID	1
13 #define STM32MP1_ETZPC_IWDG1_ID		2
14 #define STM32MP1_ETZPC_USART1_ID	3
15 #define STM32MP1_ETZPC_SPI6_ID		4
16 #define STM32MP1_ETZPC_I2C4_ID		5
17 #define STM32MP1_ETZPC_GPIOZ_ID		6
18 #define STM32MP1_ETZPC_RNG1_ID		7
19 #define STM32MP1_ETZPC_HASH1_ID		8
20 #define STM32MP1_ETZPC_CRYP1_ID		9
21 #define STM32MP1_ETZPC_DDRCTRL_ID	10
22 #define STM32MP1_ETZPC_DDRPHYC_ID	11
23 #define STM32MP1_ETZPC_I2C6_ID		12
24 /* 13-15 Reserved */
25 #define STM32MP1_ETZPC_TIM2_ID		16
26 #define STM32MP1_ETZPC_TIM3_ID		17
27 #define STM32MP1_ETZPC_TIM4_ID		18
28 #define STM32MP1_ETZPC_TIM5_ID		19
29 #define STM32MP1_ETZPC_TIM6_ID		20
30 #define STM32MP1_ETZPC_TIM7_ID		21
31 #define STM32MP1_ETZPC_TIM12_ID		22
32 #define STM32MP1_ETZPC_TIM13_ID		23
33 #define STM32MP1_ETZPC_TIM14_ID		24
34 #define STM32MP1_ETZPC_LPTIM1_ID	25
35 #define STM32MP1_ETZPC_WWDG1_ID		26
36 #define STM32MP1_ETZPC_SPI2_ID		27
37 #define STM32MP1_ETZPC_SPI3_ID		28
38 #define STM32MP1_ETZPC_SPDIFRX_ID	29
39 #define STM32MP1_ETZPC_USART2_ID	30
40 #define STM32MP1_ETZPC_USART3_ID	31
41 #define STM32MP1_ETZPC_UART4_ID		32
42 #define STM32MP1_ETZPC_UART5_ID		33
43 #define STM32MP1_ETZPC_I2C1_ID		34
44 #define STM32MP1_ETZPC_I2C2_ID		35
45 #define STM32MP1_ETZPC_I2C3_ID		36
46 #define STM32MP1_ETZPC_I2C5_ID		37
47 #define STM32MP1_ETZPC_CEC_ID		38
48 #define STM32MP1_ETZPC_DAC_ID		39
49 #define STM32MP1_ETZPC_UART7_ID		40
50 #define STM32MP1_ETZPC_UART8_ID		41
51 /* 42-43 Reserved */
52 #define STM32MP1_ETZPC_MDIOS_ID		44
53 /* 45-47 Reserved */
54 #define STM32MP1_ETZPC_TIM1_ID		48
55 #define STM32MP1_ETZPC_TIM8_ID		49
56 /* 50 Reserved */
57 #define STM32MP1_ETZPC_USART6_ID	51
58 #define STM32MP1_ETZPC_SPI1_ID		52
59 #define STM32MP1_ETZPC_SPI4_ID		53
60 #define STM32MP1_ETZPC_TIM15_ID		54
61 #define STM32MP1_ETZPC_TIM16_ID		55
62 #define STM32MP1_ETZPC_TIM17_ID		56
63 #define STM32MP1_ETZPC_SPI5_ID		57
64 #define STM32MP1_ETZPC_SAI1_ID		58
65 #define STM32MP1_ETZPC_SAI2_ID		59
66 #define STM32MP1_ETZPC_SAI3_ID		60
67 #define STM32MP1_ETZPC_DFSDM_ID		61
68 #define STM32MP1_ETZPC_TT_FDCAN_ID	62
69 /* 63 Reserved */
70 #define STM32MP1_ETZPC_LPTIM2_ID	64
71 #define STM32MP1_ETZPC_LPTIM3_ID	65
72 #define STM32MP1_ETZPC_LPTIM4_ID	66
73 #define STM32MP1_ETZPC_LPTIM5_ID	67
74 #define STM32MP1_ETZPC_SAI4_ID		68
75 #define STM32MP1_ETZPC_VREFBUF_ID	69
76 #define STM32MP1_ETZPC_DCMI_ID		70
77 #define STM32MP1_ETZPC_CRC2_ID		71
78 #define STM32MP1_ETZPC_ADC_ID		72
79 #define STM32MP1_ETZPC_HASH2_ID		73
80 #define STM32MP1_ETZPC_RNG2_ID		74
81 #define STM32MP1_ETZPC_CRYP2_ID		75
82 /* 76-79 Reserved */
83 #define STM32MP1_ETZPC_SRAM1_ID		80
84 #define STM32MP1_ETZPC_SRAM2_ID		81
85 #define STM32MP1_ETZPC_SRAM3_ID		82
86 #define STM32MP1_ETZPC_SRAM4_ID		83
87 #define STM32MP1_ETZPC_RETRAM_ID	84
88 #define STM32MP1_ETZPC_OTG_ID		85
89 #define STM32MP1_ETZPC_SDMMC3_ID	86
90 #define STM32MP1_ETZPC_DLYBSD3_ID	87
91 #define STM32MP1_ETZPC_DMA1_ID		88
92 #define STM32MP1_ETZPC_DMA2_ID		89
93 #define STM32MP1_ETZPC_DMAMUX_ID	90
94 #define STM32MP1_ETZPC_FMC_ID		91
95 #define STM32MP1_ETZPC_QSPI_ID		92
96 #define STM32MP1_ETZPC_DLYBQ_ID		93
97 #define STM32MP1_ETZPC_ETH_ID		94
98 /* 95 Reserved */
99 #define STM32MP1_ETZPC_MAX_ID		96
100 #endif /* CFG_STM32MP15 */
101 
102 #ifdef CFG_STM32MP13
103 #define STM32MP1_ETZPC_VREFBUF_ID	0
104 #define STM32MP1_ETZPC_LPTIM2_ID	1
105 #define STM32MP1_ETZPC_LPTIM3_ID	2
106 #define STM32MP1_ETZPC_LTDC_ID		3
107 #define STM32MP1_ETZPC_DCMIPP_ID	4
108 #define STM32MP1_ETZPC_USBPHYCTRL_ID	5
109 #define STM32MP1_ETZPC_DDRCTRLPHY_ID	6
110 /* 7-11 Reserved */
111 #define STM32MP1_ETZPC_IWDG1_ID		12
112 #define STM32MP1_ETZPC_STGENC_ID	13
113 /* 14-15 Reserved */
114 #define STM32MP1_ETZPC_USART1_ID	16
115 #define STM32MP1_ETZPC_USART2_ID	17
116 #define STM32MP1_ETZPC_SPI4_ID		18
117 #define STM32MP1_ETZPC_SPI5_ID		19
118 #define STM32MP1_ETZPC_I2C3_ID		20
119 #define STM32MP1_ETZPC_I2C4_ID		21
120 #define STM32MP1_ETZPC_I2C5_ID		22
121 #define STM32MP1_ETZPC_TIM12_ID		23
122 #define STM32MP1_ETZPC_TIM13_ID		24
123 #define STM32MP1_ETZPC_TIM14_ID		25
124 #define STM32MP1_ETZPC_TIM15_ID		26
125 #define STM32MP1_ETZPC_TIM16_ID		27
126 #define STM32MP1_ETZPC_TIM17_ID		28
127 /* 29-31 Reserved */
128 #define STM32MP1_ETZPC_ADC1_ID		32
129 #define STM32MP1_ETZPC_ADC2_ID		33
130 #define STM32MP1_ETZPC_OTG_ID		34
131 /* 35-36 Reserved */
132 #define STM32MP1_ETZPC_TSC_ID		37
133 /* 38-39 Reserved */
134 #define STM32MP1_ETZPC_RNG_ID		40
135 #define STM32MP1_ETZPC_HASH_ID		41
136 #define STM32MP1_ETZPC_CRYP_ID		42
137 #define STM32MP1_ETZPC_SAES_ID		43
138 #define STM32MP1_ETZPC_PKA_ID		44
139 #define STM32MP1_ETZPC_BKPSRAM_ID	45
140 /* 46-47 Reserved */
141 #define STM32MP1_ETZPC_ETH1_ID		48
142 #define STM32MP1_ETZPC_ETH2_ID		49
143 #define STM32MP1_ETZPC_SDMMC1_ID	50
144 #define STM32MP1_ETZPC_SDMMC2_ID	51
145 /* 52 Reserved */
146 #define STM32MP1_ETZPC_MCE_ID		53
147 #define STM32MP1_ETZPC_FMC_ID		54
148 #define STM32MP1_ETZPC_QSPI_ID		55
149 /* 56-59 Reserved */
150 #define STM32MP1_ETZPC_SRAM1_ID		60
151 #define STM32MP1_ETZPC_SRAM2_ID		61
152 #define STM32MP1_ETZPC_SRAM3_ID		62
153 /* 63 Reserved */
154 #define STM32MP1_ETZPC_MAX_ID		64
155 #endif /* CFG_STM32MP13 */
156 #endif /*__STM32MP1_ETZPC_H*/
157