devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: devicetree@vger.kernel.org, U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v6 2/2] schemas: Add schema for U-Boot driver model 'phase tags'
Date: Wed, 18 Jan 2023 10:33:34 -0700	[thread overview]
Message-ID: <CAPnjgZ3pMfY6wh6h8hpcAh7v87AqSSa2jTFtEjupdaVjjCz-wg@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ2d==x1uLCRFJg44Us=UzyAGCst2LzTx=d=xyN+OQHVhw@mail.gmail.com>

+U-Boot Mailing List

Hi Rob,

On Fri, 13 Jan 2023 at 14:00, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Rob,
>
> On Fri, 13 Jan 2023 at 13:58, Simon Glass <sjg@chromium.org> wrote:
> >
> > U-Boot has some particular challenges with device tree and devices:
> >
> > - U-Boot has multiple build phases, such as a Secondary Program Loader
> >   (SPL) phase which typically runs in a pre-SDRAM environment where code
> >   and data space are limited. In particular, there may not be enough
> >   space for the full device tree blob. U-Boot uses various automated
> >   techniques to reduce the size from perhaps 40KB to 3KB. It is not
> >   always possible to handle these tags entirely at build time, since
> >   U-Boot proper must have the full device tree, even though we do not
> >   want it to process all nodes until after relocation.
> > - Some U-Boot phases needs to run before the clocks are properly set up,
> >   where the CPU may be running very slowly. Therefore it is important to
> >   bind only those devices which are actually needed in that phase
> > - U-Boot uses lazy initialisation for its devices, with 'bind' and
> >   'probe' being separate steps. Even if a device is bound, it is not
> >   actually probed until it is used. This is necessary to keep the boot
> >   time reasonable, e.g. to under a second
>
> [..]
>
> Unfortunately I still don't have the hang of this schema validation. I
> would like to do this:
>
> $ dtc -O dtb -o test.dtb test/bootphases.dts && tools/dt-validate -m test.dtb
> test.dtb: /some-device: failed to match any schema with compatible:
> ['vendor,soc1-ip']
>
> but I don't get any errors when I manage test/bootphases.dts e.g. with
> misnamed properties.
>
> I thought I had this working, but that was back in November. What am I
> doing wrong?

Any thoughts on this and the patch? I would like to send a PR but it
seems sensible to sort this out first, since it may mask some
problems.

Regards,
Simon

  reply	other threads:[~2023-01-18 17:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 20:55 [PATCH v6 1/2] Correct typo in dt-doc-validate command Simon Glass
2023-01-13 20:55 ` [PATCH v6 2/2] schemas: Add schema for U-Boot driver model 'phase tags' Simon Glass
2023-01-13 21:00   ` Simon Glass
2023-01-18 17:33     ` Simon Glass [this message]
2023-01-18 20:33   ` Rob Herring
2023-01-18 22:05     ` Simon Glass
2023-01-19 15:28       ` Rob Herring
2023-01-19 16:17         ` Simon Glass
2023-01-19 17:20           ` Rob Herring
2023-01-19 17:32             ` Simon Glass
2023-01-19 20:33               ` Simon Glass
2023-01-20 14:23                 ` Rob Herring
2023-01-20 14:33                   ` 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=CAPnjgZ3pMfY6wh6h8hpcAh7v87AqSSa2jTFtEjupdaVjjCz-wg@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).