Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | 8e1d92f | 2016-12-11 19:24:38 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. |
Peng Fan | 8e1d92f | 2016-12-11 19:24:38 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <config.h> |
| 7 | |
| 8 | /* DDR script */ |
| 9 | .macro imx6sll_evk_ddr_setting |
| 10 | ldr r0, =IOMUXC_BASE_ADDR |
| 11 | ldr r1, =0x00080000 |
| 12 | str r1, [r0, #0x550] |
| 13 | ldr r1, =0x00000000 |
| 14 | str r1, [r0, #0x534] |
| 15 | ldr r1, =0x00000030 |
| 16 | str r1, [r0, #0x2AC] |
| 17 | str r1, [r0, #0x548] |
| 18 | str r1, [r0, #0x52C] |
| 19 | ldr r1, =0x00020000 |
| 20 | str r1, [r0, #0x530] |
| 21 | ldr r1, =0x00003030 |
| 22 | str r1, [r0, #0x2B0] |
| 23 | str r1, [r0, #0x2B4] |
| 24 | str r1, [r0, #0x2B8] |
| 25 | str r1, [r0, #0x2BC] |
| 26 | |
| 27 | ldr r1, =0x00020000 |
| 28 | str r1, [r0, #0x540] |
| 29 | ldr r1, =0x00000030 |
| 30 | str r1, [r0, #0x544] |
| 31 | str r1, [r0, #0x54C] |
| 32 | str r1, [r0, #0x554] |
| 33 | str r1, [r0, #0x558] |
| 34 | str r1, [r0, #0x294] |
| 35 | str r1, [r0, #0x298] |
| 36 | str r1, [r0, #0x29C] |
| 37 | str r1, [r0, #0x2A0] |
| 38 | |
| 39 | ldr r1, =0x00082030 |
| 40 | str r1, [r0, #0x2C0] |
| 41 | |
| 42 | ldr r0, =MMDC_P0_BASE_ADDR |
| 43 | ldr r1, =0x00008000 |
| 44 | str r1, [r0, #0x1C] |
| 45 | ldr r1, =0xA1390003 |
| 46 | str r1, [r0, #0x800] |
| 47 | ldr r1, =0x084700C7 |
| 48 | str r1, [r0, #0x85C] |
| 49 | ldr r1, =0x00400000 |
| 50 | str r1, [r0, #0x890] |
| 51 | |
| 52 | ldr r1, =0x3F393B3C |
| 53 | str r1, [r0, #0x848] |
| 54 | ldr r1, =0x262C3826 |
| 55 | str r1, [r0, #0x850] |
| 56 | |
| 57 | ldr r1, =0x33333333 |
| 58 | str r1, [r0, #0x81C] |
| 59 | str r1, [r0, #0x820] |
| 60 | str r1, [r0, #0x824] |
| 61 | str r1, [r0, #0x828] |
| 62 | |
| 63 | ldr r1, =0xf3333333 |
| 64 | str r1, [r0, #0x82C] |
| 65 | str r1, [r0, #0x830] |
| 66 | str r1, [r0, #0x834] |
| 67 | str r1, [r0, #0x838] |
| 68 | |
| 69 | ldr r1, =0x24922492 |
| 70 | str r1, [r0, #0x8C0] |
| 71 | ldr r1, =0x00000800 |
| 72 | str r1, [r0, #0x8B8] |
| 73 | |
| 74 | ldr r1, =0x00020052 |
| 75 | str r1, [r0, #0x004] |
| 76 | ldr r1, =0x53574333 |
| 77 | str r1, [r0, #0x00C] |
| 78 | ldr r1, =0x00100B22 |
| 79 | str r1, [r0, #0x010] |
| 80 | ldr r1, =0x00170778 |
| 81 | str r1, [r0, #0x038] |
| 82 | ldr r1, =0x00C700DB |
| 83 | str r1, [r0, #0x014] |
| 84 | ldr r1, =0x00201718 |
| 85 | str r1, [r0, #0x018] |
| 86 | ldr r1, =0x0F9F26D2 |
| 87 | str r1, [r0, #0x02C] |
| 88 | ldr r1, =0x009F0E10 |
| 89 | str r1, [r0, #0x030] |
| 90 | ldr r1, =0x0000005F |
| 91 | str r1, [r0, #0x040] |
| 92 | ldr r1, =0xC4190000 |
| 93 | str r1, [r0, #0x000] |
| 94 | ldr r1, =0x20000000 |
| 95 | str r1, [r0, #0x83C] |
| 96 | |
| 97 | ldr r1, =0x00008050 |
| 98 | str r1, [r0, #0x01C] |
| 99 | ldr r1, =0x00008058 |
| 100 | str r1, [r0, #0x01C] |
| 101 | ldr r1, =0x003F8030 |
| 102 | str r1, [r0, #0x01C] |
| 103 | ldr r1, =0x003F8038 |
| 104 | str r1, [r0, #0x01C] |
| 105 | ldr r1, =0xFF0A8030 |
| 106 | str r1, [r0, #0x01C] |
| 107 | ldr r1, =0xFF0A8038 |
| 108 | str r1, [r0, #0x01C] |
| 109 | ldr r1, =0x04028030 |
| 110 | str r1, [r0, #0x01C] |
| 111 | ldr r1, =0x04028038 |
| 112 | str r1, [r0, #0x01C] |
| 113 | ldr r1, =0x83018030 |
| 114 | str r1, [r0, #0x01C] |
| 115 | ldr r1, =0x83018038 |
| 116 | str r1, [r0, #0x01C] |
| 117 | ldr r1, =0x01038030 |
| 118 | str r1, [r0, #0x01C] |
| 119 | ldr r1, =0x01038038 |
| 120 | str r1, [r0, #0x01C] |
| 121 | |
| 122 | ldr r1, =0x00001800 |
| 123 | str r1, [r0, #0x020] |
| 124 | ldr r1, =0xA1390003 |
| 125 | str r1, [r0, #0x800] |
| 126 | ldr r1, =0x00020052 |
| 127 | str r1, [r0, #0x004] |
| 128 | ldr r1, =0x00011006 |
| 129 | str r1, [r0, #0x404] |
| 130 | ldr r1, =0x00000000 |
| 131 | str r1, [r0, #0x01C] |
| 132 | .endm |
| 133 | |
| 134 | .macro imx6_clock_gating |
| 135 | ldr r0, =CCM_BASE_ADDR |
| 136 | ldr r1, =0xffffffff |
| 137 | str r1, [r0, #0x068] |
| 138 | str r1, [r0, #0x06c] |
| 139 | str r1, [r0, #0x070] |
| 140 | str r1, [r0, #0x074] |
| 141 | str r1, [r0, #0x078] |
| 142 | str r1, [r0, #0x07c] |
| 143 | str r1, [r0, #0x080] |
| 144 | .endm |
| 145 | |
| 146 | .macro imx6_qos_setting |
| 147 | .endm |
| 148 | |
| 149 | .macro imx6_ddr_setting |
| 150 | imx6sll_evk_ddr_setting |
| 151 | .endm |
| 152 | |
| 153 | /* include the common plugin code here */ |
| 154 | #include <asm/arch/mx6_plugin.S> |