mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Mayur Nande <Mayur.Nande@medel.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Earliest possible GPIO toggle on i.mx6
Date: Wed, 05 Jul 2017 14:51:37 +0200	[thread overview]
Message-ID: <1499259097.22075.15.camel@pengutronix.de> (raw)
In-Reply-To: <7f60ba0f248e430d88c949c54c155728@ATMEDS029.medel.local>

Am Mittwoch, den 05.07.2017, 12:41 +0000 schrieb Mayur Nande:
> Hello all,
> 
> I have a question regarding the earliest possible GPIO toggle with
> barebox on imx6. We use boards with imx6 quad core processor (from
> Phytec). In our hardware design we have a push button controller which
> has a "KILL" pin attached to one of the GPIO pins on i.mx6. The
> requirement is that this pin should be set to 1 within 400 ms of power
> on. I tried setting this at various places in barebox with incremental
> improvements starting from the init script, board.c, lowlevel.c and
> then DCD/lowlevel.c combination. 
> 
> The best performance I got was by setting the iomux registers
> (IOMUXC_SW_MUX_CTL_PAD and IOMUXC_SW_PAD_CTL_PAD) in DCD and the GPIO
> direction and value registers in lowlevel.c (since GPIO controller
> registers are not accessible with DCD). Even with this, I get the GPIO
> set in around 460-475ms at the best. I understand that some of the
> time here is used by the hardware for voltage regulation/crystal
> stabilization which probably we can't do anything about.

If lowlevel.c is too late already, the only chance to make this work is
setting the DCD padctl to configure a pull-up/down to satisfy the KILL
pin. Then in the board file set up the GPIO and switch the padctl to
neutral state.

Still 400ms sound like a awfully long time to reach lowlevel init. What
is your boot source, i.e. where is the barebox binary stored?

Regards,
Lucas


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-07-05 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 12:41 Mayur Nande
2017-07-05 12:51 ` Lucas Stach [this message]
2017-07-05 13:18   ` Mayur Nande
2017-07-06 14:30     ` Mayur Nande

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=1499259097.22075.15.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=Mayur.Nande@medel.com \
    --cc=barebox@lists.infradead.org \
    /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