diff mbox

[U-Boot,v4,15/20] sunxi: defconfig: add supported DT list for Pine64

Message ID 1493166772-24598-16-git-send-email-andre.przywara@arm.com
State Accepted
Commit fdd8098ab750bd4a02fbd1b4e7a3f7dbf7b969b6
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Andre Przywara April 26, 2017, 12:32 a.m. UTC
When a board uses a FIT image to load U-Boot proper, it requires a list
of supported device trees to be supplied in CONFIG_OF_LIST, from which it
chooses the right one at runtime.
For boards with just one possible DT (like the OrangePi PC2) this
defaults to CONFIG_DEFAULT_DEVICE_TREE, but for the Pine64 with its two
possible models we provide all compatible DTs in this config symbol.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 configs/pine64_plus_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jagan Teki May 5, 2017, 7:55 p.m. UTC | #1
On Wed, Apr 26, 2017 at 6:02 AM, Andre Przywara <andre.przywara@arm.com> wrote:
> When a board uses a FIT image to load U-Boot proper, it requires a list
> of supported device trees to be supplied in CONFIG_OF_LIST, from which it
> chooses the right one at runtime.
> For boards with just one possible DT (like the OrangePi PC2) this
> defaults to CONFIG_DEFAULT_DEVICE_TREE, but for the Pine64 with its two
> possible models we provide all compatible DTs in this config symbol.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  configs/pine64_plus_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> index 92bda60..593e24a 100644
> --- a/configs/pine64_plus_defconfig
> +++ b/configs/pine64_plus_defconfig
> @@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
>  CONFIG_MACH_SUN50I=y
>  CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
>  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus"

fdtfile env is compile option now, so it all ways assign
CONFIG_DEFAULT_DEVICE_TREE so it can't pick sun50i-a64-pine64.dtb
here, are you manage this in runtime board code?

thanks!
Andre Przywara May 8, 2017, 1:44 p.m. UTC | #2
Hi,

On 05/05/17 20:55, Jagan Teki wrote:
> On Wed, Apr 26, 2017 at 6:02 AM, Andre Przywara <andre.przywara@arm.com> wrote:
>> When a board uses a FIT image to load U-Boot proper, it requires a list
>> of supported device trees to be supplied in CONFIG_OF_LIST, from which it
>> chooses the right one at runtime.
>> For boards with just one possible DT (like the OrangePi PC2) this
>> defaults to CONFIG_DEFAULT_DEVICE_TREE, but for the Pine64 with its two
>> possible models we provide all compatible DTs in this config symbol.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  configs/pine64_plus_defconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
>> index 92bda60..593e24a 100644
>> --- a/configs/pine64_plus_defconfig
>> +++ b/configs/pine64_plus_defconfig
>> @@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
>>  CONFIG_MACH_SUN50I=y
>>  CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
>>  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus"
> 
> fdtfile env is compile option now, so it all ways assign
> CONFIG_DEFAULT_DEVICE_TREE so it can't pick sun50i-a64-pine64.dtb
> here, are you manage this in runtime board code?

There may be a confusion about two different uses of DT:
CONFIG_DEFAULT_DEVICE_TREE and CONFIG_OF_LIST are there to tell which DT
U-Boot (proper) *itself* uses: and yes, we pick one of OF_LIST at
runtime (based on some board-specific code, for instance 512MB RAM on
the Pine64(non-plus).
The "fdtfile" environment variable is to give a filename stub for
loading an *external* DT for the *OS*.
Eventually we hopefully won't need that variable and .dtb loading at
all, instead we just pass U-Boot's DT ($fdtcontroladdr) on the OS. This
removes the churn distributions have these days with having to provide
.dtb files for each and every board they want to support.

Cheers,
Andre.
Simon Glass May 14, 2017, 9:32 a.m. UTC | #3
On 25 April 2017 at 18:32, Andre Przywara <andre.przywara@arm.com> wrote:
> When a board uses a FIT image to load U-Boot proper, it requires a list
> of supported device trees to be supplied in CONFIG_OF_LIST, from which it
> chooses the right one at runtime.
> For boards with just one possible DT (like the OrangePi PC2) this
> defaults to CONFIG_DEFAULT_DEVICE_TREE, but for the Pine64 with its two
> possible models we provide all compatible DTs in this config symbol.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  configs/pine64_plus_defconfig | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index 92bda60..593e24a 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -3,6 +3,7 @@  CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN50I=y
 CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
+CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_CONSOLE_MUX=y
 CONFIG_SPL=y