xref: /freebsd/sys/contrib/device-tree/src/riscv/canaan/k210.dtsi (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
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		};
68*b97ee269SEmmanuel Vadot
69*b97ee269SEmmanuel Vadot		cpu-map {
70*b97ee269SEmmanuel Vadot			cluster0 {
71*b97ee269SEmmanuel Vadot				core0 {
72*b97ee269SEmmanuel Vadot					cpu = <&cpu0>;
73*b97ee269SEmmanuel Vadot				};
74*b97ee269SEmmanuel Vadot
75*b97ee269SEmmanuel Vadot				core1 {
76*b97ee269SEmmanuel Vadot					cpu = <&cpu1>;
77*b97ee269SEmmanuel Vadot				};
78*b97ee269SEmmanuel Vadot			};
79*b97ee269SEmmanuel Vadot		};
805def4c47SEmmanuel Vadot	};
815def4c47SEmmanuel Vadot
825def4c47SEmmanuel Vadot	sram: memory@80000000 {
835def4c47SEmmanuel Vadot		device_type = "memory";
84*b97ee269SEmmanuel Vadot		reg = <0x80000000 0x400000>, /* sram0 4 MiB */
85*b97ee269SEmmanuel Vadot		      <0x80400000 0x200000>, /* sram1 2 MiB */
86*b97ee269SEmmanuel Vadot		      <0x80600000 0x200000>; /* aisram 2 MiB */
87*b97ee269SEmmanuel Vadot	};
88*b97ee269SEmmanuel Vadot
89*b97ee269SEmmanuel Vadot	sram_controller: memory-controller {
905def4c47SEmmanuel Vadot		compatible = "canaan,k210-sram";
915def4c47SEmmanuel Vadot		clocks = <&sysclk K210_CLK_SRAM0>,
925def4c47SEmmanuel Vadot			 <&sysclk K210_CLK_SRAM1>,
935def4c47SEmmanuel Vadot			 <&sysclk K210_CLK_AI>;
945def4c47SEmmanuel Vadot		clock-names = "sram0", "sram1", "aisram";
955def4c47SEmmanuel Vadot	};
965def4c47SEmmanuel Vadot
975def4c47SEmmanuel Vadot	clocks {
985def4c47SEmmanuel Vadot		in0: oscillator {
995def4c47SEmmanuel Vadot			compatible = "fixed-clock";
1005def4c47SEmmanuel Vadot			#clock-cells = <0>;
1015def4c47SEmmanuel Vadot			clock-frequency = <26000000>;
1025def4c47SEmmanuel Vadot		};
1035def4c47SEmmanuel Vadot	};
1045def4c47SEmmanuel Vadot
1055def4c47SEmmanuel Vadot	soc {
1065def4c47SEmmanuel Vadot		#address-cells = <1>;
1075def4c47SEmmanuel Vadot		#size-cells = <1>;
1085def4c47SEmmanuel Vadot		compatible = "simple-bus";
1095def4c47SEmmanuel Vadot		ranges;
1105def4c47SEmmanuel Vadot		interrupt-parent = <&plic0>;
1115def4c47SEmmanuel Vadot
1125def4c47SEmmanuel Vadot		rom0: nvmem@1000 {
1135def4c47SEmmanuel Vadot			reg = <0x1000 0x1000>;
1145def4c47SEmmanuel Vadot			read-only;
1155def4c47SEmmanuel Vadot		};
1165def4c47SEmmanuel Vadot
1175def4c47SEmmanuel Vadot		clint0: timer@2000000 {
1185def4c47SEmmanuel Vadot			compatible = "canaan,k210-clint", "sifive,clint0";
1195def4c47SEmmanuel Vadot			reg = <0x2000000 0xC000>;
120e67e8565SEmmanuel Vadot			interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
121e67e8565SEmmanuel Vadot					      <&cpu1_intc 3>, <&cpu1_intc 7>;
1225def4c47SEmmanuel Vadot		};
1235def4c47SEmmanuel Vadot
1245def4c47SEmmanuel Vadot		plic0: interrupt-controller@c000000 {
1255def4c47SEmmanuel Vadot			#interrupt-cells = <1>;
1265def4c47SEmmanuel Vadot			#address-cells = <0>;
1275def4c47SEmmanuel Vadot			compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
1285def4c47SEmmanuel Vadot			reg = <0xC000000 0x4000000>;
1295def4c47SEmmanuel Vadot			interrupt-controller;
130e67e8565SEmmanuel Vadot			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
131e67e8565SEmmanuel Vadot					      <&cpu1_intc 11>, <&cpu1_intc 9>;
1325def4c47SEmmanuel Vadot			riscv,ndev = <65>;
1335def4c47SEmmanuel Vadot		};
1345def4c47SEmmanuel Vadot
1355def4c47SEmmanuel Vadot		uarths0: serial@38000000 {
1365def4c47SEmmanuel Vadot			compatible = "canaan,k210-uarths", "sifive,uart0";
1375def4c47SEmmanuel Vadot			reg = <0x38000000 0x1000>;
1385def4c47SEmmanuel Vadot			interrupts = <33>;
1395def4c47SEmmanuel Vadot			clocks = <&sysclk K210_CLK_CPU>;
1405def4c47SEmmanuel Vadot		};
1415def4c47SEmmanuel Vadot
1425def4c47SEmmanuel Vadot		gpio0: gpio-controller@38001000 {
1435def4c47SEmmanuel Vadot			#interrupt-cells = <2>;
1445def4c47SEmmanuel Vadot			#gpio-cells = <2>;
1455def4c47SEmmanuel Vadot			compatible = "canaan,k210-gpiohs", "sifive,gpio0";
1465def4c47SEmmanuel Vadot			reg = <0x38001000 0x1000>;
1475def4c47SEmmanuel Vadot			interrupt-controller;
148e67e8565SEmmanuel Vadot			interrupts = <34>, <35>, <36>, <37>, <38>, <39>, <40>,
149e67e8565SEmmanuel Vadot				     <41>, <42>, <43>, <44>, <45>, <46>, <47>,
150e67e8565SEmmanuel Vadot				     <48>, <49>, <50>, <51>, <52>, <53>, <54>,
151e67e8565SEmmanuel Vadot				     <55>, <56>, <57>, <58>, <59>, <60>, <61>,
152e67e8565SEmmanuel Vadot				     <62>, <63>, <64>, <65>;
1535def4c47SEmmanuel Vadot			gpio-controller;
1545def4c47SEmmanuel Vadot			ngpios = <32>;
1555def4c47SEmmanuel Vadot		};
1565def4c47SEmmanuel Vadot
1575def4c47SEmmanuel Vadot		dmac0: dma-controller@50000000 {
1585def4c47SEmmanuel Vadot			compatible = "snps,axi-dma-1.01a";
1595def4c47SEmmanuel Vadot			reg = <0x50000000 0x1000>;
160e67e8565SEmmanuel Vadot			interrupts = <27>, <28>, <29>, <30>, <31>, <32>;
1615def4c47SEmmanuel Vadot			#dma-cells = <1>;
1625def4c47SEmmanuel Vadot			clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>;
1635def4c47SEmmanuel Vadot			clock-names = "core-clk", "cfgr-clk";
1645def4c47SEmmanuel Vadot			resets = <&sysrst K210_RST_DMA>;
1655def4c47SEmmanuel Vadot			dma-channels = <6>;
1665def4c47SEmmanuel Vadot			snps,dma-masters = <2>;
1675def4c47SEmmanuel Vadot			snps,priority = <0 1 2 3 4 5>;
1685def4c47SEmmanuel Vadot			snps,data-width = <5>;
1695def4c47SEmmanuel Vadot			snps,block-size = <0x200000 0x200000 0x200000
1705def4c47SEmmanuel Vadot					   0x200000 0x200000 0x200000>;
1715def4c47SEmmanuel Vadot			snps,axi-max-burst-len = <256>;
1725def4c47SEmmanuel Vadot		};
1735def4c47SEmmanuel Vadot
1745def4c47SEmmanuel Vadot		apb0: bus@50200000 {
1755def4c47SEmmanuel Vadot			#address-cells = <1>;
1765def4c47SEmmanuel Vadot			#size-cells = <1>;
1775def4c47SEmmanuel Vadot			compatible = "simple-pm-bus";
178*b97ee269SEmmanuel Vadot			ranges = <0x50200000 0x50200000 0x200000>;
1795def4c47SEmmanuel Vadot			clocks = <&sysclk K210_CLK_APB0>;
1805def4c47SEmmanuel Vadot
1815def4c47SEmmanuel Vadot			gpio1: gpio@50200000 {
1825def4c47SEmmanuel Vadot				#address-cells = <1>;
1835def4c47SEmmanuel Vadot				#size-cells = <0>;
1845def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-gpio";
1855def4c47SEmmanuel Vadot				reg = <0x50200000 0x80>;
1865def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_APB0>,
1875def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_GPIO>;
1885def4c47SEmmanuel Vadot				clock-names = "bus", "db";
1895def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_GPIO>;
1905def4c47SEmmanuel Vadot
1915def4c47SEmmanuel Vadot				gpio1_0: gpio-port@0 {
1925def4c47SEmmanuel Vadot					#gpio-cells = <2>;
1935def4c47SEmmanuel Vadot					#interrupt-cells = <2>;
1945def4c47SEmmanuel Vadot					compatible = "snps,dw-apb-gpio-port";
1955def4c47SEmmanuel Vadot					reg = <0>;
1965def4c47SEmmanuel Vadot					interrupt-controller;
1975def4c47SEmmanuel Vadot					interrupts = <23>;
1985def4c47SEmmanuel Vadot					gpio-controller;
1995def4c47SEmmanuel Vadot					ngpios = <8>;
2005def4c47SEmmanuel Vadot				};
2015def4c47SEmmanuel Vadot			};
2025def4c47SEmmanuel Vadot
2035def4c47SEmmanuel Vadot			uart1: serial@50210000 {
2045def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-uart";
2055def4c47SEmmanuel Vadot				reg = <0x50210000 0x100>;
2065def4c47SEmmanuel Vadot				interrupts = <11>;
2075def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_UART1>,
2085def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
2095def4c47SEmmanuel Vadot				clock-names = "baudclk", "apb_pclk";
2105def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_UART1>;
2115def4c47SEmmanuel Vadot				reg-io-width = <4>;
2125def4c47SEmmanuel Vadot				reg-shift = <2>;
2135def4c47SEmmanuel Vadot				dcd-override;
2145def4c47SEmmanuel Vadot				dsr-override;
2155def4c47SEmmanuel Vadot				cts-override;
2165def4c47SEmmanuel Vadot				ri-override;
2175def4c47SEmmanuel Vadot			};
2185def4c47SEmmanuel Vadot
2195def4c47SEmmanuel Vadot			uart2: serial@50220000 {
2205def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-uart";
2215def4c47SEmmanuel Vadot				reg = <0x50220000 0x100>;
2225def4c47SEmmanuel Vadot				interrupts = <12>;
2235def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_UART2>,
2245def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
2255def4c47SEmmanuel Vadot				clock-names = "baudclk", "apb_pclk";
2265def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_UART2>;
2275def4c47SEmmanuel Vadot				reg-io-width = <4>;
2285def4c47SEmmanuel Vadot				reg-shift = <2>;
2295def4c47SEmmanuel Vadot				dcd-override;
2305def4c47SEmmanuel Vadot				dsr-override;
2315def4c47SEmmanuel Vadot				cts-override;
2325def4c47SEmmanuel Vadot				ri-override;
2335def4c47SEmmanuel Vadot			};
2345def4c47SEmmanuel Vadot
2355def4c47SEmmanuel Vadot			uart3: serial@50230000 {
2365def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-uart";
2375def4c47SEmmanuel Vadot				reg = <0x50230000 0x100>;
2385def4c47SEmmanuel Vadot				interrupts = <13>;
2395def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_UART3>,
2405def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
2415def4c47SEmmanuel Vadot				clock-names = "baudclk", "apb_pclk";
2425def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_UART3>;
2435def4c47SEmmanuel Vadot				reg-io-width = <4>;
2445def4c47SEmmanuel Vadot				reg-shift = <2>;
2455def4c47SEmmanuel Vadot				dcd-override;
2465def4c47SEmmanuel Vadot				dsr-override;
2475def4c47SEmmanuel Vadot				cts-override;
2485def4c47SEmmanuel Vadot				ri-override;
2495def4c47SEmmanuel Vadot			};
2505def4c47SEmmanuel Vadot
2515def4c47SEmmanuel Vadot			spi2: spi@50240000 {
2525def4c47SEmmanuel Vadot				compatible = "canaan,k210-spi";
2535def4c47SEmmanuel Vadot				spi-slave;
2545def4c47SEmmanuel Vadot				reg = <0x50240000 0x100>;
2555def4c47SEmmanuel Vadot				#address-cells = <0>;
2565def4c47SEmmanuel Vadot				#size-cells = <0>;
2575def4c47SEmmanuel Vadot				interrupts = <3>;
2585def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_SPI2>,
2595def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
2605def4c47SEmmanuel Vadot				clock-names = "ssi_clk", "pclk";
2615def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_SPI2>;
2625def4c47SEmmanuel Vadot			};
2635def4c47SEmmanuel Vadot
2645def4c47SEmmanuel Vadot			i2s0: i2s@50250000 {
265*b97ee269SEmmanuel Vadot				compatible = "canaan,k210-i2s", "snps,designware-i2s";
2665def4c47SEmmanuel Vadot				reg = <0x50250000 0x200>;
2675def4c47SEmmanuel Vadot				interrupts = <5>;
2685def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2S0>;
2695def4c47SEmmanuel Vadot				clock-names = "i2sclk";
2705def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2S0>;
2715def4c47SEmmanuel Vadot			};
2725def4c47SEmmanuel Vadot
2735def4c47SEmmanuel Vadot			i2s1: i2s@50260000 {
274*b97ee269SEmmanuel Vadot				compatible = "canaan,k210-i2s", "snps,designware-i2s";
2755def4c47SEmmanuel Vadot				reg = <0x50260000 0x200>;
2765def4c47SEmmanuel Vadot				interrupts = <6>;
2775def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2S1>;
2785def4c47SEmmanuel Vadot				clock-names = "i2sclk";
2795def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2S1>;
2805def4c47SEmmanuel Vadot			};
2815def4c47SEmmanuel Vadot
2825def4c47SEmmanuel Vadot			i2s2: i2s@50270000 {
283*b97ee269SEmmanuel Vadot				compatible = "canaan,k210-i2s", "snps,designware-i2s";
2845def4c47SEmmanuel Vadot				reg = <0x50270000 0x200>;
2855def4c47SEmmanuel Vadot				interrupts = <7>;
2865def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2S2>;
2875def4c47SEmmanuel Vadot				clock-names = "i2sclk";
2885def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2S2>;
2895def4c47SEmmanuel Vadot			};
2905def4c47SEmmanuel Vadot
2915def4c47SEmmanuel Vadot			i2c0: i2c@50280000 {
2925def4c47SEmmanuel Vadot				compatible = "snps,designware-i2c";
2935def4c47SEmmanuel Vadot				reg = <0x50280000 0x100>;
2945def4c47SEmmanuel Vadot				interrupts = <8>;
2955def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2C0>,
2965def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
2975def4c47SEmmanuel Vadot				clock-names = "ref", "pclk";
2985def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2C0>;
2995def4c47SEmmanuel Vadot			};
3005def4c47SEmmanuel Vadot
3015def4c47SEmmanuel Vadot			i2c1: i2c@50290000 {
3025def4c47SEmmanuel Vadot				compatible = "snps,designware-i2c";
3035def4c47SEmmanuel Vadot				reg = <0x50290000 0x100>;
3045def4c47SEmmanuel Vadot				interrupts = <9>;
3055def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2C1>,
3065def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3075def4c47SEmmanuel Vadot				clock-names = "ref", "pclk";
3085def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2C1>;
3095def4c47SEmmanuel Vadot			};
3105def4c47SEmmanuel Vadot
3115def4c47SEmmanuel Vadot			i2c2: i2c@502a0000 {
3125def4c47SEmmanuel Vadot				compatible = "snps,designware-i2c";
3135def4c47SEmmanuel Vadot				reg = <0x502A0000 0x100>;
3145def4c47SEmmanuel Vadot				interrupts = <10>;
3155def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_I2C2>,
3165def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3175def4c47SEmmanuel Vadot				clock-names = "ref", "pclk";
3185def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_I2C2>;
3195def4c47SEmmanuel Vadot			};
3205def4c47SEmmanuel Vadot
3215def4c47SEmmanuel Vadot			fpioa: pinmux@502b0000 {
3225def4c47SEmmanuel Vadot				compatible = "canaan,k210-fpioa";
3235def4c47SEmmanuel Vadot				reg = <0x502B0000 0x100>;
3245def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_FPIOA>,
3255def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3265def4c47SEmmanuel Vadot				clock-names = "ref", "pclk";
3275def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_FPIOA>;
3285def4c47SEmmanuel Vadot				canaan,k210-sysctl-power = <&sysctl 108>;
3295def4c47SEmmanuel Vadot			};
3305def4c47SEmmanuel Vadot
3315def4c47SEmmanuel Vadot			timer0: timer@502d0000 {
3325def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
333*b97ee269SEmmanuel Vadot				reg = <0x502D0000 0x14>;
334*b97ee269SEmmanuel Vadot				interrupts = <14>;
3355def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER0>,
3365def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3375def4c47SEmmanuel Vadot				clock-names = "timer", "pclk";
3385def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER0>;
3395def4c47SEmmanuel Vadot			};
3405def4c47SEmmanuel Vadot
341*b97ee269SEmmanuel Vadot			timer1: timer@502d0014 {
3425def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
343*b97ee269SEmmanuel Vadot				reg = <0x502D0014 0x14>;
344*b97ee269SEmmanuel Vadot				interrupts = <15>;
345*b97ee269SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER0>,
346*b97ee269SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
347*b97ee269SEmmanuel Vadot				clock-names = "timer", "pclk";
348*b97ee269SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER0>;
349*b97ee269SEmmanuel Vadot			};
350*b97ee269SEmmanuel Vadot
351*b97ee269SEmmanuel Vadot			timer2: timer@502e0000 {
352*b97ee269SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
353*b97ee269SEmmanuel Vadot				reg = <0x502E0000 0x14>;
354*b97ee269SEmmanuel Vadot				interrupts = <16>;
3555def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER1>,
3565def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3575def4c47SEmmanuel Vadot				clock-names = "timer", "pclk";
3585def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER1>;
3595def4c47SEmmanuel Vadot			};
3605def4c47SEmmanuel Vadot
361*b97ee269SEmmanuel Vadot			timer3: timer@502e0014 {
3625def4c47SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
363*b97ee269SEmmanuel Vadot				reg = <0x502E0014 0x114>;
364*b97ee269SEmmanuel Vadot				interrupts = <17>;
365*b97ee269SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER1>,
366*b97ee269SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
367*b97ee269SEmmanuel Vadot				clock-names = "timer", "pclk";
368*b97ee269SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER1>;
369*b97ee269SEmmanuel Vadot			};
370*b97ee269SEmmanuel Vadot
371*b97ee269SEmmanuel Vadot			timer4: timer@502f0000 {
372*b97ee269SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
373*b97ee269SEmmanuel Vadot				reg = <0x502F0000 0x14>;
374*b97ee269SEmmanuel Vadot				interrupts = <18>;
375*b97ee269SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER2>,
376*b97ee269SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
377*b97ee269SEmmanuel Vadot				clock-names = "timer", "pclk";
378*b97ee269SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER2>;
379*b97ee269SEmmanuel Vadot			};
380*b97ee269SEmmanuel Vadot
381*b97ee269SEmmanuel Vadot			timer5: timer@502f0014 {
382*b97ee269SEmmanuel Vadot				compatible = "snps,dw-apb-timer";
383*b97ee269SEmmanuel Vadot				reg = <0x502F0014 0x14>;
384*b97ee269SEmmanuel Vadot				interrupts = <19>;
3855def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_TIMER2>,
3865def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB0>;
3875def4c47SEmmanuel Vadot				clock-names = "timer", "pclk";
3885def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_TIMER2>;
3895def4c47SEmmanuel Vadot			};
3905def4c47SEmmanuel Vadot		};
3915def4c47SEmmanuel Vadot
3925def4c47SEmmanuel Vadot		apb1: bus@50400000 {
3935def4c47SEmmanuel Vadot			#address-cells = <1>;
3945def4c47SEmmanuel Vadot			#size-cells = <1>;
3955def4c47SEmmanuel Vadot			compatible = "simple-pm-bus";
396*b97ee269SEmmanuel Vadot			ranges = <0x50400000 0x50400000 0x40100>;
3975def4c47SEmmanuel Vadot			clocks = <&sysclk K210_CLK_APB1>;
3985def4c47SEmmanuel Vadot
3995def4c47SEmmanuel Vadot			wdt0: watchdog@50400000 {
4005def4c47SEmmanuel Vadot				compatible = "snps,dw-wdt";
4015def4c47SEmmanuel Vadot				reg = <0x50400000 0x100>;
4025def4c47SEmmanuel Vadot				interrupts = <21>;
4035def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_WDT0>,
4045def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB1>;
4055def4c47SEmmanuel Vadot				clock-names = "tclk", "pclk";
4065def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_WDT0>;
4075def4c47SEmmanuel Vadot			};
4085def4c47SEmmanuel Vadot
4095def4c47SEmmanuel Vadot			wdt1: watchdog@50410000 {
4105def4c47SEmmanuel Vadot				compatible = "snps,dw-wdt";
4115def4c47SEmmanuel Vadot				reg = <0x50410000 0x100>;
4125def4c47SEmmanuel Vadot				interrupts = <22>;
4135def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_WDT1>,
4145def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB1>;
4155def4c47SEmmanuel Vadot				clock-names = "tclk", "pclk";
4165def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_WDT1>;
4175def4c47SEmmanuel Vadot			};
4185def4c47SEmmanuel Vadot
4195def4c47SEmmanuel Vadot			sysctl: syscon@50440000 {
4205def4c47SEmmanuel Vadot				compatible = "canaan,k210-sysctl",
4215def4c47SEmmanuel Vadot					     "syscon", "simple-mfd";
4225def4c47SEmmanuel Vadot				reg = <0x50440000 0x100>;
4235def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_APB1>;
4245def4c47SEmmanuel Vadot				clock-names = "pclk";
4255def4c47SEmmanuel Vadot
4265def4c47SEmmanuel Vadot				sysclk: clock-controller {
4275def4c47SEmmanuel Vadot					#clock-cells = <1>;
4285def4c47SEmmanuel Vadot					compatible = "canaan,k210-clk";
4295def4c47SEmmanuel Vadot					clocks = <&in0>;
4305def4c47SEmmanuel Vadot				};
4315def4c47SEmmanuel Vadot
4325def4c47SEmmanuel Vadot				sysrst: reset-controller {
4335def4c47SEmmanuel Vadot					compatible = "canaan,k210-rst";
4345def4c47SEmmanuel Vadot					#reset-cells = <1>;
4355def4c47SEmmanuel Vadot				};
4365def4c47SEmmanuel Vadot
4375def4c47SEmmanuel Vadot				reboot: syscon-reboot {
4385def4c47SEmmanuel Vadot					compatible = "syscon-reboot";
4395def4c47SEmmanuel Vadot					regmap = <&sysctl>;
4405def4c47SEmmanuel Vadot					offset = <48>;
4415def4c47SEmmanuel Vadot					mask = <1>;
4425def4c47SEmmanuel Vadot					value = <1>;
4435def4c47SEmmanuel Vadot				};
4445def4c47SEmmanuel Vadot			};
4455def4c47SEmmanuel Vadot		};
4465def4c47SEmmanuel Vadot
4475def4c47SEmmanuel Vadot		apb2: bus@52000000 {
4485def4c47SEmmanuel Vadot			#address-cells = <1>;
4495def4c47SEmmanuel Vadot			#size-cells = <1>;
4505def4c47SEmmanuel Vadot			compatible = "simple-pm-bus";
451*b97ee269SEmmanuel Vadot			ranges = <0x52000000 0x52000000 0x2000200>;
4525def4c47SEmmanuel Vadot			clocks = <&sysclk K210_CLK_APB2>;
4535def4c47SEmmanuel Vadot
4545def4c47SEmmanuel Vadot			spi0: spi@52000000 {
4555def4c47SEmmanuel Vadot				#address-cells = <1>;
4565def4c47SEmmanuel Vadot				#size-cells = <0>;
4575def4c47SEmmanuel Vadot				compatible = "canaan,k210-spi";
4585def4c47SEmmanuel Vadot				reg = <0x52000000 0x100>;
4595def4c47SEmmanuel Vadot				interrupts = <1>;
4605def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_SPI0>,
4615def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB2>;
4625def4c47SEmmanuel Vadot				clock-names = "ssi_clk", "pclk";
4635def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_SPI0>;
4645def4c47SEmmanuel Vadot				reset-names = "spi";
4655def4c47SEmmanuel Vadot				num-cs = <4>;
4665def4c47SEmmanuel Vadot				reg-io-width = <4>;
4675def4c47SEmmanuel Vadot			};
4685def4c47SEmmanuel Vadot
4695def4c47SEmmanuel Vadot			spi1: spi@53000000 {
4705def4c47SEmmanuel Vadot				#address-cells = <1>;
4715def4c47SEmmanuel Vadot				#size-cells = <0>;
4725def4c47SEmmanuel Vadot				compatible = "canaan,k210-spi";
4735def4c47SEmmanuel Vadot				reg = <0x53000000 0x100>;
4745def4c47SEmmanuel Vadot				interrupts = <2>;
4755def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_SPI1>,
4765def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB2>;
4775def4c47SEmmanuel Vadot				clock-names = "ssi_clk", "pclk";
4785def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_SPI1>;
4795def4c47SEmmanuel Vadot				reset-names = "spi";
4805def4c47SEmmanuel Vadot				num-cs = <4>;
4815def4c47SEmmanuel Vadot				reg-io-width = <4>;
4825def4c47SEmmanuel Vadot			};
4835def4c47SEmmanuel Vadot
4845def4c47SEmmanuel Vadot			spi3: spi@54000000 {
4855def4c47SEmmanuel Vadot				#address-cells = <1>;
4865def4c47SEmmanuel Vadot				#size-cells = <0>;
4875def4c47SEmmanuel Vadot				compatible = "snps,dwc-ssi-1.01a";
4885def4c47SEmmanuel Vadot				reg = <0x54000000 0x200>;
4895def4c47SEmmanuel Vadot				interrupts = <4>;
4905def4c47SEmmanuel Vadot				clocks = <&sysclk K210_CLK_SPI3>,
4915def4c47SEmmanuel Vadot					 <&sysclk K210_CLK_APB2>;
4925def4c47SEmmanuel Vadot				clock-names = "ssi_clk", "pclk";
4935def4c47SEmmanuel Vadot				resets = <&sysrst K210_RST_SPI3>;
4945def4c47SEmmanuel Vadot				reset-names = "spi";
495*b97ee269SEmmanuel Vadot
4965def4c47SEmmanuel Vadot				num-cs = <4>;
4975def4c47SEmmanuel Vadot				reg-io-width = <4>;
4985def4c47SEmmanuel Vadot			};
4995def4c47SEmmanuel Vadot		};
5005def4c47SEmmanuel Vadot	};
5015def4c47SEmmanuel Vadot};
502