Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ye Li | b3d60d5 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2014 Freescale Semiconductor, Inc. |
Ye Li | b3d60d5 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
Ye Li | b3d60d5 | 2016-02-01 10:41:32 +0800 | [diff] [blame] | 6 | #include <config.h> |
| 7 | |
| 8 | /* image version */ |
| 9 | |
| 10 | IMAGE_VERSION 2 |
| 11 | |
| 12 | /* |
| 13 | * Boot Device : one of |
| 14 | * spi/sd/nand/onenand, qspi/nor |
| 15 | */ |
| 16 | |
| 17 | BOOT_FROM sd |
| 18 | |
| 19 | /* |
| 20 | * Device Configuration Data (DCD) |
| 21 | * |
| 22 | * Each entry must have the format: |
| 23 | * Addr-type Address Value |
| 24 | * |
| 25 | * where: |
| 26 | * Addr-type register length (1,2 or 4 bytes) |
| 27 | * Address absolute address of the register |
| 28 | * value value to be stored in the register |
| 29 | */ |
| 30 | |
| 31 | /* Enable all clocks */ |
| 32 | DATA 4 0x020c4068 0xffffffff |
| 33 | DATA 4 0x020c406c 0xffffffff |
| 34 | DATA 4 0x020c4070 0xffffffff |
| 35 | DATA 4 0x020c4074 0xffffffff |
| 36 | DATA 4 0x020c4078 0xffffffff |
| 37 | DATA 4 0x020c407c 0xffffffff |
| 38 | DATA 4 0x020c4080 0xffffffff |
| 39 | DATA 4 0x020c4084 0xffffffff |
| 40 | |
| 41 | /* IOMUX - DDR IO Type */ |
| 42 | DATA 4 0x020e0618 0x000c0000 |
| 43 | DATA 4 0x020e05fc 0x00000000 |
| 44 | |
| 45 | /* Clock */ |
| 46 | DATA 4 0x020e032c 0x00000030 |
| 47 | |
| 48 | /* Address */ |
| 49 | DATA 4 0x020e0300 0x00000030 |
| 50 | DATA 4 0x020e02fc 0x00000030 |
| 51 | DATA 4 0x020e05f4 0x00000030 |
| 52 | |
| 53 | /* Control */ |
| 54 | DATA 4 0x020e0340 0x00000030 |
| 55 | |
| 56 | DATA 4 0x020e0320 0x00000000 |
| 57 | DATA 4 0x020e0310 0x00000030 |
| 58 | DATA 4 0x020e0314 0x00000030 |
| 59 | DATA 4 0x020e0614 0x00000030 |
| 60 | |
| 61 | /* Data Strobe */ |
| 62 | DATA 4 0x020e05f8 0x00020000 |
| 63 | DATA 4 0x020e0330 0x00000030 |
| 64 | DATA 4 0x020e0334 0x00000030 |
| 65 | DATA 4 0x020e0338 0x00000030 |
| 66 | DATA 4 0x020e033c 0x00000030 |
| 67 | |
| 68 | /* Data */ |
| 69 | DATA 4 0x020e0608 0x00020000 |
| 70 | DATA 4 0x020e060c 0x00000030 |
| 71 | DATA 4 0x020e0610 0x00000030 |
| 72 | DATA 4 0x020e061c 0x00000030 |
| 73 | DATA 4 0x020e0620 0x00000030 |
| 74 | DATA 4 0x020e02ec 0x00000030 |
| 75 | DATA 4 0x020e02f0 0x00000030 |
| 76 | DATA 4 0x020e02f4 0x00000030 |
| 77 | DATA 4 0x020e02f8 0x00000030 |
| 78 | |
| 79 | /* Calibrations - ZQ */ |
| 80 | DATA 4 0x021b0800 0xa1390003 |
| 81 | |
| 82 | /* Write leveling */ |
| 83 | DATA 4 0x021b080c 0x002C003D |
| 84 | DATA 4 0x021b0810 0x00110046 |
| 85 | |
| 86 | /* DQS Read Gate */ |
| 87 | DATA 4 0x021b083c 0x4160016C |
| 88 | DATA 4 0x021b0840 0x013C016C |
| 89 | |
| 90 | /* Read/Write Delay */ |
| 91 | DATA 4 0x021b0848 0x46424446 |
| 92 | DATA 4 0x021b0850 0x3A3C3C3A |
| 93 | |
| 94 | DATA 4 0x021b08c0 0x2492244A |
| 95 | |
| 96 | /* read data bit delay */ |
| 97 | DATA 4 0x021b081c 0x33333333 |
| 98 | DATA 4 0x021b0820 0x33333333 |
| 99 | DATA 4 0x021b0824 0x33333333 |
| 100 | DATA 4 0x021b0828 0x33333333 |
| 101 | |
| 102 | /* Complete calibration by forced measurement */ |
| 103 | DATA 4 0x021b08b8 0x00000800 |
| 104 | |
| 105 | /* MMDC init - DDR3, 64-bit mode, only MMDC0 is initiated */ |
| 106 | DATA 4 0x021b0004 0x0002002d |
| 107 | DATA 4 0x021b0008 0x00333030 |
| 108 | DATA 4 0x021b000c 0x676b52f3 |
| 109 | DATA 4 0x021b0010 0xb66d8b63 |
| 110 | DATA 4 0x021b0014 0x01ff00db |
| 111 | DATA 4 0x021b0018 0x00011740 |
| 112 | DATA 4 0x021b001c 0x00008000 |
| 113 | DATA 4 0x021b002c 0x000026d2 |
| 114 | DATA 4 0x021b0030 0x006b1023 |
| 115 | DATA 4 0x021b0040 0x0000007f |
| 116 | DATA 4 0x021b0000 0x85190000 |
| 117 | |
| 118 | /* Initialize MT41K256M16HA-125 - MR2 */ |
| 119 | DATA 4 0x021b001c 0x04008032 |
| 120 | /* MR3 */ |
| 121 | DATA 4 0x021b001c 0x00008033 |
| 122 | /* MR1 */ |
| 123 | DATA 4 0x021b001c 0x00068031 |
| 124 | /* MR0 */ |
| 125 | DATA 4 0x021b001c 0x05208030 |
| 126 | /* DDR device ZQ calibration */ |
| 127 | DATA 4 0x021b001c 0x04008040 |
| 128 | |
| 129 | /* Final DDR setup, before operation start */ |
| 130 | DATA 4 0x021b0020 0x00000800 |
| 131 | DATA 4 0x021b0818 0x00022227 |
| 132 | DATA 4 0x021b0004 0x0002556d |
| 133 | DATA 4 0x021b0404 0x00011006 |
| 134 | DATA 4 0x021b001c 0x00000000 |