public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/7] mx23evk: Fix DDR pin iomux settings
Date: Fri, 3 May 2013 05:22:12 +0200	[thread overview]
Message-ID: <201305030522.12752.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5B89bs9H6pnmRPS8QD1qw3OPS+rb8=Md=QcoK7AgRk3VA@mail.gmail.com>

Dear Fabio Estevam,

> On Thu, May 2, 2013 at 11:37 PM, Marek Vasut <marex@denx.de> wrote:
> > Uh, why is it even set ? Does the bootrom screw up with it? But then it's
> > cool, just fix those few remaining ramblings of mine and stick my Acks
> > on it.
> 
> Ok, let's go step by step.
> 
> mx23 reference manual says that EMI pins voltage bits can be:
> 0 - for normal operation
> 1  - invalid.
> 
> After reset this bit is 1 and the iomux driver needs to clear this bit.
> 
> Let's look at the defines:
> 
> #define MXS_PAD_1V8	((PAD_1V8 << MXS_PAD_VOL_SHIFT) | \
> 					MXS_PAD_VOL_VALID_MASK)
> #define MXS_PAD_3V3	((PAD_3V3 << MXS_PAD_VOL_SHIFT) | \
> 					MXS_PAD_VOL_VALID_MASK)
> 
> and then in the iomux;c driver:
> 
> 	if (PAD_VOL_VALID(pad)) {
> 		bp = PAD_PIN(pad) % 8 * 4 + 2;
> 		mxs_reg = (struct mxs_register_32 *)(iomux_base + ofs);
> 		if (PAD_VOL(pad))
> 			writel(1 << bp, &mxs_reg->reg_set);
> 		else
> 			writel(1 << bp, &mxs_reg->reg_clr);
> 	}
> 
> So the only way that the iomux driver can clear the voltage bit is if
> PAD_VOL_VALID(pad) is true, and the only way that PAD_VOL_VALID(pad)
> can be true is if either MXS_PAD_3V3 or MXS_PAD_1V8 are defined, since
> they have the MXS_PAD_VOL_VALID_MASK bit in their definitions.

Yuck. But then, why not configure the pins as 1V8 ? But either way WFM.

Best regards,
Marek Vasut

  reply	other threads:[~2013-05-03  3:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 22:44 [U-Boot] [PATCH v3 0/9] mx23: Make DDR initialization stable Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 1/7] mx23: Fix pad voltage selection bit Fabio Estevam
2013-05-03  2:24   ` Marek Vasut
2013-05-03  2:33     ` Otavio Salvador
2013-05-03  2:34       ` Marek Vasut
2013-05-03  2:34     ` Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 2/7] mx23evk: Fix DDR pin iomux settings Fabio Estevam
2013-05-03  2:24   ` Marek Vasut
2013-05-03  2:35     ` Fabio Estevam
2013-05-03  2:37       ` Marek Vasut
2013-05-03  2:51         ` Fabio Estevam
2013-05-03  3:22           ` Marek Vasut [this message]
2013-05-02 22:44 ` [U-Boot] [PATCH v3 3/7] mx23_olinuxino: " Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 4/7] mxs: spl_mem_init: Fix comment about start bit Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 5/7] mxs: spl_mem_init: Remove erroneous DDR setting Fabio Estevam
2013-05-03  2:25   ` Marek Vasut
2013-05-03  2:37     ` Fabio Estevam
2013-05-03  2:50       ` Marek Vasut
2013-05-02 22:44 ` [U-Boot] [PATCH v3 6/7] mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers Fabio Estevam
2013-05-03  2:26   ` Marek Vasut
2013-05-03  2:33     ` Otavio Salvador
2013-05-02 22:44 ` [U-Boot] [PATCH v3 7/7] mxs: spl_mem_init: Change EMI port priority Fabio Estevam
2013-05-03  2:20 ` [U-Boot] [PATCH v3 0/9] mx23: Make DDR initialization stable Marek Vasut

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=201305030522.12752.marex@denx.de \
    --to=marex@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