15def4c47SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ 25def4c47SEmmanuel Vadot/* 35def4c47SEmmanuel Vadot * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 45def4c47SEmmanuel Vadot * Copyright (C) 2020 Western Digital Corporation or its affiliates. 55def4c47SEmmanuel Vadot */ 65def4c47SEmmanuel Vadot#include <dt-bindings/clock/k210-clk.h> 75def4c47SEmmanuel Vadot#include <dt-bindings/pinctrl/k210-fpioa.h> 85def4c47SEmmanuel Vadot#include <dt-bindings/reset/k210-rst.h> 95def4c47SEmmanuel Vadot 105def4c47SEmmanuel Vadot/ { 115def4c47SEmmanuel Vadot /* 125def4c47SEmmanuel Vadot * Although the K210 is a 64-bit CPU, the address bus is only 32-bits 135def4c47SEmmanuel Vadot * wide, and the upper half of all addresses is ignored. 145def4c47SEmmanuel Vadot */ 155def4c47SEmmanuel Vadot #address-cells = <1>; 165def4c47SEmmanuel Vadot #size-cells = <1>; 175def4c47SEmmanuel Vadot compatible = "canaan,kendryte-k210"; 185def4c47SEmmanuel Vadot 195def4c47SEmmanuel Vadot aliases { 205def4c47SEmmanuel Vadot serial0 = &uarths0; 215def4c47SEmmanuel Vadot serial1 = &uart1; 225def4c47SEmmanuel Vadot serial2 = &uart2; 235def4c47SEmmanuel Vadot serial3 = &uart3; 245def4c47SEmmanuel Vadot }; 255def4c47SEmmanuel Vadot 265def4c47SEmmanuel Vadot /* 275def4c47SEmmanuel Vadot * The K210 has an sv39 MMU following the privileged specification v1.9. 285def4c47SEmmanuel Vadot * Since this is a non-ratified draft specification, the kernel does not 295def4c47SEmmanuel Vadot * support it and the K210 support enabled only for the !MMU case. 305def4c47SEmmanuel Vadot * Be consistent with this by setting the CPUs MMU type to "none". 315def4c47SEmmanuel Vadot */ 325def4c47SEmmanuel Vadot cpus { 335def4c47SEmmanuel Vadot #address-cells = <1>; 345def4c47SEmmanuel Vadot #size-cells = <0>; 355def4c47SEmmanuel Vadot timebase-frequency = <7800000>; 365def4c47SEmmanuel Vadot cpu0: cpu@0 { 375def4c47SEmmanuel Vadot device_type = "cpu"; 385def4c47SEmmanuel Vadot compatible = "canaan,k210", "riscv"; 395def4c47SEmmanuel Vadot reg = <0>; 405def4c47SEmmanuel Vadot riscv,isa = "rv64imafdc"; 415def4c47SEmmanuel Vadot mmu-type = "riscv,none"; 425def4c47SEmmanuel Vadot i-cache-block-size = <64>; 435def4c47SEmmanuel Vadot i-cache-size = <0x8000>; 445def4c47SEmmanuel Vadot d-cache-block-size = <64>; 455def4c47SEmmanuel Vadot d-cache-size = <0x8000>; 465def4c47SEmmanuel Vadot cpu0_intc: interrupt-controller { 475def4c47SEmmanuel Vadot #interrupt-cells = <1>; 485def4c47SEmmanuel Vadot interrupt-controller; 495def4c47SEmmanuel Vadot compatible = "riscv,cpu-intc"; 505def4c47SEmmanuel Vadot }; 515def4c47SEmmanuel Vadot }; 525def4c47SEmmanuel Vadot cpu1: cpu@1 { 535def4c47SEmmanuel Vadot device_type = "cpu"; 545def4c47SEmmanuel Vadot compatible = "canaan,k210", "riscv"; 555def4c47SEmmanuel Vadot reg = <1>; 565def4c47SEmmanuel Vadot riscv,isa = "rv64imafdc"; 575def4c47SEmmanuel Vadot mmu-type = "riscv,none"; 585def4c47SEmmanuel Vadot i-cache-block-size = <64>; 595def4c47SEmmanuel Vadot i-cache-size = <0x8000>; 605def4c47SEmmanuel Vadot d-cache-block-size = <64>; 615def4c47SEmmanuel Vadot d-cache-size = <0x8000>; 625def4c47SEmmanuel Vadot cpu1_intc: interrupt-controller { 635def4c47SEmmanuel Vadot #interrupt-cells = <1>; 645def4c47SEmmanuel Vadot interrupt-controller; 655def4c47SEmmanuel Vadot compatible = "riscv,cpu-intc"; 665def4c47SEmmanuel Vadot }; 675def4c47SEmmanuel Vadot }; 685def4c47SEmmanuel Vadot }; 695def4c47SEmmanuel Vadot 705def4c47SEmmanuel Vadot sram: memory@80000000 { 715def4c47SEmmanuel Vadot device_type = "memory"; 725def4c47SEmmanuel Vadot compatible = "canaan,k210-sram"; 735def4c47SEmmanuel Vadot reg = <0x80000000 0x400000>, 745def4c47SEmmanuel Vadot <0x80400000 0x200000>, 755def4c47SEmmanuel Vadot <0x80600000 0x200000>; 765def4c47SEmmanuel Vadot reg-names = "sram0", "sram1", "aisram"; 775def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SRAM0>, 785def4c47SEmmanuel Vadot <&sysclk K210_CLK_SRAM1>, 795def4c47SEmmanuel Vadot <&sysclk K210_CLK_AI>; 805def4c47SEmmanuel Vadot clock-names = "sram0", "sram1", "aisram"; 815def4c47SEmmanuel Vadot }; 825def4c47SEmmanuel Vadot 835def4c47SEmmanuel Vadot clocks { 845def4c47SEmmanuel Vadot in0: oscillator { 855def4c47SEmmanuel Vadot compatible = "fixed-clock"; 865def4c47SEmmanuel Vadot #clock-cells = <0>; 875def4c47SEmmanuel Vadot clock-frequency = <26000000>; 885def4c47SEmmanuel Vadot }; 895def4c47SEmmanuel Vadot }; 905def4c47SEmmanuel Vadot 915def4c47SEmmanuel Vadot soc { 925def4c47SEmmanuel Vadot #address-cells = <1>; 935def4c47SEmmanuel Vadot #size-cells = <1>; 945def4c47SEmmanuel Vadot compatible = "simple-bus"; 955def4c47SEmmanuel Vadot ranges; 965def4c47SEmmanuel Vadot interrupt-parent = <&plic0>; 975def4c47SEmmanuel Vadot 985def4c47SEmmanuel Vadot rom0: nvmem@1000 { 995def4c47SEmmanuel Vadot reg = <0x1000 0x1000>; 1005def4c47SEmmanuel Vadot read-only; 1015def4c47SEmmanuel Vadot }; 1025def4c47SEmmanuel Vadot 1035def4c47SEmmanuel Vadot clint0: timer@2000000 { 1045def4c47SEmmanuel Vadot compatible = "canaan,k210-clint", "sifive,clint0"; 1055def4c47SEmmanuel Vadot reg = <0x2000000 0xC000>; 106*e67e8565SEmmanuel Vadot interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, 107*e67e8565SEmmanuel Vadot <&cpu1_intc 3>, <&cpu1_intc 7>; 1085def4c47SEmmanuel Vadot }; 1095def4c47SEmmanuel Vadot 1105def4c47SEmmanuel Vadot plic0: interrupt-controller@c000000 { 1115def4c47SEmmanuel Vadot #interrupt-cells = <1>; 1125def4c47SEmmanuel Vadot #address-cells = <0>; 1135def4c47SEmmanuel Vadot compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; 1145def4c47SEmmanuel Vadot reg = <0xC000000 0x4000000>; 1155def4c47SEmmanuel Vadot interrupt-controller; 116*e67e8565SEmmanuel Vadot interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>, 117*e67e8565SEmmanuel Vadot <&cpu1_intc 11>, <&cpu1_intc 9>; 1185def4c47SEmmanuel Vadot riscv,ndev = <65>; 1195def4c47SEmmanuel Vadot }; 1205def4c47SEmmanuel Vadot 1215def4c47SEmmanuel Vadot uarths0: serial@38000000 { 1225def4c47SEmmanuel Vadot compatible = "canaan,k210-uarths", "sifive,uart0"; 1235def4c47SEmmanuel Vadot reg = <0x38000000 0x1000>; 1245def4c47SEmmanuel Vadot interrupts = <33>; 1255def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_CPU>; 1265def4c47SEmmanuel Vadot }; 1275def4c47SEmmanuel Vadot 1285def4c47SEmmanuel Vadot gpio0: gpio-controller@38001000 { 1295def4c47SEmmanuel Vadot #interrupt-cells = <2>; 1305def4c47SEmmanuel Vadot #gpio-cells = <2>; 1315def4c47SEmmanuel Vadot compatible = "canaan,k210-gpiohs", "sifive,gpio0"; 1325def4c47SEmmanuel Vadot reg = <0x38001000 0x1000>; 1335def4c47SEmmanuel Vadot interrupt-controller; 134*e67e8565SEmmanuel Vadot interrupts = <34>, <35>, <36>, <37>, <38>, <39>, <40>, 135*e67e8565SEmmanuel Vadot <41>, <42>, <43>, <44>, <45>, <46>, <47>, 136*e67e8565SEmmanuel Vadot <48>, <49>, <50>, <51>, <52>, <53>, <54>, 137*e67e8565SEmmanuel Vadot <55>, <56>, <57>, <58>, <59>, <60>, <61>, 138*e67e8565SEmmanuel Vadot <62>, <63>, <64>, <65>; 1395def4c47SEmmanuel Vadot gpio-controller; 1405def4c47SEmmanuel Vadot ngpios = <32>; 1415def4c47SEmmanuel Vadot }; 1425def4c47SEmmanuel Vadot 1435def4c47SEmmanuel Vadot dmac0: dma-controller@50000000 { 1445def4c47SEmmanuel Vadot compatible = "snps,axi-dma-1.01a"; 1455def4c47SEmmanuel Vadot reg = <0x50000000 0x1000>; 146*e67e8565SEmmanuel Vadot interrupts = <27>, <28>, <29>, <30>, <31>, <32>; 1475def4c47SEmmanuel Vadot #dma-cells = <1>; 1485def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>; 1495def4c47SEmmanuel Vadot clock-names = "core-clk", "cfgr-clk"; 1505def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_DMA>; 1515def4c47SEmmanuel Vadot dma-channels = <6>; 1525def4c47SEmmanuel Vadot snps,dma-masters = <2>; 1535def4c47SEmmanuel Vadot snps,priority = <0 1 2 3 4 5>; 1545def4c47SEmmanuel Vadot snps,data-width = <5>; 1555def4c47SEmmanuel Vadot snps,block-size = <0x200000 0x200000 0x200000 1565def4c47SEmmanuel Vadot 0x200000 0x200000 0x200000>; 1575def4c47SEmmanuel Vadot snps,axi-max-burst-len = <256>; 1585def4c47SEmmanuel Vadot }; 1595def4c47SEmmanuel Vadot 1605def4c47SEmmanuel Vadot apb0: bus@50200000 { 1615def4c47SEmmanuel Vadot #address-cells = <1>; 1625def4c47SEmmanuel Vadot #size-cells = <1>; 1635def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 1645def4c47SEmmanuel Vadot ranges; 1655def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB0>; 1665def4c47SEmmanuel Vadot 1675def4c47SEmmanuel Vadot gpio1: gpio@50200000 { 1685def4c47SEmmanuel Vadot #address-cells = <1>; 1695def4c47SEmmanuel Vadot #size-cells = <0>; 1705def4c47SEmmanuel Vadot compatible = "snps,dw-apb-gpio"; 1715def4c47SEmmanuel Vadot reg = <0x50200000 0x80>; 1725def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB0>, 1735def4c47SEmmanuel Vadot <&sysclk K210_CLK_GPIO>; 1745def4c47SEmmanuel Vadot clock-names = "bus", "db"; 1755def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_GPIO>; 1765def4c47SEmmanuel Vadot 1775def4c47SEmmanuel Vadot gpio1_0: gpio-port@0 { 1785def4c47SEmmanuel Vadot #gpio-cells = <2>; 1795def4c47SEmmanuel Vadot #interrupt-cells = <2>; 1805def4c47SEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 1815def4c47SEmmanuel Vadot reg = <0>; 1825def4c47SEmmanuel Vadot interrupt-controller; 1835def4c47SEmmanuel Vadot interrupts = <23>; 1845def4c47SEmmanuel Vadot gpio-controller; 1855def4c47SEmmanuel Vadot ngpios = <8>; 1865def4c47SEmmanuel Vadot }; 1875def4c47SEmmanuel Vadot }; 1885def4c47SEmmanuel Vadot 1895def4c47SEmmanuel Vadot uart1: serial@50210000 { 1905def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 1915def4c47SEmmanuel Vadot reg = <0x50210000 0x100>; 1925def4c47SEmmanuel Vadot interrupts = <11>; 1935def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART1>, 1945def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 1955def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 1965def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART1>; 1975def4c47SEmmanuel Vadot reg-io-width = <4>; 1985def4c47SEmmanuel Vadot reg-shift = <2>; 1995def4c47SEmmanuel Vadot dcd-override; 2005def4c47SEmmanuel Vadot dsr-override; 2015def4c47SEmmanuel Vadot cts-override; 2025def4c47SEmmanuel Vadot ri-override; 2035def4c47SEmmanuel Vadot }; 2045def4c47SEmmanuel Vadot 2055def4c47SEmmanuel Vadot uart2: serial@50220000 { 2065def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 2075def4c47SEmmanuel Vadot reg = <0x50220000 0x100>; 2085def4c47SEmmanuel Vadot interrupts = <12>; 2095def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART2>, 2105def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 2115def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 2125def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART2>; 2135def4c47SEmmanuel Vadot reg-io-width = <4>; 2145def4c47SEmmanuel Vadot reg-shift = <2>; 2155def4c47SEmmanuel Vadot dcd-override; 2165def4c47SEmmanuel Vadot dsr-override; 2175def4c47SEmmanuel Vadot cts-override; 2185def4c47SEmmanuel Vadot ri-override; 2195def4c47SEmmanuel Vadot }; 2205def4c47SEmmanuel Vadot 2215def4c47SEmmanuel Vadot uart3: serial@50230000 { 2225def4c47SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 2235def4c47SEmmanuel Vadot reg = <0x50230000 0x100>; 2245def4c47SEmmanuel Vadot interrupts = <13>; 2255def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_UART3>, 2265def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 2275def4c47SEmmanuel Vadot clock-names = "baudclk", "apb_pclk"; 2285def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_UART3>; 2295def4c47SEmmanuel Vadot reg-io-width = <4>; 2305def4c47SEmmanuel Vadot reg-shift = <2>; 2315def4c47SEmmanuel Vadot dcd-override; 2325def4c47SEmmanuel Vadot dsr-override; 2335def4c47SEmmanuel Vadot cts-override; 2345def4c47SEmmanuel Vadot ri-override; 2355def4c47SEmmanuel Vadot }; 2365def4c47SEmmanuel Vadot 2375def4c47SEmmanuel Vadot spi2: spi@50240000 { 2385def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 2395def4c47SEmmanuel Vadot spi-slave; 2405def4c47SEmmanuel Vadot reg = <0x50240000 0x100>; 2415def4c47SEmmanuel Vadot #address-cells = <0>; 2425def4c47SEmmanuel Vadot #size-cells = <0>; 2435def4c47SEmmanuel Vadot interrupts = <3>; 2445def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI2>, 2455def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 2465def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 2475def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI2>; 2485def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 2495def4c47SEmmanuel Vadot }; 2505def4c47SEmmanuel Vadot 2515def4c47SEmmanuel Vadot i2s0: i2s@50250000 { 2525def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 2535def4c47SEmmanuel Vadot reg = <0x50250000 0x200>; 2545def4c47SEmmanuel Vadot interrupts = <5>; 2555def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S0>; 2565def4c47SEmmanuel Vadot clock-names = "i2sclk"; 2575def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S0>; 2585def4c47SEmmanuel Vadot }; 2595def4c47SEmmanuel Vadot 2605def4c47SEmmanuel Vadot i2s1: i2s@50260000 { 2615def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 2625def4c47SEmmanuel Vadot reg = <0x50260000 0x200>; 2635def4c47SEmmanuel Vadot interrupts = <6>; 2645def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S1>; 2655def4c47SEmmanuel Vadot clock-names = "i2sclk"; 2665def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S1>; 2675def4c47SEmmanuel Vadot }; 2685def4c47SEmmanuel Vadot 2695def4c47SEmmanuel Vadot i2s2: i2s@50270000 { 2705def4c47SEmmanuel Vadot compatible = "snps,designware-i2s"; 2715def4c47SEmmanuel Vadot reg = <0x50270000 0x200>; 2725def4c47SEmmanuel Vadot interrupts = <7>; 2735def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2S2>; 2745def4c47SEmmanuel Vadot clock-names = "i2sclk"; 2755def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2S2>; 2765def4c47SEmmanuel Vadot }; 2775def4c47SEmmanuel Vadot 2785def4c47SEmmanuel Vadot i2c0: i2c@50280000 { 2795def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 2805def4c47SEmmanuel Vadot reg = <0x50280000 0x100>; 2815def4c47SEmmanuel Vadot interrupts = <8>; 2825def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C0>, 2835def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 2845def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 2855def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C0>; 2865def4c47SEmmanuel Vadot }; 2875def4c47SEmmanuel Vadot 2885def4c47SEmmanuel Vadot i2c1: i2c@50290000 { 2895def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 2905def4c47SEmmanuel Vadot reg = <0x50290000 0x100>; 2915def4c47SEmmanuel Vadot interrupts = <9>; 2925def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C1>, 2935def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 2945def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 2955def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C1>; 2965def4c47SEmmanuel Vadot }; 2975def4c47SEmmanuel Vadot 2985def4c47SEmmanuel Vadot i2c2: i2c@502a0000 { 2995def4c47SEmmanuel Vadot compatible = "snps,designware-i2c"; 3005def4c47SEmmanuel Vadot reg = <0x502A0000 0x100>; 3015def4c47SEmmanuel Vadot interrupts = <10>; 3025def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_I2C2>, 3035def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 3045def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 3055def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_I2C2>; 3065def4c47SEmmanuel Vadot }; 3075def4c47SEmmanuel Vadot 3085def4c47SEmmanuel Vadot fpioa: pinmux@502b0000 { 3095def4c47SEmmanuel Vadot compatible = "canaan,k210-fpioa"; 3105def4c47SEmmanuel Vadot reg = <0x502B0000 0x100>; 3115def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_FPIOA>, 3125def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 3135def4c47SEmmanuel Vadot clock-names = "ref", "pclk"; 3145def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_FPIOA>; 3155def4c47SEmmanuel Vadot canaan,k210-sysctl-power = <&sysctl 108>; 3165def4c47SEmmanuel Vadot }; 3175def4c47SEmmanuel Vadot 3185def4c47SEmmanuel Vadot timer0: timer@502d0000 { 3195def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 3205def4c47SEmmanuel Vadot reg = <0x502D0000 0x100>; 321*e67e8565SEmmanuel Vadot interrupts = <14>, <15>; 3225def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER0>, 3235def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 3245def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 3255def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER0>; 3265def4c47SEmmanuel Vadot }; 3275def4c47SEmmanuel Vadot 3285def4c47SEmmanuel Vadot timer1: timer@502e0000 { 3295def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 3305def4c47SEmmanuel Vadot reg = <0x502E0000 0x100>; 331*e67e8565SEmmanuel Vadot interrupts = <16>, <17>; 3325def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER1>, 3335def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 3345def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 3355def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER1>; 3365def4c47SEmmanuel Vadot }; 3375def4c47SEmmanuel Vadot 3385def4c47SEmmanuel Vadot timer2: timer@502f0000 { 3395def4c47SEmmanuel Vadot compatible = "snps,dw-apb-timer"; 3405def4c47SEmmanuel Vadot reg = <0x502F0000 0x100>; 341*e67e8565SEmmanuel Vadot interrupts = <18>, <19>; 3425def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_TIMER2>, 3435def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB0>; 3445def4c47SEmmanuel Vadot clock-names = "timer", "pclk"; 3455def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_TIMER2>; 3465def4c47SEmmanuel Vadot }; 3475def4c47SEmmanuel Vadot }; 3485def4c47SEmmanuel Vadot 3495def4c47SEmmanuel Vadot apb1: bus@50400000 { 3505def4c47SEmmanuel Vadot #address-cells = <1>; 3515def4c47SEmmanuel Vadot #size-cells = <1>; 3525def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 3535def4c47SEmmanuel Vadot ranges; 3545def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB1>; 3555def4c47SEmmanuel Vadot 3565def4c47SEmmanuel Vadot wdt0: watchdog@50400000 { 3575def4c47SEmmanuel Vadot compatible = "snps,dw-wdt"; 3585def4c47SEmmanuel Vadot reg = <0x50400000 0x100>; 3595def4c47SEmmanuel Vadot interrupts = <21>; 3605def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_WDT0>, 3615def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB1>; 3625def4c47SEmmanuel Vadot clock-names = "tclk", "pclk"; 3635def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_WDT0>; 3645def4c47SEmmanuel Vadot }; 3655def4c47SEmmanuel Vadot 3665def4c47SEmmanuel Vadot wdt1: watchdog@50410000 { 3675def4c47SEmmanuel Vadot compatible = "snps,dw-wdt"; 3685def4c47SEmmanuel Vadot reg = <0x50410000 0x100>; 3695def4c47SEmmanuel Vadot interrupts = <22>; 3705def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_WDT1>, 3715def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB1>; 3725def4c47SEmmanuel Vadot clock-names = "tclk", "pclk"; 3735def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_WDT1>; 3745def4c47SEmmanuel Vadot }; 3755def4c47SEmmanuel Vadot 3765def4c47SEmmanuel Vadot sysctl: syscon@50440000 { 3775def4c47SEmmanuel Vadot compatible = "canaan,k210-sysctl", 3785def4c47SEmmanuel Vadot "syscon", "simple-mfd"; 3795def4c47SEmmanuel Vadot reg = <0x50440000 0x100>; 3805def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB1>; 3815def4c47SEmmanuel Vadot clock-names = "pclk"; 3825def4c47SEmmanuel Vadot 3835def4c47SEmmanuel Vadot sysclk: clock-controller { 3845def4c47SEmmanuel Vadot #clock-cells = <1>; 3855def4c47SEmmanuel Vadot compatible = "canaan,k210-clk"; 3865def4c47SEmmanuel Vadot clocks = <&in0>; 3875def4c47SEmmanuel Vadot }; 3885def4c47SEmmanuel Vadot 3895def4c47SEmmanuel Vadot sysrst: reset-controller { 3905def4c47SEmmanuel Vadot compatible = "canaan,k210-rst"; 3915def4c47SEmmanuel Vadot #reset-cells = <1>; 3925def4c47SEmmanuel Vadot }; 3935def4c47SEmmanuel Vadot 3945def4c47SEmmanuel Vadot reboot: syscon-reboot { 3955def4c47SEmmanuel Vadot compatible = "syscon-reboot"; 3965def4c47SEmmanuel Vadot regmap = <&sysctl>; 3975def4c47SEmmanuel Vadot offset = <48>; 3985def4c47SEmmanuel Vadot mask = <1>; 3995def4c47SEmmanuel Vadot value = <1>; 4005def4c47SEmmanuel Vadot }; 4015def4c47SEmmanuel Vadot }; 4025def4c47SEmmanuel Vadot }; 4035def4c47SEmmanuel Vadot 4045def4c47SEmmanuel Vadot apb2: bus@52000000 { 4055def4c47SEmmanuel Vadot #address-cells = <1>; 4065def4c47SEmmanuel Vadot #size-cells = <1>; 4075def4c47SEmmanuel Vadot compatible = "simple-pm-bus"; 4085def4c47SEmmanuel Vadot ranges; 4095def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_APB2>; 4105def4c47SEmmanuel Vadot 4115def4c47SEmmanuel Vadot spi0: spi@52000000 { 4125def4c47SEmmanuel Vadot #address-cells = <1>; 4135def4c47SEmmanuel Vadot #size-cells = <0>; 4145def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 4155def4c47SEmmanuel Vadot reg = <0x52000000 0x100>; 4165def4c47SEmmanuel Vadot interrupts = <1>; 4175def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI0>, 4185def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 4195def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 4205def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI0>; 4215def4c47SEmmanuel Vadot reset-names = "spi"; 4225def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 4235def4c47SEmmanuel Vadot num-cs = <4>; 4245def4c47SEmmanuel Vadot reg-io-width = <4>; 4255def4c47SEmmanuel Vadot }; 4265def4c47SEmmanuel Vadot 4275def4c47SEmmanuel Vadot spi1: spi@53000000 { 4285def4c47SEmmanuel Vadot #address-cells = <1>; 4295def4c47SEmmanuel Vadot #size-cells = <0>; 4305def4c47SEmmanuel Vadot compatible = "canaan,k210-spi"; 4315def4c47SEmmanuel Vadot reg = <0x53000000 0x100>; 4325def4c47SEmmanuel Vadot interrupts = <2>; 4335def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI1>, 4345def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 4355def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 4365def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI1>; 4375def4c47SEmmanuel Vadot reset-names = "spi"; 4385def4c47SEmmanuel Vadot spi-max-frequency = <25000000>; 4395def4c47SEmmanuel Vadot num-cs = <4>; 4405def4c47SEmmanuel Vadot reg-io-width = <4>; 4415def4c47SEmmanuel Vadot }; 4425def4c47SEmmanuel Vadot 4435def4c47SEmmanuel Vadot spi3: spi@54000000 { 4445def4c47SEmmanuel Vadot #address-cells = <1>; 4455def4c47SEmmanuel Vadot #size-cells = <0>; 4465def4c47SEmmanuel Vadot compatible = "snps,dwc-ssi-1.01a"; 4475def4c47SEmmanuel Vadot reg = <0x54000000 0x200>; 4485def4c47SEmmanuel Vadot interrupts = <4>; 4495def4c47SEmmanuel Vadot clocks = <&sysclk K210_CLK_SPI3>, 4505def4c47SEmmanuel Vadot <&sysclk K210_CLK_APB2>; 4515def4c47SEmmanuel Vadot clock-names = "ssi_clk", "pclk"; 4525def4c47SEmmanuel Vadot resets = <&sysrst K210_RST_SPI3>; 4535def4c47SEmmanuel Vadot reset-names = "spi"; 4545def4c47SEmmanuel Vadot /* Could possibly go up to 200 MHz */ 4555def4c47SEmmanuel Vadot spi-max-frequency = <100000000>; 4565def4c47SEmmanuel Vadot num-cs = <4>; 4575def4c47SEmmanuel Vadot reg-io-width = <4>; 4585def4c47SEmmanuel Vadot }; 4595def4c47SEmmanuel Vadot }; 4605def4c47SEmmanuel Vadot }; 4615def4c47SEmmanuel Vadot}; 462