From: David Jander <david.jander@protonic.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Use common function to set GPIOs for MX3 and MX5
Date: Mon, 23 Aug 2010 13:30:02 +0200 [thread overview]
Message-ID: <201008231330.02182.david.jander@protonic.nl> (raw)
In-Reply-To: <4C724F5C.2090500@denx.de>
Hi Stefano,
On Monday 23 August 2010 12:37:16 pm Stefano Babic wrote:
>[...]
> > In spi_cfg(), I saw this line:
> >
> > if (!(mode & SPI_CPOL))
> > sclkpol = 1;
> >
> > AFAIK, this should be:
> >
> > if (mode & SPI_CPOL)
> > sclkpol = 1;
> >
> > At least for the MX51. Can you confirm that this is different on the
> > MX31?
>
> Agree. According to the MX51 Manual, the register must be set with:
> 0 Active high polarity (0 = Idle).
> 1 Active low polarity (1 = Idle).
I just checked in the reference manual of the i.MX31, and there the meaning of
this bit has the same polarity as on the i.MX51, so you'll need to fix this
also at the end of the spi_setup_slave() function, in the #else path of the
#ifdef CONFIG_MX51 directive.
if (!(mode & SPI_CPOL))
ctrl_reg |= MXC_CSPICTRL_POL;
should be:
if (mode & SPI_CPOL)
ctrl_reg |= MXC_CSPICTRL_POL;
Would be nice if someone with a MX31 board could verify this.
> So we need to change both CONFIG_FSL_PMIC_MODE in config and in
> mxc_spi.c. Do you send a patch or do you prefer I will do this job ? I
> will add your signed-off-by if you agree.
I agree, and I guess you can better include it in your patch-set, otherwise
I'd have to wait for your patches and then provide my own patch on top of
that.... too complicated :-)
I am also adding support for S25FL032P chips to the spansion driver. Will post
a patch later.
Right now I have correct detection of the chip, but the environment is not
saved and read back correctly. Still investigating... maybe some chip
configuration prolem in the spansion driver?
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2010-08-23 11:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 8:20 [U-Boot] [PATCH] Use common function to set GPIOs for MX3 and MX5 Stefano Babic
2010-08-20 8:46 ` David Jander
2010-08-20 9:29 ` David Jander
2010-08-20 10:01 ` Stefano Babic
2010-08-20 10:07 ` David Jander
2010-08-20 10:20 ` Stefano Babic
2010-08-20 10:30 ` David Jander
2010-08-20 11:19 ` Stefano Babic
2010-08-20 12:15 ` David Jander
2010-08-20 13:35 ` Stefano Babic
2010-08-23 8:50 ` David Jander
2010-08-23 9:14 ` David Jander
2010-08-23 10:37 ` Stefano Babic
2010-08-23 11:30 ` David Jander [this message]
2010-08-23 15:55 ` Stefano Babic
2010-08-23 17:18 ` Stefan Roese
2010-08-23 21:03 ` Detlev Zundel
2010-08-23 21:53 ` Mike Frysinger
2010-08-26 9:09 ` Detlev Zundel
2010-08-23 10:28 ` Stefano Babic
2010-08-20 10:55 ` [U-Boot] [PATCH V2] " Stefano Babic
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=201008231330.02182.david.jander@protonic.nl \
--to=david.jander@protonic.nl \
--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