Re: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config

Hi Bin,
From: Bin Meng bmeng.cn@gmail.com Sent: Friday, June 04, 2021 1:51 PM To: Rick Jian-Zhi Chen(陳建志) rick@andestech.com; Leo Yu-Chi Liang(梁育齊) ycliang@andestech.com; U-Boot Mailing List u-boot@lists.denx.de Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config
At present the AE350 SPL defconfig is using OF_PRIOR_STAGE. The intention was to use gdb to load device tree before running U-Boot SPL/proper from RAM. When we switch to OF_SEPARATE we will have to use our own DT but without "u-boot,dm-spl" in several essential nodes, SPL does not boot.
Can you describe how do you verify and provide the steps about that SPL boot fail that I can duplicate it. :)
Thanks, Rick.
Let's add all the required "u-boot,dm-spl" for SPL config.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/riscv/dts/ae350-u-boot.dtsi | 52 ++++++++++++++++++++++++++++++++ arch/riscv/dts/ae350_32.dts | 1 + arch/riscv/dts/ae350_64.dts | 1 + 3 files changed, 54 insertions(+) create mode 100644 arch/riscv/dts/ae350-u-boot.dtsi
diff --git a/arch/riscv/dts/ae350-u-boot.dtsi b/arch/riscv/dts/ae350-u-boot.dtsi new file mode 100644 index 0000000000..0d4201cfae --- /dev/null +++ b/arch/riscv/dts/ae350-u-boot.dtsi @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/ {
cpus {
u-boot,dm-spl;
CPU0: cpu@0 {
u-boot,dm-spl;
CPU0_intc: interrupt-controller {
u-boot,dm-spl;
};
};
CPU1: cpu@1 {
u-boot,dm-spl;
CPU1_intc: interrupt-controller {
u-boot,dm-spl;
};
};
CPU2: cpu@2 {
u-boot,dm-spl;
CPU2_intc: interrupt-controller {
u-boot,dm-spl;
};
};
CPU3: cpu@3 {
u-boot,dm-spl;
CPU3_intc: interrupt-controller {
u-boot,dm-spl;
};
};
};
memory@0 {
u-boot,dm-spl;
};
soc {
u-boot,dm-spl;
plic1: interrupt-controller@e6400000 {
u-boot,dm-spl;
};
plmt0@e6000000 {
u-boot,dm-spl;
};
};
serial0: serial@f0300000 {
u-boot,dm-spl;
};
+}; diff --git a/arch/riscv/dts/ae350_32.dts b/arch/riscv/dts/ae350_32.dts index 70576846f2..083f676333 100644 --- a/arch/riscv/dts/ae350_32.dts +++ b/arch/riscv/dts/ae350_32.dts @@ -3,6 +3,7 @@ /dts-v1/;
#include "binman.dtsi" +#include "ae350-u-boot.dtsi"
/ { #address-cells = <1>; diff --git a/arch/riscv/dts/ae350_64.dts b/arch/riscv/dts/ae350_64.dts index 564e94a1db..74cff9122d 100644 --- a/arch/riscv/dts/ae350_64.dts +++ b/arch/riscv/dts/ae350_64.dts @@ -3,6 +3,7 @@ /dts-v1/;
#include "binman.dtsi" +#include "ae350-u-boot.dtsi"
/ { #address-cells = <2>; -- 2.25.1
CONFIDENTIALITY NOTICE:
This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation.
Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved.

Hi Rick,
On Wed, Jun 9, 2021 at 3:06 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
From: Bin Meng bmeng.cn@gmail.com Sent: Friday, June 04, 2021 1:51 PM To: Rick Jian-Zhi Chen(陳建志) rick@andestech.com; Leo Yu-Chi Liang(梁育齊) ycliang@andestech.com; U-Boot Mailing List u-boot@lists.denx.de Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config
At present the AE350 SPL defconfig is using OF_PRIOR_STAGE. The intention was to use gdb to load device tree before running U-Boot SPL/proper from RAM. When we switch to OF_SEPARATE we will have to use our own DT but without "u-boot,dm-spl" in several essential nodes, SPL does not boot.
Can you describe how do you verify and provide the steps about that SPL boot fail that I can duplicate it. :)
$ make ae350_rv64_spl_defconfig; make -j $ make menuconfig (change OF_PRIOR_STAGE to OF_EMBED or OF_SEPARATE)
Load u-boot.bin to RAM
Regards, Bin

HI Bin
Hi Rick,
On Wed, Jun 9, 2021 at 3:06 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
From: Bin Meng bmeng.cn@gmail.com Sent: Friday, June 04, 2021 1:51 PM To: Rick Jian-Zhi Chen(陳建志) rick@andestech.com; Leo Yu-Chi Liang(梁育齊) ycliang@andestech.com; U-Boot Mailing List u-boot@lists.denx.de Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config
At present the AE350 SPL defconfig is using OF_PRIOR_STAGE. The intention was to use gdb to load device tree before running U-Boot SPL/proper from RAM. When we switch to OF_SEPARATE we will have to use our own DT but without "u-boot,dm-spl" in several essential nodes, SPL does not boot.
Can you describe how do you verify and provide the steps about that SPL boot fail that I can duplicate it. :)
$ make ae350_rv64_spl_defconfig; make -j $ make menuconfig (change OF_PRIOR_STAGE to OF_EMBED or OF_SEPARATE)
Load u-boot.bin to RAM
It can boot with OF_EMBED. But it compile fail with choosing OF_EMBED at the first time, fail messages as below:
binman: [Errno 2] No such file or directory: 'u-boot.dtb' Makefile:1084: recipe for target 'all' failed make: *** [all] Error 1
Thanks, Rick
Regards, Bin

