blob: 049eca4f3a7115925970696e1ef366a19273f775 [file] [log] [blame]
Peng Fanbbcd2c42022-07-26 16:40:39 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2022 NXP
4 */
5
6#ifndef __ASM_ARCH_IMX9_REGS_H__
7#define __ASM_ARCH_IMX9_REGS_H__
8
9#define ARCH_MXC
10
Peng Fan28b5cb52022-07-26 16:40:43 +080011#define IOMUXC_BASE_ADDR 0x443C0000UL
12#define CCM_BASE_ADDR 0x44450000UL
13#define CCM_CCGR_BASE_ADDR 0x44458000UL
Jian Liacf41a32022-07-26 16:40:46 +080014#define SYSCNT_CTRL_BASE_ADDR 0x44290000
Peng Fan28b5cb52022-07-26 16:40:43 +080015
16#define ANATOP_BASE_ADDR 0x44480000UL
Peng Fanbbcd2c42022-07-26 16:40:39 +080017
Ye Li9e19ff92022-07-26 16:40:47 +080018#define WDG3_BASE_ADDR 0x42490000UL
19#define WDG4_BASE_ADDR 0x424a0000UL
20#define WDG5_BASE_ADDR 0x424b0000UL
21
Alice Guob93916d2022-07-26 16:40:59 +080022#define FSB_BASE_ADDR 0x47510000UL
23
Peng Fan65563792022-07-26 16:41:02 +080024#define ANATOP_BASE_ADDR 0x44480000UL
25
26#define BLK_CTRL_WAKEUPMIX_BASE_ADDR 0x42420000
27#define BLK_CTRL_S_ANOMIX_BASE_ADDR 0x444f0000
28
29#define SRC_IPS_BASE_ADDR (0x44460000)
30#define SRC_GLOBAL_RBASE (SRC_IPS_BASE_ADDR + 0x0000)
31
32#define SRC_DDR_RBASE (SRC_IPS_BASE_ADDR + 0x1000)
33#define SRC_ML_RBASE (SRC_IPS_BASE_ADDR + 0x1800)
34#define SRC_MEDIA_RBASE (SRC_IPS_BASE_ADDR + 0x2400)
35#define SRC_M33P_RBASE (SRC_IPS_BASE_ADDR + 0x2800)
36
37#define SRC_MIX_SLICE_FUNC_STAT_PSW_STAT BIT(0)
38#define SRC_MIX_SLICE_FUNC_STAT_RST_STAT BIT(2)
39#define SRC_MIX_SLICE_FUNC_STAT_ISO_STAT BIT(4)
40#define SRC_MIX_SLICE_FUNC_STAT_MEM_STAT BIT(12)
41
Peng Fan1e9aff12022-07-26 16:40:50 +080042#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
43#include <asm/types.h>
44#include <stdbool.h>
45
46struct mu_type {
47 u32 ver;
48 u32 par;
49 u32 cr;
50 u32 sr;
51 u32 reserved0[60];
52 u32 fcr;
53 u32 fsr;
54 u32 reserved1[2];
55 u32 gier;
56 u32 gcr;
57 u32 gsr;
58 u32 reserved2;
59 u32 tcr;
60 u32 tsr;
61 u32 rcr;
62 u32 rsr;
63 u32 reserved3[52];
64 u32 tr[16];
65 u32 reserved4[16];
66 u32 rr[16];
67 u32 reserved5[14];
68 u32 mu_attr;
69};
Peng Fan65563792022-07-26 16:41:02 +080070
71enum mix_power_domain {
72 MIX_PD_MEDIAMIX,
73 MIX_PD_MLMIX,
74 MIX_PD_DDRMIX,
75};
76
77enum src_mix_slice_id {
78 SRC_MIX_EDGELOCK = 0,
79 SRC_MIX_AONMIX = 1,
80 SRC_MIX_WAKEUPMIX = 2,
81 SRC_MIX_DDRMIX = 3,
82 SRC_MIX_DDRPHY = 4,
83 SRC_MIX_ML = 5,
84 SRC_MIX_NIC = 6,
85 SRC_MIX_HSIO = 7,
86 SRC_MIX_MEDIA = 8,
87 SRC_MIX_CM33 = 9,
88 SRC_MIX_CA55C0 = 10,
89 SRC_MIX_CA55C1 = 11,
90 SRC_MIX_CA55CLUSTER = 12,
91};
92
93enum src_mem_slice_id {
94 SRC_MEM_AONMIX = 0,
95 SRC_MEM_WAKEUPMIX = 1,
96 SRC_MEM_DDRMIX = 2,
97 SRC_MEM_DDRPHY = 3,
98 SRC_MEM_ML = 4,
99 SRC_MEM_NIC = 5,
100 SRC_MEM_OCRAM = 6,
101 SRC_MEM_HSIO = 7,
102 SRC_MEM_MEDIA = 8,
103 SRC_MEM_CA55C0 = 9,
104 SRC_MEM_CA55C1 = 10,
105 SRC_MEM_CA55CLUSTER = 11,
106 SRC_MEM_L3 = 12,
107};
108
109struct blk_ctrl_s_aonmix_regs {
110 u32 cm33_irq_mask[7];
111 u32 initnsvtor;
112 u32 reserved1[8];
113 u32 ca55_irq_mask[7];
114 u32 initsvtor;
115 u32 m33_cfg;
116 u32 reserved2[11];
117 u32 axbs_aon_ctrl;
118 u32 reserved3[27];
119 u32 dap_access_stkybit;
120 u32 reserved4[3];
121 u32 lp_handshake[2];
122 u32 ca55_cpuwait;
123 u32 ca55_rvbaraddr0_l;
124 u32 ca55_rvbaraddr0_h;
125 u32 ca55_rvbaraddr1_l;
126 u32 ca55_rvbaraddr1_h;
127 u32 s401_irq_mask;
128 u32 s401_reset_req_mask;
129 u32 s401_halt_st;
130 u32 ca55_mode;
131 u32 nmi_mask;
132 u32 nmi_clr;
133 u32 wdog_any_mask;
134 u32 s4v1_ipi_noclk_ref1;
135};
136
137struct blk_ctrl_wakeupmix_regs {
138 u32 upper_addr;
139 u32 ipg_debug_cm33;
140 u32 reserved[2];
141 u32 qch_dis;
142 u32 ssi;
143 u32 reserved1[1];
144 u32 dexsc_err;
145 u32 mqs_setting;
146 u32 sai_clk_sel;
147 u32 eqos_gpr;
148 u32 enet_clk_sel;
149 u32 reserved2[1];
150 u32 volt_detect;
151 u32 i3c2_wakeup;
152 u32 ipg_debug_ca55c0;
153 u32 ipg_debug_ca55c1;
154 u32 axi_attr_cfg;
155 u32 i3c2_sda_irq;
156};
157
158struct src_general_regs {
159 u32 reserved[1];
160 u32 authen_ctrl;
161 u32 reserved1[2];
162 u32 scr;
163 u32 srtmr;
164 u32 srmask;
165 u32 reserved2[1];
166 u32 srmr[6];
167 u32 reserved3[2];
168 u32 sbmr[2];
169 u32 reserved4[2];
170 u32 srsr;
171 u32 gpr[19];
172 u32 reserved5[24];
173 u32 gpr20;
174 u32 cm_quiesce;
175 u32 cold_reset_ssar_ack_ctrl;
176 u32 sp_iso_ctrl;
177 u32 rom_lp_ctrl;
178 u32 a55_deny_stat;
179};
180
181struct src_mem_slice_regs {
182 u32 reserved[1];
183 u32 mem_ctrl;
184 u32 memlp_ctrl_0;
185 u32 reserved1[1];
186 u32 memlp_ctrl_1;
187 u32 memlp_ctrl_2;
188 u32 mem_stat;
189};
190
191struct src_mix_slice_regs {
192 u32 reserved[1];
193 u32 authen_ctrl;
194 u32 reserved1[2];
195 u32 lpm_setting[3];
196 u32 reserved2[1];
197 u32 slice_sw_ctrl;
198 u32 single_reset_sw_ctrl;
199 u32 reserved3[6];
200 u32 a55_hdsk_ack_ctrl;
201 u32 a55_hdsk_ack_stat;
202 u32 reserved4[2];
203 u32 ssar_ack_ctrl;
204 u32 ssar_ack_stat;
205 u32 reserved5[1];
206 u32 iso_off_dly_por;
207 u32 iso_on_dly;
208 u32 iso_off_dly;
209 u32 psw_off_lf_dly;
210 u32 reserved6[1];
211 u32 psw_off_hf_dly;
212 u32 psw_on_lf_dly;
213 u32 psw_on_hf_dly;
214 u32 reserved7[1];
215 u32 psw_ack_ctrl[2];
216 u32 psw_ack_stat;
217 u32 reserved8[1];
218 u32 mtr_ack_ctrl;
219 u32 mtr_ack_stat;
220 u32 reserved9[2];
221 u32 upi_stat[4];
222 u32 fsm_stat;
223 u32 func_stat;
224};
Peng Fan1e9aff12022-07-26 16:40:50 +0800225#endif
226
Peng Fanbbcd2c42022-07-26 16:40:39 +0800227#endif