diff --git a/configs/sama5d3-xplained/src/sam_sdram.c b/configs/sama5d3-xplained/src/sam_sdram.c index 8190d7cca74..abd75d66641 100644 --- a/configs/sama5d3-xplained/src/sam_sdram.c +++ b/configs/sama5d3-xplained/src/sam_sdram.c @@ -206,10 +206,10 @@ void sam_sdram_config(void) regval |= MPDDRC_HS_AUTOREFRESH_CAL; putreg32(regval, SAM_MPDDRC_HS); - /* Force DDR_DQ and DDR_DQS input buffer always on (undocumented) */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ regval = getreg32(SAM_SFR_DDRCFG); - regval |= SFR_DDRCFG_DRQON; + regval |= SFR_FDQIEN | SFR_FDQSIEN; putreg32(regval, SAM_SFR_DDRCFG); /* Configure the slave offset register */ @@ -235,11 +235,9 @@ void sam_sdram_config(void) regval |= (MPDDRC_IO_CALIBR_RZQ48_40 | MPDDRC_IO_CALIBR_TZQIO(3)); putreg32(regval, SAM_MPDDRC_IO_CALIBR); - /* Force DDR_DQ and DDR_DQS input buffer always on, clearing other bits - * (undocumented) - */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ - putreg32(SFR_DDRCFG_DRQON, SAM_SFR_DDRCFG); + putreg32(SFR_FDQIEN | SFR_FDQSIEN, SAM_SFR_DDRCFG); /* Step 1: Program the memory device type * diff --git a/configs/sama5d3x-ek/src/sam_sdram.c b/configs/sama5d3x-ek/src/sam_sdram.c index 080ed9a1292..184c5cbda4b 100644 --- a/configs/sama5d3x-ek/src/sam_sdram.c +++ b/configs/sama5d3x-ek/src/sam_sdram.c @@ -205,10 +205,10 @@ void sam_sdram_config(void) regval |= MPDDRC_HS_AUTOREFRESH_CAL; putreg32(regval, SAM_MPDDRC_HS); - /* Force DDR_DQ and DDR_DQS input buffer always on (undocumented) */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ regval = getreg32(SAM_SFR_DDRCFG); - regval |= SFR_DDRCFG_DRQON; + regval |= SFR_FDQIEN | SFR_FDQSIEN; putreg32(regval, SAM_SFR_DDRCFG); /* Configure the slave offset register */ @@ -234,11 +234,9 @@ void sam_sdram_config(void) regval |= (MPDDRC_IO_CALIBR_RZQ48_40 | MPDDRC_IO_CALIBR_TZQIO(3)); putreg32(regval, SAM_MPDDRC_IO_CALIBR); - /* Force DDR_DQ and DDR_DQS input buffer always on, clearing other bits - * (undocumented) - */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ - putreg32(SFR_DDRCFG_DRQON, SAM_SFR_DDRCFG); + putreg32(SFR_FDQIEN | SFR_FDQSIEN, SAM_SFR_DDRCFG); /* Step 1: Program the memory device type * diff --git a/configs/sama5d4-ek/src/sam_sdram.c b/configs/sama5d4-ek/src/sam_sdram.c index 44612e26429..3cb32800bf3 100644 --- a/configs/sama5d4-ek/src/sam_sdram.c +++ b/configs/sama5d4-ek/src/sam_sdram.c @@ -206,10 +206,10 @@ void sam_sdram_config(void) regval |= MPDDRC_HS_AUTOREFRESH_CAL; putreg32(regval, SAM_MPDDRC_HS); - /* Force DDR_DQ and DDR_DQS input buffer always on (undocumented) */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ regval = getreg32(SAM_SFR_DDRCFG); - regval |= SFR_DDRCFG_DRQON; + regval |= SFR_FDQIEN | SFR_FDQSIEN; putreg32(regval, SAM_SFR_DDRCFG); /* Configure the slave offset register */ @@ -235,11 +235,9 @@ void sam_sdram_config(void) regval |= (MPDDRC_IO_CALIBR_RZQ48_40 | MPDDRC_IO_CALIBR_TZQIO(3)); putreg32(regval, SAM_MPDDRC_IO_CALIBR); - /* Force DDR_DQ and DDR_DQS input buffer always on, clearing other bits - * (undocumented) - */ + /* Force DDR_DQ and DDR_DQS input buffer always on */ - putreg32(SFR_DDRCFG_DRQON, SAM_SFR_DDRCFG); + putreg32(SFR_FDQIEN | SFR_FDQSIEN, SAM_SFR_DDRCFG); /* Step 1: Program the memory device type *