All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: "Sahil Malhotra (OSS)" <sahil.malhotra@oss.nxp.com>
Cc: "ZHIZHIKIN Andrey" <andrey.zhizhikin@leica-geosystems.com>,
	"Clément Faure" <clement.faure@nxp.com>,
	"Gaurav Jain" <gaurav.jain@nxp.com>,
	"Pankaj Gupta" <pankaj.gupta@nxp.com>,
	"Priyanka Jain" <priyanka.jain@nxp.com>,
	u-boot@lists.denx.de, "Varun Sethi" <V.Sethi@nxp.com>,
	"Ye Li" <ye.li@nxp.com>
Subject: Re: [PATCH 1/2] fsl-layerscape: add dtb overlay feature
Date: Thu, 06 Jan 2022 08:40:21 +0100	[thread overview]
Message-ID: <b0359ed615380ac440435b3ba99dc911@walle.cc> (raw)
In-Reply-To: <VI1PR04MB53279E27A4357ABD669357AA824C9@VI1PR04MB5327.eurprd04.prod.outlook.com>

Hi Sahil,

Am 2022-01-06 07:09, schrieb Sahil Malhotra (OSS):

>> I don't know I follow. u-boot and linux should have the same device 
>> tree;
>> regardless if that device is used or not. So applying the overlay just 
>> for linux isn't
>> enough here.
> Ok, I don't think that as of now, in all platforms uboot and linux
> have same devie
> tree.

That doesn't mean it is ok to diverge again. I put a lot of effort in
syncing uboot's LS1028A device tree with linux.

> But I will try to address your concern, but I don’t know how to apply 
> overlay to
> dtb which is embedded in u-boot binary, Can you please point me to one 
> reference
> which is doing this thing, I will take reference from there.

Sorry I can't advise you with that. There is board_fix_fdt() maybe
that will help. But I'm not conviced this is the correct approach,
see below.

>> > We don't use DTB in OP-TEE, but when we use CAAM in OP-TEE, OP-TEE
>> > reserves One Job Ring for its use and that is communicated to Kernel
>> > using DTB overlay.
>> >
>> >> what if the overlay doesn't match the dtb?
>> > I didn't get this point, can you please elaborate a little.
>> 
>> You are merging a dtb fragment with an unknown dtb, right? Who says 
>> they
>> match? you might have an old dtb where the supplied dtb fragment 
>> doesn't
>> make any sense.
>> 
>> I might be missing something here. Eg. where is the linux dtb supposed 
>> to come
>> from? This patchset is really missing an example and a description how 
>> things
>> should work.
> If supplied DTB does not match with DTB overlay fragment. then overlay
> will not get applied.

I don't think this is what happens here. fdt_overlay_apply() will
mark the fdt as damaged and there will be no fdt at all.

> We don't have any control on where user picks the DTB, but we can only
> make sure DTB
> overlay feature must work with DTBs which are upstreamed
> If user makes its own customized DTB, we cannot make sure that things 
> will work.

Again. Is there any documentation on how this should all work
together? Where does optee get its device tree from? Shouldn't
it be the same device tree as u-boot and linux? Shouldn't optee
modify the device tree in place before jumping back to u-boot?

Andrey, do you know how this works on imx?

-michael

  reply	other threads:[~2022-01-06  7:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06  6:09 RE:Re: [PATCH 1/2] fsl-layerscape: add dtb overlay feature Sahil Malhotra (OSS)
2022-01-06  7:40 ` Michael Walle [this message]
2022-02-04 11:27   ` Sahil Malhotra (OSS)
2022-02-24 10:59     ` Sahil Malhotra (OSS)
2022-02-24 12:33       ` Michael Walle
2022-01-06  7:47 ` François Ozog
2022-01-31  8:07   ` [EXT] " Sahil Malhotra (OSS)
  -- strict thread matches above, loose matches on Subject: below --
2021-11-17  6:23 Sahil Malhotra
2021-11-17  7:53 ` Michael Walle
2021-11-17 18:11   ` Sahil Malhotra (OSS)
2021-11-17 18:20     ` Michael Walle
2021-11-29 11:55       ` Sahil Malhotra (OSS)
2021-11-29 17:47         ` Michael Walle
2021-12-08  6:12           ` Sahil Malhotra (OSS)
2021-12-08 10:13             ` ZHIZHIKIN Andrey
2021-12-10  6:33               ` Sahil Malhotra (OSS)
2021-12-17  6:19                 ` Sahil Malhotra (OSS)
2021-12-17  7:27                   ` Michael Walle
2021-12-20 12:52                 ` Michael Walle
2021-12-10  7:38           ` François Ozog
2021-11-16 10:16 Sahil Malhotra
2021-11-16  8:34 Sahil Malhotra
2021-11-16  8:30 Sahil Malhotra
2021-11-16  6:49 Sahil Malhotra
2021-11-16  6:46 Sahil Malhotra
2021-11-16  6:37 Sahil Malhotra

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=b0359ed615380ac440435b3ba99dc911@walle.cc \
    --to=michael@walle.cc \
    --cc=V.Sethi@nxp.com \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=clement.faure@nxp.com \
    --cc=gaurav.jain@nxp.com \
    --cc=pankaj.gupta@nxp.com \
    --cc=priyanka.jain@nxp.com \
    --cc=sahil.malhotra@oss.nxp.com \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.