1*077e5f4fSSamuel Holland// SPDX-License-Identifier: (GPL-2.0+ or MIT) 2*077e5f4fSSamuel Holland// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org> 3*077e5f4fSSamuel Holland 4*077e5f4fSSamuel Holland#define SOC_PERIPHERAL_IRQ(nr) (nr + 16) 5*077e5f4fSSamuel Holland 6*077e5f4fSSamuel Holland#include "sunxi-d1s-t113.dtsi" 7*077e5f4fSSamuel Holland 8*077e5f4fSSamuel Holland/ { 9*077e5f4fSSamuel Holland cpus { 10*077e5f4fSSamuel Holland timebase-frequency = <24000000>; 11*077e5f4fSSamuel Holland #address-cells = <1>; 12*077e5f4fSSamuel Holland #size-cells = <0>; 13*077e5f4fSSamuel Holland 14*077e5f4fSSamuel Holland cpu0: cpu@0 { 15*077e5f4fSSamuel Holland compatible = "thead,c906", "riscv"; 16*077e5f4fSSamuel Holland device_type = "cpu"; 17*077e5f4fSSamuel Holland reg = <0>; 18*077e5f4fSSamuel Holland clocks = <&ccu CLK_RISCV>; 19*077e5f4fSSamuel Holland d-cache-block-size = <64>; 20*077e5f4fSSamuel Holland d-cache-sets = <256>; 21*077e5f4fSSamuel Holland d-cache-size = <32768>; 22*077e5f4fSSamuel Holland i-cache-block-size = <64>; 23*077e5f4fSSamuel Holland i-cache-sets = <128>; 24*077e5f4fSSamuel Holland i-cache-size = <32768>; 25*077e5f4fSSamuel Holland mmu-type = "riscv,sv39"; 26*077e5f4fSSamuel Holland operating-points-v2 = <&opp_table_cpu>; 27*077e5f4fSSamuel Holland riscv,isa = "rv64imafdc"; 28*077e5f4fSSamuel Holland #cooling-cells = <2>; 29*077e5f4fSSamuel Holland 30*077e5f4fSSamuel Holland cpu0_intc: interrupt-controller { 31*077e5f4fSSamuel Holland compatible = "riscv,cpu-intc"; 32*077e5f4fSSamuel Holland interrupt-controller; 33*077e5f4fSSamuel Holland #address-cells = <0>; 34*077e5f4fSSamuel Holland #interrupt-cells = <1>; 35*077e5f4fSSamuel Holland }; 36*077e5f4fSSamuel Holland }; 37*077e5f4fSSamuel Holland }; 38*077e5f4fSSamuel Holland 39*077e5f4fSSamuel Holland opp_table_cpu: opp-table-cpu { 40*077e5f4fSSamuel Holland compatible = "operating-points-v2"; 41*077e5f4fSSamuel Holland 42*077e5f4fSSamuel Holland opp-408000000 { 43*077e5f4fSSamuel Holland opp-hz = /bits/ 64 <408000000>; 44*077e5f4fSSamuel Holland opp-microvolt = <900000 900000 1100000>; 45*077e5f4fSSamuel Holland }; 46*077e5f4fSSamuel Holland 47*077e5f4fSSamuel Holland opp-1080000000 { 48*077e5f4fSSamuel Holland opp-hz = /bits/ 64 <1008000000>; 49*077e5f4fSSamuel Holland opp-microvolt = <900000 900000 1100000>; 50*077e5f4fSSamuel Holland }; 51*077e5f4fSSamuel Holland }; 52*077e5f4fSSamuel Holland 53*077e5f4fSSamuel Holland soc { 54*077e5f4fSSamuel Holland interrupt-parent = <&plic>; 55*077e5f4fSSamuel Holland 56*077e5f4fSSamuel Holland riscv_wdt: watchdog@6011000 { 57*077e5f4fSSamuel Holland compatible = "allwinner,sun20i-d1-wdt"; 58*077e5f4fSSamuel Holland reg = <0x6011000 0x20>; 59*077e5f4fSSamuel Holland interrupts = <SOC_PERIPHERAL_IRQ(131) IRQ_TYPE_LEVEL_HIGH>; 60*077e5f4fSSamuel Holland clocks = <&dcxo>, <&rtc CLK_OSC32K>; 61*077e5f4fSSamuel Holland clock-names = "hosc", "losc"; 62*077e5f4fSSamuel Holland }; 63*077e5f4fSSamuel Holland 64*077e5f4fSSamuel Holland plic: interrupt-controller@10000000 { 65*077e5f4fSSamuel Holland compatible = "allwinner,sun20i-d1-plic", 66*077e5f4fSSamuel Holland "thead,c900-plic"; 67*077e5f4fSSamuel Holland reg = <0x10000000 0x4000000>; 68*077e5f4fSSamuel Holland interrupts-extended = <&cpu0_intc 11>, 69*077e5f4fSSamuel Holland <&cpu0_intc 9>; 70*077e5f4fSSamuel Holland interrupt-controller; 71*077e5f4fSSamuel Holland riscv,ndev = <175>; 72*077e5f4fSSamuel Holland #address-cells = <0>; 73*077e5f4fSSamuel Holland #interrupt-cells = <2>; 74*077e5f4fSSamuel Holland }; 75*077e5f4fSSamuel Holland }; 76*077e5f4fSSamuel Holland}; 77