mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <trent.piepho@igorinstitute.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Matthias Fend <matthias.fend@emfend.at>,
	Sam Ravnborg <sam@ravnborg.org>,
	 barebox@lists.infradead.org
Subject: Re: One barebox image for multiple boards
Date: Fri, 13 May 2022 11:02:50 -0700	[thread overview]
Message-ID: <CAMHeXxPobn72Gt4OGkZW42_ALQUS-QXaOKEfGffSOgxvcMSkpA@mail.gmail.com> (raw)
In-Reply-To: <8ac33383-0da9-7609-0ba0-61cf02fd4034@pengutronix.de>

On Fri, May 13, 2022 at 5:21 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

> >>
> >> Not what you asked for but maybe duplicating the minimal set of
> >> infrastructure allows you to determine the board type anyway in lowlevel?
> >
> > Thank you for pointing out this interesting example.
> > Since in this case things like I2C devices are needed for board detection, I think putting them in lowlevel init is not a good idea.
>
> The i.MX8MN-EVK uses i2c to differentiate between two variants,
> look for power_init_board_pca9450 and power_init_board_bd71837.
>
> We don't pass different device trees there, but this can easily
> be retrofitted once it's useful (i.e. once we have PMIC drivers
> for one of these chips).

Something I've done is to modify the unflattened device tree
programmatically based on board type.  For instance, set one device to
status = "okay" and another to status = "disabled" based on board
type.

One needs to do this before the driver(s) for those devices are
initialized.  But other drivers can be initialized first.

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


  reply	other threads:[~2022-05-13 18:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  8:55 Matthias Fend
2022-05-13 10:30 ` Sam Ravnborg
2022-05-13 12:08   ` Matthias Fend
2022-05-13 12:20     ` Ahmad Fatoum
2022-05-13 18:02       ` Trent Piepho [this message]
2022-05-13 12:23     ` Sascha Hauer
2022-05-13 11:00 ` Sascha Hauer
2022-05-13 12:10   ` Matthias Fend
2022-05-16  8:07     ` Sascha Hauer
2022-05-19  9:25       ` Matthias Fend

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=CAMHeXxPobn72Gt4OGkZW42_ALQUS-QXaOKEfGffSOgxvcMSkpA@mail.gmail.com \
    --to=trent.piepho@igorinstitute.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=matthias.fend@emfend.at \
    --cc=sam@ravnborg.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