mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Tretter <m.tretter@pengutronix.de>
Subject: [RFC PATCH 0/7] Device Tree Overlay Support
Date: Thu,  4 Apr 2019 16:53:13 +0200	[thread overview]
Message-ID: <20190404145320.11465-1-m.tretter@pengutronix.de> (raw)

Hello,

This series adds devicetree overlay support loosely based on the Linux drivers
and a fpga-region driver to program an FPGA based on a devicetree overlay.

The overlay is registered as a fixup, which is necessary to apply the overlay
either on the build-in device tree or external device trees that are passed to
Linux.

The overlay driver uses notifiers to notify other drivers before and after an
overlay is applied. This allows other drivers to react on overlays, e.g., to
program an FPGA. If other drivers report an error from the notifier, the error
will be ignored and the overlay will be applied anyway.

The fpga-region driver understands the firmware-name property and loads a
firmware if the firmware-name property is added to a device node. The binding
defines that the firmware is searched in the firmware search path. The
global.firmware.path variable stores this path and allows other drivers or the
user to specify the search path. Not sure if this is a good variable name for
that.

I extended the blspec and allow to specify a device tree overlay with the
"devicetree-overlay" key. The overlay is applied before booting the OS from
that blspec entry.

Michael

Michael Tretter (7):
  commands: unify newlines for options
  dtc: add -@ option to enable __symbols__
  of: add support for devicetree overlays
  commands: add oftree -o option for overlays
  firmware: allow to find manager by device node
  firmware: add support for fpga-regions
  blspec: add support for devicetree overlays

 Documentation/user/booting-linux.rst |   4 +
 commands/crc.c                       |   4 +-
 commands/firmwareload.c              |   4 +-
 commands/of_display_timings.c        |   8 +-
 commands/of_dump.c                   |   6 +-
 commands/of_fixup_status.c           |   2 +-
 commands/oftree.c                    |  41 +++-
 common/blspec.c                      |  10 +
 common/bootm.c                       |  35 ++++
 common/firmware.c                    |  18 ++
 drivers/firmware/Kconfig             |   7 +
 drivers/firmware/Makefile            |   1 +
 drivers/firmware/of-fpga-region.c    | 153 +++++++++++++++
 drivers/of/Kconfig                   |   9 +
 drivers/of/Makefile                  |   1 +
 drivers/of/overlay.c                 | 251 ++++++++++++++++++++++++
 drivers/of/resolver.c                | 278 +++++++++++++++++++++++++++
 include/bootm.h                      |   1 +
 include/firmware.h                   |   1 +
 include/of.h                         |  42 ++++
 scripts/Makefile.lib                 |   2 +-
 21 files changed, 860 insertions(+), 18 deletions(-)
 create mode 100644 drivers/firmware/of-fpga-region.c
 create mode 100644 drivers/of/overlay.c
 create mode 100644 drivers/of/resolver.c

-- 
2.20.1


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

             reply	other threads:[~2019-04-04 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 14:53 Michael Tretter [this message]
2019-04-04 14:53 ` [RFC PATCH 1/7] commands: unify newlines for options Michael Tretter
2019-04-05 12:47   ` Sascha Hauer
2019-04-04 14:53 ` [RFC PATCH 2/7] dtc: add -@ option to enable __symbols__ Michael Tretter
2019-04-04 14:53 ` [RFC PATCH 3/7] of: add support for devicetree overlays Michael Tretter
2019-04-04 14:53 ` [RFC PATCH 4/7] commands: add oftree -o option for overlays Michael Tretter
2019-04-04 14:53 ` [RFC PATCH 5/7] firmware: allow to find manager by device node Michael Tretter
2019-04-04 14:53 ` [RFC PATCH 6/7] firmware: add support for fpga-regions Michael Tretter
2019-04-05 10:39   ` Sascha Hauer
2019-04-04 14:53 ` [RFC PATCH 7/7] blspec: add support for devicetree overlays Michael Tretter
2019-04-05 11:04   ` Sascha Hauer

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=20190404145320.11465-1-m.tretter@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --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