From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/5] MX5:MX53: add initial support for MX53EVK board
Date: Fri, 17 Dec 2010 14:05:22 +0100 [thread overview]
Message-ID: <4D0B6012.4090407@denx.de> (raw)
In-Reply-To: <AANLkTik9SB4EP2YLMeCa-TNb4c7Z-2CPphLtBqfx6J8B@mail.gmail.com>
On 12/17/2010 04:05 AM, Jason Liu wrote:
> There is pretty much different with I.MX51 ROM, we will not use DCD
> data file to config the
> DDR script since ROM has the DCD size limitation and use the advance
> feature of what we
> called plug-in, the plug-in code must be in the first 2K of MMC card
> from 0x400 offset, that's
> why we need put this code section before start.S. The plug-in code
> will be called by boot ROM
> to do DDR init first and copy u-boot to DDR and jump to _start to run it.
As I am not understanding what you mean as "plugin", it seems to me you
need some code able to set-up RAM and copy the u-boot code. This method
looks like very similar to other SoCs, where a first stage boot loader
is needed or when we boot from NAND.
I do not find any reasonable argument to follow the methods you are
proposing and to link statically this code to u-boot. In U-Boot we have
already two mechanisms for do this initial setup, one using special
images (with .kwb and .imx images when the RBL of the SoC is able to do
the whole job), the second one with a first stage bootloader as nand_spl
does and as Albert has already suggested.
> Does anyone of expert like you and Albert and Wolfgang tell me how to
> do it? It's very important for FSL
> coming many SOCs support, since we will use plug-in feature of boot ROM.
I am really not understanding if this "plugin" feature is really
different as what we have with other SoCs or when we boot from NAND on
other SOCs. As I can up now understand, it is similar to other
approaches we have support already and I do not see a reason to
implement a new one.
Is there some released Freescale's documentation to allow to me to
better understand what you are meaning ?
> Yes, we need write it in assembly. Please see the comments above.
> We can't put it into board_init or board_early_init_f, because it does
> DDR init.
> It *must* run in IRAM which load by ROM first.
Running in IRAM is not a sufficient reason to do in this way. If I am
not wrong, we could reach the same behavior on a i.MX51, too, if we set
the app_code_jump in the header to point to an IRAM address. Then even
the i.MX51 RBL should copy the code from storage to IRAM and then jump
to this address, isnt it ?
> I can't catch your mean. The function just do i2c iomux setup, anything wrong?
My concern is related to the fact that the controllers are normally
enumerated as "port numbers" and you make the selection based on the
base address, that could be confusing. I see an approach of the type:
static void setup_i2c(unsigned int port_number)
{
switch (port_number) {
0:
.....
break;
1:
.........
}
more intuitive to understand.
>>> + /* Set core voltage VDDGP to 1.05V for 800MHZ */
>>> + buf[0] = 0x45;
>>> + buf[1] = 0x4a;
>>> + buf[2] = 0x52;
>>
>> Please remove all fixed constants in the file and replaced them with
>> named constants, defined in a header file. Check vision2.c as reference.
>> This board uses the MC13892 PMIC controller, and ./include/mc13892.h
>> contains all required defines.
>
> OK,
As further comment: there is already a pmic driver in u-boot
(fsl_pmic.c), that hides the underlying communication between processor
and pmic itself. At the moment, only spi is implemented. It is better to
expand the fsl_pmic code to support i2c, too, and to use the accessors
pmic_reg_read() and pmic_reg_write() to access to the pmic internal
registers in the board related code.
> No, this is not the case like MX53. The power of FEC is default on of
> this board.
> We need change power before we can run CPU at full speed.
Ok, understood.
>>> +#define CONFIG_SYS_I2C_PORT I2C2_BASE_ADDR
>>
>> As stated before: port means an enumeration value (0,1,..N), and it is
>> set to a physical address.
>
> Yes, I will fix it.
This comment is related to the previous one for the setup_i2c()
function. Sorry if I was not clear enough. As you describe the define
CONFIG_SYS_I2C_PORT, this should be a port number (0,1,..N) and the
setup_i2() should accept as parameter this enumeration value, not a base
address.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2010-12-17 13:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 10:17 [U-Boot] [PATCH 0/5] Add support for Freescale MX53 Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 1/5] MX5: Add initial support for MX53 Jason Liu
2010-12-16 12:27 ` Wolfgang Denk
2010-12-17 3:20 ` Jason Liu
2010-12-16 13:34 ` Stefano Babic
2010-12-17 3:18 ` Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 2/5] serial_mxc: add support for MX53 processor Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 3/5] fec_mxc: " Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 4/5] mxc_i2c: " Jason Liu
2010-12-16 10:37 ` Heiko Schocher
2010-12-17 3:28 ` Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 5/5] MX5:MX53: add initial support for MX53EVK board Jason Liu
2010-12-16 10:48 ` Albert ARIBAUD
2010-12-16 12:23 ` Wolfgang Denk
2010-12-16 13:19 ` Stefano Babic
2010-12-17 3:05 ` Jason Liu
2010-12-17 5:41 ` Wolfgang Denk
2010-12-17 10:20 ` Albert ARIBAUD
2010-12-17 13:05 ` Stefano Babic [this message]
2010-12-20 5:19 ` Jason Liu
2010-12-20 6:52 ` John Rigby
2010-12-22 13:40 ` Jason Liu
2010-12-27 10:03 ` Stefano Babic
2010-12-20 6:52 ` Albert ARIBAUD
2010-12-16 23:04 ` Wolfgang Denk
2010-12-17 3:04 ` Jason Liu
2010-12-17 5:36 ` Wolfgang Denk
2010-12-16 12:25 ` [U-Boot] [PATCH 0/5] Add support for Freescale MX53 Wolfgang Denk
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=4D0B6012.4090407@denx.de \
--to=sbabic@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox