diff mbox series

[1/1] riscv: dts: Enable device-tree overlay support for starfive devices

Message ID 20230627080620.329873-1-felix.moessbauer@siemens.com (mailing list archive)
State Accepted
Delegated to: Conor Dooley
Headers show
Series [1/1] riscv: dts: Enable device-tree overlay support for starfive devices | expand

Checks

Context Check Description
conchuod/cover_letter success Single patches do not need cover letters
conchuod/tree_selection success Guessed tree name to be for-next at HEAD 488833ccdcac
conchuod/fixes_present success Fixes tag not required for -next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 6 and now 6
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 8 this patch: 8
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig success Errors and warnings before: 8 this patch: 8
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 20 this patch: 20
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success No Fixes tag
conchuod/build_rv64_nommu_virt_defconfig success Build OK

Commit Message

Felix Moessbauer June 27, 2023, 8:06 a.m. UTC
Add the '-@' DTC option for the starfive devices. This option
populates the '__symbols__' node that contains all the necessary symbols
for supporting device-tree overlays (for instance from the firmware or
the bootloader) on these devices.

The starfive devices allow various modules to be connected and this
enables users to create out-of-tree device-tree overlays for these modules.

Please note that this change does increase the size of the resulting DTB
by ~20%. For example, with v6.4 increase in size is as follows:

jh7100-beaglev-starlight.dtb 6192 -> 7339
jh7100-starfive-visionfive-v1.dtb 6281 -> 7428
jh7110-starfive-visionfive-2-v1.2a.dtb 11101 -> 13447
jh7110-starfive-visionfive-2-v1.3b.dtb 11101 -> 13447

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 arch/riscv/boot/dts/starfive/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Palmer Dabbelt July 6, 2023, 5:27 p.m. UTC | #1
On Tue, 27 Jun 2023 01:06:20 PDT (-0700), felix.moessbauer@siemens.com wrote:
> Add the '-@' DTC option for the starfive devices. This option
> populates the '__symbols__' node that contains all the necessary symbols
> for supporting device-tree overlays (for instance from the firmware or
> the bootloader) on these devices.
>
> The starfive devices allow various modules to be connected and this
> enables users to create out-of-tree device-tree overlays for these modules.
>
> Please note that this change does increase the size of the resulting DTB
> by ~20%. For example, with v6.4 increase in size is as follows:
>
> jh7100-beaglev-starlight.dtb 6192 -> 7339
> jh7100-starfive-visionfive-v1.dtb 6281 -> 7428
> jh7110-starfive-visionfive-2-v1.2a.dtb 11101 -> 13447
> jh7110-starfive-visionfive-2-v1.3b.dtb 11101 -> 13447
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  arch/riscv/boot/dts/starfive/Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index 170956846d49..0141504c0f5c 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -1,4 +1,10 @@
>  # SPDX-License-Identifier: GPL-2.0
> +# Enables support for device-tree overlays
> +DTC_FLAGS_jh7100-beaglev-starlight := -@
> +DTC_FLAGS_jh7100-starfive-visionfive-v1 := -@
> +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.2a := -@
> +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
> +
>  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
>  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb

Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Conor Dooley July 10, 2023, 6:28 p.m. UTC | #2
Emil, Walker,

On Tue, Jun 27, 2023 at 04:06:20PM +0800, Felix Moessbauer wrote:
> Add the '-@' DTC option for the starfive devices. This option
> populates the '__symbols__' node that contains all the necessary symbols
> for supporting device-tree overlays (for instance from the firmware or
> the bootloader) on these devices.
> 
> The starfive devices allow various modules to be connected and this
> enables users to create out-of-tree device-tree overlays for these modules.
> 
> Please note that this change does increase the size of the resulting DTB
> by ~20%. For example, with v6.4 increase in size is as follows:

Whatcha think?

> jh7100-beaglev-starlight.dtb 6192 -> 7339
> jh7100-starfive-visionfive-v1.dtb 6281 -> 7428
> jh7110-starfive-visionfive-2-v1.2a.dtb 11101 -> 13447
> jh7110-starfive-visionfive-2-v1.3b.dtb 11101 -> 13447
> 
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  arch/riscv/boot/dts/starfive/Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index 170956846d49..0141504c0f5c 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -1,4 +1,10 @@
>  # SPDX-License-Identifier: GPL-2.0
> +# Enables support for device-tree overlays
> +DTC_FLAGS_jh7100-beaglev-starlight := -@
> +DTC_FLAGS_jh7100-starfive-visionfive-v1 := -@
> +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.2a := -@
> +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
> +
>  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
>  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
>  
> -- 
> 2.39.2
>
Emil Renner Berthing July 12, 2023, 4:17 p.m. UTC | #3
On Mon, 10 Jul 2023 at 20:29, Conor Dooley <conor@kernel.org> wrote:
>
>
> Emil, Walker,
>
> On Tue, Jun 27, 2023 at 04:06:20PM +0800, Felix Moessbauer wrote:
> > Add the '-@' DTC option for the starfive devices. This option
> > populates the '__symbols__' node that contains all the necessary symbols
> > for supporting device-tree overlays (for instance from the firmware or
> > the bootloader) on these devices.
> >
> > The starfive devices allow various modules to be connected and this
> > enables users to create out-of-tree device-tree overlays for these modules.
> >
> > Please note that this change does increase the size of the resulting DTB
> > by ~20%. For example, with v6.4 increase in size is as follows:
>
> Whatcha think?

I'm fine with it. I just wonder why it's only the Nvidia Tegra boards
and the VisionFive's that need this. Surely other boards have pins for
expansion cards.

Acked-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
/Emil

> > jh7100-beaglev-starlight.dtb 6192 -> 7339
> > jh7100-starfive-visionfive-v1.dtb 6281 -> 7428
> > jh7110-starfive-visionfive-2-v1.2a.dtb 11101 -> 13447
> > jh7110-starfive-visionfive-2-v1.3b.dtb 11101 -> 13447
> >
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> >  arch/riscv/boot/dts/starfive/Makefile | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> > index 170956846d49..0141504c0f5c 100644
> > --- a/arch/riscv/boot/dts/starfive/Makefile
> > +++ b/arch/riscv/boot/dts/starfive/Makefile
> > @@ -1,4 +1,10 @@
> >  # SPDX-License-Identifier: GPL-2.0
> > +# Enables support for device-tree overlays
> > +DTC_FLAGS_jh7100-beaglev-starlight := -@
> > +DTC_FLAGS_jh7100-starfive-visionfive-v1 := -@
> > +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.2a := -@
> > +DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
> > +
> >  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
> >  dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
> >
> > --
> > 2.39.2
> >
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Conor Dooley July 12, 2023, 4:23 p.m. UTC | #4
On Wed, Jul 12, 2023 at 06:17:19PM +0200, Emil Renner Berthing wrote:
> On Mon, 10 Jul 2023 at 20:29, Conor Dooley <conor@kernel.org> wrote:
> >
> >
> > Emil, Walker,
> >
> > On Tue, Jun 27, 2023 at 04:06:20PM +0800, Felix Moessbauer wrote:
> > > Add the '-@' DTC option for the starfive devices. This option
> > > populates the '__symbols__' node that contains all the necessary symbols
> > > for supporting device-tree overlays (for instance from the firmware or
> > > the bootloader) on these devices.
> > >
> > > The starfive devices allow various modules to be connected and this
> > > enables users to create out-of-tree device-tree overlays for these modules.
> > >
> > > Please note that this change does increase the size of the resulting DTB
> > > by ~20%. For example, with v6.4 increase in size is as follows:
> >
> > Whatcha think?
> 
> I'm fine with it. I just wonder why it's only the Nvidia Tegra boards
> and the VisionFive's that need this. Surely other boards have pins for
> expansion cards.

It's totally not just these two - there's been a flurry of similar
patches recently. The RPi stuff got it - I think I Acked that one from
the DT side while Rob and Krzysztof were out of office, partially on the
basis that the Nvidia stuff had it (and IIRC Renesas).
Since then there's been a couple other ones that got the same treatment,
including 32-bit ARM Microchip stuff. I've been avoiding doing it for the
RISC-V Microchip to see if Rob decides that what I Acked was a problem.

It seems generally helpful, so I've been a little suspicious as to why
it was not done already...
Conor Dooley July 12, 2023, 4:40 p.m. UTC | #5
From: Conor Dooley <conor.dooley@microchip.com>

On Tue, 27 Jun 2023 16:06:20 +0800, Felix Moessbauer wrote:
> Add the '-@' DTC option for the starfive devices. This option
> populates the '__symbols__' node that contains all the necessary symbols
> for supporting device-tree overlays (for instance from the firmware or
> the bootloader) on these devices.
> 
> The starfive devices allow various modules to be connected and this
> enables users to create out-of-tree device-tree overlays for these modules.
> 
> [...]

Applied to riscv-dt-for-next, thanks!

[1/1] riscv: dts: Enable device-tree overlay support for starfive devices
      https://git.kernel.org/conor/c/ef6012f301f7

