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