U-boot customization for customized board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-boot customization for customized board

881 Views
srinivasaporam
Contributor II

Hi,

We have got customized board based on IMX6D. Now, we are bringing up the board for which we are customizing U-Boot and compiling it.

Now, for some of the freescale boards ccgr_init() is like below

static void ccgr_init(void)

{

    struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

    writel(0xFFFFFFFF, &ccm->CCGR0);

    writel(0xFFFFFFFF, &ccm->CCGR1);

    writel(0xFFFFFFFF, &ccm->CCGR2);

    writel(0xFFFFFFFF, &ccm->CCGR3);

    writel(0xFFFFFFFF, &ccm->CCGR4);

    writel(0xFFFFFFFF, &ccm->CCGR5);

    writel(0xFFFFFFFF, &ccm->CCGR6);

    writel(0x00260324, &ccm->cbcmr);

}

where as some of the boards ccgr_init() function is defined as below:

static void ccgr_init(void)

{

    struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

    writel(0x00C03F3F, &ccm->CCGR0);

    writel(0x0030FC03, &ccm->CCGR1);

    writel(0x0FFFC000, &ccm->CCGR2);

    writel(0x3FF00000, &ccm->CCGR3);

    writel(0x00FFF300, &ccm->CCGR4);

    writel(0x0F0000C3, &ccm->CCGR5);

    writel(0x000003FF, &ccm->CCGR6);

}

how to write ccgr_init() function for our board. how to arrive at those values.

also, i have another query on  mx6_ddr_sysinfo () (from imx_ddr.h)

struct mx6_ddr_sysinfo {

    u8 dsize;    /* size of bus (in dwords: 0=16bit,1=32bit,2=64bit) */

    u8 cs_density;    /* density per chip select (Gb) */

    u8 ncs;        /* number chip selects used (1|2) */

    char cs1_mirror;/* enable address mirror (0|1) */

    char bi_on;    /* Bank interleaving enable */

    u8 rtt_nom;    /* Rtt_Nom (DDR3_RTT_*) */

    u8 rtt_wr;    /* Rtt_Wr (DDR3_RTT_*) */

    u8 ralat;    /* Read Additional Latency (0-7) */

    u8 walat;    /* Write Additional Latency (0-3) */

    u8 mif3_mode;    /* Command prediction working mode */

    u8 rst_to_cke;    /* Time from SDE enable to CKE rise */

    u8 sde_to_rst;    /* Time from SDE enable until DDR reset# is high */

    u8 pd_fast_exit;/* enable precharge powerdown fast-exit */

    u8 ddr_type;    /* DDR type: DDR3(0) or LPDDR2(1) */

};

in this .cs-density value should be given as 2 if our DDR is 2Gb per chip select. But some places like Sabresd they are using 24, and some places they are using 20 etc.  how to get correct value.

Labels (2)
0 Kudos
1 Reply

444 Views
igorpadykov
NXP Employee
NXP Employee

Hi Srinivasa

ccm->CCGRx define whch modules are used ("1" in CCGRx) in uboot, which

not. Description can be found in CCM chapter of RM.

Regarding mx6_ddr_sysinfo, one can look at presentation with

description MMDC settings

https://community.freescale.com/docs/DOC-104363

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos