mpc5200b configure nand driver via dts

Grant Likely grant.likely at secretlab.ca
Tue Jan 13 01:48:42 EST 2009


On Mon, Jan 12, 2009 at 2:07 AM,  <florian.belser at freenet.de> wrote:
> hello,
>
> I have some problems with an mpc5200b based board. It's nearly compatible to
> the lite5200b board.
> I connected an samsung k9k8g08u0a nand flash via the lpb bus. This works
> fine with an self written nand driver.
> Now I try to use the standard nand driver from linux and configure it via
> the dts file. But this doesn't work and I get
> the following output:
>
>   nand at 1,0 {  //cs1
>    compatible = "samsung, k9k8g08u08", "cfi-flash";
                                          ^^^^^^^^^

NAND Flash is not a CFI flash device.  The cfi-flash driver won't work with it.

> Now my questions are:
>  Is there any error in the dts configuration?
>  Is it principle posible to configure a nand flash via the dts file (in
> combination with mpc5200b)?

It is possible to *describe* the NAND flash via the dts file.  The dts
file doesn't configure anything.  It just describes the hardware
layout so that you can write or bind the appropriate driver to the
device.  I don't know if a device tree binding has been defined for
NAND flash yet.

>  I read in some forums that the nand flash must be activated in the u-boot
> before it can be configured via dts.

You definitely need to set up the CS line for the NAND before using it
in Linux.  Typically this is done in U-Boot, but in a pinch it can be
done in the platform support code (arch/powerpc/platforms/52xx/*)

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the Linuxppc-dev mailing list