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