Skip to contentSkip to conversation

riscv: dts: Add hifive-unleashed-a00 dts from Linux

PATCH Superseded Jagan Teki 4 participants 8 messages Nov 18, 2019 – Dec 3, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v4 1/2 riscv: dts: Add hifive-unleashed-a00 dts from Linux

Sync the hifive-unleashed-a00 dts from Linux with
below commit details:

commit <2993c9b04e616df0848b655d7202a707a70fc876> ("riscv: dts: HiFive
Unleashed: add default chosen/stdout-path")

Idea is to periodically sync the dts from Linux instead of tweaking internal changes one after another, so better not add any intermediate changes in between. This would help to maintain the dts files easy and meaningful since we are reusing device tree files from Linux.

---
Changes for v4:
- none

 arch/riscv/dts/Makefile                 |   1 +
 arch/riscv/dts/fu540-c000.dtsi          | 251 ++++++++++++++++++++++++
 arch/riscv/dts/hifive-unleashed-a00.dts |  96 +++++++++
 3 files changed, 348 insertions(+)
 create mode 100644 arch/riscv/dts/fu540-c000.dtsi
 create mode 100644 arch/riscv/dts/hifive-unleashed-a00.dts
arch/riscv/dts/Makefile +1 -0
index f9cd606a9a..4f30e6936f 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 dtb-$(CONFIG_TARGET_AX25_AE350) += ae350_32.dtb ae350_64.dtb
+dtb-$(CONFIG_TARGET_SIFIVE_FU540) += hifive-unleashed-a00.dtb
 
 targets += $(dtb-y)
 
arch/riscv/dts/fu540-c000.dtsi new file +251 -0

251 lines not on this page · raw message

arch/riscv/dts/hifive-unleashed-a00.dts new file +96 -0

96 lines not on this page · raw message

Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#1 lore raw

PATCH v4 2/2 sifive: fu540: Enable OF_SEPARATE

Use dts support from U-Boot via OF_SEPARATE instead of depending from opensbi.

This would help to make the necessary changes in drivers and device trees in U-Boot tree itself. This feature would also be helpful to not pass dtb during opensbi builds.

---
Changes for v4:
- Drop abosolete text

 configs/sifive_fu540_defconfig | 3 ++-
 doc/board/sifive/fu540.rst     | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)
configs/sifive_fu540_defconfig +2 -1
index 48865e5f11..979d0a0418 100644
@@ -6,6 +6,7 @@ CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_MISC_INIT_R=y
+CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
-CONFIG_OF_PRIOR_STAGE=y
+CONFIG_OF_SEPARATE=y
doc/board/sifive/fu540.rst +1 -4
index 7807f5b2c1..dd279f6a03 100644
@@ -58,10 +58,7 @@ firmware. We need to compile OpenSBI with below command:
 
 .. code-block:: none
 
-    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot.bin> FW_PAYLOAD_FDT_PATH=<path to hifive-unleashed-a00.dtb from Linux>
-
-(Note: Prefer hifive-unleashed-a00.dtb from Linux-5.3 or higher)
-(Note: Linux-5.2 is also fine but it does not have ethernet DT node)
+    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
 
 More detailed description of steps required to build FW_PAYLOAD firmware
 is beyond the scope of this document. Please refer OpenSBI documenation.
Signature · 1 line
2.18.0.321.gffc6fa0e3
#2 lore raw

PATCH v4 2/2 sifive: fu540: Enable OF_SEPARATE

Quoted 8 lines · Jagan Teki

Use dts support from U-Boot via OF_SEPARATE instead of depending from opensbi.

This would help to make the necessary changes in drivers and device trees in U-Boot tree itself. This feature would also be helpful to not pass dtb during opensbi builds.

Quoted 9 lines

---
Changes for v4:
- Drop abosolete text

 configs/sifive_fu540_defconfig | 3 ++-
 doc/board/sifive/fu540.rst     | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)
#3 lore raw

PATCH v4 2/2 sifive: fu540: Enable OF_SEPARATE

Quoted 24 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Bin Meng
Sent: Monday, November 18, 2019 5:52 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH v4 2/2] sifive: fu540: Enable OF_SEPARATE

Quoted 13 lines · Jagan Teki

Use dts support from U-Boot via OF_SEPARATE instead of depending from opensbi.

This would help to make the necessary changes in drivers and device trees in U-Boot tree itself. This feature would also be helpful to not pass dtb during opensbi builds.

---
Changes for v4:
- Drop abosolete text

Quoted 6 lines
Quoted 4 lines
 configs/sifive_fu540_defconfig | 3 ++-
 doc/board/sifive/fu540.rst     | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)

LGTM.

It would be great if this patches are merged for U-Boot-2020.01.

Can you also update documentation for OpenSBI SiFive FU540 platform support ?

Regards,
Anup

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH v4 2/2 sifive: fu540: Enable OF_SEPARATE

Hi Jagon

Quoted 46 lines

From: Jagan Teki [mailto:jagan at amarulasolutions.com]
Sent: Monday, November 18, 2019 7:30 PM
To: Rick Jian-Zhi Chen(陳建志)
Cc: u-boot at lists.denx.de; Jagan Teki
Subject: [PATCH v4 2/2] sifive: fu540: Enable OF_SEPARATE

Use dts support from U-Boot via OF_SEPARATE instead of depending from opensbi.

This would help to make the necessary changes in drivers and device trees in U-Boot tree itself. This feature would also be helpful to not pass dtb during opensbi builds.

---
Changes for v4:
- Drop abosolete text

 configs/sifive_fu540_defconfig | 3 ++-
 doc/board/sifive/fu540.rst     | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)
