Prepare for new DDR PHY
[litex.git] / software / include / hw / dfii.h
1 /*
2 * Milkymist SoC (Software)
3 * Copyright (C) 2012 Sebastien Bourdeauducq
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef __HW_DFII_H
19 #define __HW_DFII_H
20
21 #include <hw/common.h>
22
23 #define CSR_DFII_CONTROL MMPTR(0xe0000800)
24
25 #define DFII_CONTROL_SEL (0x01)
26 #define DFII_CONTROL_CKE (0x02)
27
28 #define CSR_DFII_COMMAND MMPTR(0xe0001004)
29
30 #define DFII_COMMAND_CS (0x01)
31 #define DFII_COMMAND_WE (0x02)
32 #define DFII_COMMAND_CAS (0x04)
33 #define DFII_COMMAND_RAS (0x08)
34 #define DFII_COMMAND_RDDATA (0x10)
35 #define DFII_COMMAND_WRDATA (0x20)
36
37 #define CSR_DFII_AH MMPTR(0xe0000808)
38 #define CSR_DFII_AL MMPTR(0xe000080C)
39 #define CSR_DFII_BA MMPTR(0xe0000810)
40
41 #define CSR_DFII_RDDELAY MMPTR(0xe0000814)
42 #define CSR_DFII_RDDURATION MMPTR(0xe0000818)
43 #define CSR_DFII_WRDELAY MMPTR(0xe000081C)
44 #define CSR_DFII_WRDURATION MMPTR(0xe0000820)
45
46 #endif /* __HW_DFII_H */