Skip to contentSkip to conversation

riscv: ae350: dts: Add SPDX license header

PATCH In review Bin Meng 3 participants 19 messages Jun 4, 2021 – Jun 15, 2021 5 messages not in the archive RISC-V

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/5 riscv: ae350: dts: Add SPDX license header

The SPDX license header is currently missing. Add one.

---

 arch/riscv/dts/ae350_32.dts | 2 ++
 arch/riscv/dts/ae350_64.dts | 2 ++
 2 files changed, 4 insertions(+)
arch/riscv/dts/ae350_32.dts +2 -0
index a0ab5e9be2..ef110c54ae 100644
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
 /dts-v1/;
 
 #include "binman.dtsi"
arch/riscv/dts/ae350_64.dts +2 -0
index f654f4809a..6abf42e904 100644
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
 /dts-v1/;
 
 #include "binman.dtsi"
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/5 riscv: ae350: dts: Remove the unnecessary space in bootargs

There are two spaces before "debug' in bootargs. Drop one.

---

 arch/riscv/dts/ae350_32.dts | 2 +-
 arch/riscv/dts/ae350_64.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/riscv/dts/ae350_32.dts +1 -1
index ef110c54ae..b90351e87b 100644
@@ -16,7 +16,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,38400n8  debug loglevel=7";
+		bootargs = "console=ttyS0,38400n8 debug loglevel=7";
 		stdout-path = "uart0:38400n8";
 	};
 
arch/riscv/dts/ae350_64.dts +1 -1
index 6abf42e904..27ac21c716 100644
@@ -16,7 +16,7 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,38400n8  debug loglevel=7";
+		bootargs = "console=ttyS0,38400n8 debug loglevel=7";
 		stdout-path = "uart0:38400n8";
 	};
 
Signature · 1 line
2.25.1

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

Reviewed-by
#3 lore raw

Re: [PATCH 2/5] riscv: ae350: dts: Remove the unnecessary space in bootargs

Quoted 5 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: [PATCH 2/5] riscv: ae350: dts: Remove the unnecessary space in bootargs

Quoted 8 lines

There are two spaces before "debug' in bootargs. Drop one.

---

 arch/riscv/dts/ae350_32.dts | 2 +-
 arch/riscv/dts/ae350_64.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
author
#5 lore raw

PATCH 3/5 riscv: ae350: dts: Remove the unnecessary #address-cells in plic nodes

In reply to Bin Meng

PLIC nodes don't have child nodes, so #address-cells is not needed.

---

 arch/riscv/dts/ae350_32.dts | 2 --
 arch/riscv/dts/ae350_64.dts | 2 --
 2 files changed, 4 deletions(-)
