1*5def4c47SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ 2*5def4c47SEmmanuel Vadot/* 3*5def4c47SEmmanuel Vadot * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 4*5def4c47SEmmanuel Vadot * Copyright (C) 2020 Western Digital Corporation or its affiliates. 5*5def4c47SEmmanuel Vadot */ 6*5def4c47SEmmanuel Vadot#include <dt-bindings/clock/k210-clk.h> 7*5def4c47SEmmanuel Vadot#include <dt-bindings/pinctrl/k210-fpioa.h> 8*5def4c47SEmmanuel Vadot#include <dt-bindings/reset/k210-rst.h> 9*5def4c47SEmmanuel Vadot 10*5def4c47SEmmanuel Vadot/ { 11*5def4c47SEmmanuel Vadot /* 12*5def4c47SEmmanuel Vadot * Although the K210 is a 64-bit CPU, the address bus is only 32-bits 13*5def4c47SEmmanuel Vadot * wide, and the upper half of all addresses is ignored. 14*5def4c47SEmmanuel Vadot */ 15*5def4c47SEmmanuel Vadot #address-cells = <1>; 16*5def4c47SEmmanuel Vadot #size-cells = <1>; 17*5def4c47SEmmanuel Vadot compatible = "canaan,kendryte-k210"; 18*5def4c47SEmmanuel Vadot 19*5def4c47SEmmanuel Vadot aliases { 20*5def4c47SEmmanuel Vadot serial0 = &uarths0; 21*5def4c47SEmmanuel Vadot serial1 = &uart1; 22*5def4c47SEmmanuel Vadot serial2 = &uart2; 23*5def4c47SEmmanuel Vadot serial3 = &uart3; 24*5def4c47SEmmanuel Vadot }; 25*5def4c47SEmmanuel Vadot 26*5def4c47SEmmanuel Vadot /* 27*5def4c47SEmmanuel Vadot * The K210 has an sv39 MMU following the privileged specification v1.9. 28*5def4c47SEmmanuel Vadot * Since this is a non-ratified draft specification, the kernel does not 29*5def4c47SEmmanuel Vadot * support it and the K210 support enabled only for the !MMU case. 30*5def4c47SEmmanuel Vadot * Be consistent with this by setting the CPUs MMU type to "none". 31*5def4c47SEmmanuel Vadot */ 32*5def4c47SEmmanuel Vadot cpus { 33*5def4c47SEmmanuel Vadot #address-cells = <1>; 34*5def4c47SEmmanuel Vadot #size-cells = <0>; 35*5def4c47SEmmanuel Vadot timebase-frequency = <7800000>; 36*5def4c47SEmmanuel Vadot cpu0: cpu@0 { 37*5def4c47SEmmanuel Vadot device_type = "cpu"; 38*5def4c47SEmmanuel Vadot compatible = "canaan,k210", "riscv"; 39*5def4c47SEmmanuel Vadot reg = <0>; 40*5def4c47SEmmanuel Vadot riscv,isa = "rv64imafdc"; 41*5def4c47SEmmanuel Vadot mmu-type = "riscv,none"; 42*5def4c47SEmmanuel Vadot i-cache-block-size = <64>; 43*5def4c47SEmmanuel Vadot i-cache-size = <0x8000>; 44*5def4c47SEmmanuel Vadot d-cache-block-size = <64>; 45*5def4c47SEmmanuel Vadot d-cache-size = <0x8000>; 46*5def4c47SEmmanuel Vadot cpu0_intc: interrupt-controller { 47*5def4c47SEmmanuel Vadot #interrupt-cells = <1>; 48*5def4c47SEmmanuel Vadot interrupt-controller; 49*5def4c47SEmmanuel Vadot compatible = "riscv,cpu-intc"; 50*5def4c47SEmmanuel Vadot }; 51*5def4c47SEmmanuel Vadot }; 52*5def4c47SEmmanuel Vadot cpu1: cpu@1 { 53*5def4c47SEmmanuel Vadot device_type = "cpu"; 54*5def4c47SEmmanuel Vadot compatible = "canaan,k210", "riscv"; 55*5def4c47SEmmanuel Vadot reg = <1>; 56*5def4c47SEmmanuel Vadot riscv,isa = "rv64imafdc"; 57*5def4c47SEmmanuel Vadot mmu-type = "riscv,none"; 58*5def4c47SEmmanuel Vadot i-cache-block-size = <64>; 59*5def4c47SEmmanuel Vadot i-cache-size = <0x8000>; 60*5def4c47SEmmanuel Vadot d-cache-block-size = <64>; 61*5def4c47SEmmanuel Vadot d-cache-size = <0x8000>; 62*5def4c47SEmmanuel Vadot cpu1_intc: interrupt-controller { 63*5def4c47SEmmanuel Vadot #interrupt-cells = <1>; 64*5def4c47SEmmanuel Vadot interrupt-controller; 65*5def4c47SEmmanuel Vadot compatible = "riscv,cpu-intc"; 66*5def4c47SEmmanuel Vadot }; 67*5def4c47SEmmanuel Vadot }; 68*5def4c47SEmmanuel Vadot }; 69*5def4c47SEmmanuel Vadot 70*5def4c47SEmmanuel Vadot sram: memory@80000000 { 71*5def4c47SEmmanuel Vadot device_type = "memory"; 72*5def4c47SEmmanuel Vadot compatible = "canaan,k210-sram"; 73*5def4c47SEmmanuel Vadot reg = <0x80000000 0x400000>, 74*5def4c47SEmmanuel Vadot <0x80400000 0x200000>, 75*5def4c47SEmmanuel Vadot <0x80600000 0x200000>; 76*5def4c47SEmmanuel Vadot reg-names = "sram0", "sram1", "aisram"; 77*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SRAM0>, 78*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_SRAM1>, 79*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_AI>; 80*5def4c47SEmmanuel Vadot clock-names = "sram0", "sram1", "aisram"; 81*5def4c47SEmmanuel Vadot }; 82*5def4c47SEmmanuel Vadot 83*5def4c47SEmmanuel Vadot clocks { 84*5def4c47SEmmanuel Vadot in0: oscillator { 85*5def4c47SEmmanuel Vadot compatible = "fixed-clock"; 86*5def4c47SEmmanuel Vadot #clock-cells = <0>; 87*5def4c47SEmmanuel Vadot clock-frequency = <26000000>; 88*5def4c47SEmmanuel Vadot }; 89*5def4c47SEmmanuel Vadot }; 90*5def4c47SEmmanuel Vadot 91*5def4c47SEmmanuel Vadot soc { 92*5def4c47SEmmanuel Vadot #address-cells = <1>; 93*5def4c47SEmmanuel Vadot #size-cells = <1>; 94*5def4c47SEmmanuel Vadot compatible = "simple-bus"; 95*5def4c47SEmmanuel Vadot ranges; 96*5def4c47SEmmanuel Vadot interrupt-parent = <&plic0>; 97*5def4c47SEmmanuel Vadot 98*5def4c47SEmmanuel Vadot rom0: nvmem@1000 { 99*5def4c47SEmmanuel Vadot reg = <0x1000 0x1000>; 100*5def4c47SEmmanuel Vadot read-only; 101*5def4c47SEmmanuel Vadot }; 102*5def4c47SEmmanuel Vadot 103*5def4c47SEmmanuel Vadot clint0: timer@2000000 { 104*5def4c47SEmmanuel Vadot compatible = "canaan,k210-clint", "sifive,clint0"; 105*5def4c47SEmmanuel Vadot reg = <0x2000000 0xC000>; 106*5def4c47SEmmanuel Vadot interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 107*5def4c47SEmmanuel Vadot &cpu1_intc 3 &cpu1_intc 7>; 108*5def4c47SEmmanuel Vadot }; 109*5def4c47SEmmanuel Vadot 110*5def4c47SEmmanuel Vadot plic0: interrupt-controller@c000000 { 111*5def4c47SEmmanuel Vadot #interrupt-cells = <1>; 112*5def4c47SEmmanuel Vadot #address-cells = <0>; 113*5def4c47SEmmanuel Vadot compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; 114*5def4c47SEmmanuel Vadot reg = <0xC000000 0x4000000>; 115*5def4c47SEmmanuel Vadot interrupt-controller; 116*5def4c47SEmmanuel Vadot interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>; 117*5def4c47SEmmanuel Vadot riscv,ndev = <65>; 118*5def4c47SEmmanuel Vadot }; 119*5def4c47SEmmanuel Vadot 120*5def4c47SEmmanuel Vadot uarths0: serial@38000000 { 121*5def4c47SEmmanuel Vadot compatible = "canaan,k210-uarths", "sifive,uart0"; 122*5def4c47SEmmanuel Vadot reg = <0x38000000 0x1000>; 123*5def4c47SEmmanuel Vadot interrupts = <33>; 124*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_CPU>; 125*5def4c47SEmmanuel Vadot }; 126*5def4c47SEmmanuel Vadot 127*5def4c47SEmmanuel Vadot gpio0: gpio-controller@38001000 { 128*5def4c47SEmmanuel Vadot #interrupt-cells = <2>; 129*5def4c47SEmmanuel Vadot #gpio-cells = <2>; 130*5def4c47SEmmanuel Vadot compatible = "canaan,k210-gpiohs", "sifive,gpio0"; 131*5def4c47SEmmanuel Vadot reg = <0x38001000 0x1000>; 132*5def4c47SEmmanuel Vadot interrupt-controller; 133*5def4c47SEmmanuel Vadot interrupts = <34 35 36 37 38 39 40 41 134*5def4c47SEmmanuel Vadot 42 43 44 45 46 47 48 49 135*5def4c47SEmmanuel Vadot 50 51 52 53 54 55 56 57 136*5def4c47SEmmanuel Vadot 58 59 60 61 62 63 64 65>; 137*5def4c47SEmmanuel Vadot gpio-controller; 138*5def4c47SEmmanuel Vadot ngpios = <32>; 139*5def4c47SEmmanuel Vadot }; 140*5def4c47SEmmanuel Vadot 141*5def4c47SEmmanuel Vadot dmac0: dma-controller@50000000 { 142*5def4c47SEmmanuel Vadot compatible = "snps,axi-dma-1.01a"; 143*5def4c47SEmmanuel Vadot reg = <0x50000000 0x1000>; 144*5def4c47SEmmanuel Vadot interrupts = <27 28 29 30 31 32>; 145*5def4c47SEmmanuel Vadot #dma-cells = <1>; 146*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>; 147*5def4c47SEmmanuel Vadot clock-names = "core-clk", "cfgr-clk"; 148*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_DMA>; 149*5def4c47SEmmanuel Vadot dma-channels = <6>; 150*5def4c47SEmmanuel Vadot snps,dma-masters = <2>; 151*5def4c47SEmmanuel Vadot snps,priority = <0 1 2 3 4 5>; 152*5def4c47SEmmanuel Vadot snps,data-width = <5>; 153*5def4c47SEmmanuel Vadot snps,block-size = <0x200000 0x200000 0x200000 154*5def4c47SEmmanuel Vadot 0x200000 0x200000 0x200000>; 155*5def4c47SEmmanuel Vadot snps,axi-max-burst-len = <256>; 156*5def4c47SEmmanuel Vadot }; 157*5def4c47SEmmanuel Vadot 158*5def4c47SEmmanuel Vadot apb0: bus@50200000 { 159*5def4c47SEmmanuel Vadot #address-cells = <1>; 160*5def4c47SEmmanuel Vadot #size-cells = <1>; 161*5def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 162*5def4c47SEmmanuel Vadot ranges; 163*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB0>; 164*5def4c47SEmmanuel Vadot 165*5def4c47SEmmanuel Vadot gpio1: gpio@50200000 { 166*5def4c47SEmmanuel Vadot #address-cells = <1>; 167*5def4c47SEmmanuel Vadot #size-cells = <0>; 168*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-gpio"; 169*5def4c47SEmmanuel Vadot reg = <0x50200000 0x80>; 170*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB0>, 171*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_GPIO>; 172*5def4c47SEmmanuel Vadot clock-names = "bus", "db"; 173*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_GPIO>; 174*5def4c47SEmmanuel Vadot 175*5def4c47SEmmanuel Vadot gpio1_0: gpio-port@0 { 176*5def4c47SEmmanuel Vadot #gpio-cells = <2>; 177*5def4c47SEmmanuel Vadot #interrupt-cells = <2>; 178*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 179*5def4c47SEmmanuel Vadot reg = <0>; 180*5def4c47SEmmanuel Vadot interrupt-controller; 181*5def4c47SEmmanuel Vadot interrupts = <23>; 182*5def4c47SEmmanuel Vadot gpio-controller; 183*5def4c47SEmmanuel Vadot ngpios = <8>; 184*5def4c47SEmmanuel Vadot }; 185*5def4c47SEmmanuel Vadot }; 186*5def4c47SEmmanuel Vadot 187*5def4c47SEmmanuel Vadot uart1: serial@50210000 { 188*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 189*5def4c47SEmmanuel Vadot reg = <0x50210000 0x100>; 190*5def4c47SEmmanuel Vadot interrupts = <11>; 191*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART1>, 192*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 193*5def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 194*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART1>; 195*5def4c47SEmmanuel Vadot reg-io-width = <4>; 196*5def4c47SEmmanuel Vadot reg-shift = <2>; 197*5def4c47SEmmanuel Vadot dcd-override; 198*5def4c47SEmmanuel Vadot dsr-override; 199*5def4c47SEmmanuel Vadot cts-override; 200*5def4c47SEmmanuel Vadot ri-override; 201*5def4c47SEmmanuel Vadot }; 202*5def4c47SEmmanuel Vadot 203*5def4c47SEmmanuel Vadot uart2: serial@50220000 { 204*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 205*5def4c47SEmmanuel Vadot reg = <0x50220000 0x100>; 206*5def4c47SEmmanuel Vadot interrupts = <12>; 207*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART2>, 208*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 209*5def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 210*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART2>; 211*5def4c47SEmmanuel Vadot reg-io-width = <4>; 212*5def4c47SEmmanuel Vadot reg-shift = <2>; 213*5def4c47SEmmanuel Vadot dcd-override; 214*5def4c47SEmmanuel Vadot dsr-override; 215*5def4c47SEmmanuel Vadot cts-override; 216*5def4c47SEmmanuel Vadot ri-override; 217*5def4c47SEmmanuel Vadot }; 218*5def4c47SEmmanuel Vadot 219*5def4c47SEmmanuel Vadot uart3: serial@50230000 { 220*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 221*5def4c47SEmmanuel Vadot reg = <0x50230000 0x100>; 222*5def4c47SEmmanuel Vadot interrupts = <13>; 223*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART3>, 224*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 225*5def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 226*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART3>; 227*5def4c47SEmmanuel Vadot reg-io-width = <4>; 228*5def4c47SEmmanuel Vadot reg-shift = <2>; 229*5def4c47SEmmanuel Vadot dcd-override; 230*5def4c47SEmmanuel Vadot dsr-override; 231*5def4c47SEmmanuel Vadot cts-override; 232*5def4c47SEmmanuel Vadot ri-override; 233*5def4c47SEmmanuel Vadot }; 234*5def4c47SEmmanuel Vadot 235*5def4c47SEmmanuel Vadot spi2: spi@50240000 { 236*5def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 237*5def4c47SEmmanuel Vadot spi-slave; 238*5def4c47SEmmanuel Vadot reg = <0x50240000 0x100>; 239*5def4c47SEmmanuel Vadot #address-cells = <0>; 240*5def4c47SEmmanuel Vadot #size-cells = <0>; 241*5def4c47SEmmanuel Vadot interrupts = <3>; 242*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI2>, 243*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 244*5def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 245*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI2>; 246*5def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 247*5def4c47SEmmanuel Vadot }; 248*5def4c47SEmmanuel Vadot 249*5def4c47SEmmanuel Vadot i2s0: i2s@50250000 { 250*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 251*5def4c47SEmmanuel Vadot reg = <0x50250000 0x200>; 252*5def4c47SEmmanuel Vadot interrupts = <5>; 253*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S0>; 254*5def4c47SEmmanuel Vadot clock-names = "i2sclk"; 255*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S0>; 256*5def4c47SEmmanuel Vadot }; 257*5def4c47SEmmanuel Vadot 258*5def4c47SEmmanuel Vadot i2s1: i2s@50260000 { 259*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 260*5def4c47SEmmanuel Vadot reg = <0x50260000 0x200>; 261*5def4c47SEmmanuel Vadot interrupts = <6>; 262*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S1>; 263*5def4c47SEmmanuel Vadot clock-names = "i2sclk"; 264*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S1>; 265*5def4c47SEmmanuel Vadot }; 266*5def4c47SEmmanuel Vadot 267*5def4c47SEmmanuel Vadot i2s2: i2s@50270000 { 268*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 269*5def4c47SEmmanuel Vadot reg = <0x50270000 0x200>; 270*5def4c47SEmmanuel Vadot interrupts = <7>; 271*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S2>; 272*5def4c47SEmmanuel Vadot clock-names = "i2sclk"; 273*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S2>; 274*5def4c47SEmmanuel Vadot }; 275*5def4c47SEmmanuel Vadot 276*5def4c47SEmmanuel Vadot i2c0: i2c@50280000 { 277*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 278*5def4c47SEmmanuel Vadot reg = <0x50280000 0x100>; 279*5def4c47SEmmanuel Vadot interrupts = <8>; 280*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C0>, 281*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 282*5def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 283*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C0>; 284*5def4c47SEmmanuel Vadot }; 285*5def4c47SEmmanuel Vadot 286*5def4c47SEmmanuel Vadot i2c1: i2c@50290000 { 287*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 288*5def4c47SEmmanuel Vadot reg = <0x50290000 0x100>; 289*5def4c47SEmmanuel Vadot interrupts = <9>; 290*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C1>, 291*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 292*5def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 293*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C1>; 294*5def4c47SEmmanuel Vadot }; 295*5def4c47SEmmanuel Vadot 296*5def4c47SEmmanuel Vadot i2c2: i2c@502a0000 { 297*5def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 298*5def4c47SEmmanuel Vadot reg = <0x502A0000 0x100>; 299*5def4c47SEmmanuel Vadot interrupts = <10>; 300*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C2>, 301*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 302*5def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 303*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C2>; 304*5def4c47SEmmanuel Vadot }; 305*5def4c47SEmmanuel Vadot 306*5def4c47SEmmanuel Vadot fpioa: pinmux@502b0000 { 307*5def4c47SEmmanuel Vadot compatible = "canaan,k210-fpioa"; 308*5def4c47SEmmanuel Vadot reg = <0x502B0000 0x100>; 309*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_FPIOA>, 310*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 311*5def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 312*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_FPIOA>; 313*5def4c47SEmmanuel Vadot canaan,k210-sysctl-power = <&sysctl 108>; 314*5def4c47SEmmanuel Vadot }; 315*5def4c47SEmmanuel Vadot 316*5def4c47SEmmanuel Vadot timer0: timer@502d0000 { 317*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 318*5def4c47SEmmanuel Vadot reg = <0x502D0000 0x100>; 319*5def4c47SEmmanuel Vadot interrupts = <14 15>; 320*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER0>, 321*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 322*5def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 323*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER0>; 324*5def4c47SEmmanuel Vadot }; 325*5def4c47SEmmanuel Vadot 326*5def4c47SEmmanuel Vadot timer1: timer@502e0000 { 327*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 328*5def4c47SEmmanuel Vadot reg = <0x502E0000 0x100>; 329*5def4c47SEmmanuel Vadot interrupts = <16 17>; 330*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER1>, 331*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 332*5def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 333*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER1>; 334*5def4c47SEmmanuel Vadot }; 335*5def4c47SEmmanuel Vadot 336*5def4c47SEmmanuel Vadot timer2: timer@502f0000 { 337*5def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 338*5def4c47SEmmanuel Vadot reg = <0x502F0000 0x100>; 339*5def4c47SEmmanuel Vadot interrupts = <18 19>; 340*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER2>, 341*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 342*5def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 343*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER2>; 344*5def4c47SEmmanuel Vadot }; 345*5def4c47SEmmanuel Vadot }; 346*5def4c47SEmmanuel Vadot 347*5def4c47SEmmanuel Vadot apb1: bus@50400000 { 348*5def4c47SEmmanuel Vadot #address-cells = <1>; 349*5def4c47SEmmanuel Vadot #size-cells = <1>; 350*5def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 351*5def4c47SEmmanuel Vadot ranges; 352*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB1>; 353*5def4c47SEmmanuel Vadot 354*5def4c47SEmmanuel Vadot wdt0: watchdog@50400000 { 355*5def4c47SEmmanuel Vadot compatible = "snps,dw-wdt"; 356*5def4c47SEmmanuel Vadot reg = <0x50400000 0x100>; 357*5def4c47SEmmanuel Vadot interrupts = <21>; 358*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_WDT0>, 359*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB1>; 360*5def4c47SEmmanuel Vadot clock-names = "tclk", "pclk"; 361*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_WDT0>; 362*5def4c47SEmmanuel Vadot }; 363*5def4c47SEmmanuel Vadot 364*5def4c47SEmmanuel Vadot wdt1: watchdog@50410000 { 365*5def4c47SEmmanuel Vadot compatible = "snps,dw-wdt"; 366*5def4c47SEmmanuel Vadot reg = <0x50410000 0x100>; 367*5def4c47SEmmanuel Vadot interrupts = <22>; 368*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_WDT1>, 369*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB1>; 370*5def4c47SEmmanuel Vadot clock-names = "tclk", "pclk"; 371*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_WDT1>; 372*5def4c47SEmmanuel Vadot }; 373*5def4c47SEmmanuel Vadot 374*5def4c47SEmmanuel Vadot sysctl: syscon@50440000 { 375*5def4c47SEmmanuel Vadot compatible = "canaan,k210-sysctl", 376*5def4c47SEmmanuel Vadot "syscon", "simple-mfd"; 377*5def4c47SEmmanuel Vadot reg = <0x50440000 0x100>; 378*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB1>; 379*5def4c47SEmmanuel Vadot clock-names = "pclk"; 380*5def4c47SEmmanuel Vadot 381*5def4c47SEmmanuel Vadot sysclk: clock-controller { 382*5def4c47SEmmanuel Vadot #clock-cells = <1>; 383*5def4c47SEmmanuel Vadot compatible = "canaan,k210-clk"; 384*5def4c47SEmmanuel Vadot clocks = <&in0>; 385*5def4c47SEmmanuel Vadot }; 386*5def4c47SEmmanuel Vadot 387*5def4c47SEmmanuel Vadot sysrst: reset-controller { 388*5def4c47SEmmanuel Vadot compatible = "canaan,k210-rst"; 389*5def4c47SEmmanuel Vadot #reset-cells = <1>; 390*5def4c47SEmmanuel Vadot }; 391*5def4c47SEmmanuel Vadot 392*5def4c47SEmmanuel Vadot reboot: syscon-reboot { 393*5def4c47SEmmanuel Vadot compatible = "syscon-reboot"; 394*5def4c47SEmmanuel Vadot regmap = <&sysctl>; 395*5def4c47SEmmanuel Vadot offset = <48>; 396*5def4c47SEmmanuel Vadot mask = <1>; 397*5def4c47SEmmanuel Vadot value = <1>; 398*5def4c47SEmmanuel Vadot }; 399*5def4c47SEmmanuel Vadot }; 400*5def4c47SEmmanuel Vadot }; 401*5def4c47SEmmanuel Vadot 402*5def4c47SEmmanuel Vadot apb2: bus@52000000 { 403*5def4c47SEmmanuel Vadot #address-cells = <1>; 404*5def4c47SEmmanuel Vadot #size-cells = <1>; 405*5def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 406*5def4c47SEmmanuel Vadot ranges; 407*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB2>; 408*5def4c47SEmmanuel Vadot 409*5def4c47SEmmanuel Vadot spi0: spi@52000000 { 410*5def4c47SEmmanuel Vadot #address-cells = <1>; 411*5def4c47SEmmanuel Vadot #size-cells = <0>; 412*5def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 413*5def4c47SEmmanuel Vadot reg = <0x52000000 0x100>; 414*5def4c47SEmmanuel Vadot interrupts = <1>; 415*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI0>, 416*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 417*5def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 418*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI0>; 419*5def4c47SEmmanuel Vadot reset-names = "spi"; 420*5def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 421*5def4c47SEmmanuel Vadot num-cs = <4>; 422*5def4c47SEmmanuel Vadot reg-io-width = <4>; 423*5def4c47SEmmanuel Vadot }; 424*5def4c47SEmmanuel Vadot 425*5def4c47SEmmanuel Vadot spi1: spi@53000000 { 426*5def4c47SEmmanuel Vadot #address-cells = <1>; 427*5def4c47SEmmanuel Vadot #size-cells = <0>; 428*5def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 429*5def4c47SEmmanuel Vadot reg = <0x53000000 0x100>; 430*5def4c47SEmmanuel Vadot interrupts = <2>; 431*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI1>, 432*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 433*5def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 434*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI1>; 435*5def4c47SEmmanuel Vadot reset-names = "spi"; 436*5def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 437*5def4c47SEmmanuel Vadot num-cs = <4>; 438*5def4c47SEmmanuel Vadot reg-io-width = <4>; 439*5def4c47SEmmanuel Vadot }; 440*5def4c47SEmmanuel Vadot 441*5def4c47SEmmanuel Vadot spi3: spi@54000000 { 442*5def4c47SEmmanuel Vadot #address-cells = <1>; 443*5def4c47SEmmanuel Vadot #size-cells = <0>; 444*5def4c47SEmmanuel Vadot compatible = "snps,dwc-ssi-1.01a"; 445*5def4c47SEmmanuel Vadot reg = <0x54000000 0x200>; 446*5def4c47SEmmanuel Vadot interrupts = <4>; 447*5def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI3>, 448*5def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 449*5def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 450*5def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI3>; 451*5def4c47SEmmanuel Vadot reset-names = "spi"; 452*5def4c47SEmmanuel Vadot /* Could possibly go up to 200 MHz */ 453*5def4c47SEmmanuel Vadot spi-max-frequency = <100000000>; 454*5def4c47SEmmanuel Vadot num-cs = <4>; 455*5def4c47SEmmanuel Vadot reg-io-width = <4>; 456*5def4c47SEmmanuel Vadot }; 457*5def4c47SEmmanuel Vadot }; 458*5def4c47SEmmanuel Vadot }; 459*5def4c47SEmmanuel Vadot}; 460