All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] pull request: raspberry pi updates
Date: Tue, 25 Jun 2019 06:53:59 +0200	[thread overview]
Message-ID: <f656327f-4f08-0795-9a91-c04d0b1443f6@gmx.de> (raw)
In-Reply-To: <20190625035141.GC60373@largo.jsg.id.au>

On 6/25/19 5:51 AM, Jonathan Gray wrote:
> On Mon, Jun 24, 2019 at 02:11:43PM -0400, Tom Rini wrote:
>> On Wed, Jun 12, 2019 at 04:25:33PM -0400, Tom Rini wrote:
>>> On Wed, Jun 12, 2019 at 10:21:22PM +0200, Heinrich Schuchardt wrote:
>>>> On 6/12/19 10:08 PM, Tom Rini wrote:
>>>>> On Wed, Jun 12, 2019 at 10:07:31PM +0200, Heinrich Schuchardt wrote:
>>>>>> On 6/12/19 9:56 PM, Tom Rini wrote:
>>>>>>> On Wed, Jun 12, 2019 at 03:48:06PM +0100, Peter Robinson wrote:
>>>>>>>> Hi Matthias,
>>>>>>>>
>>>>>>>> Have these been out on the list for general review? I don't remember
>>>>>>>> seeing them.
>>>>>>>>
>>>>>>>> On Wed, Jun 12, 2019 at 1:57 PM Matthias Brugger <mbrugger@suse.com> wrote:
>>>>>>>>>
>>>>>>>>> Hi Tom,
>>>>>>>>>
>>>>>>>>> Please have a look on the following patches.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Matthias
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>> The following changes since commit fc6c0e29a28f6b71dfb728b7f78e9e770f2cd218:
>>>>>>>>>
>>>>>>>>>    Prepare v2019.07-rc4 (2019-06-10 21:27:46 -0400)
>>>>>>>>>
>>>>>>>>> are available in the Git repository at:
>>>>>>>>>
>>>>>>>>>    https://github.com/mbgg/u-boot.git tags/rpi-next-2019.07
>>>>>>>>>
>>>>>>>>> for you to fetch changes up to 38e58ff2b785b45e8c8ade8e23f916a1984016c6:
>>>>>>>>>
>>>>>>>>>    ARM: bcm283x: Fix definition of MBOX_TAG_TEST_PIXEL_ORDER (2019-06-12 12:23:46
>>>>>>>>> +0200)
>>>>>>>>>
>>>>>>>>> ----------------------------------------------------------------
>>>>>>>>> - fix complation error for CONFIG_USB
>>>>>>>>> - update RPi3 DTBs to v5.1-rc6 state
>>>>>>>>> - add defconfig for RPi3 B+
>>>>>>>>
>>>>>>>> Why do we need a separate config when it's detected and works
>>>>>>>> perfectly well with the standard rpi_3 and rpi_3_32b configs?
>>>>>>>
>>>>>>> Good question.  It came from Heinrich, so Heinrich?
>>>>>>
>>>>>> If we call the bootefi command without a OS supplied device tree the
>>>>>> U-Boot device tree is passed to the operating system.
>>>>>>
>>>>>> So we need a device tree which is a complete description of the
>>>>>> respective system.
>>>>>>
>>>>>> On the Linaro boot-architecture list there has been a lengthy discussion
>>>>>> with Linaro people thinking that it is the responsibility of the
>>>>>> hardware and firmware to provide the correct device tree and not of the OS.
>>>>>
>>>>> OK, but on Pi aren't we passed, and pass along, the dtb from the
>>>>> previous stage?
>>>>>
>>>> Currently `bootefi` uses as default what it finds in $fdt_control_addr
>>>> and provides this to GRUB, Linux, or any other payload.
>>>
>>> Right, and maybe I'm mistaken, but doesn't the previous stage on Pi pass
>>> in a device tree, that U-Boot then uses?
>>
>> I haven't taken this as I haven't gotten an answer to this part.  I
>> could have sworn that the proprietary loader passed along the device
>> tree that's passed by us to the next stage.
>
> The firmware includes device trees
>
> https://github.com/raspberrypi/firmware/tree/master/boot
>
> At least OpenSUSE, OpenBSD and Fedora change the rpi defconfigs to
> better use it:
>
> https://src.fedoraproject.org/rpms/uboot-tools/blob/master/f/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
> https://github.com/openSUSE/u-boot/commit/121d9d775c6af6ba5d1c3f198f478404a9196f84.patch
>
>>From 121d9d775c6af6ba5d1c3f198f478404a9196f84 Mon Sep 17 00:00:00 2001
> From: Alexander Graf <agraf@suse.de>
> Date: Wed, 21 Feb 2018 17:41:13 +0100
> Subject: [PATCH] rpi: Use firmware provided device tree
>
> Currently the firmware generates a device tree for us that we could
> just use to adjust ourselves. We then on boot throw that away and
> use our own built-in device tree to configure device access.
>
> This is bad for a multitude of reasons. For starters, it breaks
> overlay support in config.txt, confusing users. Much worse however
> is that we are stuck with individual U-Boot builds per board.
> The firmware can easily give us the right DT depending on the
> target board and revision though.
>
> So let's use the firmware provided device tree instead. That way
> U-Boot as well as payloads loaded by it can automatically adapt
> to variants of RPi hardware.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> Signed-off-by: Guillaume Gardet <guillaume.gardet@free.fr>

