diff mbox series

[v2,7/8] dts: meson-gxbb: Switch to using upstream DT

Message ID 20231222061208.3009970-8-sumit.garg@linaro.org
State New
Headers show
Series An effort to bring DT bindings compliance within U-Boot | expand

Commit Message

Sumit Garg Dec. 22, 2023, 6:12 a.m. UTC
Although there were still some variations in board DTS files based on
meson-gxbb SoC but I think those were minor differences from upstream
and shouldn't impact boot on these devices.

So switch to upstream DT via mirroring amlogic/ directory from
devicetree-rebasing/src/arm64/amlogic/ directory. And thereby directly
building DTB from there including *-u-boot.dtsi files from
arch/$(ARCH)/dts/ directory.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
---
 configs/nanopi-k2_defconfig           | 3 ++-
 configs/odroid-c2_defconfig           | 3 ++-
 configs/p200_defconfig                | 3 ++-
 configs/p201_defconfig                | 3 ++-
 configs/videostrong-kii-pro_defconfig | 3 ++-
 configs/wetek-hub_defconfig           | 3 ++-
 configs/wetek-play2_defconfig         | 3 ++-
 dts/arch/arm64/Makefile               | 9 +++++++++
 dts/arch/arm64/amlogic                | 1 +
 9 files changed, 24 insertions(+), 7 deletions(-)
 create mode 120000 dts/arch/arm64/amlogic

Comments

Tom Rini Dec. 22, 2023, 12:31 p.m. UTC | #1
On Fri, Dec 22, 2023 at 11:42:07AM +0530, Sumit Garg wrote:

> Although there were still some variations in board DTS files based on
> meson-gxbb SoC but I think those were minor differences from upstream
> and shouldn't impact boot on these devices.
> 
> So switch to upstream DT via mirroring amlogic/ directory from
> devicetree-rebasing/src/arm64/amlogic/ directory. And thereby directly
> building DTB from there including *-u-boot.dtsi files from
> arch/$(ARCH)/dts/ directory.
> 
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> ---
>  configs/nanopi-k2_defconfig           | 3 ++-
>  configs/odroid-c2_defconfig           | 3 ++-
>  configs/p200_defconfig                | 3 ++-
>  configs/p201_defconfig                | 3 ++-
>  configs/videostrong-kii-pro_defconfig | 3 ++-
>  configs/wetek-hub_defconfig           | 3 ++-
>  configs/wetek-play2_defconfig         | 3 ++-
>  dts/arch/arm64/Makefile               | 9 +++++++++
>  dts/arch/arm64/amlogic                | 1 +
>  9 files changed, 24 insertions(+), 7 deletions(-)
>  create mode 120000 dts/arch/arm64/amlogic

Do we need all of the Makefile portions of this? One of the things that
works today is that trees listed in ONFIG_DEFAULT_DEVICE_TREE (and a few
other variables) will be automatically built. We might just need the new
Makefiles to just have:
include $(srctree)/scripts/Makefile.dts
and then the trees a given config will need will be built.
Sumit Garg Dec. 22, 2023, 1:20 p.m. UTC | #2
On Fri, 22 Dec 2023 at 18:01, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Dec 22, 2023 at 11:42:07AM +0530, Sumit Garg wrote:
>
> > Although there were still some variations in board DTS files based on
> > meson-gxbb SoC but I think those were minor differences from upstream
> > and shouldn't impact boot on these devices.
> >
> > So switch to upstream DT via mirroring amlogic/ directory from
> > devicetree-rebasing/src/arm64/amlogic/ directory. And thereby directly
> > building DTB from there including *-u-boot.dtsi files from
> > arch/$(ARCH)/dts/ directory.
> >
> > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > ---
> >  configs/nanopi-k2_defconfig           | 3 ++-
> >  configs/odroid-c2_defconfig           | 3 ++-
> >  configs/p200_defconfig                | 3 ++-
> >  configs/p201_defconfig                | 3 ++-
> >  configs/videostrong-kii-pro_defconfig | 3 ++-
> >  configs/wetek-hub_defconfig           | 3 ++-
> >  configs/wetek-play2_defconfig         | 3 ++-
> >  dts/arch/arm64/Makefile               | 9 +++++++++
> >  dts/arch/arm64/amlogic                | 1 +
> >  9 files changed, 24 insertions(+), 7 deletions(-)
> >  create mode 120000 dts/arch/arm64/amlogic
>
> Do we need all of the Makefile portions of this? One of the things that
> works today is that trees listed in ONFIG_DEFAULT_DEVICE_TREE (and a few
> other variables) will be automatically built. We might just need the new
> Makefiles to just have:
> include $(srctree)/scripts/Makefile.dts
> and then the trees a given config will need will be built.

