fsl/board/ddr: optimize board-specific cpo for erratum A-009942
authorShengzhou Liu <Shengzhou.Liu@nxp.com>
Tue, 15 Nov 2016 09:15:21 +0000 (17:15 +0800)
committerYork Sun <york.sun@nxp.com>
Thu, 15 Dec 2016 19:56:39 +0000 (11:56 -0800)
Optimize board-specific cpo for erratum A-009942 on b4860qds,
ls1043aqds, ls1043ardb, ls1046aqds, ls1046ardb, ls2080ardb,
t102xqds, t102xrdb, t1040qds, t104xrdb, t208xqds, t208xrdb,
t4qds, t4rdb boards.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
14 files changed:
board/freescale/b4860qds/ddr.c
board/freescale/ls1043aqds/ddr.c
board/freescale/ls1043ardb/ddr.c
board/freescale/ls1046aqds/ddr.c
board/freescale/ls1046ardb/ddr.c
board/freescale/ls2080ardb/ddr.c
board/freescale/t102xqds/ddr.c
board/freescale/t102xrdb/ddr.c
board/freescale/t1040qds/ddr.c
board/freescale/t104xrdb/ddr.c
board/freescale/t208xqds/ddr.c
board/freescale/t208xrdb/ddr.c
board/freescale/t4qds/ddr.c
board/freescale/t4rdb/ddr.c

index 31b186ea8ce9c51aaf35ed26dfc32d0a763ee764..3885acc170cb9b898cb0e6d54b841f477c51a113 100644 (file)
@@ -171,6 +171,9 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x3e;
 }
 
 phys_size_t initdram(int board_type)
index d4540d0a9a0e4b2be5bed3e97e70a170f4f22fc3..7882a9a9a1d27761b456f08d85fe85b81c70d4f3 100644 (file)
@@ -96,6 +96,9 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
                          DDR_CDR2_VREF_OVRD(70);       /* Vref = 70% */
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x59;
 #else
        popts->cswl_override = DDR_CSWL_CS0;
 
index 61b1cc4f30e178561b5d8859d6e5bc36544c08d0..849f1d1b66d99041f5ebd016706f8fce5039926e 100644 (file)
@@ -91,6 +91,9 @@ found:
        /* Enable ZQ calibration */
        popts->zq_en = 1;
 
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x46;
+
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
                          DDR_CDR2_VREF_OVRD(70);       /* Vref = 70% */
index d8139653add209d70a57b2c077959f0478fc9d63..4ea8b236bf7e785ea3ec2b85b067521c015c1a9d 100644 (file)
@@ -87,6 +87,9 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
                          DDR_CDR2_VREF_TRAIN_EN | DDR_CDR2_VREF_RANGE_2;
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x70;
 }
 
 phys_size_t initdram(int board_type)
index a9b7dbdf90acb62f29907ee6f536e5003cce6675..dd3b5d0e6b2e92cd507d8fd5d55ff78d34b63a44 100644 (file)
@@ -91,6 +91,9 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
                          DDR_CDR2_VREF_TRAIN_EN | DDR_CDR2_VREF_RANGE_2;
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x70;
 }
 
 phys_size_t initdram(int board_type)
index ecd1e71ad8fb81034a225e82f036aebac18dcb88..959dfeb02b6ac9e01325bbc915a8472d2b64d78a 100644 (file)
@@ -134,6 +134,9 @@ found:
        /* Enable ZQ calibration */
        popts->zq_en = 1;
 
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x6e;
+
        if (ddr_freq < 2350) {
                if (pdimm[0].n_ranks == 2 && pdimm[1].n_ranks == 2) {
                        /* four chip-selects */
index c26f3503b99192bf009010fe0df981c9a5f9c005..b6b11919906fd4543c2cceba0cad5dab25669f45 100644 (file)
@@ -139,6 +139,9 @@ found:
 #else
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x5f;
 #endif
 
        /* T1023 supports max DDR bus 32bit width, T1024 supports DDR 64bit,
index edfbdbf3a814e65b1fe3fd246b51f2fa38c9f5fd..9e1b16bfcdfc2011fb3b9f5fd2321b5afb3384b8 100644 (file)
@@ -139,6 +139,10 @@ found:
 #ifdef CONFIG_T1023RDB
        popts->wrlvl_ctl_2 = 0x07070606;
        popts->half_strength_driver_enable = 1;
+       popts->cpo_sample = 0x43;
+#elif defined(CONFIG_T1024RDB)
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x52;
 #endif
 }
 
index 82402408a74b7090326854bd7872704f2cb7b8db..cb58d1e5245b8bb5f4445e2006cbfd9211557a5c 100644 (file)
@@ -95,6 +95,9 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
                          DDR_CDR2_VREF_OVRD(70);       /* Vref = 70% */
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x69;
 #else
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
index 22d6a5f617693c71bca2050627aa46788a4b66a3..302f19be698597115024c4c3e2c984aafd358b9d 100644 (file)
@@ -77,6 +77,8 @@ found:
         */
 #ifdef CONFIG_SYS_FSL_DDR4
        popts->half_strength_driver_enable = 1;
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x59;
 #else
        popts->half_strength_driver_enable = 0;
 #endif
index f96470f0206b551d2351369e784cca665040fc2b..d6e4554a807ad051309033f0de792d7faf872781 100644 (file)
@@ -99,6 +99,9 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x64;
 }
 
 phys_size_t initdram(int board_type)
index f6c8ca30ac44388f35d2579e37cb2fb8c3c91098..3487261b9d8d0de44af54579ad523fd2e2ed697a 100644 (file)
@@ -92,6 +92,9 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x54;
 }
 
 phys_size_t initdram(int board_type)
index d533924a0dd38ac76860870ba388e99d5b6383a2..842073b6c6b9240912099d2be7fdf387b1ec9da0 100644 (file)
@@ -107,6 +107,9 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x63;
 }
 
 phys_size_t initdram(int board_type)
index 230f031a3bf8d9319869f6d22f8bc8709a2f3504..7b05821cf792a84c8ff9f8decd69ba6132f109f3 100644 (file)
@@ -100,6 +100,9 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x64;
 }
 
 phys_size_t initdram(int board_type)