summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/mediatek/mt8183/dramc_init_setting.c1
-rw-r--r--src/soc/mediatek/mt8183/dramc_pi_calibration_api.c1
-rw-r--r--src/soc/mediatek/mt8183/include/soc/dramc_param.h14
-rw-r--r--src/soc/mediatek/mt8183/include/soc/emi.h3
4 files changed, 14 insertions, 5 deletions
diff --git a/src/soc/mediatek/mt8183/dramc_init_setting.c b/src/soc/mediatek/mt8183/dramc_init_setting.c
index 9ae0aae07f..794fad1c3d 100644
--- a/src/soc/mediatek/mt8183/dramc_init_setting.c
+++ b/src/soc/mediatek/mt8183/dramc_init_setting.c
@@ -5,6 +5,7 @@
#include <delay.h>
#include <soc/emi.h>
#include <soc/dramc_pi_api.h>
+#include <soc/dramc_param.h>
#include <soc/dramc_register.h>
#include <soc/infracfg.h>
#include <string.h>
diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
index 50d847f542..fce7c9ff4a 100644
--- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
+++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
@@ -6,6 +6,7 @@
#include <device/mmio.h>
#include <soc/emi.h>
#include <soc/dramc_register.h>
+#include <soc/dramc_param.h>
#include <soc/dramc_pi_api.h>
#include <timer.h>
diff --git a/src/soc/mediatek/mt8183/include/soc/dramc_param.h b/src/soc/mediatek/mt8183/include/soc/dramc_param.h
index a883fe7dce..e35e4f5421 100644
--- a/src/soc/mediatek/mt8183/include/soc/dramc_param.h
+++ b/src/soc/mediatek/mt8183/include/soc/dramc_param.h
@@ -3,14 +3,14 @@
#ifndef SOC_MEDIATEK_MT8183_DRAMC_PARAM_H
#define SOC_MEDIATEK_MT8183_DRAMC_PARAM_H
+#include <soc/dramc_common_mt8183.h>
+#include <soc/emi.h>
#include <stdint.h>
#include <sys/types.h>
-#include "emi.h"
-
enum {
DRAMC_PARAM_HEADER_MAGIC = 0x44524d4b,
- DRAMC_PARAM_HEADER_VERSION = 2,
+ DRAMC_PARAM_HEADER_VERSION = 3,
};
enum DRAMC_PARAM_STATUS_CODES {
@@ -37,10 +37,16 @@ enum DRAMC_PARAM_FLAGS {
DRAMC_FLAG_HAS_SAVED_DATA = 0x0001,
};
+enum DRAMC_PARAM_GEOMETRY_TYPE {
+ DDR_TYPE_2CH_2RK_4GB_2_2,
+ DDR_TYPE_2CH_2RK_6GB_3_3,
+ DDR_TYPE_2CH_2RK_8GB_4_4,
+};
+
struct dramc_param_header {
u32 status; /* DRAMC_PARAM_STATUS_CODES */
u32 magic;
- u32 version;
+ u32 version; /* DRAMC_PARAM_HEADER_VERSION */
u32 size; /* size of whole dramc_param */
u16 config; /* DRAMC_PARAM_CONFIG */
u16 flags; /* DRAMC_PARAM_FLAGS */
diff --git a/src/soc/mediatek/mt8183/include/soc/emi.h b/src/soc/mediatek/mt8183/include/soc/emi.h
index b2d78b965f..cf794dee89 100644
--- a/src/soc/mediatek/mt8183/include/soc/emi.h
+++ b/src/soc/mediatek/mt8183/include/soc/emi.h
@@ -13,8 +13,9 @@ enum DRAMC_PARAM_SOURCE {
};
struct sdram_params {
- u16 source; /* DRAMC_PARAM_SOURCE */
+ u16 source; /* DRAMC_PARAM_SOURCE */
u16 frequency;
+ u32 ddr_geometry; /* DRAMC_PARAM_GEOMETRY_TYPE */
u8 wr_level[CHANNEL_MAX][RANK_MAX][DQS_NUMBER];
/* DUTY */