diff --git a/board/thead/light-c910/lpddr4/include/ddr_retention.h b/board/thead/light-c910/lpddr4/include/ddr_retention.h index 42eb034f..9e1d34aa 100644 --- a/board/thead/light-c910/lpddr4/include/ddr_retention.h +++ b/board/thead/light-c910/lpddr4/include/ddr_retention.h @@ -28,6 +28,8 @@ typedef enum { typedef struct Ddr_Reg_Config { uint32_t misc_reg_num; uint32_t phy_reg_num; + uint8_t ddr_rank; + uint8_t reserve[55]; } Ddr_Reg_Config_t; int dwc_ddrphy_phyinit_regInterface(regInstr myRegInstr); diff --git a/board/thead/light-c910/lpddr4/src/ddr_retention.c b/board/thead/light-c910/lpddr4/src/ddr_retention.c index eed83aac..bfbe0bf9 100644 --- a/board/thead/light-c910/lpddr4/src/ddr_retention.c +++ b/board/thead/light-c910/lpddr4/src/ddr_retention.c @@ -1009,6 +1009,11 @@ int dwc_ddrphy_phyinit_regInterface(regInstr myRegInstr) { uint32_t phy_reg_num = ARRAY_SIZE(RetRegList_addr); ddr_Regu_Config->phy_reg_num = phy_reg_num; +#ifdef CONFIG_DDR_DUAL_RANK + ddr_Regu_Config->ddr_rank = 2; +#else + ddr_Regu_Config->ddr_rank = 1; +#endif Reg_Phy_Addr_Val_t* phy_addr_t = (Reg_Phy_Addr_Val_t*)((char*)ddr_Regu_Config + 64 + sizeof(Reg_Misc_Addr_Val_t) * ARRAY_SIZE(MiscRegList)); #ifdef CONFIG_DDR_MSG