Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Adam Ford | a2965c9 | 2017-04-07 10:25:34 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2017 Logic PD, Inc. |
| 4 | * Adam Ford <aford173@gmail.com> |
| 5 | * |
Adam Ford | a2965c9 | 2017-04-07 10:25:34 -0500 | [diff] [blame] | 6 | * Refer doc/README.imximage for more details about how-to configure |
| 7 | * and create imximage boot image |
| 8 | * |
| 9 | * The syntax is taken as close as possible with the kwbimage |
| 10 | */ |
| 11 | |
Stefano Babic | 33731bc | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 12 | #include <asm/mach-imx/imximage.cfg> |
Adam Ford | a2965c9 | 2017-04-07 10:25:34 -0500 | [diff] [blame] | 13 | |
| 14 | /* image version */ |
| 15 | IMAGE_VERSION 2 |
| 16 | |
| 17 | BOOT_OFFSET FLASH_OFFSET_STANDARD |
| 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 | #define __ASSEMBLY__ |
| 32 | #include <config.h> |
| 33 | #include "asm/arch-mx6/mx6-ddr.h" |
| 34 | #include "asm/arch-mx6/iomux.h" |
| 35 | #include "asm/arch-mx6/crm_regs.h" |
| 36 | |
| 37 | DATA 4, MX6_IOM_GRP_DDR_TYPE, 0x000C0000 |
| 38 | DATA 4, MX6_IOM_GRP_DDRPKE, 0x00000000 |
| 39 | DATA 4, MX6_IOM_DRAM_SDCLK_0, 0x00000030 |
| 40 | DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x00000030 |
| 41 | DATA 4, MX6_IOM_DRAM_CAS, 0x00000030 |
| 42 | DATA 4, MX6_IOM_DRAM_RAS, 0x00000030 |
| 43 | DATA 4, MX6_IOM_GRP_ADDDS, 0x00000030 |
| 44 | DATA 4, MX6_IOM_DRAM_RESET, 0x00000030 |
| 45 | DATA 4, MX6_IOM_DRAM_SDBA2, 0x00000000 |
| 46 | DATA 4, MX6_IOM_DRAM_SDODT0, 0x00000030 |
| 47 | DATA 4, MX6_IOM_DRAM_SDODT1, 0x00000030 |
| 48 | DATA 4, MX6_IOM_GRP_CTLDS, 0x00000030 |
| 49 | DATA 4, MX6_IOM_DDRMODE_CTL, 0x00020000 |
| 50 | DATA 4, MX6_IOM_DRAM_SDQS0, 0x00000030 |
| 51 | DATA 4, MX6_IOM_DRAM_SDQS1, 0x00000030 |
| 52 | DATA 4, MX6_IOM_DRAM_SDQS2, 0x00000030 |
| 53 | DATA 4, MX6_IOM_DRAM_SDQS3, 0x00000030 |
| 54 | DATA 4, MX6_IOM_GRP_DDRMODE, 0x00020000 |
| 55 | DATA 4, MX6_IOM_GRP_B0DS, 0x00000030 |
| 56 | DATA 4, MX6_IOM_GRP_B1DS, 0x00000030 |
| 57 | DATA 4, MX6_IOM_GRP_B2DS, 0x00000030 |
| 58 | DATA 4, MX6_IOM_GRP_B3DS, 0x00000030 |
| 59 | DATA 4, MX6_IOM_DRAM_DQM0, 0x00000030 |
| 60 | DATA 4, MX6_IOM_DRAM_DQM1, 0x00000030 |
| 61 | DATA 4, MX6_IOM_DRAM_DQM2, 0x00000030 |
| 62 | DATA 4, MX6_IOM_DRAM_DQM3, 0x00000030 |
| 63 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000 |
| 64 | DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xA1390003 |
| 65 | DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x002D003A |
| 66 | DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x0038002B |
| 67 | DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x03340338 |
| 68 | DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x0334032C |
| 69 | DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x4036383C |
| 70 | DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x2E384038 |
| 71 | DATA 4, MX6_MMDC_P0_MPRDDQBY0DL, 0x33333333 |
| 72 | DATA 4, MX6_MMDC_P0_MPRDDQBY1DL, 0x33333333 |
| 73 | DATA 4, MX6_MMDC_P0_MPRDDQBY2DL, 0x33333333 |
| 74 | DATA 4, MX6_MMDC_P0_MPRDDQBY3DL, 0x33333333 |
| 75 | DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000800 |
| 76 | DATA 4, MX6_MMDC_P0_MDPDC, 0x00020036 |
| 77 | DATA 4, MX6_MMDC_P0_MDOTC, 0x09444040 |
| 78 | DATA 4, MX6_MMDC_P0_MDCFG0, 0xB8BE7955 |
| 79 | DATA 4, MX6_MMDC_P0_MDCFG1, 0xFF328F64 |
| 80 | DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB |
| 81 | DATA 4, MX6_MMDC_P0_MDMISC, 0x00011740 |
| 82 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000 |
| 83 | DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2 |
| 84 | DATA 4, MX6_MMDC_P0_MDOR, 0x00BE1023 |
| 85 | DATA 4, MX6_MMDC_P0_MDASP, 0x00000047 |
| 86 | DATA 4, MX6_MMDC_P0_MDCTL, 0x85190000 |
| 87 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00888032 |
| 88 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033 |
| 89 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00008031 |
| 90 | DATA 4, MX6_MMDC_P0_MDSCR, 0x19408030 |
| 91 | DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040 |
| 92 | DATA 4, MX6_MMDC_P0_MDREF, 0x00007800 |
| 93 | DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00000007 |
| 94 | DATA 4, MX6_MMDC_P0_MDPDC, 0x00025576 |
| 95 | DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006 |
| 96 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000 |
| 97 | |
| 98 | /* set the default clock gate to save power */ |
| 99 | DATA 4, CCM_CCGR0, 0x00C03F3F |
| 100 | DATA 4, CCM_CCGR1, 0x0030FC03 |
| 101 | DATA 4, CCM_CCGR2, 0x0FFFC000 |
| 102 | DATA 4, CCM_CCGR3, 0x3FF00000 |
| 103 | DATA 4, CCM_CCGR4, 0xFFFFF300 |
| 104 | DATA 4, CCM_CCGR5, 0x0F0000F3 |
| 105 | DATA 4, CCM_CCGR6, 0x00000FFF |
| 106 | |
| 107 | /* enable AXI cache for VDOA/VPU/IPU */ |
| 108 | DATA 4 MX6_IOMUXC_GPR4 0xF00000CF |
| 109 | /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ |
| 110 | DATA 4 MX6_IOMUXC_GPR6 0x007F007F |
| 111 | DATA 4 MX6_IOMUXC_GPR7 0x007F007F |