Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Max Krummenacher | eeb16b2 | 2016-11-30 19:43:09 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Boundary Devices |
| 4 | * Copyright (C) 2014-2016, Toradex AG |
Max Krummenacher | eeb16b2 | 2016-11-30 19:43:09 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | DATA 4, MX6_MMDC_P0_MDPDC, 0x0002002D |
| 8 | DATA 4, MX6_MMDC_P0_MDCFG0, 0x2C305503 |
| 9 | DATA 4, MX6_MMDC_P0_MDCFG1, 0xB66D8D63 |
| 10 | DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB |
| 11 | DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2 |
| 12 | DATA 4, MX6_MMDC_P0_MDOR, 0x00301023 |
| 13 | DATA 4, MX6_MMDC_P0_MDOTC, 0x00333030 |
| 14 | DATA 4, MX6_MMDC_P0_MDPDC, 0x0002556D |
| 15 | /* CS0 End: 7MSB of ((0x10000000 + 512M) -1) >> 25 */ |
| 16 | DATA 4, MX6_MMDC_P0_MDASP, 0x00000017 |
| 17 | /* DDR3 DATA BUS SIZE: 64BIT */ |
| 18 | /* DATA 4, MX6_MMDC_P0_MDCTL, 0x821A0000 */ |
| 19 | /* DDR3 DATA BUS SIZE: 32BIT */ |
| 20 | DATA 4, MX6_MMDC_P0_MDCTL, 0x82190000 |
| 21 | |
| 22 | /* Write commands to DDR */ |
| 23 | /* Load Mode Registers */ |
| 24 | /* TODO Use Auto Self-Refresh mode (Extended Temperature)*/ |
| 25 | /* DATA 4, MX6_MMDC_P0_MDSCR, 0x04408032 */ |
| 26 | DATA 4, MX6_MMDC_P0_MDSCR, 0x04008032 |
| 27 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033 |
| 28 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031 |
| 29 | DATA 4, MX6_MMDC_P0_MDSCR, 0x13208030 |
| 30 | /* ZQ calibration */ |
| 31 | DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040 |
| 32 | |
| 33 | DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xA1390003 |
| 34 | DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xA1390003 |
| 35 | DATA 4, MX6_MMDC_P0_MDREF, 0x00005800 |
| 36 | |
| 37 | DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00000000 |
| 38 | DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x00000000 |
| 39 | |
| 40 | DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x42360232 |
| 41 | DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x021F022A |
| 42 | DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x421E0224 |
| 43 | DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x02110218 |
| 44 | |
| 45 | DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x41434344 |
| 46 | DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x4345423E |
| 47 | DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x39383339 |
| 48 | DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x3E363930 |
| 49 | |
| 50 | DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x00340039 |
| 51 | DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x002C002D |
| 52 | DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x00120019 |
| 53 | DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x0012002D |
| 54 | |
| 55 | DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000800 |
| 56 | DATA 4, MX6_MMDC_P1_MPMUR0, 0x00000800 |
| 57 | DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000 |
| 58 | DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006 |