1/* 2 * Copyright (c) 2021 Katsuhiro Suzuki 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/dt-bindings/gpio/gpio.h> 8#include <freq.h> 9 10/ { 11 #address-cells = <2>; 12 #size-cells = <2>; 13 compatible = "sifive,FU740-C000", "fu740-dev", "sifive-dev"; 14 model = "sifive,FU740"; 15 16 clocks { 17 coreclk: core-clk { 18 #clock-cells = <0>; 19 compatible = "fixed-clock"; 20 clock-frequency = <DT_FREQ_M(1000)>; 21 }; 22 23 pclk: p-clk { 24 #clock-cells = <0>; 25 compatible = "fixed-clock"; 26 clock-frequency = <DT_FREQ_K(125125)>; 27 }; 28 }; 29 30 cpus { 31 #address-cells = <1>; 32 #size-cells = <0>; 33 34 cpu0: cpu@0 { 35 compatible = "sifive,s7", "riscv"; 36 device_type = "cpu"; 37 reg = <0>; 38 riscv,isa = "rv64imac_zicsr_zifencei"; 39 status = "okay"; 40 41 hlic0: interrupt-controller { 42 compatible = "riscv,cpu-intc"; 43 #address-cells = <0>; 44 #interrupt-cells = <1>; 45 interrupt-controller; 46 }; 47 }; 48 cpu1: cpu@1 { 49 compatible = "sifive,u74", "riscv"; 50 device_type = "cpu"; 51 mmu-type = "riscv,sv39"; 52 reg = <0x1>; 53 riscv,isa = "rv64gc"; 54 55 hlic1: interrupt-controller { 56 compatible = "riscv,cpu-intc"; 57 #address-cells = <0>; 58 #interrupt-cells = <1>; 59 interrupt-controller; 60 }; 61 }; 62 cpu2: cpu@2 { 63 compatible = "sifive,u74", "riscv"; 64 device_type = "cpu"; 65 mmu-type = "riscv,sv39"; 66 reg = <0x2>; 67 riscv,isa = "rv64gc"; 68 69 hlic2: interrupt-controller { 70 compatible = "riscv,cpu-intc"; 71 #address-cells = <0>; 72 #interrupt-cells = <1>; 73 interrupt-controller; 74 }; 75 }; 76 cpu3: cpu@3 { 77 compatible = "sifive,u74", "riscv"; 78 device_type = "cpu"; 79 mmu-type = "riscv,sv39"; 80 reg = <0x3>; 81 riscv,isa = "rv64gc"; 82 83 hlic3: interrupt-controller { 84 compatible = "riscv,cpu-intc"; 85 #address-cells = <0>; 86 #interrupt-cells = <1>; 87 interrupt-controller; 88 }; 89 }; 90 cpu4: cpu@4 { 91 compatible = "sifive,u74", "riscv"; 92 device_type = "cpu"; 93 mmu-type = "riscv,sv39"; 94 reg = <0x4>; 95 riscv,isa = "rv64gc"; 96 97 hlic4: interrupt-controller { 98 compatible = "riscv,cpu-intc"; 99 #address-cells = <0>; 100 #interrupt-cells = <1>; 101 interrupt-controller; 102 }; 103 }; 104 }; 105 106 soc { 107 #address-cells = <2>; 108 #size-cells = <2>; 109 compatible = "fu740-soc", "sifive-soc", "simple-bus"; 110 ranges; 111 112 modeselect: rom@1000 { 113 compatible = "sifive,modeselect0"; 114 reg = <0x0 0x1000 0x0 0x1000>; 115 reg-names = "mem"; 116 }; 117 118 maskrom: rom@10000 { 119 compatible = "sifive,maskrom0"; 120 reg = <0x0 0x10000 0x0 0x8000>; 121 reg-names = "mem"; 122 }; 123 124 dtim: dtim@1000000 { 125 compatible = "sifive,dtim0"; 126 reg = <0x0 0x1000000 0x0 0x2000>; 127 reg-names = "mem"; 128 }; 129 130 clint: clint@2000000 { 131 compatible = "sifive,clint0"; 132 interrupts-extended = <&hlic0 3 &hlic0 7 133 &hlic1 3 &hlic1 7 134 &hlic2 3 &hlic2 7 135 &hlic3 3 &hlic3 7 136 &hlic4 3 &hlic4 7>; 137 reg = <0x0 0x2000000 0x0 0x10000>; 138 }; 139 140 l2lim: l2lim@8000000 { 141 compatible = "sifive,l2lim0"; 142 reg = <0x0 0x8000000 0x0 0x200000>; 143 reg-names = "mem"; 144 }; 145 146 147 plic: interrupt-controller@c000000 { 148 compatible = "sifive,plic-1.0.0"; 149 #address-cells = <0>; 150 #interrupt-cells = <2>; 151 interrupt-controller; 152 interrupts-extended = <&hlic0 11 153 &hlic1 11 154 &hlic2 11 155 &hlic3 11 156 &hlic4 11>; 157 reg = <0x0 0x0c000000 0x0 0x04000000>; 158 riscv,max-priority = <7>; 159 riscv,ndev = <52>; 160 }; 161 162 uart0: serial@10010000 { 163 compatible = "sifive,uart0"; 164 interrupt-parent = <&plic>; 165 interrupts = <39 1>; 166 reg = <0x0 0x10010000 0x0 0x1000>; 167 reg-names = "control"; 168 status = "disabled"; 169 }; 170 171 uart1: serial@10011000 { 172 compatible = "sifive,uart0"; 173 interrupt-parent = <&plic>; 174 interrupts = <40 1>; 175 reg = <0x0 0x10011000 0x0 0x1000>; 176 reg-names = "control"; 177 status = "disabled"; 178 }; 179 180 spi0: spi@10040000 { 181 compatible = "sifive,spi0"; 182 interrupt-parent = <&plic>; 183 interrupts = <41 1>; 184 reg = <0x0 0x10040000 0x0 0x1000 0x0 0x20000000 0x0 0x10000000>; 185 reg-names = "control", "mem"; 186 status = "disabled"; 187 #address-cells = <1>; 188 #size-cells = <0>; 189 }; 190 191 spi1: spi@10041000 { 192 compatible = "sifive,spi0"; 193 interrupt-parent = <&plic>; 194 interrupts = <42 1>; 195 reg = <0x0 0x10041000 0x0 0x1000>; 196 reg-names = "control"; 197 status = "disabled"; 198 #address-cells = <1>; 199 #size-cells = <0>; 200 }; 201 202 spi2: spi@10050000 { 203 compatible = "sifive,spi0"; 204 interrupt-parent = <&plic>; 205 interrupts = <43 1>; 206 reg = <0x0 0x10050000 0x0 0x1000>; 207 reg-names = "control"; 208 status = "disabled"; 209 #address-cells = <1>; 210 #size-cells = <0>; 211 }; 212 dmc: dmc@100b0000 { 213 compatible = "sifive,fu740-c000-ddr"; 214 reg = <0x0 0x100b0000 0x0 0x0800 215 0x0 0x100b2000 0x0 0x2000 216 0x0 0x100b8000 0x0 0x1000>; 217 status = "disabled"; 218 }; 219 }; 220}; 221