[PATCH 0/8] PinePhone automatic device tree selection

Peter Robinson pbrobinson at gmail.com
Sat Oct 24 18:50:14 CEST 2020


On Mon, Sep 7, 2020 at 1:01 AM André Przywara <andre.przywara at arm.com> wrote:
>
> On 03/09/2020 06:07, Samuel Holland wrote:
>
> Hi Samuel,
>
> > This patch series implements a feature to automatically choose the
> > right PinePhone device tree by probing the hardware. It then extends
> > the functionality to pass the chosen DTB name to the boot command.
> > Finally, I add device trees and a defconfig for the PinePhone.
> >
> > I'm aware that Andre has concerns about updating the device tree files.
> > It would be unfortunate for this to block new hardware support.
>
> I agree that it shouldn't block it.
>
> > Since
> > the device trees are primarily maintained in the Linux repository, and
> > only copied here, I believe compatibility concerns should be directed
> > there, not here.
>
> Sigh. I tried that there, multiple times, and was basically dismissed.
> IIRC the main argument was that we (as the sunxi community) do not have
> the resources to pull off something like compatible DTs. The DTs are
> being created and written as we go, so maintaining forward compatibility
> is not something the Linux maintainers wanted to subscribe to.
> And while I see that's *some* extra effort, I argued that it's worth it,
> even providing solutions. Otherwise I am afraid that we end up in the
> embedded rabbit hole that we see today, where dozens of images are
> traded around, even though there are generic distributions available.
>
> We parted by agreeing on putting those necessary DT changes into U-Boot
> instead. Commit ababb5920e899 is one example of this. I tried to prevent
> further changes, but failed.
>
> > In any case, the first 6 patches can be merged
> > independently, so I request that they be merged even if patches 7-8 are
> > not. I am mainly including the last two patches for ease of testing.
>
> So I have some easy patches that improve DT compatibility, I guess we
> can just apply them later. The most prominent issue is the change of the
> RTC compatible name. This seems to cost us the RTC (bearable?) and, in
> turn, the debouncing feature of the GPIO controller (through the newly
> introduced clock in the RTC).

Can those fixes go into -u-boot.dtsi files, that would then make
syncing with upstream easier while having less chances to regress the
compatibility.

> There seem to be more issues that popped up in testing. I guess we would
> need to define some supported kernels, and test them. The effort for
> this depends on how far back we want to support Linux kernels and with
> what feature set. I ran a headless board fine here with Ubuntu's 18.04
> original kernel, which is 4.15 based. I might concede to give this up,
> if needed, to go back to only 4.19 (Debian), or maybe 4.18 (Ubuntu
> 18.04.2 HWE kernel).

I feel it should be the people that want to run newer U-Boot on those
older releases with older kernels to do the work. In reality what is
the actual demand for those use cases?

> I will have a look at the other patches later. It seems like you jump
> through some hoops to be able to set fdtfile in U-Boot proper later? I
> consider this conceptually dodgy ($fdtcontroladdr should be all you
> need), but don't care enough, as it does not seem to break things.
>
> Cheers,
> Andre
>
> > Samuel Holland (8):
> >   sunxi: board: Use a more descriptive variable name
> >   sunxi: board: Add a helper to get the SPL DT name
> >   sunxi: board: Simplify Pine A64 DT selection logic
> >   sunxi: board: Add PinePhone DT selection logic
> >   sunxi: board: Save the chosen DT name in the SPL header
> >   sunxi: board: Set fdtfile to match the DT chosen by SPL
> >   sunxi: DT: A64: update device tree files
> >   sunxi: a64: Add a defconfig for the PinePhone
> >
> >  arch/arm/dts/Makefile                         |   4 +
> >  arch/arm/dts/axp803.dtsi                      |  82 +--
> >  arch/arm/dts/sun50i-a64-amarula-relic.dts     | 109 +++-
> >  arch/arm/dts/sun50i-a64-bananapi-m64.dts      | 118 ++--
> >  arch/arm/dts/sun50i-a64-cpu-opp.dtsi          |  75 +++
> >  arch/arm/dts/sun50i-a64-nanopi-a64.dts        |  70 +--
> >  .../dts/sun50i-a64-oceanic-5205-5inmfd.dts    |  31 +-
> >  arch/arm/dts/sun50i-a64-olinuxino-emmc.dts    |  12 +-
> >  arch/arm/dts/sun50i-a64-olinuxino.dts         | 113 ++--
> >  arch/arm/dts/sun50i-a64-orangepi-win.dts      | 127 +++--
> >  arch/arm/dts/sun50i-a64-pine64-lts.dts        |   7 +-
> >  arch/arm/dts/sun50i-a64-pine64-plus.dts       |  52 +-
> >  arch/arm/dts/sun50i-a64-pine64.dts            |  97 ++--
> >  arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi  |  17 -
> >  arch/arm/dts/sun50i-a64-pinebook.dts          | 237 ++++++--
> >  arch/arm/dts/sun50i-a64-pinephone-1.0.dts     |  11 +
> >  arch/arm/dts/sun50i-a64-pinephone-1.1.dts     |  30 +
> >  arch/arm/dts/sun50i-a64-pinephone-1.2.dts     |  40 ++
> >  arch/arm/dts/sun50i-a64-pinephone.dtsi        | 429 ++++++++++++++
> >  arch/arm/dts/sun50i-a64-pinetab.dts           | 460 +++++++++++++++
> >  arch/arm/dts/sun50i-a64-sopine-baseboard.dts  | 113 ++--
> >  arch/arm/dts/sun50i-a64-sopine.dtsi           |  69 +--
> >  arch/arm/dts/sun50i-a64-teres-i-u-boot.dtsi   |  41 --
> >  arch/arm/dts/sun50i-a64-teres-i.dts           | 138 ++++-
> >  arch/arm/dts/sun50i-a64.dtsi                  | 532 ++++++++++++++----
> >  arch/arm/mach-sunxi/Kconfig                   |   7 +
> >  board/sunxi/board.c                           |  97 +++-
> >  configs/pinephone_defconfig                   |  12 +
> >  include/dt-bindings/clock/sun50i-a64-ccu.h    |   4 +-
> >  include/dt-bindings/clock/sun8i-de2.h         |   3 +
> >  include/dt-bindings/reset/sun8i-de2.h         |   1 +
> >  31 files changed, 2488 insertions(+), 650 deletions(-)
> >  create mode 100644 arch/arm/dts/sun50i-a64-cpu-opp.dtsi
> >  delete mode 100644 arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi
> >  create mode 100644 arch/arm/dts/sun50i-a64-pinephone-1.0.dts
> >  create mode 100644 arch/arm/dts/sun50i-a64-pinephone-1.1.dts
> >  create mode 100644 arch/arm/dts/sun50i-a64-pinephone-1.2.dts
> >  create mode 100644 arch/arm/dts/sun50i-a64-pinephone.dtsi
> >  create mode 100644 arch/arm/dts/sun50i-a64-pinetab.dts
> >  delete mode 100644 arch/arm/dts/sun50i-a64-teres-i-u-boot.dtsi
> >  create mode 100644 configs/pinephone_defconfig
> >
>


More information about the U-Boot mailing list