Thanks,
Conor.
Emil Renner Berthing July 12, 2023, 6:52 p.m. UTC | #6
On Wed, 12 Jul 2023 at 18:23, Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Jul 12, 2023 at 06:17:19PM +0200, Emil Renner Berthing wrote:
> > On Mon, 10 Jul 2023 at 20:29, Conor Dooley <conor@kernel.org> wrote:
> > >
> > >
> > > Emil, Walker,
> > >
> > > On Tue, Jun 27, 2023 at 04:06:20PM +0800, Felix Moessbauer wrote:
> > > > Add the '-@' DTC option for the starfive devices. This option
> > > > populates the '__symbols__' node that contains all the necessary symbols
> > > > for supporting device-tree overlays (for instance from the firmware or
> > > > the bootloader) on these devices.
> > > >
> > > > The starfive devices allow various modules to be connected and this
> > > > enables users to create out-of-tree device-tree overlays for these modules.
> > > >
> > > > Please note that this change does increase the size of the resulting DTB
> > > > by ~20%. For example, with v6.4 increase in size is as follows:
> > >
> > > Whatcha think?
> >
> > I'm fine with it. I just wonder why it's only the Nvidia Tegra boards
> > and the VisionFive's that need this. Surely other boards have pins for
> > expansion cards.
>
> It's totally not just these two - there's been a flurry of similar
> patches recently. The RPi stuff got it - I think I Acked that one from
> the DT side while Rob and Krzysztof were out of office, partially on the
> basis that the Nvidia stuff had it (and IIRC Renesas).
> Since then there's been a couple other ones that got the same treatment,
> including 32-bit ARM Microchip stuff. I've been avoiding doing it for the
> RISC-V Microchip to see if Rob decides that what I Acked was a problem.
>
> It seems generally helpful, so I've been a little suspicious as to why
> it was not done already...

Ah cool. I must have been grepping on v6.4.
Walker Chen July 20, 2023, 6:34 a.m. UTC | #7
On 2023/7/13 0:23, Conor Dooley wrote:
> On Wed, Jul 12, 2023 at 06:17:19PM +0200, Emil Renner Berthing wrote:
>> On Mon, 10 Jul 2023 at 20:29, Conor Dooley <conor@kernel.org> wrote:
>> >
>> >
>> > Emil, Walker,
>> >
>> > On Tue, Jun 27, 2023 at 04:06:20PM +0800, Felix Moessbauer wrote:
>> > > Add the '-@' DTC option for the starfive devices. This option
>> > > populates the '__symbols__' node that contains all the necessary symbols
>> > > for supporting device-tree overlays (for instance from the firmware or
>> > > the bootloader) on these devices.
>> > >
>> > > The starfive devices allow various modules to be connected and this
>> > > enables users to create out-of-tree device-tree overlays for these modules.
>> > >
>> > > Please note that this change does increase the size of the resulting DTB
>> > > by ~20%. For example, with v6.4 increase in size is as follows:
>> >
>> > Whatcha think?
>> 
>> I'm fine with it. I just wonder why it's only the Nvidia Tegra boards
>> and the VisionFive's that need this. Surely other boards have pins for
>> expansion cards.
> 
> It's totally not just these two - there's been a flurry of similar
> patches recently. The RPi stuff got it - I think I Acked that one from
> the DT side while Rob and Krzysztof were out of office, partially on the
> basis that the Nvidia stuff had it (and IIRC Renesas).
> Since then there's been a couple other ones that got the same treatment,
> including 32-bit ARM Microchip stuff. I've been avoiding doing it for the
> RISC-V Microchip to see if Rob decides that what I Acked was a problem.
> 
> It seems generally helpful, so I've been a little suspicious as to why
> it was not done already...

I agree to use DT overlay though this will increase a little bit size for DTB.
For users who want to use expansion card like audio daughter board, it provides a convenient way.

Best regards,
Walker
diff mbox series

Patch

diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
index 170956846d49..0141504c0f5c 100644
--- a/arch/riscv/boot/dts/starfive/Makefile
+++ b/arch/riscv/boot/dts/starfive/Makefile
@@ -1,4 +1,10 @@ 
 # SPDX-License-Identifier: GPL-2.0
+# Enables support for device-tree overlays
+DTC_FLAGS_jh7100-beaglev-starlight := -@
+DTC_FLAGS_jh7100-starfive-visionfive-v1 := -@
+DTC_FLAGS_jh7110-starfive-visionfive-2-v1.2a := -@
+DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
+
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb