[PATCH] board: ti: am62x: Add variable device tree in env

Andrew Davis afd at ti.com
Mon Jul 31 16:36:38 CEST 2023


On 7/31/23 9:27 AM, Jason Kacines wrote:
> Added variable default_device_tree that grabs from defconfig. Prevents
> needing to change this variable in two locations if using a separate
> device tree. In the future, it would be a good idea to remove this logic
> completely, but this will help reduce complications.
> 

If there are more than one possible DT for a given configuration, then
we should have logic in `findfdt` to handle that. Not sure what having
this set from kconfig will help in practice.

Plus this kconfig is the DT bundled with SPL/U-Boot, but here you are using
it to set the name of the DT to load for kernel (in theory these should have
the same name but it still feels like a misuse).

How about we just skip to removing this logic as you suggest, set name_fdt
directly and remove the `default_device_tree` env var.

Andrew

> Signed-off-by: Jason Kacines <j-kacines at ti.com>
> ---
>   board/ti/am62x/am62x.env | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
> index bb37d21de6..ee3d5a6b5f 100644
> --- a/board/ti/am62x/am62x.env
> +++ b/board/ti/am62x/am62x.env
> @@ -1,7 +1,7 @@
>   #include <environment/ti/ti_armv7_common.env>
>   #include <environment/ti/mmc.env>
>   
> -default_device_tree=ti/k3-am625-sk.dtb
> +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE.dtb
>   findfdt=
>   	setenv name_fdt ${default_device_tree};
>   	setenv fdtfile ${name_fdt}


More information about the U-Boot mailing list