Hi Rick,
On Sat, Jun 12, 2021 at 9:30 PM Rick Chen rickchen36@gmail.com wrote:
HI Bin
Hi Rick,
On Wed, Jun 9, 2021 at 3:06 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
From: Bin Meng bmeng.cn@gmail.com Sent: Friday, June 04, 2021 1:51 PM To: Rick Jian-Zhi Chen(陳建志) rick@andestech.com; Leo Yu-Chi Liang(梁育齊) ycliang@andestech.com; U-Boot Mailing List u-boot@lists.denx.de Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config
At present the AE350 SPL defconfig is using OF_PRIOR_STAGE. The intention was to use gdb to load device tree before running U-Boot SPL/proper from RAM. When we switch to OF_SEPARATE we will have to use our own DT but without "u-boot,dm-spl" in several essential nodes, SPL does not boot.
Can you describe how do you verify and provide the steps about that SPL boot fail that I can duplicate it. :)
$ make ae350_rv64_spl_defconfig; make -j $ make menuconfig (change OF_PRIOR_STAGE to OF_EMBED or OF_SEPARATE)
Load u-boot.bin to RAM
It can boot with OF_EMBED. But it compile fail with choosing OF_EMBED at the first time, fail messages as below:
binman: [Errno 2] No such file or directory: 'u-boot.dtb' Makefile:1084: recipe for target 'all' failed make: *** [all] Error 1
Yes, this is a known issue of the binman conversion for SPL. OF_EMBED is a debugging purpose hence I am inclined to leave it as is.
Regards, Bin

Hi Rick,
On Sat, Jun 12, 2021 at 9:30 PM Rick Chen rickchen36@gmail.com wrote:
HI Bin
Hi Rick,
On Wed, Jun 9, 2021 at 3:06 PM Rick Chen rickchen36@gmail.com wrote:
Hi Bin,
From: Bin Meng bmeng.cn@gmail.com Sent: Friday, June 04, 2021 1:51 PM To: Rick Jian-Zhi Chen(陳建志) rick@andestech.com; Leo Yu-Chi Liang(梁育齊) ycliang@andestech.com; U-Boot Mailing List u-boot@lists.denx.de Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config
At present the AE350 SPL defconfig is using OF_PRIOR_STAGE. The intention was to use gdb to load device tree before running U-Boot SPL/proper from RAM. When we switch to OF_SEPARATE we will have to use our own DT but without "u-boot,dm-spl" in several essential nodes, SPL does not boot.
Can you describe how do you verify and provide the steps about that SPL boot fail that I can duplicate it. :)
$ make ae350_rv64_spl_defconfig; make -j $ make menuconfig (change OF_PRIOR_STAGE to OF_EMBED or OF_SEPARATE)
Load u-boot.bin to RAM
It can boot with OF_EMBED. But it compile fail with choosing OF_EMBED at the first time, fail messages as below:
binman: [Errno 2] No such file or directory: 'u-boot.dtb' Makefile:1084: recipe for target 'all' failed make: *** [all] Error 1
Yes, this is a known issue of the binman conversion for SPL. OF_EMBED is a debugging purpose hence I am inclined to leave it as is.
Reviewed-by: Rick Chen rick@andestech.com
Regards, Bin
participants (2)
-
Bin Meng
-
Rick Chen