arch/riscv/dts/ae350_32.dts +0 -2
index b90351e87b..0917b83108 100644
@@ -135,7 +135,6 @@
 
 		plic0: interrupt-controller@e4000000 {
 			compatible = "riscv,plic0";
-			#address-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			reg = <0xe4000000 0x2000000>;
@@ -148,7 +147,6 @@
 
 		plic1: interrupt-controller@e6400000 {
 			compatible = "riscv,plic1";
-			#address-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			reg = <0xe6400000 0x400000>;
arch/riscv/dts/ae350_64.dts +0 -2
index 27ac21c716..564e94a1db 100644
@@ -135,7 +135,6 @@
 
 		plic0: interrupt-controller@e4000000 {
 			compatible = "riscv,plic0";
-			#address-cells = <2>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
 			reg = <0x0 0xe4000000 0x0 0x2000000>;
@@ -148,7 +147,6 @@
 
 		plic1: interrupt-controller@e6400000 {
 			compatible = "riscv,plic1";
-			#address-cells = <2>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
 			reg = <0x0 0xe6400000 0x0 0x400000>;
Signature · 1 line
2.25.1

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

Reviewed-by
#7 lore raw

Re: [PATCH 3/5] riscv: ae350: dts: Remove the unnecessary #address-cells in plic nodes

Quoted 5 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: [PATCH 3/5] riscv: ae350: dts: Remove the unnecessary #address-cells in plic nodes

Quoted 8 lines

PLIC nodes don't have child nodes, so #address-cells is not needed.

---

 arch/riscv/dts/ae350_32.dts | 2 --
 arch/riscv/dts/ae350_64.dts | 2 --
 2 files changed, 4 deletions(-)
author
#9 lore raw

PATCH 4/5 riscv: ae350: dts: Fix #interrupt-cells for plic0 in 32-bit

In reply to Bin Meng

All the device nodes that refer to plic0 as their interrupt parent have 2 cells encoded in their interrupts property, but plic0 only provides 1 cell in #interrupt-cells which is incorrect.

---

 arch/riscv/dts/ae350_32.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/dts/ae350_32.dts +1 -1
index 0917b83108..70576846f2 100644
@@ -135,7 +135,7 @@
 
 		plic0: interrupt-controller@e4000000 {
 			compatible = "riscv,plic0";
-			#interrupt-cells = <1>;
+			#interrupt-cells = <2>;
 			interrupt-controller;
 			reg = <0xe4000000 0x2000000>;
 			riscv,ndev=<71>;
Signature · 1 line
2.25.1

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

Reviewed-by
#11 lore raw

Re: [PATCH 4/5] riscv: ae350: dts: Fix #interrupt-cells for plic0 in 32-bit

Quoted 5 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: [PATCH 4/5] riscv: ae350: dts: Fix #interrupt-cells for plic0 in 32-bit

Quoted 7 lines

All the device nodes that refer to plic0 as their interrupt parent have 2 cells encoded in their interrupts property, but plic0 only provides 1 cell in #interrupt-cells which is incorrect.

---

 arch/riscv/dts/ae350_32.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v1 4/5
#12 lore raw

Re: [PATCH 4/5] riscv: ae350: dts: Fix #interrupt-cells for plic0 in 32-bit

In reply to Bin Meng
Quoted 10 lines · Bin Meng

All the device nodes that refer to plic0 as their interrupt parent have 2 cells encoded in their interrupts property, but plic0 only provides 1 cell in #interrupt-cells which is incorrect.

---

 arch/riscv/dts/ae350_32.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
author
#13 lore raw

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

In reply to Bin Meng

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.

Let's add all the required "u-boot,dm-spl" for SPL config.

---

 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
arch/riscv/dts/ae350-u-boot.dtsi new file +52 -0
new file mode 100644
index 0000000000..0d4201cfae
@@ -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;
+	};
+
+};
arch/riscv/dts/ae350_32.dts +1 -0
index 70576846f2..083f676333 100644
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "binman.dtsi"
+#include "ae350-u-boot.dtsi"
 
 / {
 	#address-cells = <1>;
arch/riscv/dts/ae350_64.dts +1 -0
index 564e94a1db..74cff9122d 100644
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "binman.dtsi"
+#include "ae350-u-boot.dtsi"
 
 / {
 	#address-cells = <2>;
Signature · 1 line
2.25.1

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

#15 lore raw

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

Hi Bin,

Quoted 6 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
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.

Quoted 100 lines

Let's add all the required "u-boot,dm-spl" for SPL config.

---

 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
arch/riscv/dts/ae350-u-boot.dtsi new file +52 -0
new file mode 100644
index 0000000000..0d4201cfae
@@ -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;
+       };
+
+};
arch/riscv/dts/ae350_32.dts +1 -0
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "binman.dtsi"
+#include "ae350-u-boot.dtsi"
 
 / {
        #address-cells = <1>;
arch/riscv/dts/ae350_64.dts +1 -1
@@ -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.

author
#16 lore raw

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

Hi Rick,

Quoted 8 lines · Rick Chen

Hi Bin,

Quoted 5 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: [PATCH 5/5] riscv: ae350: dts: Add missing "u-boot,dm-spl" for SPL config

Quoted 4 lines
Quoted 1 line

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

#17 lore raw

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

HI Bin

Quoted 13 lines

Hi Rick,

Quoted 10 lines · Rick Chen

Hi Bin,

Quoted 6 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
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.

Quoted 7 lines
Quoted 2 lines

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

Quoted 3 lines

Regards,
Bin

author
#18 lore raw

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

Hi Rick,

Quoted 24 lines · Rick Chen

HI Bin

Quoted 13 lines

Hi Rick,

Quoted 10 lines · Rick Chen

Hi Bin,

Quoted 6 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
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.

Quoted 7 lines
Quoted 2 lines

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

Quoted 7 lines

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

Reviewed-by
#19 lore raw

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

Quoted 31 lines

Hi Rick,

Quoted 28 lines · Rick Chen

HI Bin

Quoted 13 lines

Hi Rick,

Quoted 10 lines · Rick Chen

Hi Bin,

Quoted 6 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
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.

Quoted 7 lines
Quoted 2 lines

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:

Quoted 6 lines
Quoted 3 lines

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.

Quoted 3 lines

Regards,
Bin

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

Reviewed-by
#23 lore raw
Quoted 5 lines

From: Bin Meng <[email protected]>
Sent: Friday, June 04, 2021 1:51 PM
To: Rick Jian-Zhi Chen(陳建志) <[email protected]>; Leo Yu-Chi Liang(梁育齊) <[email protected]>; U-Boot Mailing List <[email protected]>
Subject: [PATCH 1/5] riscv: ae350: dts: Add SPDX license header

Quoted 8 lines

The SPDX license header is currently missing. Add one.

---

 arch/riscv/dts/ae350_32.dts | 2 ++
 arch/riscv/dts/ae350_64.dts | 2 ++
 2 files changed, 4 insertions(+)