That sounds fine for Amlogic SoC and many others too with
CONFIG_DEFAULT_DEVICE_TREE="" CONFIG_OF_LIST="" options available.
However, if in future we have truely generalized U-Boot (like efforts
for Qcom platform) then CONFIG_OF_LIST="" may become an overloaded
choice.

For now, let me drop the Makefile portions.

-Sumit

>
> --
> Tom
Tom Rini Dec. 22, 2023, 1:54 p.m. UTC | #3
On Fri, Dec 22, 2023 at 06:50:32PM +0530, Sumit Garg wrote:
> On Fri, 22 Dec 2023 at 18:01, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Dec 22, 2023 at 11:42:07AM +0530, Sumit Garg wrote:
> >
> > > Although there were still some variations in board DTS files based on
> > > meson-gxbb SoC but I think those were minor differences from upstream
> > > and shouldn't impact boot on these devices.
> > >
> > > So switch to upstream DT via mirroring amlogic/ directory from
> > > devicetree-rebasing/src/arm64/amlogic/ directory. And thereby directly
> > > building DTB from there including *-u-boot.dtsi files from
> > > arch/$(ARCH)/dts/ directory.
> > >
> > > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > ---
> > >  configs/nanopi-k2_defconfig           | 3 ++-
> > >  configs/odroid-c2_defconfig           | 3 ++-
> > >  configs/p200_defconfig                | 3 ++-
> > >  configs/p201_defconfig                | 3 ++-
> > >  configs/videostrong-kii-pro_defconfig | 3 ++-
> > >  configs/wetek-hub_defconfig           | 3 ++-
> > >  configs/wetek-play2_defconfig         | 3 ++-
> > >  dts/arch/arm64/Makefile               | 9 +++++++++
> > >  dts/arch/arm64/amlogic                | 1 +
> > >  9 files changed, 24 insertions(+), 7 deletions(-)
> > >  create mode 120000 dts/arch/arm64/amlogic
> >
> > Do we need all of the Makefile portions of this? One of the things that
> > works today is that trees listed in ONFIG_DEFAULT_DEVICE_TREE (and a few
> > other variables) will be automatically built. We might just need the new
> > Makefiles to just have:
> > include $(srctree)/scripts/Makefile.dts
> > and then the trees a given config will need will be built.
> 
> That sounds fine for Amlogic SoC and many others too with
> CONFIG_DEFAULT_DEVICE_TREE="" CONFIG_OF_LIST="" options available.
> However, if in future we have truely generalized U-Boot (like efforts
> for Qcom platform) then CONFIG_OF_LIST="" may become an overloaded
> choice.

I don't object to listing them when needed, I'm just not totally sure on
how the use case really works out. But we can cross that when we get
there, too.
Sumit Garg Dec. 22, 2023, 2 p.m. UTC | #4
On Fri, 22 Dec 2023 at 19:24, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Dec 22, 2023 at 06:50:32PM +0530, Sumit Garg wrote:
> > On Fri, 22 Dec 2023 at 18:01, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Fri, Dec 22, 2023 at 11:42:07AM +0530, Sumit Garg wrote:
> > >
> > > > Although there were still some variations in board DTS files based on
> > > > meson-gxbb SoC but I think those were minor differences from upstream
> > > > and shouldn't impact boot on these devices.
> > > >
> > > > So switch to upstream DT via mirroring amlogic/ directory from
> > > > devicetree-rebasing/src/arm64/amlogic/ directory. And thereby directly
> > > > building DTB from there including *-u-boot.dtsi files from
> > > > arch/$(ARCH)/dts/ directory.
> > > >
> > > > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > ---
> > > >  configs/nanopi-k2_defconfig           | 3 ++-
> > > >  configs/odroid-c2_defconfig           | 3 ++-
> > > >  configs/p200_defconfig                | 3 ++-
> > > >  configs/p201_defconfig                | 3 ++-
> > > >  configs/videostrong-kii-pro_defconfig | 3 ++-
> > > >  configs/wetek-hub_defconfig           | 3 ++-
> > > >  configs/wetek-play2_defconfig         | 3 ++-
> > > >  dts/arch/arm64/Makefile               | 9 +++++++++
> > > >  dts/arch/arm64/amlogic                | 1 +
> > > >  9 files changed, 24 insertions(+), 7 deletions(-)
> > > >  create mode 120000 dts/arch/arm64/amlogic
> > >
> > > Do we need all of the Makefile portions of this? One of the things that
> > > works today is that trees listed in ONFIG_DEFAULT_DEVICE_TREE (and a few
> > > other variables) will be automatically built. We might just need the new
> > > Makefiles to just have:
> > > include $(srctree)/scripts/Makefile.dts
> > > and then the trees a given config will need will be built.
> >
> > That sounds fine for Amlogic SoC and many others too with
> > CONFIG_DEFAULT_DEVICE_TREE="" CONFIG_OF_LIST="" options available.
> > However, if in future we have truely generalized U-Boot (like efforts
> > for Qcom platform) then CONFIG_OF_LIST="" may become an overloaded
> > choice.
>
> I don't object to listing them when needed, I'm just not totally sure on
> how the use case really works out. But we can cross that when we get
> there, too.

