* [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE
@ 2015-10-15 10:05 Peng Fan
2015-10-15 10:05 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support Peng Fan
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Peng Fan @ 2015-10-15 10:05 UTC (permalink / raw)
To: u-boot
This macro is not needed, since gd->ram_size is assigned value using
function imx_ddr_size().
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
include/configs/mx6sabresd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index e9e3b27..bfc4f61 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -19,7 +19,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
#define CONFIG_CONSOLE_DEV "ttymxc0"
#define CONFIG_MMCROOT "/dev/mmcblk1p2"
-#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
--
1.8.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support 2015-10-15 10:05 [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Peng Fan @ 2015-10-15 10:05 ` Peng Fan 2015-10-30 14:16 ` Stefano Babic 2015-10-15 10:06 ` [U-Boot] [PATCH 1/1] imx: ddr: drop duplicated debug info Peng Fan ` (2 subsequent siblings) 3 siblings, 1 reply; 6+ messages in thread From: Peng Fan @ 2015-10-15 10:05 UTC (permalink / raw) To: u-boot Add i.MX6DQP-Sabresd board support: 1. set fdt_file according to board_rev which is set at runtime. 2. Add mx6dqp_ddr_ioregs and calibration value for this board. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> --- Before this patch needs to apply "pci: pcie_imx: Fix hang on mx6qp" from Fabio. http://lists.denx.de/pipermail/u-boot/2015-October/230018.html. board/freescale/mx6sabresd/mx6sabresd.c | 69 ++++++++++++++++++++++++++++++--- include/configs/mx6sabre_common.h | 2 + 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 5644167..5b0b83e 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -684,7 +684,9 @@ int board_late_init(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG setenv("board_name", "SABRESD"); - if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + if (is_mx6dqp()) + setenv("board_rev", "MX6QP"); + else if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) setenv("board_rev", "MX6Q"); else if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO)) setenv("board_rev", "MX6DL"); @@ -732,6 +734,35 @@ const struct mx6dq_iomux_ddr_regs mx6_ddr_ioregs = { .dram_dqm7 = 0x00020030, }; +const struct mx6dq_iomux_ddr_regs mx6dqp_ddr_ioregs = { + .dram_sdclk_0 = 0x00000030, + .dram_sdclk_1 = 0x00000030, + .dram_cas = 0x00000030, + .dram_ras = 0x00000030, + .dram_reset = 0x00000030, + .dram_sdcke0 = 0x00003000, + .dram_sdcke1 = 0x00003000, + .dram_sdba2 = 0x00000000, + .dram_sdodt0 = 0x00003030, + .dram_sdodt1 = 0x00003030, + .dram_sdqs0 = 0x00000030, + .dram_sdqs1 = 0x00000030, + .dram_sdqs2 = 0x00000030, + .dram_sdqs3 = 0x00000030, + .dram_sdqs4 = 0x00000030, + .dram_sdqs5 = 0x00000030, + .dram_sdqs6 = 0x00000030, + .dram_sdqs7 = 0x00000030, + .dram_dqm0 = 0x00000030, + .dram_dqm1 = 0x00000030, + .dram_dqm2 = 0x00000030, + .dram_dqm3 = 0x00000030, + .dram_dqm4 = 0x00000030, + .dram_dqm5 = 0x00000030, + .dram_dqm6 = 0x00000030, + .dram_dqm7 = 0x00000030, +}; + const struct mx6dq_iomux_grp_regs mx6_grp_ioregs = { .grp_ddr_type = 0x000C0000, .grp_ddrmode_ctl = 0x00020000, @@ -764,6 +795,21 @@ const struct mx6_mmdc_calibration mx6_mmcd_calib = { .p1_mpwrdlctl = 0x48254A36, }; +const struct mx6_mmdc_calibration mx6dqp_mmcd_calib = { + .p0_mpwldectrl0 = 0x001B001E, + .p0_mpwldectrl1 = 0x002E0029, + .p1_mpwldectrl0 = 0x001B002A, + .p1_mpwldectrl1 = 0x0019002C, + .p0_mpdgctrl0 = 0x43240334, + .p0_mpdgctrl1 = 0x0324031A, + .p1_mpdgctrl0 = 0x43340344, + .p1_mpdgctrl1 = 0x03280276, + .p0_mprddlctl = 0x44383A3E, + .p1_mprddlctl = 0x3C3C3846, + .p0_mpwrdlctl = 0x2E303230, + .p1_mpwrdlctl = 0x38283E34, +}; + /* MT41K128M16JT-125 */ static struct mx6_ddr3_cfg mem_ddr = { .mem_speed = 1600, @@ -797,9 +843,15 @@ static void gpr_init(void) /* enable AXI cache for VDOA/VPU/IPU */ writel(0xF00000CF, &iomux->gpr[4]); - /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ - writel(0x007F007F, &iomux->gpr[6]); - writel(0x007F007F, &iomux->gpr[7]); + if (is_mx6dqp()) { + /* set IPU AXI-id1 Qos=0x1 AXI-id0/2/3 Qos=0x7 */ + writel(0x007F007F, &iomux->gpr[6]); + writel(0x007F007F, &iomux->gpr[7]); + } else { + /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ + writel(0x007F007F, &iomux->gpr[6]); + writel(0x007F007F, &iomux->gpr[7]); + } } /* @@ -827,8 +879,13 @@ static void spl_dram_init(void) .ddr_type = DDR_TYPE_DDR3, }; - mx6dq_dram_iocfg(64, &mx6_ddr_ioregs, &mx6_grp_ioregs); - mx6_dram_cfg(&sysinfo, &mx6_mmcd_calib, &mem_ddr); + if (is_mx6dqp()) { + mx6dq_dram_iocfg(64, &mx6dqp_ddr_ioregs, &mx6_grp_ioregs); + mx6_dram_cfg(&sysinfo, &mx6dqp_mmcd_calib, &mem_ddr); + } else { + mx6dq_dram_iocfg(64, &mx6_ddr_ioregs, &mx6_grp_ioregs); + mx6_dram_cfg(&sysinfo, &mx6_mmcd_calib, &mem_ddr); + } } void board_init_f(ulong dummy) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 9dcc64e..3e045ef 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -158,6 +158,8 @@ "setenv fdt_file imx6q-sabreauto.dtb; fi; " \ "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \ "setenv fdt_file imx6dl-sabreauto.dtb; fi; " \ + "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \ + "setenv fdt_file imx6qp-sabresd.dtb; fi; " \ "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \ "setenv fdt_file imx6q-sabresd.dtb; fi; " \ "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \ -- 1.8.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support 2015-10-15 10:05 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support Peng Fan @ 2015-10-30 14:16 ` Stefano Babic 0 siblings, 0 replies; 6+ messages in thread From: Stefano Babic @ 2015-10-30 14:16 UTC (permalink / raw) To: u-boot On 15/10/2015 12:05, Peng Fan wrote: > Add i.MX6DQP-Sabresd board support: > 1. set fdt_file according to board_rev which is set at runtime. > 2. Add mx6dqp_ddr_ioregs and calibration value for this board. > > Signed-off-by: Peng Fan <Peng.Fan@freescale.com> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/1] imx: ddr: drop duplicated debug info 2015-10-15 10:05 [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Peng Fan 2015-10-15 10:05 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support Peng Fan @ 2015-10-15 10:06 ` Peng Fan 2015-10-15 12:24 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Fabio Estevam 2015-10-30 14:13 ` Stefano Babic 3 siblings, 0 replies; 6+ messages in thread From: Peng Fan @ 2015-10-15 10:06 UTC (permalink / raw) To: u-boot Drop duplicated debug info for tcl. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> --- arch/arm/cpu/armv7/mx6/ddr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/cpu/armv7/mx6/ddr.c b/arch/arm/cpu/armv7/mx6/ddr.c index 6b039e4..567ddc4 100644 --- a/arch/arm/cpu/armv7/mx6/ddr.c +++ b/arch/arm/cpu/armv7/mx6/ddr.c @@ -796,7 +796,6 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo, debug("Rtt_wr=%d\n", sysinfo->rtt_wr); debug("Rtt_nom=%d\n", sysinfo->rtt_nom); debug("SRT=%d\n", ddr3_cfg->SRT); - debug("tcl=%d\n", tcl); debug("twr=%d\n", twr); /* -- 1.8.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE 2015-10-15 10:05 [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Peng Fan 2015-10-15 10:05 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support Peng Fan 2015-10-15 10:06 ` [U-Boot] [PATCH 1/1] imx: ddr: drop duplicated debug info Peng Fan @ 2015-10-15 12:24 ` Fabio Estevam 2015-10-30 14:13 ` Stefano Babic 3 siblings, 0 replies; 6+ messages in thread From: Fabio Estevam @ 2015-10-15 12:24 UTC (permalink / raw) To: u-boot On Thu, Oct 15, 2015 at 7:05 AM, Peng Fan <Peng.Fan@freescale.com> wrote: > This macro is not needed, since gd->ram_size is assigned value using > function imx_ddr_size(). > > Signed-off-by: Peng Fan <Peng.Fan@freescale.com> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE 2015-10-15 10:05 [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Peng Fan ` (2 preceding siblings ...) 2015-10-15 12:24 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Fabio Estevam @ 2015-10-30 14:13 ` Stefano Babic 3 siblings, 0 replies; 6+ messages in thread From: Stefano Babic @ 2015-10-30 14:13 UTC (permalink / raw) To: u-boot On 15/10/2015 12:05, Peng Fan wrote: > This macro is not needed, since gd->ram_size is assigned value using > function imx_ddr_size(). > > Signed-off-by: Peng Fan <Peng.Fan@freescale.com> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > --- > include/configs/mx6sabresd.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h > index e9e3b27..bfc4f61 100644 > --- a/include/configs/mx6sabresd.h > +++ b/include/configs/mx6sabresd.h > @@ -19,7 +19,6 @@ > #define CONFIG_MXC_UART_BASE UART1_BASE > #define CONFIG_CONSOLE_DEV "ttymxc0" > #define CONFIG_MMCROOT "/dev/mmcblk1p2" > -#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024) > > #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ > > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-30 14:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-15 10:05 [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Peng Fan 2015-10-15 10:05 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd: add i.MX6DQP Sabresd support Peng Fan 2015-10-30 14:16 ` Stefano Babic 2015-10-15 10:06 ` [U-Boot] [PATCH 1/1] imx: ddr: drop duplicated debug info Peng Fan 2015-10-15 12:24 ` [U-Boot] [PATCH 1/1] imx: mx6sabresd discard PHYS_SDRAM_SIZE Fabio Estevam 2015-10-30 14:13 ` Stefano Babic
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox