All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mingkai Hu <mingkai.hu@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v6 8/9] armv8: ls1046ardb: Add LS1046ARDB board support
Date: Wed, 21 Sep 2016 07:46:07 +0000	[thread overview]
Message-ID: <VI1PR04MB1454C31FD8FDBE7F0F6FD0958EF60@VI1PR04MB1454.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <AM4PR0401MB1732F12A7A2C9F764221B0FD9AF30@AM4PR0401MB1732.eurprd04.prod.outlook.com>



> -----Original Message-----
> From: york sun
> Sent: Saturday, September 17, 2016 4:14 AM
> To: Q.Y. Gong <qianyu.gong@nxp.com>; u-boot at lists.denx.de
> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; S.H. Xie <shaohui.xie@nxp.com>; Z.Q. Hou
> <zhiqiang.hou@nxp.com>; Wenbin Song <wenbin.song@nxp.com>;
> Shengzhou Liu <shengzhou.liu@nxp.com>
> Subject: Re: [Patch v6 8/9] armv8: ls1046ardb: Add LS1046ARDB board
> support
> 
> On 09/07/2016 03:08 AM, Gong Qianyu wrote:
> > From: Mingkai Hu <mingkai.hu@nxp.com>
> >
> > LS1046ARDB Specification:
> > -------------------------
> > Memory subsystem:
> >  * 8GByte DDR4 SDRAM (64bit bus)
> >  * 512 Mbyte NAND flash
> >  * Two 64 Mbyte high-speed SPI flash
> >  * SD connector to interface with the SD memory card
> >  * On-board 4G eMMC
> >
> > Ethernet:
> >  * Two XFI 10G ports
> >  * Two SGMII ports
> >  * Two RGMII ports
> >
> > PCIe:
> >  * PCIe1 (SerDes2 Lane0) to miniPCIe slot
> >  * PCIe2 (SerDes2 Lane1) to x2 PCIe slot
> >  * PCIe3 (SerDes2 Lane2) to x4 PCIe slot
> 
> Why don't you enable PCIe in the config file?
> 

A follow up patch will enable PCIe support which will use the SVR to differentiate some memory map differences
for different silicon.

> 
> > diff --git a/board/freescale/ls1046ardb/ddr.c
> > b/board/freescale/ls1046ardb/ddr.c
> > new file mode 100644
> > index 0000000..a9b7dbd
> > --- /dev/null
> > +++ b/board/freescale/ls1046ardb/ddr.c
> > @@ -0,0 +1,140 @@
> > +/*
> > + * Copyright 2016 Freescale Semiconductor, Inc.
> > + *
> > + * SPDX-License-Identifier:	GPL-2.0+
> > + */
> > +
> > +#include <common.h>
> > +#include <fsl_ddr_sdram.h>
> > +#include <fsl_ddr_dimm_params.h>
> > +#include "ddr.h"
> > +#ifdef CONFIG_FSL_DEEP_SLEEP
> > +#include <fsl_sleep.h>
> > +#endif
> > +
> > +DECLARE_GLOBAL_DATA_PTR;
> > +
> > +void fsl_ddr_board_options(memctl_options_t *popts,
> > +			   dimm_params_t *pdimm,
> > +			   unsigned int ctrl_num)
> > +{
> > +	const struct board_specific_parameters *pbsp, *pbsp_highest =
> NULL;
> > +	ulong ddr_freq;
> > +
> > +	if (ctrl_num > 1) {
> > +		printf("Not supported controller number %d\n", ctrl_num);
> > +		return;
> > +	}
> > +	if (!pdimm->n_ranks)
> > +		return;
> > +
> > +	pbsp = udimms[0];
> > +
> > +	/* Get clk_adjust, wrlvl_start, wrlvl_ctl, according to the board ddr
> > +	 * freqency and n_banks specified in board_specific_parameters
> table.
> > +	 */
> > +	ddr_freq = get_ddr_freq(0) / 1000000;
> > +	while (pbsp->datarate_mhz_high) {
> > +		if (pbsp->n_ranks == pdimm->n_ranks) {
> > +			if (ddr_freq <= pbsp->datarate_mhz_high) {
> > +				popts->clk_adjust = pbsp->clk_adjust;
> > +				popts->wrlvl_start = pbsp->wrlvl_start;
> > +				popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
> > +				popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
> > +				goto found;
> > +			}
> > +			pbsp_highest = pbsp;
> > +		}
> > +		pbsp++;
> > +	}
> > +
> > +	if (pbsp_highest) {
> > +		printf("Error: board specific timing not found for %lu MT/s\n",
> > +		       ddr_freq);
> > +		printf("Trying to use the highest speed (%u) parameters\n",
> > +		       pbsp_highest->datarate_mhz_high);
> > +		popts->clk_adjust = pbsp_highest->clk_adjust;
> > +		popts->wrlvl_start = pbsp_highest->wrlvl_start;
> > +		popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
> > +		popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
> > +	} else {
> > +		panic("DIMM is not supported by this board");
> > +	}
> > +found:
> > +	debug("Found timing match: n_ranks %d, data rate %d,
> rank_gb %d\n",
> > +	      pbsp->n_ranks, pbsp->datarate_mhz_high, pbsp->rank_gb);
> > +
> > +	popts->data_bus_width = 0;	/* 64-bit data bus */
> > +	popts->otf_burst_chop_en = 0;
> > +	popts->burst_length = DDR_BL8;
> 
> You don't need to set these options unless you specifically want to disable on
> the fly burst chop. Do you?
> 

No, will remove it.

Thanks,
Mingkai

  parent reply	other threads:[~2016-09-21  7:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  9:56 [U-Boot] [Patch v6 0/9] Add LS1046ARDB&QDS board support Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 1/9] ddr: fsl: fix a compile issue Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 2/9] Export memset for standalone AQ FW load apps Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 3/9] armv8: fsl-layerscape: Increase L2 Data RAM latency and L2 Tag RAM latency Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 4/9] armv8: fsl-layerscape: add define CONFIG_STANDALONE_LOAD_ADDR for standalone app Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 5/9] armv8: fsl-layerscape: spl: remove BSS clearing and board_init_r Gong Qianyu
2016-09-08 17:06   ` york sun
2016-09-09  6:12     ` Q.Y. Gong
2016-09-13 20:45       ` york sun
2016-09-14  7:32         ` Q.Y. Gong
2016-09-14 15:55           ` york sun
2016-09-07  9:56 ` [U-Boot] [Patch v6 6/9] armv8: ls1046a: Enable DDR erratum for ls1046a Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 7/9] armv8: ls1046a: disable SATA ECC in DCSR Gong Qianyu
2016-09-07  9:56 ` [U-Boot] [Patch v6 8/9] armv8: ls1046ardb: Add LS1046ARDB board support Gong Qianyu
2016-09-08 17:21   ` york sun
2016-09-09  0:07     ` Prabhakar Kushwaha
2016-09-09 16:20       ` york sun
2016-09-16 20:14   ` york sun
2016-09-21  3:21     ` Q.Y. Gong
2016-09-21  7:46     ` Mingkai Hu [this message]
2016-09-21 15:31       ` york sun
2016-09-07  9:56 ` [U-Boot] [Patch v6 9/9] armv8: ls1046aqds: Add LS1046AQDS " Gong Qianyu
2016-09-20 18:06 ` [U-Boot] [Patch v6 0/9] Add LS1046ARDB&QDS " york sun
2016-09-07 10:47 [U-Boot] [Patch v6 8/9] armv8: ls1046ardb: Add LS1046ARDB " Gong Qianyu
2017-02-22 23:19 chris warth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR04MB1454C31FD8FDBE7F0F6FD0958EF60@VI1PR04MB1454.eurprd04.prod.outlook.com \
    --to=mingkai.hu@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.