From: Moteen Shah <m-shah@ti.com>
To: Simon Glass <sjg@chromium.org>
Cc: <u-boot@lists.denx.de>, <trini@konsulko.com>, <m-chawdhry@ti.com>,
<n-francis@ti.com>, <vigneshr@ti.com>, <u-kumar1@ti.com>,
<a-chavda@ti.com>
Subject: Re: [EXTERNAL] Re: [RFC PATCH 1/2 v1] arch: arm: Kconfig: Add config to use subnode's bootph property for binding drivers
Date: Fri, 7 Mar 2025 10:25:00 +0530 [thread overview]
Message-ID: <67398051-7282-4cfd-a805-45268f41e84c@ti.com> (raw)
In-Reply-To: <CAFLszTjS3SoyGzaFsdbjTxP7rUfc71roNzvtgixPaJ6G2YZ7ww@mail.gmail.com>
On 26/02/25 02:57, Simon Glass wrote:
> Hi Moteen, On Thu, 13 Feb 2025 at 22: 05, Moteen Shah
> <m-shah@ ti. com> wrote: > > > On 13/02/25 19: 31, Simon Glass wrote:
> > > Hi Moteen, On Wed, 12 Feb 2025 at 02: 18, Moteen Shah > > <m-shah@
> ti. com> wrote: >
> ZjQcmQRYFpfptBannerStart
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source
> of this email and know the content is safe.
> Report Suspicious
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK!tDdkczlA_gRXoUoEULhq8lPl3ziRhLj9IlA3ZXDoziTij0dPBpn6-DgWRD6rC1BVPnBWST9bilaw10uU17sjumdmw40nkGdzZUT48cV7qkEDIlAys_tcmpU$>
>
> ZjQcmQRYFpfptBannerEnd
> Hi Moteen,
>
> On Thu, 13 Feb 2025 at 22:05, Moteen Shah <m-shah@ti.com> wrote:
> >
> >
> > On 13/02/25 19:31, Simon Glass wrote:
> > > Hi Moteen, On Wed, 12 Feb 2025 at 02: 18, Moteen Shah
> > > <m-shah@ ti. com> wrote: > > Add a new config when set will traverse
> > > through all the subnodes of > a given node scanning for bootph-all
> > > property and propagate it to > all of
> > > ZjQcmQRYFpfptBannerStart
> > > This message was sent from outside of Texas Instruments.
> > > Do not click links or open attachments unless you recognize the source
> > > of this email and know the content is safe.
> > > Report Suspicious
> > > <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK!tDdkczlA_gRXoUgIvDspkOY_N58UTgTbK8UGS8zfYNsuu6kFHonhYC9p6QDyxO6fEM-jwDoJbz7g9IYZuow6CShwWbGJRkE39jUS3OLaz9G1-q9eGLvRc6M$>
> > >
> > > ZjQcmQRYFpfptBannerEnd
> > > Hi Moteen,
> > >
> > > On Wed, 12 Feb 2025 at 02:18, Moteen Shah <m-shah@ti.com> wrote:
> > > >
> > > > Add a new config when set will traverse through all the subnodes of
> > > > a given node scanning for bootph-all property and propagate it to
> > > > all of its parent node up the hierarchy.
> > > >
> > > > Signed-off-by: Moteen Shah <m-shah@ti.com>
> > > > ---
> > > > arch/arm/Kconfig | 11 +++++++++++
> > > > 1 file changed, 11 insertions(+)
> > > >
> > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > index 314916527c9..51fc952b0db 100644
> > > > --- a/arch/arm/Kconfig
> > > > +++ b/arch/arm/Kconfig
> > > > @@ -805,6 +805,7 @@ config ARCH_K3
> > > > select FIT
> > > > select REGEX
> > > > select FIT_SIGNATURE if ARM64
> > > > + imply BIND_FROM_CHILD_BOOTPH
> > > > imply TI_SECURE_DEVICE
> > > >
> > > > config ARCH_OMAP2PLUS
> > > > @@ -2232,6 +2233,16 @@ config SYS_KWD_CONFIG
> > > > Path within the source directory to the kwbimage.cfg file to use
> > > > when packaging the U-Boot image for use.
> > > >
> > > > +
> > > > +config BIND_FROM_CHILD_BOOTPH
> > >
> > > How about DM_F_STRICT_BOOTPH ? or DM_F_CHILD_BOOTPH ?
> >
> > Yes, this should be more descriptive, will include this in v2.
> >
> > >
> > > It indicates that it relates to driver model before relocation.
> > >
> > > This behaviour is actually required by the schema. I agree it should
> > > be optional, but only due to its performance issues.
> > >
> > > A Binman solution would not have any performance issues.
> >
> > Will explore on this more, if you have some more pointers on this,
> > then do let me know.
>
> As you requested on the call today:
>
> PrepareImagesAndDtbs() fiddles with the dtb so you can add some code there.
>
> My suggestion is to insert something after this chunk:
>
> # Get the device tree ready by compiling it and copying the compiled
> # output into a file in our output directly. Then scan it for use
> # in binman.
> dtb_fname = fdt_util.EnsureCompiled(dtb_fname)
> fname = tools.get_output_filename('u-boot.dtb.out')
>
> here you can read in the file and modify it, e.g.:
>
> dtb = fdt.FdtScan(dtb_fname)
> add_bootph_nodes(dtb)
> dtb.Sync(True)
> tools.write_file(fname, dtb.GetContents())
>
> tools.write_file(fname, tools.read_file(dtb_fname)) # delete this line
> dtb = fdt.FdtScan(fname)
>
> It might need some tweaking. It will need some sort of test, see
> ftest.py for that. As an example, testCompressSectionSize() reads back
> the dtb to check it., so you can follow that You need to create a .dts
> file in tools/binman/test, containing nodes other than 'binman'.
Thanks for the pointers Simon. I'll start with the implementation soon
after checking the time delta
we get with this patch but with direct binding rather than propagating
bootph-* properties.
> >
> >
> > Regards,
> > Moteen
> >
> > >
> > > > + bool "Bind drivers from bootph* in subnode"
> > > > + depends on ARCH_K3
> > > > + help
> > > > + This config must be set to bind drivers in pre reloc stage whose
> > > > + compatible parent nodes are implicitly declared to be bound to
> > > > + their respective drivers by having bootph* property in one of
> > > > + their subnodes.
> > > > +
> > > > source "arch/arm/mach-apple/Kconfig"
> > > >
> > > > source "arch/arm/mach-aspeed/Kconfig"
> > > > --
> > > > 2.34.1
> > > >
> > >
> > > Regards,
> > > Simon
>
> Regards,
> Simon
Regards,
Moteen
next prev parent reply other threads:[~2025-03-07 4:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 9:18 [RFC PATCH 0/2 v1] Propagate bootph* property to all parent nodes Moteen Shah
2025-02-12 9:18 ` [RFC PATCH 1/2 v1] arch: arm: Kconfig: Add config to use subnode's bootph property for binding drivers Moteen Shah
2025-02-12 14:49 ` Kumar, Udit
2025-02-13 4:48 ` Moteen Shah
2025-02-13 14:01 ` Simon Glass
2025-02-14 5:05 ` [EXTERNAL] " Moteen Shah
2025-02-25 21:27 ` Simon Glass
2025-03-07 4:55 ` Moteen Shah [this message]
2025-03-27 6:58 ` Moteen Shah
2025-02-12 9:18 ` [RFC PATCH 2/2 v1] drivers: core: lists.c: Bind drivers using bootph* property in subnodes Moteen Shah
2025-02-12 13:37 ` Simon Glass
2025-02-13 13:01 ` [EXTERNAL] " Moteen Shah
2025-02-12 14:59 ` Kumar, Udit
2025-02-17 15:02 ` [RFC PATCH 0/2 v1] Propagate bootph* property to all parent nodes Quentin Schulz
2025-02-26 5:57 ` Moteen Shah
2025-02-26 10:53 ` Quentin Schulz
2025-02-27 16:24 ` Simon Glass
2025-02-28 11:03 ` Quentin Schulz
2025-03-05 14:15 ` 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=67398051-7282-4cfd-a805-45268f41e84c@ti.com \
--to=m-shah@ti.com \
--cc=a-chavda@ti.com \
--cc=m-chawdhry@ti.com \
--cc=n-francis@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox