kumquat-buildroot/board/nezha/patches/uboot/0001-arch-riscv-dts-sun20i-d1.dtsi-adjust-plic-compatible.patch
Peter Korsgaard acbe6a0a89 configs/nezha_defconfig: new defconfig
Add a defconfig for the Allwinner Nezha, a raspberrypi-style board built
around the RISC-V 64bit D1 SoC.

There is currently no upstream support, so use the git repos from Samuel
Holland as explained on the linux-sunxi wiki:

https://linux-sunxi.org/Allwinner_Nezha

The U-Boot DTB is also used by opensbi, but the two branches are
unfortunately not in sync at the moment, so add a patch to fix the
compatible for the PLIC so opensbi makes it available to S-Mode (Linux).

The use of the sun20i-d1-spl SPL bootloader / TOC1 file format also makes it
a bit more complicated to build the boot image.  As this is expected to only
be a temporary issue, add a U-Boot patch to build the TOC1 image as part of
the build rather than adding explicit support in our U-Boot package to do
it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-11-08 09:45:50 +01:00

37 lines
1.2 KiB
Diff

From 99cf8f37ceb1def9e7bbaccc395cf2275723e03d Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Thu, 4 Nov 2021 22:15:13 +0100
Subject: [PATCH] arch/riscv/dts/sun20i-d1.dtsi: adjust plic compatible to
match opensbi
The T-HEAD PLIC is by default not accessible from S-mode, and access must be
enabled by opensbi to make it accessible to Linux.
The DTB is used both by U-Boot and opensbi (but the PLIC node is ignored by
U-Boot), so change the compatible to match what opensbi expects to fix a
crash during Linux boot:
https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
arch/riscv/dts/sun20i-d1.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/dts/sun20i-d1.dtsi b/arch/riscv/dts/sun20i-d1.dtsi
index 280e0336d4..56d02c33b0 100644
--- a/arch/riscv/dts/sun20i-d1.dtsi
+++ b/arch/riscv/dts/sun20i-d1.dtsi
@@ -1136,7 +1136,7 @@
plic: interrupt-controller@10000000 {
compatible = "allwinner,sun20i-d1-plic",
- "sifive,plic-1.0.0";
+ "thead,c900-plic";
reg = <0x10000000 0x4000000>;
#address-cells = <0>;
interrupts-extended = <&cpu0_intc 11>,
--
2.20.1