diff --git a/conf/demosoc/build.mk b/conf/demosoc/build.mk deleted file mode 100644 index 5c55af6..0000000 --- a/conf/demosoc/build.mk +++ /dev/null @@ -1,20 +0,0 @@ -FW_TEXT_START := 0xA0000000 -UIMAGE_AE_CMD := -a 0xA0400000 -e 0xA0400000 -# Need Nuclei Qemu >= 2023.10 -QEMU_MACHINE_OPTS := -M nuclei_demosoc,download=flashxip -smp 8 -m 256M -# initramfs pre command before generate initrd ramfs -INITRAMFS_PRECMD := bash $(confdir)/preramfs.sh $(confdir) $(buildroot_initramfs_sysroot) copyfiles.txt -# eg. $(confdir)/amp/cx.bin -CORE1_APP_BIN := -CORE2_APP_BIN := -CORE3_APP_BIN := -CORE4_APP_BIN := -CORE5_APP_BIN := -CORE6_APP_BIN := -CORE7_APP_BIN := - -# Freq Settings -TIMER_HZ ?= -CPU_HZ ?= -PERIPH_HZ ?= $(CPU_HZ) -SIMULATION ?= 0 diff --git a/conf/demosoc/buildroot_initramfs_rv64imac_config b/conf/demosoc/buildroot_initramfs_rv64imac_config deleted file mode 100644 index bf60467..0000000 --- a/conf/demosoc/buildroot_initramfs_rv64imac_config +++ /dev/null @@ -1,47 +0,0 @@ -BR2_riscv=y -BR2_riscv_custom=y -BR2_RISCV_ISA_CUSTOM_RVM=y -BR2_RISCV_ISA_CUSTOM_RVC=y -BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y -BR2_TOOLCHAIN_EXTERNAL_URL="https://www.nucleisys.com/upload/files/nuclei_riscv_glibc_prebuilt_linux64_2022.04.tar.bz2" -BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="riscv-nuclei-linux-gnu" -BR2_TOOLCHAIN_EXTERNAL_GCC_10=y -BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_0=y -BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y -BR2_TOOLCHAIN_EXTERNAL_CXX=y -BR2_KERNEL_MIRROR="http://mirrors.163.com/kernel" -BR2_GNU_MIRROR="https://mirrors.tuna.tsinghua.edu.cn/gnu" -BR2_CPAN_MIRROR="https://mirrors.163.com/cpan" -BR2_TARGET_GENERIC_HOSTNAME="nucleisys" -BR2_TARGET_GENERIC_ISSUE="Welcome to Nuclei System Technology" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y -BR2_TARGET_GENERIC_ROOT_PASSWD="nuclei" -BR2_SYSTEM_BIN_SH_BASH=y -BR2_SYSTEM_DHCP="eth0" -BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y -BR2_PACKAGE_CACHE_CALIBRATOR=y -BR2_PACKAGE_DUMA=y -BR2_PACKAGE_LMBENCH=y -BR2_PACKAGE_MEMSTAT=y -BR2_PACKAGE_RAMSMP=y -BR2_PACKAGE_STRACE=y -BR2_PACKAGE_STRESS=y -BR2_PACKAGE_STRESS_NG=y -BR2_PACKAGE_TINYMEMBENCH=y -BR2_PACKAGE_DOSFSTOOLS=y -BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y -BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y -BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y -BR2_PACKAGE_F2FS_TOOLS=y -BR2_PACKAGE_MMC_UTILS=y -BR2_PACKAGE_MTD=y -BR2_PACKAGE_MTD_FTL_CHECK=y -BR2_PACKAGE_MTD_FTL_FORMAT=y -BR2_PACKAGE_MTD_JFFS2DUMP=y -BR2_PACKAGE_MTD_MKFSJFFS2=y -BR2_PACKAGE_MTD_MTDPART=y -BR2_PACKAGE_MINICOM=y -BR2_PACKAGE_LIBTIRPC=y -# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set -BR2_PACKAGE_LRZSZ=y diff --git a/conf/demosoc/buildroot_initramfs_rv64imafdc_config b/conf/demosoc/buildroot_initramfs_rv64imafdc_config deleted file mode 100644 index 8821ce5..0000000 --- a/conf/demosoc/buildroot_initramfs_rv64imafdc_config +++ /dev/null @@ -1,45 +0,0 @@ -BR2_riscv=y -BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y -BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y -BR2_TOOLCHAIN_EXTERNAL_URL="https://www.nucleisys.com/upload/files/nuclei_riscv_glibc_prebuilt_linux64_2022.04.tar.bz2" -BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="riscv-nuclei-linux-gnu" -BR2_TOOLCHAIN_EXTERNAL_GCC_10=y -BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_0=y -BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y -BR2_TOOLCHAIN_EXTERNAL_CXX=y -BR2_KERNEL_MIRROR="http://mirrors.163.com/kernel" -BR2_GNU_MIRROR="https://mirrors.tuna.tsinghua.edu.cn/gnu" -BR2_CPAN_MIRROR="https://mirrors.163.com/cpan" -BR2_TARGET_GENERIC_HOSTNAME="nucleisys" -BR2_TARGET_GENERIC_ISSUE="Welcome to Nuclei System Technology" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y -BR2_TARGET_GENERIC_ROOT_PASSWD="nuclei" -BR2_SYSTEM_BIN_SH_BASH=y -BR2_SYSTEM_DHCP="eth0" -BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y -BR2_PACKAGE_CACHE_CALIBRATOR=y -BR2_PACKAGE_DUMA=y -BR2_PACKAGE_LMBENCH=y -BR2_PACKAGE_MEMSTAT=y -BR2_PACKAGE_RAMSMP=y -BR2_PACKAGE_STRACE=y -BR2_PACKAGE_STRESS=y -BR2_PACKAGE_STRESS_NG=y -BR2_PACKAGE_TINYMEMBENCH=y -BR2_PACKAGE_DOSFSTOOLS=y -BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y -BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y -BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y -BR2_PACKAGE_F2FS_TOOLS=y -BR2_PACKAGE_MMC_UTILS=y -BR2_PACKAGE_MTD=y -BR2_PACKAGE_MTD_FTL_CHECK=y -BR2_PACKAGE_MTD_FTL_FORMAT=y -BR2_PACKAGE_MTD_JFFS2DUMP=y -BR2_PACKAGE_MTD_MKFSJFFS2=y -BR2_PACKAGE_MTD_MTDPART=y -BR2_PACKAGE_MINICOM=y -BR2_PACKAGE_LIBTIRPC=y -# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set -BR2_PACKAGE_LRZSZ=y diff --git a/conf/demosoc/freeloader.mk b/conf/demosoc/freeloader.mk deleted file mode 100644 index 6589165..0000000 --- a/conf/demosoc/freeloader.mk +++ /dev/null @@ -1,8 +0,0 @@ -DDR_BASE ?= 0xA0000000 -FLASH_BASE ?= 0x20000000 -FLASH_SIZE ?= 16M -CACHE_CTRL ?= 0x100C1 -TLB_CTRL ?= 0x0 -ENABLE_SMP ?= 1 -ENABLE_L2 ?= 1 -AMP_START_CORE ?= 8 diff --git a/conf/demosoc/initramfs.txt b/conf/demosoc/initramfs.txt deleted file mode 100644 index 8cd3e6a..0000000 --- a/conf/demosoc/initramfs.txt +++ /dev/null @@ -1,4 +0,0 @@ -dir /dev 755 0 0 -nod /dev/console 644 0 0 c 5 1 -nod /dev/null 644 0 0 c 1 3 -slink /init /bin/busybox 755 0 0 diff --git a/conf/demosoc/linux_rv64imac_defconfig b/conf/demosoc/linux_rv64imac_defconfig deleted file mode 100644 index 3208c55..0000000 --- a/conf/demosoc/linux_rv64imac_defconfig +++ /dev/null @@ -1,98 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="nucleisys" -CONFIG_SYSVIPC=y -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_CGROUPS=y -CONFIG_NAMESPACES=y -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -CONFIG_SMP=y -CONFIG_HOTPLUG_CPU=y -CONFIG_HZ_100=y -CONFIG_RISCV_SBI_V01=y -# CONFIG_RISCV_BOOT_SPINWAIT is not set -CONFIG_CMDLINE="earlyprintk" -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_COMPACTION is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_PACKET_DIAG=y -CONFIG_UNIX=y -CONFIG_UNIX_DIAG=y -CONFIG_TLS=y -CONFIG_INET=y -CONFIG_NETFILTER=y -CONFIG_NETLINK_DIAG=y -# CONFIG_WIRELESS is not set -CONFIG_FAILOVER=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_FTL=y -CONFIG_MTD_CFI=y -CONFIG_MTD_SPI_NOR=y -CONFIG_OF_OVERLAY=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_NETDEVICES=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_VT is not set -CONFIG_SERIAL_EARLYCON_RISCV_SBI=y -CONFIG_SERIAL_NUCLEI=y -CONFIG_SERIAL_NUCLEI_CONSOLE=y -CONFIG_HVC_RISCV_SBI=y -# CONFIG_HW_RANDOM is not set -CONFIG_SPI=y -CONFIG_SPI_NUCLEI=y -CONFIG_SPI_SPIDEV=y -CONFIG_PINCTRL=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_NUCLEI=y -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_SPI=y -# CONFIG_VIRTIO_MENU is not set -# CONFIG_VHOST_MENU is not set -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_SIFIVE_PLIC=y -# CONFIG_NVMEM is not set -CONFIG_EXT3_FS=y -CONFIG_JFS_FS=y -CONFIG_F2FS_FS=y -CONFIG_AUTOFS_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_EXFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_EFIVAR_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_RSA=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_PRINTK_TIME=y -# CONFIG_DEBUG_MISC is not set -# CONFIG_SLUB_DEBUG is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_FTRACE is not set -# CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/conf/demosoc/linux_rv64imafdc_defconfig b/conf/demosoc/linux_rv64imafdc_defconfig deleted file mode 100644 index 3208c55..0000000 --- a/conf/demosoc/linux_rv64imafdc_defconfig +++ /dev/null @@ -1,98 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_DEFAULT_HOSTNAME="nucleisys" -CONFIG_SYSVIPC=y -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_CGROUPS=y -CONFIG_NAMESPACES=y -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -CONFIG_SMP=y -CONFIG_HOTPLUG_CPU=y -CONFIG_HZ_100=y -CONFIG_RISCV_SBI_V01=y -# CONFIG_RISCV_BOOT_SPINWAIT is not set -CONFIG_CMDLINE="earlyprintk" -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_COMPACTION is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_PACKET_DIAG=y -CONFIG_UNIX=y -CONFIG_UNIX_DIAG=y -CONFIG_TLS=y -CONFIG_INET=y -CONFIG_NETFILTER=y -CONFIG_NETLINK_DIAG=y -# CONFIG_WIRELESS is not set -CONFIG_FAILOVER=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_FTL=y -CONFIG_MTD_CFI=y -CONFIG_MTD_SPI_NOR=y -CONFIG_OF_OVERLAY=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_NETDEVICES=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_VT is not set -CONFIG_SERIAL_EARLYCON_RISCV_SBI=y -CONFIG_SERIAL_NUCLEI=y -CONFIG_SERIAL_NUCLEI_CONSOLE=y -CONFIG_HVC_RISCV_SBI=y -# CONFIG_HW_RANDOM is not set -CONFIG_SPI=y -CONFIG_SPI_NUCLEI=y -CONFIG_SPI_SPIDEV=y -CONFIG_PINCTRL=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_NUCLEI=y -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_MMC=y -CONFIG_MMC_SPI=y -# CONFIG_VIRTIO_MENU is not set -# CONFIG_VHOST_MENU is not set -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_SIFIVE_PLIC=y -# CONFIG_NVMEM is not set -CONFIG_EXT3_FS=y -CONFIG_JFS_FS=y -CONFIG_F2FS_FS=y -CONFIG_AUTOFS_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_EXFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_EFIVAR_FS=y -CONFIG_JFFS2_FS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_RSA=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_PRINTK_TIME=y -# CONFIG_DEBUG_MISC is not set -# CONFIG_SLUB_DEBUG is not set -# CONFIG_RCU_TRACE is not set -# CONFIG_FTRACE is not set -# CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/conf/demosoc/nuclei_rv64imac.dts b/conf/demosoc/nuclei_rv64imac.dts deleted file mode 100644 index a155d70..0000000 --- a/conf/demosoc/nuclei_rv64imac.dts +++ /dev/null @@ -1,286 +0,0 @@ -/dts-v1/; - -#ifndef TIMERCLK_FREQ -#define TIMERCLK_FREQ 32768 -#endif -#ifndef CPUCLK_FREQ -#define CPUCLK_FREQ 16000000 -#endif -#ifndef PERIPHCLK_FREQ -#define PERIPHCLK_FREQ CPUCLK_FREQ -#endif -#ifndef SIMULATION -#define SIMULATION 0 -#endif - -/ { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc"; - model = "nuclei,demo-soc"; - - chosen { - bootargs = "earlycon=sbi console=ttyNUC0"; - stdout-path = "serial0"; - }; - - aliases { - serial0 = &uart0; - serial1 = &uart1; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - timebase-frequency = ; - cpu0: cpu@0 { - device_type = "cpu"; - reg = <0>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu0_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu1: cpu@1 { - device_type = "cpu"; - reg = <1>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu1_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu2: cpu@2 { - device_type = "cpu"; - reg = <2>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu2_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu3: cpu@3 { - device_type = "cpu"; - reg = <3>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu3_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu4: cpu@4 { - device_type = "cpu"; - reg = <4>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu4_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu5: cpu@5 { - device_type = "cpu"; - reg = <5>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu5_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu6: cpu@6 { - device_type = "cpu"; - reg = <6>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu6_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu7: cpu@7 { - device_type = "cpu"; - reg = <7>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu7_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - }; - - memory@A0000000 { - device_type = "memory"; - reg = <0x0 0xA0000000 0x0 0xE000000>; - }; - - soc { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc", "simple-bus"; - ranges; - }; - - /* Used for Uboot SBI Console */ - console { - compatible = "sbi,console"; - }; - - hfclk: hfclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = ; - clock-output-names = "hfclk"; - }; - - plic0: interrupt-controller@8000000 { - #interrupt-cells = <1>; - compatible = "riscv,plic0"; - interrupt-controller; - riscv,ndev = <53>; - interrupts-extended = - <&cpu0_intc 11 &cpu0_intc 9 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9 - &cpu5_intc 11 &cpu5_intc 9 - &cpu6_intc 11 &cpu6_intc 9 - &cpu7_intc 11 &cpu7_intc 9>; - reg = <0x0 0x8000000 0x0 0x4000000>; - }; - - clint0: clint@2001000 { - #interrupt-cells = <1>; - compatible = "riscv,clint0"; - reg = <0x0 0x2001000 0x0 0xC000>; - interrupts-extended = - <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7 - &cpu5_intc 3 &cpu5_intc 7 - &cpu6_intc 3 &cpu6_intc 7 - &cpu7_intc 3 &cpu7_intc 7>; - clocks = <&hfclk>; - }; - - uart0: serial@10013000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10013000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <33>; - clocks = <&hfclk>; - clock-frequency = ; - status = "okay"; - }; - - uart1: serial@10023000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10023000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <34>; - clocks = <&hfclk>; - clock-frequency = ; - status = "disabled"; - }; - -#if SIMULATION == 0 - qspi0: spi@10014000 { - compatible = "nuclei,spi0"; - reg = <0x0 0x10014000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <35>; - num-cs = <1>; - #address-cells = <1>; - #size-cells = <0>; - clocks = <&hfclk>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <1000000>; - m25p,fast-read; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - }; - }; - - qspi2: spi@10034000 { - compatible = "nuclei,spi0"; - reg = <0x0 0x10034000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <37>; - num-cs = <1>; - #address-cells = <1>; - #size-cells = <0>; - clocks = <&hfclk>; - status = "okay"; - - mmc@0 { - compatible = "mmc-spi-slot"; - reg = <0>; - spi-max-frequency = <20000000>; - voltage-ranges = <3300 3300>; - disable-wp; - }; - }; - - gpio: gpio@10012000 { - compatible = "nuclei,gpio0"; - interrupt-parent = <&plic0>; - interrupts = <1>, <2>, <3>, <4>, <5>, <6>, - <7>, <8>, <9>, <10>, <11>, <12>, <13>, - <14>, <15>, <16>, <17>, <18>, <19>, <20>, - <21>, <22>, <23>, <24>, <25>, <26>, <27>, - <28>, <29>, <30>, <31>, <32>; - reg = <0x0 0x10012000 0x0 0x1000>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - clocks = <&hfclk>; - status = "disabled"; - }; -#endif -}; diff --git a/conf/demosoc/nuclei_rv64imac_sim.dts b/conf/demosoc/nuclei_rv64imac_sim.dts deleted file mode 100644 index 2bafc38..0000000 --- a/conf/demosoc/nuclei_rv64imac_sim.dts +++ /dev/null @@ -1,201 +0,0 @@ -/dts-v1/; - -#define TIMERCLK_FREQ 500000 -#define CPUCLK_FREQ 1000000 -#define PERIPHCLK_FREQ 1000000 - -/ { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc"; - model = "nuclei,demo-soc"; - - chosen { - bootargs = "earlycon=sbi console=hvc0"; - stdout-path = "serial0"; - }; - - aliases { - serial0 = &uart0; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - timebase-frequency = ; - cpu0: cpu@0 { - device_type = "cpu"; - reg = <0>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu0_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu1: cpu@1 { - device_type = "cpu"; - reg = <1>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu1_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu2: cpu@2 { - device_type = "cpu"; - reg = <2>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu2_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu3: cpu@3 { - device_type = "cpu"; - reg = <3>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu3_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu4: cpu@4 { - device_type = "cpu"; - reg = <4>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu4_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu5: cpu@5 { - device_type = "cpu"; - reg = <5>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu5_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu6: cpu@6 { - device_type = "cpu"; - reg = <6>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu6_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu7: cpu@7 { - device_type = "cpu"; - reg = <7>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imac"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu7_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - }; - - memory@A0000000 { - device_type = "memory"; - reg = <0x0 0xA0000000 0x0 0xE000000>; - }; - - soc { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc", "simple-bus"; - ranges; - }; - - hfclk: hfclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = ; - clock-output-names = "hfclk"; - }; - - plic0: interrupt-controller@8000000 { - #interrupt-cells = <1>; - compatible = "riscv,plic0"; - interrupt-controller; - riscv,ndev = <53>; - interrupts-extended = - <&cpu0_intc 11 &cpu0_intc 9 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9 - &cpu5_intc 11 &cpu5_intc 9 - &cpu6_intc 11 &cpu6_intc 9 - &cpu7_intc 11 &cpu7_intc 9>; - reg = <0x0 0x8000000 0x0 0x4000000>; - }; - - clint0: clint@2001000 { - #interrupt-cells = <1>; - compatible = "riscv,clint0"; - reg = <0x0 0x2001000 0x0 0xC000>; - interrupts-extended = - <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7 - &cpu5_intc 3 &cpu5_intc 7 - &cpu6_intc 3 &cpu6_intc 7 - &cpu7_intc 3 &cpu7_intc 7>; - clocks = <&hfclk>; - }; - - uart0: serial@10013000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10013000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <33>; - clocks = <&hfclk>; - clock-frequency = ; - status = "disabled"; - }; -}; diff --git a/conf/demosoc/nuclei_rv64imafdc.dts b/conf/demosoc/nuclei_rv64imafdc.dts deleted file mode 100644 index 56f4aa7..0000000 --- a/conf/demosoc/nuclei_rv64imafdc.dts +++ /dev/null @@ -1,286 +0,0 @@ -/dts-v1/; - -#ifndef TIMERCLK_FREQ -#define TIMERCLK_FREQ 32768 -#endif -#ifndef CPUCLK_FREQ -#define CPUCLK_FREQ 16000000 -#endif -#ifndef PERIPHCLK_FREQ -#define PERIPHCLK_FREQ CPUCLK_FREQ -#endif -#ifndef SIMULATION -#define SIMULATION 0 -#endif - -/ { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc"; - model = "nuclei,demo-soc"; - - chosen { - bootargs = "earlycon=sbi console=ttyNUC0"; - stdout-path = "serial0"; - }; - - aliases { - serial0 = &uart0; - serial1 = &uart1; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - timebase-frequency = ; - cpu0: cpu@0 { - device_type = "cpu"; - reg = <0>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu0_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu1: cpu@1 { - device_type = "cpu"; - reg = <1>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu1_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu2: cpu@2 { - device_type = "cpu"; - reg = <2>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu2_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu3: cpu@3 { - device_type = "cpu"; - reg = <3>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu3_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu4: cpu@4 { - device_type = "cpu"; - reg = <4>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu4_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu5: cpu@5 { - device_type = "cpu"; - reg = <5>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu5_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu6: cpu@6 { - device_type = "cpu"; - reg = <6>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu6_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu7: cpu@7 { - device_type = "cpu"; - reg = <7>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu7_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - }; - - memory@A0000000 { - device_type = "memory"; - reg = <0x0 0xA0000000 0x0 0xE000000>; - }; - - soc { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc", "simple-bus"; - ranges; - }; - - /* Used for Uboot SBI Console */ - console { - compatible = "sbi,console"; - }; - - hfclk: hfclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = ; - clock-output-names = "hfclk"; - }; - - plic0: interrupt-controller@8000000 { - #interrupt-cells = <1>; - compatible = "riscv,plic0"; - interrupt-controller; - riscv,ndev = <53>; - interrupts-extended = - <&cpu0_intc 11 &cpu0_intc 9 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9 - &cpu5_intc 11 &cpu5_intc 9 - &cpu6_intc 11 &cpu6_intc 9 - &cpu7_intc 11 &cpu7_intc 9>; - reg = <0x0 0x8000000 0x0 0x4000000>; - }; - - clint0: clint@2001000 { - #interrupt-cells = <1>; - compatible = "riscv,clint0"; - reg = <0x0 0x2001000 0x0 0xC000>; - interrupts-extended = - <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7 - &cpu5_intc 3 &cpu5_intc 7 - &cpu6_intc 3 &cpu6_intc 7 - &cpu7_intc 3 &cpu7_intc 7>; - clocks = <&hfclk>; - }; - - uart0: serial@10013000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10013000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <33>; - clocks = <&hfclk>; - clock-frequency = ; - status = "okay"; - }; - - uart1: serial@10023000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10023000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <34>; - clocks = <&hfclk>; - clock-frequency = ; - status = "disabled"; - }; - -#if SIMULATION == 0 - qspi0: spi@10014000 { - compatible = "nuclei,spi0"; - reg = <0x0 0x10014000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <35>; - num-cs = <1>; - #address-cells = <1>; - #size-cells = <0>; - clocks = <&hfclk>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <1000000>; - m25p,fast-read; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - }; - }; - - qspi2: spi@10034000 { - compatible = "nuclei,spi0"; - reg = <0x0 0x10034000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <37>; - num-cs = <1>; - #address-cells = <1>; - #size-cells = <0>; - clocks = <&hfclk>; - status = "okay"; - - mmc@0 { - compatible = "mmc-spi-slot"; - reg = <0>; - spi-max-frequency = <20000000>; - voltage-ranges = <3300 3300>; - disable-wp; - }; - }; - - gpio: gpio@10012000 { - compatible = "nuclei,gpio0"; - interrupt-parent = <&plic0>; - interrupts = <1>, <2>, <3>, <4>, <5>, <6>, - <7>, <8>, <9>, <10>, <11>, <12>, <13>, - <14>, <15>, <16>, <17>, <18>, <19>, <20>, - <21>, <22>, <23>, <24>, <25>, <26>, <27>, - <28>, <29>, <30>, <31>, <32>; - reg = <0x0 0x10012000 0x0 0x1000>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - clocks = <&hfclk>; - status = "disabled"; - }; -#endif -}; diff --git a/conf/demosoc/nuclei_rv64imafdc_sim.dts b/conf/demosoc/nuclei_rv64imafdc_sim.dts deleted file mode 100644 index c13bfa7..0000000 --- a/conf/demosoc/nuclei_rv64imafdc_sim.dts +++ /dev/null @@ -1,201 +0,0 @@ -/dts-v1/; - -#define TIMERCLK_FREQ 500000 -#define CPUCLK_FREQ 1000000 -#define PERIPHCLK_FREQ 1000000 - -/ { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc"; - model = "nuclei,demo-soc"; - - chosen { - bootargs = "earlycon=sbi console=hvc0"; - stdout-path = "serial0"; - }; - - aliases { - serial0 = &uart0; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - timebase-frequency = ; - cpu0: cpu@0 { - device_type = "cpu"; - reg = <0>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu0_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu1: cpu@1 { - device_type = "cpu"; - reg = <1>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu1_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu2: cpu@2 { - device_type = "cpu"; - reg = <2>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu2_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu3: cpu@3 { - device_type = "cpu"; - reg = <3>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu3_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu4: cpu@4 { - device_type = "cpu"; - reg = <4>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu4_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu5: cpu@5 { - device_type = "cpu"; - reg = <5>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu5_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu6: cpu@6 { - device_type = "cpu"; - reg = <6>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu6_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - cpu7: cpu@7 { - device_type = "cpu"; - reg = <7>; - status = "okay"; - compatible = "riscv"; - riscv,isa = "rv64imafdc"; - mmu-type = "riscv,sv39"; - clock-frequency = ; - cpu7_intc: interrupt-controller { - #interrupt-cells = <1>; - interrupt-controller; - compatible = "riscv,cpu-intc"; - }; - }; - }; - - memory@A0000000 { - device_type = "memory"; - reg = <0x0 0xA0000000 0x0 0xE000000>; - }; - - soc { - #address-cells = <2>; - #size-cells = <2>; - compatible = "nuclei,demo-soc", "simple-bus"; - ranges; - }; - - hfclk: hfclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = ; - clock-output-names = "hfclk"; - }; - - plic0: interrupt-controller@8000000 { - #interrupt-cells = <1>; - compatible = "riscv,plic0"; - interrupt-controller; - riscv,ndev = <53>; - interrupts-extended = - <&cpu0_intc 11 &cpu0_intc 9 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9 - &cpu5_intc 11 &cpu5_intc 9 - &cpu6_intc 11 &cpu6_intc 9 - &cpu7_intc 11 &cpu7_intc 9>; - reg = <0x0 0x8000000 0x0 0x4000000>; - }; - - clint0: clint@2001000 { - #interrupt-cells = <1>; - compatible = "riscv,clint0"; - reg = <0x0 0x2001000 0x0 0xC000>; - interrupts-extended = - <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7 - &cpu5_intc 3 &cpu5_intc 7 - &cpu6_intc 3 &cpu6_intc 7 - &cpu7_intc 3 &cpu7_intc 7>; - clocks = <&hfclk>; - }; - - uart0: serial@10013000 { - compatible = "nuclei,uart0"; - reg = <0x0 0x10013000 0x0 0x1000>; - interrupt-parent = <&plic0>; - interrupts = <33>; - clocks = <&hfclk>; - clock-frequency = ; - status = "disabled"; - }; -}; diff --git a/conf/demosoc/openocd.cfg b/conf/demosoc/openocd.cfg deleted file mode 100644 index 592b7fd..0000000 --- a/conf/demosoc/openocd.cfg +++ /dev/null @@ -1,55 +0,0 @@ -adapter_khz 1000 - -interface ftdi -ftdi_vid_pid 0x0403 0x6010 -ftdi_oscan1_mode off - -## bindto 0.0.0.0 can be used to cover all available interfaces. -## Uncomment bindto line to enable remote machine debug -bindto 0.0.0.0 - -## If ftdi_device_desc not specified, the device description is ignored during device selection. -## So if you want to specify a dedicated FTDI device, you can select following device description: -## "Dual RS232-HS" is for HummingBird Debugger V1 -## "USB <-> JTAG-DEBUGGER" is for HummingBird Debugger V2 -## Uncomment one which match your device description -# ftdi_device_desc "Dual RS232-HS" -# ftdi_device_desc "USB <-> JTAG-DEBUGGER" - -transport select jtag - -ftdi_layout_init 0x0008 0x001b -ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 -ftdi_layout_signal TCK -data 0x0001 -ftdi_layout_signal TDI -data 0x0002 -ftdi_layout_signal TDO -input 0x0004 -ftdi_layout_signal TMS -data 0x0008 -ftdi_layout_signal JTAG_SEL -data 0x0100 -oe 0x0100 - -set _CHIPNAME riscv -jtag newtap $_CHIPNAME cpu -irlen 5 - -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME riscv -chain-position $_TARGETNAME -$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1 - -set _FLASHNAME $_CHIPNAME.flash -# Please use Nuclei OpenOCD >= 2022.01 release version -flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETNAME -# Set the ILM space also as flash, to make sure it can be add breakpoint with hardware trigger -#flash bank onboard_ilm nuspi 0x80000000 0 0 0 $_TARGETNAME - -# Expose Nuclei self-defined CSRS -# See https://github.com/riscv/riscv-gnu-toolchain/issues/319#issuecomment-358397306 -# Then user can view the csr register value in gdb using: info reg csr775 for CSR MTVT(0x307) -riscv expose_csrs 416-496,770-800,835-850,1227-1231,1483-1486,1984-2032,2064-2070,2370-2380,2490-2500,4032-4040 - -init - -if {[ info exists pulse_srst]} { - ftdi_set_signal nSRST 0 - ftdi_set_signal nSRST z -} -halt -# We must turn on this because otherwise the IDE version debug cannot download the program into flash -flash protect 0 0 last off diff --git a/conf/demosoc/opensbi/demosoc.c b/conf/demosoc/opensbi/demosoc.c deleted file mode 100644 index 3d6ac0e..0000000 --- a/conf/demosoc/opensbi/demosoc.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2023 Nuclei System Technology or its affiliates. - * - * Authors: - * Huaqi Fang - */ - -#include -#include -#include -#include - -typedef struct { - uint32_t INPUT_VAL; - uint32_t INPUT_EN; - uint32_t OUTPUT_EN; - uint32_t OUTPUT_VAL; - uint32_t PULLUP_EN; - uint32_t DRIVE; - uint32_t RISE_IE; - uint32_t RISE_IP; - uint32_t FALL_IE; - uint32_t FALL_IP; - uint32_t HIGH_IE; - uint32_t HIGH_IP; - uint32_t LOW_IE; - uint32_t LOW_IP; - uint32_t IOF_EN; - uint32_t IOF_SEL; - uint32_t OUTPUT_XOR; -} GPIO_TypeDef; - -typedef enum iof_func { - IOF_SEL_GPIO = 0, - IOF_SEL_0 = 1, - IOF_SEL_1 = 2 -} IOF_FUNC; - -#ifndef __RARELY - #define __RARELY(exp) __builtin_expect((exp), 0) -#endif - -#define DEMOSOC_PERIPH_BASE (0x10000000UL) /*!< (Peripheral) Base Address */ -#define DEMOSOC_GPIO_BASE (DEMOSOC_PERIPH_BASE + 0x12000) /*!< (GPIO) Base Address */ -#define GPIO ((GPIO_TypeDef *) DEMOSOC_GPIO_BASE) - -#define NUCLEI_GPIO_IOF_UART0_MASK 0x00030000 -#define NUCLEI_GPIO_IOF_UART1_MASK 0x03000000 -#define NUCLEI_GPIO_IOF_QSPI2_MASK 0xFC000000 - -#define NUCLEI_GPIO_INPUT_EN_UART0_MASK 0x00010000 -#define NUCLEI_GPIO_INPUT_EN_UART1_MASK 0x01000000 -#define NUCLEI_GPIO_INPUT_EN_QSPI2_MASK 0x10000000 - -#define NUCLEI_GPIO_OUTPUT_EN_UART0_MASK 0x00020000 -#define NUCLEI_GPIO_OUTPUT_EN_UART1_MASK 0x02000000 -#define NUCLEI_GPIO_OUTPUT_EN_QSPI2_MASK 0xEC000000 - -#define NUCLEI_GPIO_IOF_MASK (NUCLEI_GPIO_IOF_UART0_MASK | \ - NUCLEI_GPIO_IOF_UART1_MASK | NUCLEI_GPIO_IOF_QSPI2_MASK) - -#define NUCLEI_GPIO_INPUT_EN_MASK (NUCLEI_GPIO_INPUT_EN_UART0_MASK | \ - NUCLEI_GPIO_INPUT_EN_UART1_MASK | NUCLEI_GPIO_INPUT_EN_QSPI2_MASK) - -#define NUCLEI_GPIO_OUTPUT_EN_MASK (NUCLEI_GPIO_OUTPUT_EN_UART0_MASK | \ - NUCLEI_GPIO_OUTPUT_EN_UART1_MASK | NUCLEI_GPIO_OUTPUT_EN_QSPI2_MASK) - -static const struct fdt_match nuclei_demosoc_match[] = { - { .compatible = "nuclei,demosoc" }, - { .compatible = "nuclei,demo-soc" }, - { }, -}; - -static int32_t gpio_iof_config(GPIO_TypeDef* gpio, uint32_t mask, IOF_FUNC func) -{ - if (__RARELY(gpio == NULL)) { - return -1; - } - switch (func) { - case IOF_SEL_GPIO: - gpio->IOF_EN &= ~mask; - break; - case IOF_SEL_0: - gpio->IOF_SEL &= ~mask; - gpio->IOF_EN |= mask; - break; - case IOF_SEL_1: - gpio->IOF_SEL |= mask; - gpio->IOF_EN |= mask; - break; - default: - break; - } - return 0; -} - -static int32_t gpio_enable_output(GPIO_TypeDef* gpio, uint32_t mask) -{ - if (__RARELY(gpio == NULL)) { - return -1; - } - gpio->OUTPUT_EN |= mask; - gpio->INPUT_EN &= ~mask; - return 0; -} - -static int32_t gpio_enable_input(GPIO_TypeDef* gpio, uint32_t mask) -{ - if (__RARELY(gpio == NULL)) { - return -1; - } - gpio->INPUT_EN |= mask; - gpio->OUTPUT_EN &= ~mask; - return 0; -} - -static int nuclei_demosoc_early_init(bool cold_boot, - const struct fdt_match *match) -{ - if (cold_boot) { - // Enable pinmux for uart0/1 qspi2 - gpio_iof_config(GPIO, NUCLEI_GPIO_IOF_MASK, IOF_SEL_0); - gpio_enable_output(GPIO, NUCLEI_GPIO_OUTPUT_EN_MASK); - gpio_enable_input(GPIO, NUCLEI_GPIO_INPUT_EN_MASK); - } - - return 0; -} - -static int nuclei_demosoc_final_init(bool cold_boot, - const struct fdt_match *match) -{ - if (cold_boot) { // Add cold boot initial steps - } - - // Check mcfg_info.tee to see whether tee present - if (csr_read(0xfc2) & 0x1) { - // Enable U-Mode to access all regions by setting spmpcfg0 and spmpaddr0 - csr_write(0x1a0, 0x1f); - csr_write(0x1b0, 0xffffffff); - } - - return 0; -} - -const struct platform_override nuclei_demosoc = { - .match_table = nuclei_demosoc_match, - .early_init = nuclei_demosoc_early_init, - .final_init = nuclei_demosoc_final_init, -}; diff --git a/conf/demosoc/preramfs.sh b/conf/demosoc/preramfs.sh deleted file mode 100755 index 3265cd3..0000000 --- a/conf/demosoc/preramfs.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/env bash - -SOCCONF_DIR=$1 -ROOTFS_DIR=$2 -COPYLIST=$3 - -if [ "$#" -lt 2 ]; then - echo "Usage: $0 [Copy File List]" - exit 1 -fi - -echo "SOC Configuration Directory is ${SOCCONF_DIR}" -echo "Rootfs Directory is ${ROOTFS_DIR}" - -function copy_files() { - local copyfl=$1 - if [ "x$copyfl" == "x" ] ; then - echo "No copy file list specified" - return - fi - if [ ! -f $copyfl ] ; then - copyfl=${SOCCONF_DIR}/${copyfl} - if [ ! -f $copyfl ] ; then - echo "Can't find $copyfl, please check!" - return - fi - fi - while read -r src dst - do - if [ "x$src" == "x" ] ; then - continue - fi - if [ "x$dst" == "x" ] ; then - dst=root - fi - if [[ ! -f $src ]] && [[ ! -d $src ]]; then - src=${SOCCONF_DIR}/$src - if [[ ! -f $src ]] && [[ ! -d $src ]]; then - continue - fi - fi - dstdir=${ROOTFS_DIR}/$dst - mkdir -p $dstdir - echo "Copy $src to $dstdir" - if [ -f $src ] ; then - cp -f $src $dstdir - else - cp -rf $src $dstdir - fi - done < $copyfl -} - -# do copy files specified in $COPYLIST -# $COPYLIST is a file, format as follow -# src dst -copy_files $COPYLIST - -# TODO: You can add your extra operations here - -exit 0 diff --git a/conf/demosoc/uboot.cmd b/conf/demosoc/uboot.cmd deleted file mode 100644 index e368e96..0000000 --- a/conf/demosoc/uboot.cmd +++ /dev/null @@ -1,18 +0,0 @@ -test -z "${bootloc}" && setenv bootloc . -test -z "${kernelimg}" && setenv kernelimg ${bootloc}/uImage.lz4 -test -z "${rootfsimg}" && setenv rootfsimg ${bootloc}/uInitrd.lz4 -test -z "${dtbimg}" && setenv dtbimg ${bootloc}/kernel.dtb - -echo "Boot images located in ${bootloc}" -echo "Loading kernel: ${kernelimg}" -fatload mmc 0 0xa3000000 ${kernelimg} -echo "Loading ramdisk: ${rootfsimg}" -fatload mmc 0 0xa8300000 ${rootfsimg} -if test -e mmc 0 ${dtbimg} ; then - echo "Loading dtb: ${dtbimg}" - fatload mmc 0 0xa8000000 ${dtbimg} -else - echo "${dtbimg} not found, ignore it" -fi -echo "Starts booting from SD" -bootm 0xa3000000 0xa8300000 0xa8000000 diff --git a/conf/demosoc/uboot_rv64imac_flash_config b/conf/demosoc/uboot_rv64imac_flash_config deleted file mode 100644 index 03446b7..0000000 --- a/conf/demosoc/uboot_rv64imac_flash_config +++ /dev/null @@ -1,45 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_NR_DRAM_BANKS=1 -CONFIG_ENV_SIZE=0x20000 -CONFIG_TEXT_BASE=0xA0200000 -CONFIG_SYS_LOAD_ADDR=0xA0200000 -CONFIG_TARGET_NUCLEI_GENERIC_SOC=y -CONFIG_ARCH_RV64I=y -CONFIG_CMODEL_MEDANY=y -CONFIG_RISCV_SMODE=y -# CONFIG_RISCV_ISA_F is not set -CONFIG_SHOW_REGS=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xA0200000 -CONFIG_FIT=y -CONFIG_BOOTCOMMAND="bootm 0xA3000000 0xA8300000 0xA8000000" -CONFIG_LOG_MAX_LEVEL=8 -CONFIG_LOG_DEFAULT_LEVEL=6 -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_EVENT=y -CONFIG_EVENT_DYNAMIC=y -CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_CMD_LSBLK=y -CONFIG_CMD_MTD=y -CONFIG_CMD_SF_TEST=y -CONFIG_CMD_SPI=y -CONFIG_CMD_MTDPARTS=y -CONFIG_CMD_LOG=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_DM_MTD=y -CONFIG_SPI_FLASH_ATMEL=y -CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_GIGADEVICE=y -CONFIG_SPI_FLASH_MACRONIX=y -CONFIG_SPI_FLASH_SPANSION=y -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_SST=y -CONFIG_SPI_FLASH_WINBOND=y -# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set -# CONFIG_NETDEVICES is not set -CONFIG_FAT_WRITE=y -CONFIG_HEXDUMP=y -# CONFIG_EFI_LOADER is not set diff --git a/conf/demosoc/uboot_rv64imac_sd_config b/conf/demosoc/uboot_rv64imac_sd_config deleted file mode 100644 index 73a357c..0000000 --- a/conf/demosoc/uboot_rv64imac_sd_config +++ /dev/null @@ -1,44 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_NR_DRAM_BANKS=1 -CONFIG_ENV_SIZE=0x20000 -CONFIG_TEXT_BASE=0xA0200000 -CONFIG_SYS_LOAD_ADDR=0xA0200000 -CONFIG_TARGET_NUCLEI_GENERIC_SOC=y -CONFIG_ARCH_RV64I=y -CONFIG_CMODEL_MEDANY=y -CONFIG_RISCV_SMODE=y -# CONFIG_RISCV_ISA_F is not set -CONFIG_SHOW_REGS=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xA0200000 -CONFIG_FIT=y -CONFIG_LOG_MAX_LEVEL=8 -CONFIG_LOG_DEFAULT_LEVEL=6 -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_EVENT=y -CONFIG_EVENT_DYNAMIC=y -CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_CMD_LSBLK=y -CONFIG_CMD_MTD=y -CONFIG_CMD_SF_TEST=y -CONFIG_CMD_SPI=y -CONFIG_CMD_MTDPARTS=y -CONFIG_CMD_LOG=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_DM_MTD=y -CONFIG_SPI_FLASH_ATMEL=y -CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_GIGADEVICE=y -CONFIG_SPI_FLASH_MACRONIX=y -CONFIG_SPI_FLASH_SPANSION=y -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_SST=y -CONFIG_SPI_FLASH_WINBOND=y -# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set -# CONFIG_NETDEVICES is not set -CONFIG_FAT_WRITE=y -CONFIG_HEXDUMP=y -# CONFIG_EFI_LOADER is not set diff --git a/conf/demosoc/uboot_rv64imafdc_flash_config b/conf/demosoc/uboot_rv64imafdc_flash_config deleted file mode 100644 index 0dc8049..0000000 --- a/conf/demosoc/uboot_rv64imafdc_flash_config +++ /dev/null @@ -1,44 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_NR_DRAM_BANKS=1 -CONFIG_ENV_SIZE=0x20000 -CONFIG_TEXT_BASE=0xA0200000 -CONFIG_SYS_LOAD_ADDR=0xA0200000 -CONFIG_TARGET_NUCLEI_GENERIC_SOC=y -CONFIG_ARCH_RV64I=y -CONFIG_CMODEL_MEDANY=y -CONFIG_RISCV_SMODE=y -CONFIG_SHOW_REGS=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xA0200000 -CONFIG_FIT=y -CONFIG_BOOTCOMMAND="bootm 0xA3000000 0xA8300000 0xA8000000" -CONFIG_LOG_MAX_LEVEL=8 -CONFIG_LOG_DEFAULT_LEVEL=6 -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_EVENT=y -CONFIG_EVENT_DYNAMIC=y -CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_CMD_LSBLK=y -CONFIG_CMD_MTD=y -CONFIG_CMD_SF_TEST=y -CONFIG_CMD_SPI=y -CONFIG_CMD_MTDPARTS=y -CONFIG_CMD_LOG=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_DM_MTD=y -CONFIG_SPI_FLASH_ATMEL=y -CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_GIGADEVICE=y -CONFIG_SPI_FLASH_MACRONIX=y -CONFIG_SPI_FLASH_SPANSION=y -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_SST=y -CONFIG_SPI_FLASH_WINBOND=y -# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set -# CONFIG_NETDEVICES is not set -CONFIG_FAT_WRITE=y -CONFIG_HEXDUMP=y -# CONFIG_EFI_LOADER is not set diff --git a/conf/demosoc/uboot_rv64imafdc_sd_config b/conf/demosoc/uboot_rv64imafdc_sd_config deleted file mode 100644 index 3254476..0000000 --- a/conf/demosoc/uboot_rv64imafdc_sd_config +++ /dev/null @@ -1,43 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_NR_DRAM_BANKS=1 -CONFIG_ENV_SIZE=0x20000 -CONFIG_TEXT_BASE=0xA0200000 -CONFIG_SYS_LOAD_ADDR=0xA0200000 -CONFIG_TARGET_NUCLEI_GENERIC_SOC=y -CONFIG_ARCH_RV64I=y -CONFIG_CMODEL_MEDANY=y -CONFIG_RISCV_SMODE=y -CONFIG_SHOW_REGS=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xA0200000 -CONFIG_FIT=y -CONFIG_LOG_MAX_LEVEL=8 -CONFIG_LOG_DEFAULT_LEVEL=6 -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_EVENT=y -CONFIG_EVENT_DYNAMIC=y -CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_CMD_LSBLK=y -CONFIG_CMD_MTD=y -CONFIG_CMD_SF_TEST=y -CONFIG_CMD_SPI=y -CONFIG_CMD_MTDPARTS=y -CONFIG_CMD_LOG=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_DM_MTD=y -CONFIG_SPI_FLASH_ATMEL=y -CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_GIGADEVICE=y -CONFIG_SPI_FLASH_MACRONIX=y -CONFIG_SPI_FLASH_SPANSION=y -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_SST=y -CONFIG_SPI_FLASH_WINBOND=y -# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set -# CONFIG_NETDEVICES is not set -CONFIG_FAT_WRITE=y -CONFIG_HEXDUMP=y -# CONFIG_EFI_LOADER is not set