1*c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ 2*c66ec88fSEmmanuel Vadot/* 3*c66ec88fSEmmanuel Vadot * Copyright (C) 2019 Sean Anderson <seanga2@gmail.com> 4*c66ec88fSEmmanuel Vadot * Copyright (C) 2020 Western Digital Corporation or its affiliates. 5*c66ec88fSEmmanuel Vadot */ 6*c66ec88fSEmmanuel Vadot#include <dt-bindings/clock/k210-clk.h> 7*c66ec88fSEmmanuel Vadot 8*c66ec88fSEmmanuel Vadot/ { 9*c66ec88fSEmmanuel Vadot /* 10*c66ec88fSEmmanuel Vadot * Although the K210 is a 64-bit CPU, the address bus is only 32-bits 11*c66ec88fSEmmanuel Vadot * wide, and the upper half of all addresses is ignored. 12*c66ec88fSEmmanuel Vadot */ 13*c66ec88fSEmmanuel Vadot #address-cells = <1>; 14*c66ec88fSEmmanuel Vadot #size-cells = <1>; 15*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210"; 16*c66ec88fSEmmanuel Vadot 17*c66ec88fSEmmanuel Vadot aliases { 18*c66ec88fSEmmanuel Vadot serial0 = &uarths0; 19*c66ec88fSEmmanuel Vadot }; 20*c66ec88fSEmmanuel Vadot 21*c66ec88fSEmmanuel Vadot /* 22*c66ec88fSEmmanuel Vadot * The K210 has an sv39 MMU following the priviledge specification v1.9. 23*c66ec88fSEmmanuel Vadot * Since this is a non-ratified draft specification, the kernel does not 24*c66ec88fSEmmanuel Vadot * support it and the K210 support enabled only for the !MMU case. 25*c66ec88fSEmmanuel Vadot * Be consistent with this by setting the CPUs MMU type to "none". 26*c66ec88fSEmmanuel Vadot */ 27*c66ec88fSEmmanuel Vadot cpus { 28*c66ec88fSEmmanuel Vadot #address-cells = <1>; 29*c66ec88fSEmmanuel Vadot #size-cells = <0>; 30*c66ec88fSEmmanuel Vadot timebase-frequency = <7800000>; 31*c66ec88fSEmmanuel Vadot cpu0: cpu@0 { 32*c66ec88fSEmmanuel Vadot device_type = "cpu"; 33*c66ec88fSEmmanuel Vadot reg = <0>; 34*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210", "sifive,rocket0", "riscv"; 35*c66ec88fSEmmanuel Vadot riscv,isa = "rv64imafdc"; 36*c66ec88fSEmmanuel Vadot mmu-type = "none"; 37*c66ec88fSEmmanuel Vadot i-cache-size = <0x8000>; 38*c66ec88fSEmmanuel Vadot i-cache-block-size = <64>; 39*c66ec88fSEmmanuel Vadot d-cache-size = <0x8000>; 40*c66ec88fSEmmanuel Vadot d-cache-block-size = <64>; 41*c66ec88fSEmmanuel Vadot clocks = <&sysctl K210_CLK_CPU>; 42*c66ec88fSEmmanuel Vadot clock-frequency = <390000000>; 43*c66ec88fSEmmanuel Vadot cpu0_intc: interrupt-controller { 44*c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 45*c66ec88fSEmmanuel Vadot interrupt-controller; 46*c66ec88fSEmmanuel Vadot compatible = "riscv,cpu-intc"; 47*c66ec88fSEmmanuel Vadot }; 48*c66ec88fSEmmanuel Vadot }; 49*c66ec88fSEmmanuel Vadot cpu1: cpu@1 { 50*c66ec88fSEmmanuel Vadot device_type = "cpu"; 51*c66ec88fSEmmanuel Vadot reg = <1>; 52*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210", "sifive,rocket0", "riscv"; 53*c66ec88fSEmmanuel Vadot riscv,isa = "rv64imafdc"; 54*c66ec88fSEmmanuel Vadot mmu-type = "none"; 55*c66ec88fSEmmanuel Vadot i-cache-size = <0x8000>; 56*c66ec88fSEmmanuel Vadot i-cache-block-size = <64>; 57*c66ec88fSEmmanuel Vadot d-cache-size = <0x8000>; 58*c66ec88fSEmmanuel Vadot d-cache-block-size = <64>; 59*c66ec88fSEmmanuel Vadot clocks = <&sysctl K210_CLK_CPU>; 60*c66ec88fSEmmanuel Vadot clock-frequency = <390000000>; 61*c66ec88fSEmmanuel Vadot cpu1_intc: interrupt-controller { 62*c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 63*c66ec88fSEmmanuel Vadot interrupt-controller; 64*c66ec88fSEmmanuel Vadot compatible = "riscv,cpu-intc"; 65*c66ec88fSEmmanuel Vadot }; 66*c66ec88fSEmmanuel Vadot }; 67*c66ec88fSEmmanuel Vadot }; 68*c66ec88fSEmmanuel Vadot 69*c66ec88fSEmmanuel Vadot sram: memory@80000000 { 70*c66ec88fSEmmanuel Vadot device_type = "memory"; 71*c66ec88fSEmmanuel Vadot reg = <0x80000000 0x400000>, 72*c66ec88fSEmmanuel Vadot <0x80400000 0x200000>, 73*c66ec88fSEmmanuel Vadot <0x80600000 0x200000>; 74*c66ec88fSEmmanuel Vadot reg-names = "sram0", "sram1", "aisram"; 75*c66ec88fSEmmanuel Vadot }; 76*c66ec88fSEmmanuel Vadot 77*c66ec88fSEmmanuel Vadot clocks { 78*c66ec88fSEmmanuel Vadot in0: oscillator { 79*c66ec88fSEmmanuel Vadot compatible = "fixed-clock"; 80*c66ec88fSEmmanuel Vadot #clock-cells = <0>; 81*c66ec88fSEmmanuel Vadot clock-frequency = <26000000>; 82*c66ec88fSEmmanuel Vadot }; 83*c66ec88fSEmmanuel Vadot }; 84*c66ec88fSEmmanuel Vadot 85*c66ec88fSEmmanuel Vadot soc { 86*c66ec88fSEmmanuel Vadot #address-cells = <1>; 87*c66ec88fSEmmanuel Vadot #size-cells = <1>; 88*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210-soc", "simple-bus"; 89*c66ec88fSEmmanuel Vadot ranges; 90*c66ec88fSEmmanuel Vadot interrupt-parent = <&plic0>; 91*c66ec88fSEmmanuel Vadot 92*c66ec88fSEmmanuel Vadot sysctl: sysctl@50440000 { 93*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210-sysctl", "simple-mfd"; 94*c66ec88fSEmmanuel Vadot reg = <0x50440000 0x1000>; 95*c66ec88fSEmmanuel Vadot #clock-cells = <1>; 96*c66ec88fSEmmanuel Vadot }; 97*c66ec88fSEmmanuel Vadot 98*c66ec88fSEmmanuel Vadot clint0: clint@2000000 { 99*c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 100*c66ec88fSEmmanuel Vadot compatible = "riscv,clint0"; 101*c66ec88fSEmmanuel Vadot reg = <0x2000000 0xC000>; 102*c66ec88fSEmmanuel Vadot interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 103*c66ec88fSEmmanuel Vadot &cpu1_intc 3 &cpu1_intc 7>; 104*c66ec88fSEmmanuel Vadot clocks = <&sysctl K210_CLK_ACLK>; 105*c66ec88fSEmmanuel Vadot }; 106*c66ec88fSEmmanuel Vadot 107*c66ec88fSEmmanuel Vadot plic0: interrupt-controller@c000000 { 108*c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 109*c66ec88fSEmmanuel Vadot interrupt-controller; 110*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210-plic0", "riscv,plic0"; 111*c66ec88fSEmmanuel Vadot reg = <0xC000000 0x4000000>; 112*c66ec88fSEmmanuel Vadot interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 0xffffffff>, 113*c66ec88fSEmmanuel Vadot <&cpu1_intc 11>, <&cpu1_intc 0xffffffff>; 114*c66ec88fSEmmanuel Vadot riscv,ndev = <65>; 115*c66ec88fSEmmanuel Vadot riscv,max-priority = <7>; 116*c66ec88fSEmmanuel Vadot }; 117*c66ec88fSEmmanuel Vadot 118*c66ec88fSEmmanuel Vadot uarths0: serial@38000000 { 119*c66ec88fSEmmanuel Vadot compatible = "kendryte,k210-uarths", "sifive,uart0"; 120*c66ec88fSEmmanuel Vadot reg = <0x38000000 0x1000>; 121*c66ec88fSEmmanuel Vadot interrupts = <33>; 122*c66ec88fSEmmanuel Vadot clocks = <&sysctl K210_CLK_CPU>; 123*c66ec88fSEmmanuel Vadot }; 124*c66ec88fSEmmanuel Vadot }; 125*c66ec88fSEmmanuel Vadot}; 126