xref: /optee_os/core/arch/arm/plat-imx/config/imx6sx.h (revision 286380234252221a512d843dbba8561fc3c5e0d9)
1a53b813eSPeng Fan /* SPDX-License-Identifier: BSD-2-Clause */
2a53b813eSPeng Fan /*
3*3b93220cSSilvano di Ninno  * Copyright 2017-2019 NXP
4a53b813eSPeng Fan  *
5a53b813eSPeng Fan  * Peng Fan <peng.fan@nxp.com>
6a53b813eSPeng Fan  */
7a53b813eSPeng Fan 
8a53b813eSPeng Fan #ifndef __CONFIG_IMX6SX_H
9a53b813eSPeng Fan #define __CONFIG_IMX6SX_H
10a53b813eSPeng Fan 
11a53b813eSPeng Fan /*
12a53b813eSPeng Fan  * PL310 TAG RAM Control Register
13a53b813eSPeng Fan  *
14a53b813eSPeng Fan  * bit[10:8]:1 - 2 cycle of write accesses latency
15a53b813eSPeng Fan  * bit[6:4]:3 - 4 cycle of read accesses latency
16a53b813eSPeng Fan  * bit[2:0]:2 - 3 cycle of setup latency
17a53b813eSPeng Fan  */
18a53b813eSPeng Fan #ifndef PL310_TAG_RAM_CTRL_INIT
19a53b813eSPeng Fan #define PL310_TAG_RAM_CTRL_INIT		0x00000132
20a53b813eSPeng Fan #endif
21a53b813eSPeng Fan 
22a53b813eSPeng Fan /*
23a53b813eSPeng Fan  * PL310 DATA RAM Control Register
24a53b813eSPeng Fan  *
25a53b813eSPeng Fan  * bit[10:8]:1 - 2 cycle of write accesses latency
26a53b813eSPeng Fan  * bit[6:4]:3 - 4 cycle of read accesses latency
27a53b813eSPeng Fan  * bit[2:0]:2 - 3 cycle of setup latency
28a53b813eSPeng Fan  */
29a53b813eSPeng Fan #ifndef PL310_DATA_RAM_CTRL_INIT
30*3b93220cSSilvano di Ninno #define PL310_DATA_RAM_CTRL_INIT	0x00000132
31a53b813eSPeng Fan #endif
32a53b813eSPeng Fan 
33a53b813eSPeng Fan /*
34a53b813eSPeng Fan  * PL310 Auxiliary Control Register
35a53b813eSPeng Fan  *
36*3b93220cSSilvano di Ninno  * Early BRESP enabled (bit30=1)
37a53b813eSPeng Fan  * I/Dcache prefetch enabled (bit29:28=2b11)
38a53b813eSPeng Fan  * NS can access interrupts (bit27=1)
39a53b813eSPeng Fan  * NS can lockown cache lines (bit26=1)
40*3b93220cSSilvano di Ninno  * Pseudo-random replacement policy (bit25=1)
41*3b93220cSSilvano di Ninno  * Force write allocated (default) (bit24:23=00)
42a53b813eSPeng Fan  * Shared attribute internally ignored (bit22=1, bit13=0)
43a53b813eSPeng Fan  * Parity disabled (bit21=0)
44a53b813eSPeng Fan  * Event monitor disabled (bit20=0)
45*3b93220cSSilvano di Ninno  * 16kb way size (bit19:17=3b001)
46*3b93220cSSilvano di Ninno  * 16-way associativity (bit16=1)
47*3b93220cSSilvano di Ninno  * Store buffer device limitation enabled (bit11=0)
48a53b813eSPeng Fan  * Cacheable accesses have high prio (bit10=0)
49*3b93220cSSilvano di Ninno  * Full Line Zero (FLZ) enabled (bit0=1)
50a53b813eSPeng Fan  */
51*3b93220cSSilvano di Ninno #ifndef PL310_AUX_CTRL_INIT
52*3b93220cSSilvano di Ninno #define PL310_AUX_CTRL_INIT		0x7E430001
53*3b93220cSSilvano di Ninno #endif
54a53b813eSPeng Fan 
55a53b813eSPeng Fan /*
56a53b813eSPeng Fan  * PL310 Prefetch Control Register
57a53b813eSPeng Fan  *
58*3b93220cSSilvano di Ninno  * Double linefill enabled (bit30=1)
59a53b813eSPeng Fan  * I/D prefetch enabled (bit29:28=2b11)
60*3b93220cSSilvano di Ninno  * Prefetch drop disabled (bit24=0)
61a53b813eSPeng Fan  * Incr double linefill disable (bit23=0)
62*3b93220cSSilvano di Ninno  * Prefetch offset = 0xF (bit4:0)
63a53b813eSPeng Fan  */
64*3b93220cSSilvano di Ninno #define PL310_PREFETCH_CTRL_INIT	0x7000000F
65a53b813eSPeng Fan 
66a53b813eSPeng Fan /*
67a53b813eSPeng Fan  * PL310 Power Register
68a53b813eSPeng Fan  *
69a53b813eSPeng Fan  * Dynamic clock gating enabled
70a53b813eSPeng Fan  * Standby mode enabled
71a53b813eSPeng Fan  */
72a53b813eSPeng Fan #define PL310_POWER_CTRL_INIT		0x00000003
73a53b813eSPeng Fan #endif
74