1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright (C) 2019-20 Sean Anderson <seanga2 4 * Copyright (C) 2020 Western Digital Corporat 5 */ 6 #include <dt-bindings/clock/k210-clk.h> 7 #include <dt-bindings/pinctrl/k210-fpioa.h> 8 #include <dt-bindings/reset/k210-rst.h> 9 10 / { 11 /* 12 * Although the K210 is a 64-bit CPU, 13 * wide, and the upper half of all add 14 */ 15 #address-cells = <1>; 16 #size-cells = <1>; 17 compatible = "canaan,kendryte-k210"; 18 19 /* 20 * The K210 has an sv39 MMU following 21 * Since this is a non-ratified draft 22 * support it and the K210 support ena 23 * Be consistent with this by setting 24 */ 25 cpus { 26 #address-cells = <1>; 27 #size-cells = <0>; 28 timebase-frequency = <7800000> 29 cpu0: cpu@0 { 30 device_type = "cpu"; 31 compatible = "canaan,k 32 reg = <0>; 33 riscv,isa = "rv64imafd 34 mmu-type = "riscv,none 35 i-cache-block-size = < 36 i-cache-size = <0x8000 37 d-cache-block-size = < 38 d-cache-size = <0x8000 39 cpu0_intc: interrupt-c 40 #interrupt-cel 41 interrupt-cont 42 compatible = " 43 }; 44 }; 45 cpu1: cpu@1 { 46 device_type = "cpu"; 47 compatible = "canaan,k 48 reg = <1>; 49 riscv,isa = "rv64imafd 50 mmu-type = "riscv,none 51 i-cache-block-size = < 52 i-cache-size = <0x8000 53 d-cache-block-size = < 54 d-cache-size = <0x8000 55 cpu1_intc: interrupt-c 56 #interrupt-cel 57 interrupt-cont 58 compatible = " 59 }; 60 }; 61 62 cpu-map { 63 cluster0 { 64 core0 { 65 cpu = 66 }; 67 68 core1 { 69 cpu = 70 }; 71 }; 72 }; 73 }; 74 75 sram: memory@80000000 { 76 device_type = "memory"; 77 reg = <0x80000000 0x400000>, / 78 <0x80400000 0x200000>, / 79 <0x80600000 0x200000>; / 80 }; 81 82 sram_controller: memory-controller { 83 compatible = "canaan,k210-sram 84 clocks = <&sysclk K210_CLK_SRA 85 <&sysclk K210_CLK_SRA 86 <&sysclk K210_CLK_AI> 87 clock-names = "sram0", "sram1" 88 }; 89 90 clocks { 91 in0: oscillator { 92 compatible = "fixed-cl 93 #clock-cells = <0>; 94 clock-frequency = <260 95 }; 96 }; 97 98 soc { 99 #address-cells = <1>; 100 #size-cells = <1>; 101 compatible = "simple-bus"; 102 ranges; 103 interrupt-parent = <&plic0>; 104 105 rom0: nvmem@1000 { 106 reg = <0x1000 0x1000>; 107 read-only; 108 }; 109 110 clint0: timer@2000000 { 111 compatible = "canaan,k 112 reg = <0x2000000 0xC00 113 interrupts-extended = 114 115 }; 116 117 plic0: interrupt-controller@c0 118 #interrupt-cells = <1> 119 #address-cells = <0>; 120 compatible = "canaan,k 121 reg = <0xC000000 0x400 122 interrupt-controller; 123 interrupts-extended = 124 125 riscv,ndev = <65>; 126 }; 127 128 uarths0: serial@38000000 { 129 compatible = "canaan,k 130 reg = <0x38000000 0x10 131 interrupts = <33>; 132 clocks = <&sysclk K210 133 status = "disabled"; 134 }; 135 136 gpio0: gpio-controller@3800100 137 #interrupt-cells = <2> 138 #gpio-cells = <2>; 139 compatible = "canaan,k 140 reg = <0x38001000 0x10 141 interrupt-controller; 142 interrupts = <34>, <35 143 <41>, <42 144 <48>, <49 145 <55>, <56 146 <62>, <63 147 gpio-controller; 148 ngpios = <32>; 149 status = "disabled"; 150 }; 151 152 dmac0: dma-controller@50000000 153 compatible = "snps,axi 154 reg = <0x50000000 0x10 155 interrupts = <27>, <28 156 #dma-cells = <1>; 157 clocks = <&sysclk K210 158 clock-names = "core-cl 159 resets = <&sysrst K210 160 dma-channels = <6>; 161 snps,dma-masters = <2> 162 snps,priority = <0 1 2 163 snps,data-width = <5>; 164 snps,block-size = <0x2 165 0x2 166 snps,axi-max-burst-len 167 }; 168 169 apb0: bus@50200000 { 170 #address-cells = <1>; 171 #size-cells = <1>; 172 compatible = "simple-p 173 ranges = <0x50200000 0 174 clocks = <&sysclk K210 175 176 gpio1: gpio@50200000 { 177 #address-cells 178 #size-cells = 179 compatible = " 180 reg = <0x50200 181 clocks = <&sys 182 <&sys 183 clock-names = 184 resets = <&sys 185 status = "disa 186 187 gpio1_0: gpio- 188 #gpio- 189 #inter 190 compat 191 reg = 192 interr 193 interr 194 gpio-c 195 ngpios 196 }; 197 }; 198 199 uart1: serial@50210000 200 compatible = " 201 reg = <0x50210 202 interrupts = < 203 clocks = <&sys 204 <&sys 205 clock-names = 206 resets = <&sys 207 reg-io-width = 208 reg-shift = <2 209 dcd-override; 210 dsr-override; 211 cts-override; 212 ri-override; 213 status = "disa 214 }; 215 216 uart2: serial@50220000 217 compatible = " 218 reg = <0x50220 219 interrupts = < 220 clocks = <&sys 221 <&sys 222 clock-names = 223 resets = <&sys 224 reg-io-width = 225 reg-shift = <2 226 dcd-override; 227 dsr-override; 228 cts-override; 229 ri-override; 230 status = "disa 231 }; 232 233 uart3: serial@50230000 234 compatible = " 235 reg = <0x50230 236 interrupts = < 237 clocks = <&sys 238 <&sys 239 clock-names = 240 resets = <&sys 241 reg-io-width = 242 reg-shift = <2 243 dcd-override; 244 dsr-override; 245 cts-override; 246 ri-override; 247 status = "disa 248 }; 249 250 spi2: spi@50240000 { 251 compatible = " 252 spi-slave; 253 reg = <0x50240 254 #address-cells 255 #size-cells = 256 interrupts = < 257 clocks = <&sys 258 <&sys 259 clock-names = 260 resets = <&sys 261 status = "disa 262 }; 263 264 i2s0: i2s@50250000 { 265 compatible = " 266 reg = <0x50250 267 interrupts = < 268 clocks = <&sys 269 clock-names = 270 resets = <&sys 271 status = "disa 272 }; 273 274 i2s1: i2s@50260000 { 275 compatible = " 276 reg = <0x50260 277 interrupts = < 278 clocks = <&sys 279 clock-names = 280 resets = <&sys 281 status = "disa 282 }; 283 284 i2s2: i2s@50270000 { 285 compatible = " 286 reg = <0x50270 287 interrupts = < 288 clocks = <&sys 289 clock-names = 290 resets = <&sys 291 status = "disa 292 }; 293 294 i2c0: i2c@50280000 { 295 compatible = " 296 reg = <0x50280 297 interrupts = < 298 clocks = <&sys 299 <&sys 300 clock-names = 301 resets = <&sys 302 status = "disa 303 }; 304 305 i2c1: i2c@50290000 { 306 compatible = " 307 reg = <0x50290 308 interrupts = < 309 clocks = <&sys 310 <&sys 311 clock-names = 312 resets = <&sys 313 status = "disa 314 }; 315 316 i2c2: i2c@502a0000 { 317 compatible = " 318 reg = <0x502A0 319 interrupts = < 320 clocks = <&sys 321 <&sys 322 clock-names = 323 resets = <&sys 324 status = "disa 325 }; 326 327 fpioa: pinmux@502b0000 328 compatible = " 329 reg = <0x502B0 330 clocks = <&sys 331 <&sys 332 clock-names = 333 resets = <&sys 334 canaan,k210-sy 335 }; 336 337 timer0: timer@502d0000 338 compatible = " 339 reg = <0x502D0 340 interrupts = < 341 clocks = <&sys 342 <&sys 343 clock-names = 344 resets = <&sys 345 }; 346 347 timer1: timer@502d0014 348 compatible = " 349 reg = <0x502D0 350 interrupts = < 351 clocks = <&sys 352 <&sys 353 clock-names = 354 resets = <&sys 355 }; 356 357 timer2: timer@502e0000 358 compatible = " 359 reg = <0x502E0 360 interrupts = < 361 clocks = <&sys 362 <&sys 363 clock-names = 364 resets = <&sys 365 }; 366 367 timer3: timer@502e0014 368 compatible = " 369 reg = <0x502E0 370 interrupts = < 371 clocks = <&sys 372 <&sys 373 clock-names = 374 resets = <&sys 375 }; 376 377 timer4: timer@502f0000 378 compatible = " 379 reg = <0x502F0 380 interrupts = < 381 clocks = <&sys 382 <&sys 383 clock-names = 384 resets = <&sys 385 }; 386 387 timer5: timer@502f0014 388 compatible = " 389 reg = <0x502F0 390 interrupts = < 391 clocks = <&sys 392 <&sys 393 clock-names = 394 resets = <&sys 395 }; 396 }; 397 398 apb1: bus@50400000 { 399 #address-cells = <1>; 400 #size-cells = <1>; 401 compatible = "simple-p 402 ranges = <0x50400000 0 403 clocks = <&sysclk K210 404 405 wdt0: watchdog@5040000 406 compatible = " 407 reg = <0x50400 408 interrupts = < 409 clocks = <&sys 410 <&sys 411 clock-names = 412 resets = <&sys 413 }; 414 415 wdt1: watchdog@5041000 416 compatible = " 417 reg = <0x50410 418 interrupts = < 419 clocks = <&sys 420 <&sys 421 clock-names = 422 resets = <&sys 423 }; 424 425 sysctl: syscon@5044000 426 compatible = " 427 " 428 reg = <0x50440 429 clocks = <&sys 430 clock-names = 431 432 sysclk: clock- 433 #clock 434 compat 435 clocks 436 }; 437 438 sysrst: reset- 439 compat 440 #reset 441 }; 442 443 reboot: syscon 444 compat 445 regmap 446 offset 447 mask = 448 value 449 }; 450 }; 451 }; 452 453 apb2: bus@52000000 { 454 #address-cells = <1>; 455 #size-cells = <1>; 456 compatible = "simple-p 457 ranges = <0x52000000 0 458 clocks = <&sysclk K210 459 460 spi0: spi@52000000 { 461 #address-cells 462 #size-cells = 463 compatible = " 464 reg = <0x52000 465 interrupts = < 466 clocks = <&sys 467 <&sys 468 clock-names = 469 resets = <&sys 470 reset-names = 471 num-cs = <4>; 472 reg-io-width = 473 status = "disa 474 }; 475 476 spi1: spi@53000000 { 477 #address-cells 478 #size-cells = 479 compatible = " 480 reg = <0x53000 481 interrupts = < 482 clocks = <&sys 483 <&sys 484 clock-names = 485 resets = <&sys 486 reset-names = 487 num-cs = <4>; 488 reg-io-width = 489 status = "disa 490 }; 491 492 spi3: spi@54000000 { 493 #address-cells 494 #size-cells = 495 compatible = " 496 reg = <0x54000 497 interrupts = < 498 clocks = <&sys 499 <&sys 500 clock-names = 501 resets = <&sys 502 reset-names = 503 504 num-cs = <4>; 505 reg-io-width = 506 status = "disa 507 }; 508 }; 509 }; 510 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.