|
| 1 | +/* |
| 2 | + * SPDX-License-Identifier: Apache-2.0 |
| 3 | + * Copyright 2024 CISPA Helmholtz Center for Information Security |
| 4 | + */ |
| 5 | + |
| 6 | +#include <freq.h> |
| 7 | + |
| 8 | +/* |
| 9 | + * CVA6 SoC without CPU, which comes in 32 and 64 bit variants |
| 10 | + */ |
| 11 | +/ { |
| 12 | + #address-cells = <0x01>; |
| 13 | + #size-cells = <0x01>; |
| 14 | + |
| 15 | + clocks { |
| 16 | + |
| 17 | + clk_cpu { |
| 18 | + #clock-cells = <0x00>; |
| 19 | + clock-frequency = <DT_FREQ_M(50)>; |
| 20 | + compatible = "fixed-clock"; |
| 21 | + }; |
| 22 | + |
| 23 | + clk_bus: clk_bus_0 { |
| 24 | + #clock-cells = <0x00>; |
| 25 | + clock-frequency = <DT_FREQ_M(50)>; |
| 26 | + compatible = "fixed-clock"; |
| 27 | + }; |
| 28 | + }; |
| 29 | + |
| 30 | + soc { |
| 31 | + #address-cells = <0x01>; |
| 32 | + #size-cells = <0x01>; |
| 33 | + ranges; |
| 34 | + |
| 35 | + /* Xilinx MIG memory controller */ |
| 36 | + memory0: memory@80000000 { |
| 37 | + device_type = "memory"; |
| 38 | + reg = <0x80000000 0x40000000>; |
| 39 | + status = "okay"; |
| 40 | + }; |
| 41 | + |
| 42 | + /* RISC-V Platform-level interrupt controller */ |
| 43 | + plic: interrupt-controller@c000000 { |
| 44 | + compatible = "sifive,plic-1.0.0"; |
| 45 | + #address-cells = <0>; |
| 46 | + #interrupt-cells = <2>; |
| 47 | + interrupt-controller; |
| 48 | + interrupts-extended = <&hlic 11 &hlic 9>; |
| 49 | + reg = <0x0c000000 0x4000000>; |
| 50 | + riscv,max-priority = <7>; |
| 51 | + riscv,ndev = <30>; |
| 52 | + status = "okay"; |
| 53 | + }; |
| 54 | + |
| 55 | + /* USB UART */ |
| 56 | + uart0: serial@10000000 { |
| 57 | + clock-frequency = <50000000>; |
| 58 | + clocks = <&clk_bus>; |
| 59 | + compatible = "ns16550"; |
| 60 | + current-speed = <115200>; |
| 61 | + device_type = "serial"; |
| 62 | + reg = <0x10000000 0x10000>; |
| 63 | + reg-shift = <0x02>; |
| 64 | + parity = "none"; |
| 65 | + stop-bits = "1"; |
| 66 | + data-bits = <8>; |
| 67 | + interrupt-parent = <&plic>; |
| 68 | + interrupts = <1 0x04>; |
| 69 | + status = "disabled"; |
| 70 | + }; |
| 71 | + |
| 72 | + /* SPI controller, connected to SD card */ |
| 73 | + spi0: axi_quad_spi@20000000 { |
| 74 | + #address-cells = <1>; |
| 75 | + #size-cells = <0>; |
| 76 | + compatible = "xlnx,xps-spi-2.00.a"; |
| 77 | + reg = <0x20000000 0x10000>; |
| 78 | + xlnx,num-ss-bits = <0x01>; |
| 79 | + xlnx,num-transfer-bits = <0x8>; |
| 80 | + interrupts=<2 0x2>; |
| 81 | + interrupt-parent=<&plic>; |
| 82 | + clocks=<&clk_bus>; |
| 83 | + status = "disabled"; |
| 84 | + }; |
| 85 | + |
| 86 | + /* |
| 87 | + * Core-local interrupt controller according to RISC-V spec |
| 88 | + */ |
| 89 | + clint: clint@2000000 { |
| 90 | + compatible = "sifive,clint0"; |
| 91 | + reg = <0x2000000 0x40000>; |
| 92 | + interrupts-extended = <&hlic 3 &hlic 7>; |
| 93 | + status = "disabled"; |
| 94 | + }; |
| 95 | + |
| 96 | + /* |
| 97 | + * Xilinx AXI DMA. |
| 98 | + * Part of the Xilinx AXI Ethernet Subsystem. |
| 99 | + * Only on CISPA board. |
| 100 | + */ |
| 101 | + dma0: dma@41e00000 { |
| 102 | + #dma-cells = <0x01>; |
| 103 | + clock-frequency = <DT_FREQ_M(50)>; |
| 104 | + clock-names = "s_axi_lite_aclk"; |
| 105 | + clocks = <&clk_bus>; |
| 106 | + compatible = "xlnx,eth-dma"; |
| 107 | + reg = <0x41e00000 0x10000>; |
| 108 | + xlnx,addrwidth = <0x40>; |
| 109 | + xlnx,include-dre; |
| 110 | + xlnx,num-queues = <0x1>; |
| 111 | + interrupt-parent = <&plic>; |
| 112 | + // TX - RX |
| 113 | + // active-high level-triggered |
| 114 | + interrupts = <8 4>, <9 4>; |
| 115 | + // TX and RX |
| 116 | + dma-channels = <2>; |
| 117 | + status = "disabled"; |
| 118 | + }; |
| 119 | + |
| 120 | + /* |
| 121 | + * LowRISC ethernet subsystem. |
| 122 | + * Only on OpenHW Group board. |
| 123 | + */ |
| 124 | + eth: lowrisc-eth@30000000 { |
| 125 | + compatible = "lowrisc-eth"; |
| 126 | + device_type = "network"; |
| 127 | + interrupt-parent = <&plic>; |
| 128 | + interrupts = <3 0>; |
| 129 | + reg = <0x0 0x30000000 0x0 0x8000>; |
| 130 | + status = "disabled"; |
| 131 | + }; |
| 132 | + |
| 133 | + /* Xilinx GPIO, connected to LEDs */ |
| 134 | + xlnx_gpio: gpio@40000000 { |
| 135 | + #gpio-cells = <2>; |
| 136 | + compatible = "xlnx,xps-gpio-1.00.a"; |
| 137 | + gpio-controller ; |
| 138 | + reg = <0x0 0x40000000 0x0 0x10000 >; |
| 139 | + xlnx,all-inputs = <0x0>; |
| 140 | + xlnx,all-inputs-2 = <0x0>; |
| 141 | + xlnx,dout-default = <0x0>; |
| 142 | + xlnx,dout-default-2 = <0x0>; |
| 143 | + xlnx,gpio-width = <0x8>; |
| 144 | + xlnx,gpio2-width = <0x8>; |
| 145 | + xlnx,is-dual = <0x1>; |
| 146 | + xlnx,tri-default = <0xffffffff>; |
| 147 | + xlnx,tri-default-2 = <0xffffffff>; |
| 148 | + status = "disabled"; |
| 149 | + }; |
| 150 | + }; |
| 151 | +}; |
0 commit comments