Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. |
| 3 | * Jason Liu <r64343@freescale.com> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 6 | * |
Anatolij Gustschin | fd4b3d3 | 2013-04-30 11:15:33 +0000 | [diff] [blame] | 7 | * Refer doc/README.imximage for more details about how-to configure |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 8 | * and create imximage boot image |
| 9 | * |
| 10 | * The syntax is taken as close as possible with the kwbimage |
| 11 | */ |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 12 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 13 | /* image version */ |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 14 | IMAGE_VERSION 2 |
| 15 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 16 | /* |
| 17 | * Boot Device : one of |
| 18 | * spi, sd (the board has no nand neither onenand) |
| 19 | */ |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 20 | BOOT_FROM sd |
| 21 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 22 | /* |
| 23 | * Device Configuration Data (DCD) |
| 24 | * |
| 25 | * Each entry must have the format: |
| 26 | * Addr-type Address Value |
| 27 | * |
| 28 | * where: |
| 29 | * Addr-type register length (1,2 or 4 bytes) |
| 30 | * Address absolute address of the register |
| 31 | * value value to be stored in the register |
| 32 | */ |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 33 | DATA 4 0x020e0798 0x000C0000 |
| 34 | DATA 4 0x020e0758 0x00000000 |
| 35 | DATA 4 0x020e0588 0x00000030 |
| 36 | DATA 4 0x020e0594 0x00000030 |
| 37 | DATA 4 0x020e056c 0x00000030 |
| 38 | DATA 4 0x020e0578 0x00000030 |
| 39 | DATA 4 0x020e074c 0x00000030 |
| 40 | DATA 4 0x020e057c 0x000c0030 |
| 41 | DATA 4 0x020e058c 0x00000000 |
| 42 | DATA 4 0x020e059c 0x00003030 |
| 43 | DATA 4 0x020e05a0 0x00003030 |
| 44 | DATA 4 0x020e078c 0x00000030 |
| 45 | DATA 4 0x020e0750 0x00020000 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 46 | DATA 4 0x020e05a8 0x00000030 |
| 47 | DATA 4 0x020e05b0 0x00000030 |
| 48 | DATA 4 0x020e0524 0x00000030 |
| 49 | DATA 4 0x020e051c 0x00000030 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 50 | DATA 4 0x020e0518 0x00000030 |
| 51 | DATA 4 0x020e050c 0x00000030 |
| 52 | DATA 4 0x020e05b8 0x00000030 |
| 53 | DATA 4 0x020e05c0 0x00000030 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 54 | DATA 4 0x020e0774 0x00020000 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 55 | DATA 4 0x020e0784 0x00000030 |
| 56 | DATA 4 0x020e0788 0x00000030 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 57 | DATA 4 0x020e0794 0x00000030 |
| 58 | DATA 4 0x020e079c 0x00000030 |
| 59 | DATA 4 0x020e07a0 0x00000030 |
| 60 | DATA 4 0x020e07a4 0x00000030 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 61 | DATA 4 0x020e07a8 0x00000030 |
| 62 | DATA 4 0x020e0748 0x00000030 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 63 | DATA 4 0x020e05ac 0x00000030 |
| 64 | DATA 4 0x020e05b4 0x00000030 |
| 65 | DATA 4 0x020e0528 0x00000030 |
| 66 | DATA 4 0x020e0520 0x00000030 |
| 67 | DATA 4 0x020e0514 0x00000030 |
| 68 | DATA 4 0x020e0510 0x00000030 |
| 69 | DATA 4 0x020e05bc 0x00000030 |
| 70 | DATA 4 0x020e05c4 0x00000030 |
| 71 | DATA 4 0x021b0800 0xa1390003 |
| 72 | DATA 4 0x021b4800 0xa1390003 |
| 73 | DATA 4 0x021b080c 0x00110019 |
| 74 | DATA 4 0x021b0810 0x00260019 |
| 75 | DATA 4 0x021b480c 0x001A0031 |
| 76 | DATA 4 0x021b4810 0x001A0021 |
| 77 | DATA 4 0x021b083c 0x43100316 |
| 78 | DATA 4 0x021b0840 0x0306027E |
| 79 | DATA 4 0x021b483c 0x43250330 |
| 80 | DATA 4 0x021b4840 0x0322027B |
| 81 | DATA 4 0x021b0848 0x47414146 |
| 82 | DATA 4 0x021b4848 0x41434048 |
| 83 | DATA 4 0x021b0850 0x41444A44 |
| 84 | DATA 4 0x021b4850 0x4B444C46 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 85 | DATA 4 0x021b081c 0x33333333 |
| 86 | DATA 4 0x021b0820 0x33333333 |
| 87 | DATA 4 0x021b0824 0x33333333 |
| 88 | DATA 4 0x021b0828 0x33333333 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 89 | DATA 4 0x021b481c 0x33333333 |
| 90 | DATA 4 0x021b4820 0x33333333 |
| 91 | DATA 4 0x021b4824 0x33333333 |
| 92 | DATA 4 0x021b4828 0x33333333 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 93 | DATA 4 0x021b08b8 0x00000800 |
| 94 | DATA 4 0x021b48b8 0x00000800 |
| 95 | DATA 4 0x021b0004 0x00020036 |
| 96 | DATA 4 0x021b0008 0x09444040 |
| 97 | DATA 4 0x021b000c 0x555A79A4 |
Benoît Thébaudeau | 7bccdae | 2013-01-30 11:19:18 +0000 | [diff] [blame] | 98 | DATA 4 0x021b0010 0xDB538F64 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 99 | DATA 4 0x021b0014 0x01FF00DB |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 100 | DATA 4 0x021b0018 0x00081740 |
| 101 | DATA 4 0x021b001c 0x00008000 |
| 102 | DATA 4 0x021b002c 0x000026d2 |
| 103 | DATA 4 0x021b0030 0x005A0E21 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 104 | DATA 4 0x021b0040 0x00000027 |
| 105 | DATA 4 0x021b0000 0x831A0000 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 106 | DATA 4 0x021b001c 0x04888032 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 107 | DATA 4 0x021b001c 0x00008033 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 108 | DATA 4 0x021b001c 0x00428031 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 109 | DATA 4 0x021b001c 0x09308030 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 110 | DATA 4 0x021b001c 0x04008040 |
| 111 | DATA 4 0x021b001c 0x04008048 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 112 | DATA 4 0x021b0020 0x00005800 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 113 | DATA 4 0x021b0818 0x00011117 |
| 114 | DATA 4 0x021b4818 0x00011117 |
| 115 | DATA 4 0x021b0004 0x00025576 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 116 | DATA 4 0x021b0404 0x00011006 |
Otavio Salvador | a594fd3 | 2015-07-23 11:02:32 -0300 | [diff] [blame] | 117 | DATA 4 0x021b001c 0x00000000 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 118 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 119 | /* set the default clock gate to save power */ |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 120 | DATA 4 0x020c4068 0x00C03F3F |
Eric Nelson | 570c607 | 2012-01-31 07:52:05 +0000 | [diff] [blame] | 121 | DATA 4 0x020c406c 0x0030FC03 |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 122 | DATA 4 0x020c4070 0x0FFFC000 |
| 123 | DATA 4 0x020c4074 0x3FF00000 |
| 124 | DATA 4 0x020c4078 0x00FFF300 |
| 125 | DATA 4 0x020c407c 0x0F0000C3 |
| 126 | DATA 4 0x020c4080 0x000003FF |
| 127 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 128 | /* enable AXI cache for VDOA/VPU/IPU */ |
Vikram Narayanan | 5e4ecda | 2012-06-12 04:50:33 +0000 | [diff] [blame] | 129 | DATA 4 0x020e0010 0xF00000CF |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 130 | /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ |
Jason Liu | 0238468 | 2011-12-29 06:34:19 +0000 | [diff] [blame] | 131 | DATA 4 0x020e0018 0x007F007F |
| 132 | DATA 4 0x020e001c 0x007F007F |
Fabio Estevam | 526a413 | 2013-04-17 08:33:26 +0000 | [diff] [blame] | 133 | |
| 134 | /* |
| 135 | * Setup CCM_CCOSR register as follows: |
| 136 | * |
| 137 | * cko1_en = 1 --> CKO1 enabled |
| 138 | * cko1_div = 111 --> divide by 8 |
| 139 | * cko1_sel = 1011 --> ahb_clk_root |
| 140 | * |
| 141 | * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz |
| 142 | */ |
| 143 | DATA 4 0x020c4060 0x000000fb |