|
@@ -0,0 +1,266 @@
|
|
|
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
|
+/* Copyright (c) 2021 StarFive Technology Co., Ltd. */
|
|
|
+
|
|
|
+#include "dubhe.dtsi"
|
|
|
+#include "dubhe-fpga-u-boot.dtsi"
|
|
|
+
|
|
|
+/ {
|
|
|
+ model = "StarFive Dubhe FPGA";
|
|
|
+
|
|
|
+ aliases {
|
|
|
+ serial0 = &uart0;
|
|
|
+ };
|
|
|
+
|
|
|
+ chosen {
|
|
|
+ bootargs = "console=ttySIF0,115200 earlycon=sbi root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait";
|
|
|
+ };
|
|
|
+
|
|
|
+ cpus {
|
|
|
+ timebase-frequency = <25000000>;
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ memory@80000000 {
|
|
|
+ device_type = "memory";
|
|
|
+ reg = <0x0 0x80000000 0x2 0x0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ soc {
|
|
|
+ };
|
|
|
+
|
|
|
+ binman: binman {
|
|
|
+ multiple-images;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&spi0 {
|
|
|
+ status = "okay";
|
|
|
+ mmc@0 {
|
|
|
+ compatible = "mmc-spi-slot";
|
|
|
+ reg = <0>;
|
|
|
+ spi-max-frequency = <20000000>;
|
|
|
+ voltage-ranges = <3300 3300>;
|
|
|
+ disable-wp;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&qspi1 {
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ flash@0 {
|
|
|
+ compatible = "jedec,spi-nor";
|
|
|
+ reg = <0>;
|
|
|
+ spi-max-frequency = <20000000>;
|
|
|
+ m25p,fast-read;
|
|
|
+ spi-tx-bus-width = <1>;
|
|
|
+ spi-rx-bus-width = <1>;
|
|
|
+
|
|
|
+ partitions {
|
|
|
+ compatible = "fixed-partitions";
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <1>;
|
|
|
+
|
|
|
+ partition@0 {
|
|
|
+ reg = <0x000000 0x1000>;
|
|
|
+ label = "boot copier";
|
|
|
+ /*read-only;*/
|
|
|
+ };
|
|
|
+
|
|
|
+ partition@1000 {
|
|
|
+ reg = <0x1000 0x1000>;
|
|
|
+ label = "boot jump";
|
|
|
+ /*read-only;*/
|
|
|
+ };
|
|
|
+
|
|
|
+ partition@2000 {
|
|
|
+ reg = <0x2000 0x2000>;
|
|
|
+ label = "DTB";
|
|
|
+ };
|
|
|
+
|
|
|
+ partition@4000 {
|
|
|
+ reg = <0x4000 0x7ffc000>;
|
|
|
+ label = "FW_payload (OpenSBI and Linux)";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+&uart0 {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&binman {
|
|
|
+
|
|
|
+ kernel_fit {
|
|
|
+ filename = "kernel_sign.itb";
|
|
|
+ fit {
|
|
|
+ description = "FIT with Linux kernel image and FDT";
|
|
|
+ #address-cells = <1>;
|
|
|
+ images {
|
|
|
+ kernel {
|
|
|
+ description = "Linux kernel";
|
|
|
+ type = "kernel";
|
|
|
+ arch = "riscv";
|
|
|
+ os = "linux";
|
|
|
+ compression = "none";
|
|
|
+ load = <0x80200000>;
|
|
|
+ entry = <0x80200000>;
|
|
|
+ kernel_blob: blob-ext {
|
|
|
+ filename = "Image";
|
|
|
+ };
|
|
|
+ hash {
|
|
|
+ algo = "sha256";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ fdt_kernel {
|
|
|
+ description = "Linux kernel device tree binary";
|
|
|
+ type = "flat_dt";
|
|
|
+ arch = "riscv";
|
|
|
+ compression = "none";
|
|
|
+ load = <0x88000000>;
|
|
|
+ fdt_kernel_blob: blob-ext {
|
|
|
+ filename = "dubhe_fpga_linux.dtb";
|
|
|
+ };
|
|
|
+ hash {
|
|
|
+ algo = "sha256";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ configurations {
|
|
|
+ default = "conf";
|
|
|
+ conf {
|
|
|
+ description = "Starfive Dubhe FPGA";
|
|
|
+ kernel = "kernel";
|
|
|
+ fdt = "fdt_kernel";
|
|
|
+ signature {
|
|
|
+ algo = "sha256,rsa4096";
|
|
|
+ key-name-hint = "starfive_linux";
|
|
|
+ sign-images = "fdt", "kernel";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ kernel_fit_sign {
|
|
|
+ arg {
|
|
|
+ args = "mkimage -k ../starfive_key/linux_key -K u-boot.dtb -r -F kernel_sign.itb";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ uboot_fit {
|
|
|
+ filename = "u-boot_sign.itb";
|
|
|
+
|
|
|
+ fit {
|
|
|
+ description = "Configuration to load OpenSBI before U-Boot";
|
|
|
+ #address-cells = <1>;
|
|
|
+ fit,fdt-list = "of-list";
|
|
|
+
|
|
|
+ images {
|
|
|
+ uboot {
|
|
|
+ description = "U-Boot";
|
|
|
+ type = "standalone";
|
|
|
+ os = "U-Boot";
|
|
|
+ arch = "riscv";
|
|
|
+ compression = "none";
|
|
|
+ load = <CONFIG_SYS_TEXT_BASE>;
|
|
|
+
|
|
|
+ uboot_blob: blob-ext {
|
|
|
+ filename = "u-boot-nodtb.bin";
|
|
|
+ };
|
|
|
+ hash {
|
|
|
+ algo = "sha256";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ opensbi {
|
|
|
+ description = "OpenSBI fw_dynamic Firmware";
|
|
|
+ type = "firmware";
|
|
|
+ os = "opensbi";
|
|
|
+ arch = "riscv";
|
|
|
+ compression = "none";
|
|
|
+ load = <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
|
|
|
+ entry = <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
|
|
|
+
|
|
|
+ opensbi_blob: opensbi {
|
|
|
+ filename = "fw_dynamic.bin";
|
|
|
+ };
|
|
|
+ hash {
|
|
|
+ algo = "sha256";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ fdt {
|
|
|
+ description = "U-Boot proper device tree binary"; //"NAME";
|
|
|
+ type = "flat_dt";
|
|
|
+ arch = "riscv";
|
|
|
+ compression = "none";
|
|
|
+ fdt_blob: blob-ext {
|
|
|
+ filename = "u-boot.dtb";
|
|
|
+ };
|
|
|
+ hash {
|
|
|
+ algo = "sha256";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ configurations {
|
|
|
+ default = "conf";
|
|
|
+ conf {
|
|
|
+ description = "Starfive Dubhe FPGA"; //"NAME";
|
|
|
+ firmware = "opensbi";
|
|
|
+ loadables = "uboot";
|
|
|
+ fdt = "fdt";
|
|
|
+ signature {
|
|
|
+ algo = "sha256,rsa4096";
|
|
|
+ key-name-hint = "starfive_uboot";
|
|
|
+ sign-images = "fdt", "firmware", "loadables";
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ uboot_fit_sign {
|
|
|
+ arg {
|
|
|
+ args = "mkimage -k ../starfive_key/uboot_key -K spl/u-boot-spl.dtb -r -F u-boot_sign.itb";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ uboot_spl_key {
|
|
|
+ arg {
|
|
|
+ args = "make spl/u-boot-spl";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ QSPI_Image_binary {
|
|
|
+ filename = "QSPI-Image-signed.bin";
|
|
|
+ pad-byte = <0xff>;
|
|
|
+
|
|
|
+ bootcopier_blob: blob-ext@0 {
|
|
|
+ filename = "dubhe_fpga_bootcode.bin";
|
|
|
+ offset = <0x0>;
|
|
|
+ };
|
|
|
+
|
|
|
+ bootjump_blob: blob-ext@1 {
|
|
|
+ filename = "dubhe_fpga_bootjump.bin";
|
|
|
+ offset = <0x1000>;
|
|
|
+ };
|
|
|
+
|
|
|
+ u-boot-spl {
|
|
|
+ offset = <0x2000>;
|
|
|
+ };
|
|
|
+
|
|
|
+ qspi_ubootproper_opensbi_blob: blob-ext@2 {
|
|
|
+ filename = "u-boot_sign.itb";
|
|
|
+ offset = <0x22000>;
|
|
|
+ };
|
|
|
+
|
|
|
+ qspi_kernel_blob: blob-ext@3 {
|
|
|
+ filename = "kernel_sign.itb";
|
|
|
+ offset = <0x400000>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|