Skip to content

Commit

Permalink
add single/dual rank support
Browse files Browse the repository at this point in the history
Change-Id: I633daa4a871f93c5b4d897b1d60ed23bcc198912
  • Loading branch information
cxjjxc1993 authored and RevySR committed Jul 20, 2024
1 parent 660cb1b commit 4ca0f76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions board/thead/light-c910/lpddr4/include/ddr_retention.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions board/thead/light-c910/lpddr4/src/ddr_retention.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ca0f76

Please sign in to comment.