This patch never made it into mainline U-Boot but it is still applicable.

So what is your suggestion? Drop all RPI device trees and apply this
patch? (CCing Alex)

Why does the patch not remove CONFIG_DEFAULT_DEVICE_TREE?
Why does the patch not reduce the number of config files to 2: one for
32bit and one for 64bit if everything else is given by the board
provided DTB?

Regards

Heinrich

> ---
>   configs/rpi_0_w_defconfig   | 2 +-
>   configs/rpi_2_defconfig     | 2 +-
>   configs/rpi_3_32b_defconfig | 2 +-
>   configs/rpi_3_defconfig     | 2 +-
>   configs/rpi_defconfig       | 2 +-
>   5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
> index 1ab35f1b253..d26010efac1 100644
> --- a/configs/rpi_0_w_defconfig
> +++ b/configs/rpi_0_w_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
> index 53aa554cc74..2b6bbf1b4b4 100644
> --- a/configs/rpi_2_defconfig
> +++ b/configs/rpi_2_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
> index c33ea58438a..c3fe878aa36 100644
> --- a/configs/rpi_3_32b_defconfig
> +++ b/configs/rpi_3_32b_defconfig
> @@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
> index 98573bb89a4..6895228bdb5 100644
> --- a/configs/rpi_3_defconfig
> +++ b/configs/rpi_3_defconfig
> @@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
> index bd15c98697b..477a1bf789f 100644
> --- a/configs/rpi_defconfig
> +++ b/configs/rpi_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
>

  reply	other threads:[~2019-06-25  4:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:57 [U-Boot] pull request: raspberry pi updates Matthias Brugger
2019-06-12 14:48 ` Peter Robinson
2019-06-12 19:56   ` Tom Rini
2019-06-12 20:07     ` Heinrich Schuchardt
2019-06-12 20:08       ` Tom Rini
2019-06-12 20:21         ` Heinrich Schuchardt
2019-06-12 20:25           ` Tom Rini
2019-06-24 18:11             ` Tom Rini
2019-06-25  3:51               ` Jonathan Gray
2019-06-25  4:53                 ` Heinrich Schuchardt [this message]
2019-06-25  7:58               ` Matthias Brugger
2019-06-26 11:09                 ` Matthias Brugger
2019-07-05 11:27                   ` Matthias Brugger
2019-07-05 14:58                     ` Tom Rini

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=f656327f-4f08-0795-9a91-c04d0b1443f6@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /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.