|
| 1 | +/* |
| 2 | + * Copyright (c) 2021-2025 ATL Electronics |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#include <freq.h> |
| 8 | +#include <mem.h> |
| 9 | + |
| 10 | +/ { |
| 11 | + #address-cells = <1>; |
| 12 | + #size-cells = <1>; |
| 13 | + |
| 14 | + cpus { |
| 15 | + #address-cells = <1>; |
| 16 | + #size-cells = <0>; |
| 17 | + |
| 18 | + cpu0: cpu@0 { |
| 19 | + device_type = "cpu"; |
| 20 | + compatible = "sifive,e24", "riscv"; |
| 21 | + reg = <0>; |
| 22 | + riscv,isa = "rv32imafcb"; |
| 23 | + hardware-exec-breakpoint-count = <4>; |
| 24 | + status = "okay"; |
| 25 | + |
| 26 | + ictrl: interrupt-controller { |
| 27 | + #address-cells = <0>; |
| 28 | + #interrupt-cells = <1>; |
| 29 | + compatible = "riscv,cpu-intc"; |
| 30 | + interrupt-controller; |
| 31 | + }; |
| 32 | + }; |
| 33 | + }; |
| 34 | + |
| 35 | + soc { |
| 36 | + compatible = "simple-bus"; |
| 37 | + #address-cells = <1>; |
| 38 | + #size-cells = <1>; |
| 39 | + ranges; |
| 40 | + |
| 41 | + clic: clic@2000000 { |
| 42 | + compatible = "sifive,clint0"; |
| 43 | + reg = <0x2000000 0x10000>; |
| 44 | + #address-cells = <0>; |
| 45 | + #interrupt-cells = <2>; |
| 46 | + |
| 47 | + interrupt-controller; |
| 48 | + interrupts-extended = <&ictrl 3 &ictrl 7 &ictrl 11 &ictrl 12>; |
| 49 | + interrupt-names = "msip", /* Machine Software Interrupt */ |
| 50 | + "mtip", /* Machine Timer interrupt */ |
| 51 | + "meip", /* Machine External Interrupt */ |
| 52 | + "csip"; /* CLIC Software Interrupt */ |
| 53 | + }; |
| 54 | + |
| 55 | + mtimer: timer@200bff8 { |
| 56 | + compatible = "riscv,machine-timer"; |
| 57 | + reg = <0x200bff8 0x8 0x2004000 0x8>; |
| 58 | + reg-names = "mtime", "mtimecmp"; |
| 59 | + |
| 60 | + interrupts-extended = <&ictrl 7>; |
| 61 | + }; |
| 62 | + |
| 63 | + spi0: spi@4000a200 { |
| 64 | + compatible = "bflb,spi"; |
| 65 | + reg = <0x4000a200 0x100>; |
| 66 | + #address-cells = <1>; |
| 67 | + #size-cells = <0>; |
| 68 | + status = "disabled"; |
| 69 | + |
| 70 | + peripheral-id = <0>; |
| 71 | + interrupts = <27 0>; |
| 72 | + interrupt-parent = <&ictrl>; |
| 73 | + }; |
| 74 | + |
| 75 | + spi1: spi@4000b000 { |
| 76 | + compatible = "bflb,qspi"; |
| 77 | + reg = <0x4000b000 0x1000>; |
| 78 | + #address-cells = <1>; |
| 79 | + #size-cells = <0>; |
| 80 | + status = "disabled"; |
| 81 | + |
| 82 | + peripheral-id = <0>; |
| 83 | + interrupts = <23 0>; |
| 84 | + interrupt-parent = <&ictrl>; |
| 85 | + }; |
| 86 | + |
| 87 | + retram: memory@40010000 { |
| 88 | + compatible = "mmio-sram"; |
| 89 | + reg = <0x40010000 DT_SIZE_K(4)>; |
| 90 | + }; |
| 91 | + |
| 92 | + itcm: itcm@22010000 { |
| 93 | + compatible = "zephyr,memory-region", "sifive,dtim0"; |
| 94 | + reg = <0x22010000 DT_SIZE_K(16)>; |
| 95 | + zephyr,memory-region = "ITCM"; |
| 96 | + }; |
| 97 | + |
| 98 | + dtcm: dtcm@42014000 { |
| 99 | + compatible = "zephyr,memory-region", "sifive,dtim0"; |
| 100 | + reg = <0x42014000 DT_SIZE_K(48)>; |
| 101 | + zephyr,memory-region = "DTCM"; |
| 102 | + }; |
| 103 | + |
| 104 | + sram0: memory@42020000 { |
| 105 | + compatible = "mmio-sram"; |
| 106 | + reg = <0x42020000 DT_SIZE_K(64)>; |
| 107 | + }; |
| 108 | + |
| 109 | + sram1: memory@42030000 { |
| 110 | + compatible = "mmio-sram"; |
| 111 | + reg = <0x42030000 DT_SIZE_K(112)>; |
| 112 | + }; |
| 113 | + }; |
| 114 | +}; |
0 commit comments