Agree and I have similar concerns about it.

-Sumit

>
> --
> Tom
diff mbox series

Patch

diff --git a/configs/nanopi-k2_defconfig b/configs/nanopi-k2_defconfig
index 41dbf7981f8..3db296916e9 100644
--- a/configs/nanopi-k2_defconfig
+++ b/configs/nanopi-k2_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-nanopi-k2"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-nanopi-k2"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig
index 5f9f323e06e..65857ff478c 100644
--- a/configs/odroid-c2_defconfig
+++ b/configs/odroid-c2_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-odroidc2"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-odroidc2"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/p200_defconfig b/configs/p200_defconfig
index cd579ef5f14..c1792db51fd 100644
--- a/configs/p200_defconfig
+++ b/configs/p200_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-p200"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-p200"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/p201_defconfig b/configs/p201_defconfig
index b2f0a0ccdb4..202e1da5bcc 100644
--- a/configs/p201_defconfig
+++ b/configs/p201_defconfig
@@ -7,7 +7,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-p201"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-p201"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/videostrong-kii-pro_defconfig b/configs/videostrong-kii-pro_defconfig
index 3eda8f14a21..d09333d3b96 100644
--- a/configs/videostrong-kii-pro_defconfig
+++ b/configs/videostrong-kii-pro_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-kii-pro"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-kii-pro"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/wetek-hub_defconfig b/configs/wetek-hub_defconfig
index fd92b041e73..73f3d4aad5d 100644
--- a/configs/wetek-hub_defconfig
+++ b/configs/wetek-hub_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-wetek-hub"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-wetek-hub"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/configs/wetek-play2_defconfig b/configs/wetek-play2_defconfig
index b887419a6ba..26f57b4214a 100644
--- a/configs/wetek-play2_defconfig
+++ b/configs/wetek-play2_defconfig
@@ -6,7 +6,8 @@  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
 CONFIG_ENV_SIZE=0x2000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-wetek-play2"
+CONFIG_OF_UPSTREAM=y
+CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-gxbb-wetek-play2"
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_DEBUG_UART_BASE=0xc81004c0
diff --git a/dts/arch/arm64/Makefile b/dts/arch/arm64/Makefile
index 16e9fea622d..d548584cf5c 100644
--- a/dts/arch/arm64/Makefile
+++ b/dts/arch/arm64/Makefile
@@ -1,5 +1,14 @@ 
 # SPDX-License-Identifier: GPL-2.0+
 
+dtb-$(CONFIG_ARCH_MESON) += \
+	amlogic/meson-gxbb-kii-pro.dtb \
+	amlogic/meson-gxbb-nanopi-k2.dtb \
+	amlogic/meson-gxbb-odroidc2.dtb \
+	amlogic/meson-gxbb-p200.dtb \
+	amlogic/meson-gxbb-p201.dtb \
+	amlogic/meson-gxbb-wetek-hub.dtb \
+	amlogic/meson-gxbb-wetek-play2.dtb
+
 include $(srctree)/scripts/Makefile.dts
 
 targets += $(dtb-y)
diff --git a/dts/arch/arm64/amlogic b/dts/arch/arm64/amlogic
new file mode 120000
index 00000000000..73f7c3e7bd0
--- /dev/null
+++ b/dts/arch/arm64/amlogic
@@ -0,0 +1 @@ 
+../../../devicetree-rebasing/src/arm64/amlogic/
\ No newline at end of file