From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] dm: pinctrl: Prevent (re-)configuring pins when already done before relocation
Date: Tue, 8 Jan 2019 23:52:36 +0100 [thread overview]
Message-ID: <20190108235236.41aa25f5@jawa> (raw)
In-Reply-To: <CAO5Uq5TDz71+RW3DV9WPahsE9H54ixo5X6C0y=rkQ+AEKCxCNw@mail.gmail.com>
Hi Alex,
> On Thu, Dec 27, 2018 at 3:49 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Tue, Dec 18, 2018 at 12:30:50PM +0100, Lukasz Majewski wrote:
> >
> > > This commit prevents from re-configuring pins if those were
> > > configured before relocation.
> > >
> > > Some pins - like UART or DDR must be setup before relocation
> > > (as they have 'u-boot,dm-pre-reloc' property set in DTS). Without
> > > this change, those pins are re-configured after relocation
> > > (pre_reloc_only = 0, so we do not "continue").
> > > Such behavior may be a problem for DDR PAD configuration, as they
> > > might be already leveled/tuned with original setup).
> > >
> > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >
> > Applied to u-boot/master, thanks!
> >
>
> I've bisected out to this commit and it's slightly broken things for
> me on an AM3352. It all works fine so long as I boot MLO from MMC (so
> the MMC is probed, pinctrl setup), but if I boot from UART then I get
> to full U-Boot, MMC hasn't been probed and the pinmuxing isn't set up
> for the MMC.
I suppose that the pinmux node have set "u-boot,dm-pre-reloc"
property?
The problem is not with lack of eMMC probing - it is with pinctrl nodes
having "u-boot,dm-pre-reloc" set in DTS and the eMMC is probed after
MLO/SPL.
It looks like your use case implicitly depends on pinmux being
reconfigured no matter if we are pre-relocated (MLO) or afterwards.
As stated in the commit message above - for DDR pads it is dangerous to
re-configure them.
I'm wondering as in the device_probe() @ drivers/core/device.c the
DM_FLAG_ACTIVATED is checked. This should be enough to prevent
re-checking (of the DDR pins).
Anyway, this will not fix the issue you mentioned.
I've put Simon to CC, maybe he would have some input?
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190108/d6b09c05/attachment.sig>
next prev parent reply other threads:[~2019-01-08 22:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 11:30 [U-Boot] [PATCH] dm: pinctrl: Prevent (re-)configuring pins when already done before relocation Lukasz Majewski
2018-12-27 15:47 ` [U-Boot] " Tom Rini
2019-01-08 17:49 ` Alex Kiernan
2019-01-08 22:52 ` Lukasz Majewski [this message]
2019-01-08 23:13 ` Alex Kiernan
2019-01-08 23:24 ` Lukasz Majewski
2019-01-12 9:30 ` Alex Kiernan
2019-01-12 21:45 ` Lukasz Majewski
2019-01-16 21:35 ` Simon Glass
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=20190108235236.41aa25f5@jawa \
--to=lukma@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