[PATCH 08/10] board: ti: am62x: Add support for detecting multiple device trees

Tom Rini trini at konsulko.com
Thu Apr 27 19:38:41 CEST 2023


On Wed, Apr 26, 2023 at 03:09:04PM +0530, Nitin Yadav wrote:

> Update the board_fit_config_name_match() to choose the right
> dtb based on the board name read from EEPROM. Update the
> board_fit_config_name_match() to choose the right dtb based
> on the board name read from EEPROM. Also restrict multiple
> EEPROM reads by verifying if EEPROM is already read.
> 
> Signed-off-by: Nitin Yadav <n-yadav at ti.com>
> ---
>  board/ti/am62x/evm.c | 148 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 148 insertions(+)

I've thought about this a bit, and I think this is starting us down the
wrong path in terms of keeping the board code clean and easy to follow
and modify for custom platforms. And I have a new idea. This patch has a
few things in it:
- Code which I think could be moved to the "has TI-style EEPROM" such as
  serial# setting, which should be in the common file instead.
- Run-time board detection stuff.

And it's point two I think we should do differently. Lets just have
am62x_evm_sk_{a52,r5}_defconfig files that just support that platform,
single DT. We can still have a general if-check and call for the EEPROM
and to set serial# based on that, but it'll keep most of the code fairly
clean and minimal, and going forward just require new dts/defconfigs.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230427/899d9ca3/attachment.sig>


More information about the U-Boot mailing list