2 * Copyright 2016 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
10 #define CONFIG_SYS_MMDC_CORE_ODT_TIMING 0x12554000
11 #define CONFIG_SYS_MMDC_CORE_TIMING_CFG_0 0xbabf7954
12 #define CONFIG_SYS_MMDC_CORE_TIMING_CFG_1 0xff328f64
13 #define CONFIG_SYS_MMDC_CORE_TIMING_CFG_2 0x01ff00db
15 #define CONFIG_SYS_MMDC_CORE_MISC 0x00001680
16 #define CONFIG_SYS_MMDC_PHY_MEASURE_UNIT 0x00000800
17 #define CONFIG_SYS_MMDC_CORE_RDWR_CMD_DELAY 0x00002000
18 #define CONFIG_SYS_MMDC_PHY_ODT_CTRL 0x0000022a
20 #define CONFIG_SYS_MMDC_CORE_OUT_OF_RESET_DELAY 0x00bf1023
22 #define CONFIG_SYS_MMDC_CORE_ADDR_PARTITION 0x0000007f
24 #define CONFIG_SYS_MMDC_PHY_ZQ_HW_CTRL 0xa1390003
26 #define FORCE_ZQ_AUTO_CALIBRATION (0x1 << 16)
28 /* PHY Write Leveling Configuration and Error Status (MPWLGCR) */
29 #define WR_LVL_HW_EN 0x00000001
31 /* PHY Pre-defined Compare and CA delay-line Configuration (MPPDCMPR2) */
32 #define MPR_COMPARE_EN 0x00000001
34 #define CONFIG_SYS_MMDC_PHY_RD_DLY_LINES_CFG 0x40404040
36 /* MMDC PHY Read DQS gating control register 0 (MPDGCTRL0) */
37 #define AUTO_RD_DQS_GATING_CALIBRATION_EN 0x10000000
39 /* MMDC PHY Read Delay HW Calibration Control Register (MPRDDLHWCTL) */
40 #define AUTO_RD_CALIBRATION_EN 0x00000010
42 #define CONFIG_SYS_MMDC_CORE_PWR_DOWN_CTRL 0x00030035
44 #define CONFIG_SYS_MMDC_CORE_PWR_SAV_CTRL_STAT 0x00001067
46 #define CONFIG_SYS_MMDC_CORE_REFRESH_CTL 0x0f3c8000
48 #define START_REFRESH 0x00000001
50 /* MMDC Core Special Command Register (MDSCR) */
51 #define CMD_ADDR_MSB_MR_OP(x) (x << 24)
53 #define CMD_ADDR_LSB_MR_ADDR(x) (x << 16)
55 #define DISABLE_CFG_REQ 0x0
56 #define CONFIGURATION_REQ (0x1 << 15)
57 #define WL_EN (0x1 << 9)
59 #define CMD_NORMAL (0x0 << 4)
60 #define CMD_PRECHARGE (0x1 << 4)
61 #define CMD_AUTO_REFRESH (0x2 << 4)
62 #define CMD_LOAD_MODE_REG (0x3 << 4)
63 #define CMD_ZQ_CALIBRATION (0x4 << 4)
64 #define CMD_PRECHARGE_BANK_OPEN (0x5 << 4)
65 #define CMD_MRR (0x6 << 4)
67 #define CMD_BANK_ADDR_0 0x0
68 #define CMD_BANK_ADDR_1 0x1
69 #define CMD_BANK_ADDR_2 0x2
70 #define CMD_BANK_ADDR_3 0x3
71 #define CMD_BANK_ADDR_4 0x4
72 #define CMD_BANK_ADDR_5 0x5
73 #define CMD_BANK_ADDR_6 0x6
74 #define CMD_BANK_ADDR_7 0x7
160 #endif /* FSL_MMDC_H */