Ye Li | 90b8601 | 2018-03-25 20:42:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. |
| 3 | * Copyright 2017 NXP |
| 4 | * Jason Liu <r64343@freescale.com> |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | * |
| 8 | * Refer docs/README.imxmage for more details about how-to configure |
| 9 | * and create imximage boot image |
| 10 | * |
| 11 | * The syntax is taken as close as possible with the kwbimage |
| 12 | */ |
| 13 | |
| 14 | #define __ASSEMBLY__ |
| 15 | #include <config.h> |
| 16 | |
| 17 | /* image version */ |
| 18 | IMAGE_VERSION 2 |
| 19 | |
| 20 | /* |
| 21 | * Boot Device : one of |
| 22 | * spi, sd (the board has no nand neither onenand) |
| 23 | */ |
| 24 | BOOT_FROM sd |
| 25 | |
| 26 | #ifdef CONFIG_USE_IMXIMG_PLUGIN |
| 27 | /*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/ |
| 28 | PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 |
| 29 | #else |
| 30 | |
| 31 | #ifdef CONFIG_SECURE_BOOT |
| 32 | CSF CONFIG_CSF_SIZE |
| 33 | #endif |
| 34 | |
| 35 | /* |
| 36 | * Device Configuration Data (DCD) |
| 37 | * |
| 38 | * Each entry must have the format: |
| 39 | * Addr-type Address Value |
| 40 | * |
| 41 | * where: |
| 42 | * Addr-type register length (1,2 or 4 bytes) |
| 43 | * Address absolute address of the register |
| 44 | * value value to be stored in the register |
| 45 | */ |
Peng Fan | 9d483ef | 2017-11-09 09:10:52 +0800 | [diff] [blame] | 46 | #ifdef CONFIG_IMX_OPTEE |
| 47 | SET_BIT 4 0x20c4070 0x3c00000 |
| 48 | DATA 4 0x20e0024 0x00000003 |
| 49 | CHECK_BITS_SET 4 0x20e0024 0x3 |
| 50 | #endif |
Ye Li | 90b8601 | 2018-03-25 20:42:07 -0700 | [diff] [blame] | 51 | DATA 4, 0x020e0774, 0x000C0000 |
| 52 | DATA 4, 0x020e0754, 0x00000000 |
| 53 | DATA 4, 0x020e04ac, 0x00000030 |
| 54 | DATA 4, 0x020e04b0, 0x00000030 |
| 55 | DATA 4, 0x020e0464, 0x00000030 |
| 56 | DATA 4, 0x020e0490, 0x00000030 |
| 57 | DATA 4, 0x020e074c, 0x00000030 |
| 58 | DATA 4, 0x020e0494, 0x00000030 |
| 59 | DATA 4, 0x020e04a0, 0x00000000 |
| 60 | DATA 4, 0x020e04b4, 0x00000030 |
| 61 | DATA 4, 0x020e04b8, 0x00000030 |
| 62 | DATA 4, 0x020e076c, 0x00000030 |
| 63 | DATA 4, 0x020e0750, 0x00020000 |
| 64 | DATA 4, 0x020e04bc, 0x00000030 |
| 65 | DATA 4, 0x020e04c0, 0x00000030 |
| 66 | DATA 4, 0x020e04c4, 0x00000030 |
| 67 | DATA 4, 0x020e04c8, 0x00000030 |
| 68 | DATA 4, 0x020e0760, 0x00020000 |
| 69 | DATA 4, 0x020e0764, 0x00000030 |
| 70 | DATA 4, 0x020e0770, 0x00000030 |
| 71 | DATA 4, 0x020e0778, 0x00000030 |
| 72 | DATA 4, 0x020e077c, 0x00000030 |
| 73 | DATA 4, 0x020e0470, 0x00000030 |
| 74 | DATA 4, 0x020e0474, 0x00000030 |
| 75 | DATA 4, 0x020e0478, 0x00000030 |
| 76 | DATA 4, 0x020e047c, 0x00000030 |
| 77 | DATA 4, 0x021b0800, 0xa1390003 |
| 78 | DATA 4, 0x021b080c, 0x001F001F |
| 79 | DATA 4, 0x021b0810, 0x001F001F |
| 80 | DATA 4, 0x021b083c, 0x42190219 |
| 81 | DATA 4, 0x021b0840, 0x017B0177 |
| 82 | DATA 4, 0x021b0848, 0x4B4D4E4D |
| 83 | DATA 4, 0x021b0850, 0x3F3E2D36 |
| 84 | DATA 4, 0x021b081c, 0x33333333 |
| 85 | DATA 4, 0x021b0820, 0x33333333 |
| 86 | DATA 4, 0x021b0824, 0x33333333 |
| 87 | DATA 4, 0x021b0828, 0x33333333 |
| 88 | DATA 4, 0x021b08b8, 0x00000800 |
| 89 | DATA 4, 0x021b0004, 0x0002002D |
| 90 | DATA 4, 0x021b0008, 0x00333030 |
| 91 | DATA 4, 0x021b000c, 0x3F435313 |
| 92 | DATA 4, 0x021b0010, 0xB66E8B63 |
| 93 | DATA 4, 0x021b0014, 0x01FF00DB |
| 94 | DATA 4, 0x021b0018, 0x00001740 |
| 95 | DATA 4, 0x021b001c, 0x00008000 |
| 96 | DATA 4, 0x021b002c, 0x000026d2 |
| 97 | DATA 4, 0x021b0030, 0x00431023 |
| 98 | DATA 4, 0x021b0040, 0x00000017 |
| 99 | DATA 4, 0x021b0000, 0x83190000 |
| 100 | DATA 4, 0x021b001c, 0x04008032 |
| 101 | DATA 4, 0x021b001c, 0x00008033 |
| 102 | DATA 4, 0x021b001c, 0x00048031 |
| 103 | DATA 4, 0x021b001c, 0x05208030 |
| 104 | DATA 4, 0x021b001c, 0x04008040 |
| 105 | DATA 4, 0x021b0020, 0x00005800 |
| 106 | DATA 4, 0x021b0818, 0x00011117 |
| 107 | DATA 4, 0x021b0004, 0x0002556D |
| 108 | DATA 4, 0x021b0404, 0x00011006 |
| 109 | DATA 4, 0x021b001c, 0x00000000 |
| 110 | |
| 111 | /* set the default clock gate to save power */ |
| 112 | DATA 4, 0x020c4068, 0x00C03F3F |
| 113 | DATA 4, 0x020c406c, 0x0030FC03 |
| 114 | DATA 4, 0x020c4070, 0x0FFFF000 |
| 115 | DATA 4, 0x020c4074, 0x3FF00000 |
| 116 | DATA 4, 0x020c4078, 0x00FFF300 |
| 117 | DATA 4, 0x020c407c, 0x0F0000C3 |
| 118 | DATA 4, 0x020c4080, 0x000003FF |
| 119 | |
| 120 | /* enable AXI cache for VDOA/VPU/IPU */ |
| 121 | DATA 4, 0x020e0010, 0xF00000CF |
| 122 | /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ |
| 123 | DATA 4, 0x020e0018, 0x007F007F |
| 124 | DATA 4, 0x020e001c, 0x007F007F |
| 125 | #endif |