1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) 2021 Rockchip Electronics Co., Ltd. 4 */ 5 6 #ifndef _ASM_ARCH_SDRAM_RK3568_H 7 #define _ASM_ARCH_SDRAM_RK3568_H 8 9 #include <asm/arch-rockchip/sdram.h> 10 #include <asm/arch-rockchip/sdram_common.h> 11 12 /* store result of read and write training, for ddr_dq_eye tool in u-boot */ 13 #define RW_TRN_RESULT_ADDR (0x2000000 + 0x8000) /* 32M + 32k */ 14 #define PRINT_STEP 2 15 16 #undef FSP_NUM 17 #undef CS_NUM 18 #undef BYTE_NUM 19 20 #define FSP_NUM 4 21 #define CS_NUM 4 22 #define BYTE_NUM 5 23 #define RD_DESKEW_NUM 128 24 #define WR_DESKEW_NUM 256 25 26 #define LP4_WIDTH_REF_MHZ_H 1560 27 #define LP4_RD_WIDTH_REF_H 25 28 #define LP4_WR_WIDTH_REF_H 24 29 30 #define LP4_WIDTH_REF_MHZ_L 1184 31 #define LP4_RD_WIDTH_REF_L 30 32 #define LP4_WR_WIDTH_REF_L 29 33 34 #define DDR4_WIDTH_REF_MHZ_H 1560 35 #define DDR4_RD_WIDTH_REF_H 30 36 #define DDR4_WR_WIDTH_REF_H 22 37 38 #define DDR4_WIDTH_REF_MHZ_L 1184 39 #define DDR4_RD_WIDTH_REF_L 32 40 #define DDR4_WR_WIDTH_REF_L 26 41 42 #define LP3_WIDTH_REF_MHZ_H 1184 43 #define LP3_RD_WIDTH_REF_H 34 44 #define LP3_WR_WIDTH_REF_H 25 45 46 #define LP3_WIDTH_REF_MHZ_L 920 47 #define LP3_RD_WIDTH_REF_L 39 48 #define LP3_WR_WIDTH_REF_L 28 49 50 #define DDR3_WIDTH_REF_MHZ_H 1184 51 #define DDR3_RD_WIDTH_REF_H 32 52 #define DDR3_WR_WIDTH_REF_H 31 53 54 #define DDR3_WIDTH_REF_MHZ_L 920 55 #define DDR3_RD_WIDTH_REF_L 39 56 #define DDR3_WR_WIDTH_REF_L 34 57 58 #endif /* _ASM_ARCH_SDRAM_RK3568_H */ 59