configs/sifive_fu540_defconfig +2 -1
@@ -6,6 +6,7 @@ CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_MISC_INIT_R=y
+CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
-CONFIG_OF_PRIOR_STAGE=y
+CONFIG_OF_SEPARATE=y
doc/board/sifive/fu540.rst +1 -5
@@ -58,10 +58,7 @@ firmware. We need to compile OpenSBI with below command:
 
 .. code-block:: none
 
-    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot.bin> FW_PAYLOAD_FDT_PATH=<path to hifive-unleashed-a00.dtb from Linux>
-
-(Note: Prefer hifive-unleashed-a00.dtb from Linux-5.3 or higher)
-(Note: Linux-5.2 is also fine but it does not have ethernet DT node)
+    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
 
 More detailed description of steps required to build FW_PAYLOAD firmware  is beyond the scope of this document. Please refer OpenSBI documenation.
--
Quoted 2 lines

2.18.0.321.gffc6fa0e3

I am trying to prepare a PR, but it encounter a conflict with the master when applying this patch.
Can you rebase it again ?

Or if you don't mind I can modify your patch directly.

Thanks
Rick

author
#6 lore raw

PATCH v4 2/2 sifive: fu540: Enable OF_SEPARATE

Hi Rick,

Quoted 56 lines · Rick Chen

Hi Jagon

Quoted 46 lines

From: Jagan Teki [mailto:jagan at amarulasolutions.com]
Sent: Monday, November 18, 2019 7:30 PM
To: Rick Jian-Zhi Chen(陳建志)
Cc: u-boot at lists.denx.de; Jagan Teki
Subject: [PATCH v4 2/2] sifive: fu540: Enable OF_SEPARATE

Use dts support from U-Boot via OF_SEPARATE instead of depending from opensbi.

This would help to make the necessary changes in drivers and device trees in U-Boot tree itself. This feature would also be helpful to not pass dtb during opensbi builds.

---
Changes for v4:
- Drop abosolete text

 configs/sifive_fu540_defconfig | 3 ++-
 doc/board/sifive/fu540.rst     | 5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)
configs/sifive_fu540_defconfig +2 -1
@@ -6,6 +6,7 @@ CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_MISC_INIT_R=y
+CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
-CONFIG_OF_PRIOR_STAGE=y
+CONFIG_OF_SEPARATE=y
doc/board/sifive/fu540.rst +1 -5
@@ -58,10 +58,7 @@ firmware. We need to compile OpenSBI with below command:
 
 .. code-block:: none
 
-    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot.bin> FW_PAYLOAD_FDT_PATH=<path to hifive-unleashed-a00.dtb from Linux>
-
-(Note: Prefer hifive-unleashed-a00.dtb from Linux-5.3 or higher)
-(Note: Linux-5.2 is also fine but it does not have ethernet DT node)
+    make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<path to u-boot-dtb.bin>
 
 More detailed description of steps required to build FW_PAYLOAD firmware  is beyond the scope of this document. Please refer OpenSBI documenation.
--
Quoted 2 lines

2.18.0.321.gffc6fa0e3

I am trying to prepare a PR, but it encounter a conflict with the master when applying this patch.
Can you rebase it again ?

Quoted 1 line

Or if you don't mind I can modify your patch directly.

Sure, please do. thanks.

#7 lore raw

PATCH v4 1/2 riscv: dts: Add hifive-unleashed-a00 dts from Linux

In reply to Jagan Teki
Quoted 18 lines · Jagan Teki

Sync the hifive-unleashed-a00 dts from Linux with
below commit details:

commit <2993c9b04e616df0848b655d7202a707a70fc876> ("riscv: dts: HiFive
Unleashed: add default chosen/stdout-path")

Idea is to periodically sync the dts from Linux instead of tweaking internal changes one after another, so better not add any intermediate changes in between. This would help to maintain the dts files easy and meaningful since we are reusing device tree files from Linux.

---
Changes for v4:
- none

Quoted 7 lines
 arch/riscv/dts/Makefile                 |   1 +
 arch/riscv/dts/fu540-c000.dtsi          | 251 ++++++++++++++++++++++++
 arch/riscv/dts/hifive-unleashed-a00.dts |  96 +++++++++
 3 files changed, 348 insertions(+)
 create mode 100644 arch/riscv/dts/fu540-c000.dtsi
 create mode 100644 arch/riscv/dts/hifive-unleashed-a00.dts
#8 lore raw

PATCH v4 1/2 riscv: dts: Add hifive-unleashed-a00 dts from Linux

Quoted 37 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Bin Meng
Sent: Monday, November 18, 2019 5:52 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH v4 1/2] riscv: dts: Add hifive-unleashed-a00 dts from Linux

Quoted 17 lines · Jagan Teki

Sync the hifive-unleashed-a00 dts from Linux with below commit details:

commit <2993c9b04e616df0848b655d7202a707a70fc876> ("riscv: dts: HiFive
Unleashed: add default chosen/stdout-path")

Idea is to periodically sync the dts from Linux instead of tweaking internal changes one after another, so better not add any intermediate changes in between. This would help to maintain the dts files easy and meaningful since we are reusing device tree files from Linux.

---
Changes for v4:
- none

Quoted 7 lines
 arch/riscv/dts/Makefile                 |   1 +
 arch/riscv/dts/fu540-c000.dtsi          | 251 ++++++++++++++++++++++++
 arch/riscv/dts/hifive-unleashed-a00.dts |  96 +++++++++
 3 files changed, 348 insertions(+)
 create mode 100644 arch/riscv/dts/fu540-c000.dtsi  create mode 100644

arch/riscv/dts/hifive-unleashed-a00.dts

Quoted 1 line

LGTM.

Regards,
Anup