Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> |
| 4 | */ |
| 5 | |
| 6 | #include <dt-bindings/clock/k210-sysctl.h> |
| 7 | #include <dt-bindings/mfd/k210-sysctl.h> |
Sean Anderson | 6870556 | 2020-09-14 11:02:04 -0400 | [diff] [blame] | 8 | #include <dt-bindings/pinctrl/k210-pinctrl.h> |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 9 | #include <dt-bindings/reset/k210-sysctl.h> |
| 10 | |
| 11 | / { |
| 12 | /* |
| 13 | * Although the K210 is a 64-bit CPU, the address bus is only 32-bits |
| 14 | * wide, and the upper half of all addresses is ignored. |
| 15 | */ |
| 16 | #address-cells = <1>; |
| 17 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 18 | compatible = "canaan,kendryte-k210"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 19 | |
| 20 | aliases { |
Sean Anderson | c6d0ef8 | 2020-09-28 10:52:28 -0400 | [diff] [blame] | 21 | cpu0 = &cpu0; |
| 22 | cpu1 = &cpu1; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 23 | dma0 = &dmac0; |
| 24 | gpio0 = &gpio0; |
| 25 | gpio1 = &gpio1_0; |
| 26 | i2c0 = &i2c0; |
| 27 | i2c1 = &i2c1; |
| 28 | i2c2 = &i2c2; |
| 29 | pinctrl0 = &fpioa; |
| 30 | serial0 = &uarths0; |
| 31 | serial1 = &uart1; |
| 32 | serial2 = &uart2; |
| 33 | serial3 = &uart3; |
| 34 | spi0 = &spi0; |
| 35 | spi1 = &spi1; |
| 36 | spi2 = &spi2; |
| 37 | spi3 = &spi3; |
| 38 | timer0 = &timer0; |
| 39 | timer1 = &timer1; |
| 40 | timer2 = &timer2; |
| 41 | }; |
| 42 | |
| 43 | cpus { |
| 44 | #address-cells = <1>; |
| 45 | #size-cells = <0>; |
| 46 | timebase-frequency = <7800000>; |
| 47 | cpu0: cpu@0 { |
| 48 | device_type = "cpu"; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 49 | compatible = "canaan,k210", "sifive,rocket0", "riscv"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 50 | reg = <0>; |
| 51 | riscv,isa = "rv64imafdgc"; |
| 52 | mmu-type = "sv39"; |
| 53 | i-cache-block-size = <64>; |
| 54 | i-cache-size = <0x8000>; |
| 55 | d-cache-block-size = <64>; |
| 56 | d-cache-size = <0x8000>; |
| 57 | clocks = <&sysclk K210_CLK_CPU>; |
| 58 | cpu0_intc: interrupt-controller { |
| 59 | #interrupt-cells = <1>; |
| 60 | interrupt-controller; |
| 61 | compatible = "riscv,cpu-intc"; |
| 62 | }; |
| 63 | }; |
| 64 | cpu1: cpu@1 { |
| 65 | device_type = "cpu"; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 66 | compatible = "canaan,k210", "sifive,rocket0", "riscv"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 67 | reg = <1>; |
| 68 | riscv,isa = "rv64imafdgc"; |
| 69 | mmu-type = "sv39"; |
| 70 | i-cache-block-size = <64>; |
| 71 | i-cache-size = <0x8000>; |
| 72 | d-cache-block-size = <64>; |
| 73 | d-cache-size = <0x8000>; |
| 74 | clocks = <&sysclk K210_CLK_CPU>; |
| 75 | cpu1_intc: interrupt-controller { |
| 76 | #interrupt-cells = <1>; |
| 77 | interrupt-controller; |
| 78 | compatible = "riscv,cpu-intc"; |
| 79 | }; |
| 80 | }; |
| 81 | }; |
| 82 | |
| 83 | sram: memory@80000000 { |
| 84 | device_type = "memory"; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 85 | compatible = "canaan,k210-sram"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 86 | reg = <0x80000000 0x400000>, |
| 87 | <0x80400000 0x200000>, |
| 88 | <0x80600000 0x200000>; |
Sean Anderson | 7be6d2b | 2021-04-08 22:13:11 -0400 | [diff] [blame] | 89 | reg-names = "sram0", "sram1", "aisram"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 90 | clocks = <&sysclk K210_CLK_SRAM0>, |
| 91 | <&sysclk K210_CLK_SRAM1>, |
Sean Anderson | b23d757 | 2021-04-08 22:13:12 -0400 | [diff] [blame] | 92 | <&sysclk K210_CLK_AI>; |
Sean Anderson | 7be6d2b | 2021-04-08 22:13:11 -0400 | [diff] [blame] | 93 | clock-names = "sram0", "sram1", "aisram"; |
Sean Anderson | e8d9e3a | 2021-04-08 22:13:09 -0400 | [diff] [blame] | 94 | u-boot,dm-pre-reloc; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 95 | }; |
| 96 | |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 97 | clocks { |
| 98 | in0: osc { |
| 99 | compatible = "fixed-clock"; |
| 100 | #clock-cells = <0>; |
| 101 | clock-frequency = <26000000>; |
Sean Anderson | e8d9e3a | 2021-04-08 22:13:09 -0400 | [diff] [blame] | 102 | u-boot,dm-pre-reloc; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 103 | }; |
| 104 | }; |
| 105 | |
| 106 | soc { |
| 107 | #address-cells = <1>; |
| 108 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 109 | compatible = "canaan,k210-soc", "simple-bus"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 110 | ranges; |
| 111 | interrupt-parent = <&plic0>; |
| 112 | |
| 113 | debug0: debug@0 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 114 | compatible = "canaan,k210-debug", "riscv,debug"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 115 | reg = <0x0 0x1000>; |
| 116 | }; |
| 117 | |
| 118 | rom0: nvmem@1000 { |
| 119 | reg = <0x1000 0x1000>; |
| 120 | read-only; |
| 121 | }; |
| 122 | |
Sean Anderson | c6d0ef8 | 2020-09-28 10:52:28 -0400 | [diff] [blame] | 123 | clint0: clint@2000000 { |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 124 | #interrupt-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 125 | compatible = "canaan,k210-clint", "sifive,clint0", "riscv,clint0"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 126 | reg = <0x2000000 0xC000>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 127 | interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, |
| 128 | <&cpu1_intc 3>, <&cpu1_intc 7>; |
Sean Anderson | c6d0ef8 | 2020-09-28 10:52:28 -0400 | [diff] [blame] | 129 | clocks = <&sysclk K210_CLK_CLINT>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | plic0: interrupt-controller@C000000 { |
| 133 | #interrupt-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 134 | compatible = "canaan,k210-plic", "sifive,plic-1.0.0", "riscv,plic0"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 135 | reg = <0xC000000 0x4000000>; |
| 136 | interrupt-controller; |
| 137 | interrupts-extended = <&cpu0_intc 9>, <&cpu0_intc 11>, |
| 138 | <&cpu1_intc 9>, <&cpu1_intc 11>; |
| 139 | riscv,ndev = <65>; |
| 140 | riscv,max-priority = <7>; |
| 141 | }; |
| 142 | |
| 143 | uarths0: serial@38000000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 144 | compatible = "canaan,k210-uarths", "sifive,uart0"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 145 | reg = <0x38000000 0x1000>; |
| 146 | interrupts = <33>; |
| 147 | clocks = <&sysclk K210_CLK_CPU>; |
| 148 | status = "disabled"; |
| 149 | }; |
| 150 | |
| 151 | gpio0: gpio-controller@38001000 { |
| 152 | #interrupt-cells = <2>; |
| 153 | #gpio-cells = <2>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 154 | compatible = "canaan,k210-gpiohs", "sifive,gpio0"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 155 | reg = <0x38001000 0x1000>; |
| 156 | interrupt-controller; |
| 157 | interrupts = <34 35 36 37 38 39 40 41 |
| 158 | 42 43 44 45 46 47 48 49 |
| 159 | 50 51 52 53 54 55 56 57 |
| 160 | 58 59 60 61 62 63 64 65>; |
| 161 | gpio-controller; |
| 162 | ngpios = <32>; |
| 163 | status = "disabled"; |
| 164 | }; |
| 165 | |
| 166 | kpu0: kpu@40800000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 167 | compatible = "canaan,k210-kpu"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 168 | reg = <0x40800000 0xc00000>; |
| 169 | interrupts = <25>; |
| 170 | clocks = <&sysclk K210_CLK_AI>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 171 | status = "disabled"; |
| 172 | }; |
| 173 | |
| 174 | fft0: fft@42000000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 175 | compatible = "canaan,k210-fft"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 176 | reg = <0x42000000 0x400000>; |
| 177 | interrupts = <26>; |
| 178 | clocks = <&sysclk K210_CLK_FFT>; |
| 179 | resets = <&sysrst K210_RST_FFT>; |
| 180 | status = "disabled"; |
| 181 | }; |
| 182 | |
| 183 | dmac0: dma-controller@50000000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 184 | compatible = "canaan,k210-dmac", "snps,axi-dma-1.01a"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 185 | reg = <0x50000000 0x1000>; |
| 186 | interrupts = <27 28 29 30 31 32>; |
| 187 | clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>; |
| 188 | clock-names = "core-clk", "cfgr-clk"; |
| 189 | resets = <&sysrst K210_RST_DMA>; |
| 190 | dma-channels = <6>; |
| 191 | snps,dma-masters = <2>; |
| 192 | snps,data-width = <5>; |
Sean Anderson | d1b3321 | 2020-10-12 14:18:15 -0400 | [diff] [blame] | 193 | snps,block-size = <0x200000 0x200000 0x200000 |
| 194 | 0x200000 0x200000 0x200000>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 195 | snps,axi-max-burst-len = <256>; |
| 196 | status = "disabled"; |
| 197 | }; |
| 198 | |
| 199 | apb0: bus@50200000 { |
| 200 | #address-cells = <1>; |
| 201 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 202 | compatible = "canaan,k210-apb", "simple-pm-bus"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 203 | ranges; |
| 204 | clocks = <&sysclk K210_CLK_APB0>; |
| 205 | |
| 206 | gpio1: gpio-controller@50200000 { |
| 207 | #address-cells = <1>; |
| 208 | #size-cells = <0>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 209 | compatible = "canaan,k210-gpio", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 210 | "snps,dw-apb-gpio"; |
| 211 | reg = <0x50200000 0x80>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 212 | clocks = <&sysclk K210_CLK_APB0>, |
| 213 | <&sysclk K210_CLK_GPIO>; |
| 214 | clock-names = "bus", "db"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 215 | resets = <&sysrst K210_RST_GPIO>; |
| 216 | status = "disabled"; |
| 217 | |
| 218 | gpio1_0: gpio1@0 { |
| 219 | #gpio-cells = <2>; |
| 220 | #interrupt-cells = <2>; |
| 221 | compatible = "snps,dw-apb-gpio-port"; |
| 222 | reg = <0>; |
| 223 | interrupt-controller; |
| 224 | interrupts = <23>; |
| 225 | gpio-controller; |
| 226 | snps,nr-gpios = <8>; |
| 227 | }; |
| 228 | }; |
| 229 | |
| 230 | uart1: serial@50210000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 231 | compatible = "canaan,k210-uart", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 232 | "snps,dw-apb-uart"; |
| 233 | reg = <0x50210000 0x100>; |
| 234 | interrupts = <11>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 235 | clocks = <&sysclk K210_CLK_UART1>, |
| 236 | <&sysclk K210_CLK_APB0>; |
| 237 | clock-names = "baudclk", "apb_pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 238 | resets = <&sysrst K210_RST_UART1>; |
| 239 | reg-io-width = <4>; |
| 240 | reg-shift = <2>; |
| 241 | dcd-override; |
| 242 | dsr-override; |
| 243 | cts-override; |
| 244 | ri-override; |
| 245 | status = "disabled"; |
| 246 | }; |
| 247 | |
| 248 | uart2: serial@50220000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 249 | compatible = "canaan,k210-uart", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 250 | "snps,dw-apb-uart"; |
| 251 | reg = <0x50220000 0x100>; |
| 252 | interrupts = <12>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 253 | clocks = <&sysclk K210_CLK_UART2>, |
| 254 | <&sysclk K210_CLK_APB0>; |
| 255 | clock-names = "baudclk", "apb_pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 256 | resets = <&sysrst K210_RST_UART2>; |
| 257 | reg-io-width = <4>; |
| 258 | reg-shift = <2>; |
| 259 | dcd-override; |
| 260 | dsr-override; |
| 261 | cts-override; |
| 262 | ri-override; |
| 263 | status = "disabled"; |
| 264 | }; |
| 265 | |
| 266 | uart3: serial@50230000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 267 | compatible = "canaan,k210-uart", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 268 | "snps,dw-apb-uart"; |
| 269 | reg = <0x50230000 0x100>; |
| 270 | interrupts = <13>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 271 | clocks = <&sysclk K210_CLK_UART3>, |
| 272 | <&sysclk K210_CLK_APB0>; |
| 273 | clock-names = "baudclk", "apb_pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 274 | resets = <&sysrst K210_RST_UART3>; |
| 275 | reg-io-width = <4>; |
| 276 | reg-shift = <2>; |
| 277 | dcd-override; |
| 278 | dsr-override; |
| 279 | cts-override; |
| 280 | ri-override; |
| 281 | status = "disabled"; |
| 282 | }; |
| 283 | |
| 284 | spi2: spi@50240000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 285 | compatible = "canaan,k210-spi", |
Sean Anderson | fd9571a | 2020-10-16 18:57:50 -0400 | [diff] [blame] | 286 | "snps,dw-apb-ssi-4.01", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 287 | "snps,dw-apb-ssi"; |
| 288 | spi-slave; |
| 289 | reg = <0x50240000 0x100>; |
| 290 | interrupts = <2>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 291 | clocks = <&sysclk K210_CLK_SPI2>, |
| 292 | <&sysclk K210_CLK_APB0>; |
| 293 | clock-names = "ssi_clk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 294 | resets = <&sysrst K210_RST_SPI2>; |
| 295 | spi-max-frequency = <25000000>; |
| 296 | status = "disabled"; |
| 297 | }; |
| 298 | |
| 299 | i2s0: i2s@50250000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 300 | compatible = "canaan,k210-i2s", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 301 | "snps,designware-i2s"; |
| 302 | reg = <0x50250000 0x200>; |
| 303 | interrupts = <5>; |
| 304 | clocks = <&sysclk K210_CLK_I2S0>; |
| 305 | clock-names = "i2sclk"; |
| 306 | resets = <&sysrst K210_RST_I2S0>; |
| 307 | status = "disabled"; |
| 308 | }; |
| 309 | |
| 310 | apu0: sound@520250200 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 311 | compatible = "canaan,k210-apu"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 312 | reg = <0x50250200 0x200>; |
| 313 | status = "disabled"; |
| 314 | }; |
| 315 | |
| 316 | i2s1: i2s@50260000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 317 | compatible = "canaan,k210-i2s", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 318 | "snps,designware-i2s"; |
| 319 | reg = <0x50260000 0x200>; |
| 320 | interrupts = <6>; |
| 321 | clocks = <&sysclk K210_CLK_I2S1>; |
| 322 | clock-names = "i2sclk"; |
| 323 | resets = <&sysrst K210_RST_I2S1>; |
| 324 | status = "disabled"; |
| 325 | }; |
| 326 | |
| 327 | i2s2: i2s@50270000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 328 | compatible = "canaan,k210-i2s", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 329 | "snps,designware-i2s"; |
| 330 | reg = <0x50270000 0x200>; |
| 331 | interrupts = <7>; |
| 332 | clocks = <&sysclk K210_CLK_I2S2>; |
| 333 | clock-names = "i2sclk"; |
| 334 | resets = <&sysrst K210_RST_I2S2>; |
| 335 | status = "disabled"; |
| 336 | }; |
| 337 | |
| 338 | i2c0: i2c@50280000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 339 | compatible = "canaan,k210-i2c", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 340 | "snps,designware-i2c"; |
| 341 | reg = <0x50280000 0x100>; |
| 342 | interrupts = <8>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 343 | clocks = <&sysclk K210_CLK_I2C0>, |
| 344 | <&sysclk K210_CLK_APB0>; |
| 345 | clock-names = "ref", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 346 | resets = <&sysrst K210_RST_I2C0>; |
| 347 | status = "disabled"; |
| 348 | }; |
| 349 | |
| 350 | i2c1: i2c@50290000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 351 | compatible = "canaan,k210-i2c", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 352 | "snps,designware-i2c"; |
| 353 | reg = <0x50290000 0x100>; |
| 354 | interrupts = <9>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 355 | clocks = <&sysclk K210_CLK_I2C1>, |
| 356 | <&sysclk K210_CLK_APB0>; |
| 357 | clock-names = "ref", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 358 | resets = <&sysrst K210_RST_I2C1>; |
| 359 | status = "disabled"; |
| 360 | }; |
| 361 | |
| 362 | i2c2: i2c@502A0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 363 | compatible = "canaan,k210-i2c", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 364 | "snps,designware-i2c"; |
| 365 | reg = <0x502A0000 0x100>; |
| 366 | interrupts = <10>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 367 | clocks = <&sysclk K210_CLK_I2C2>, |
| 368 | <&sysclk K210_CLK_APB0>; |
| 369 | clock-names = "ref", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 370 | resets = <&sysrst K210_RST_I2C2>; |
| 371 | status = "disabled"; |
| 372 | }; |
| 373 | |
| 374 | fpioa: pinmux@502B0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 375 | compatible = "canaan,k210-fpioa"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 376 | reg = <0x502B0000 0x100>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 377 | clocks = <&sysclk K210_CLK_FPIOA>, |
| 378 | <&sysclk K210_CLK_APB0>; |
| 379 | clock-names = "ref", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 380 | resets = <&sysrst K210_RST_FPIOA>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 381 | canaan,k210-sysctl = <&sysctl>; |
| 382 | canaan,k210-power-offset = <K210_SYSCTL_POWER_SEL>; |
Sean Anderson | 6870556 | 2020-09-14 11:02:04 -0400 | [diff] [blame] | 383 | pinctrl-0 = <&fpioa_jtag>; |
| 384 | pinctrl-names = "default"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 385 | status = "disabled"; |
Sean Anderson | 6870556 | 2020-09-14 11:02:04 -0400 | [diff] [blame] | 386 | |
| 387 | fpioa_jtag: jtag { |
| 388 | pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>, |
| 389 | <K210_FPIOA(1, K210_PCF_JTAG_TDI)>, |
| 390 | <K210_FPIOA(2, K210_PCF_JTAG_TMS)>, |
| 391 | <K210_FPIOA(3, K210_PCF_JTAG_TDO)>; |
| 392 | }; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 393 | }; |
| 394 | |
| 395 | sha256: sha256@502C0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 396 | compatible = "canaan,k210-sha256"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 397 | reg = <0x502C0000 0x100>; |
| 398 | clocks = <&sysclk K210_CLK_SHA>; |
| 399 | resets = <&sysrst K210_RST_SHA>; |
| 400 | status = "disabled"; |
| 401 | }; |
| 402 | |
| 403 | timer0: timer@502D0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 404 | compatible = "canaan,k210-timer", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 405 | "snps,dw-apb-timer"; |
| 406 | reg = <0x502D0000 0x100>; |
| 407 | interrupts = <14 15>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 408 | clocks = <&sysclk K210_CLK_TIMER0>, |
| 409 | <&sysclk K210_CLK_APB0>; |
| 410 | clock-names = "timer", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 411 | resets = <&sysrst K210_RST_TIMER0>; |
| 412 | status = "disabled"; |
| 413 | }; |
| 414 | |
| 415 | timer1: timer@502E0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 416 | compatible = "canaan,k210-timer", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 417 | "snps,dw-apb-timer"; |
| 418 | reg = <0x502E0000 0x100>; |
| 419 | interrupts = <16 17>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 420 | clocks = <&sysclk K210_CLK_TIMER1>, |
| 421 | <&sysclk K210_CLK_APB0>; |
| 422 | clock-names = "timer", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 423 | resets = <&sysrst K210_RST_TIMER1>; |
| 424 | status = "disabled"; |
| 425 | }; |
| 426 | |
| 427 | timer2: timer@502F0000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 428 | compatible = "canaan,k210-timer", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 429 | "snps,dw-apb-timer"; |
| 430 | reg = <0x502F0000 0x100>; |
| 431 | interrupts = <18 19>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 432 | clocks = <&sysclk K210_CLK_TIMER2>, |
| 433 | <&sysclk K210_CLK_APB0>; |
| 434 | clock-names = "timer", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 435 | resets = <&sysrst K210_RST_TIMER2>; |
| 436 | status = "disabled"; |
| 437 | }; |
| 438 | }; |
| 439 | |
| 440 | apb1: bus@50400000 { |
| 441 | #address-cells = <1>; |
| 442 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 443 | compatible = "canaan,k210-apb", "simple-pm-bus"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 444 | ranges; |
| 445 | clocks = <&sysclk K210_CLK_APB1>; |
| 446 | |
| 447 | wdt0: watchdog@50400000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 448 | compatible = "canaan,k210-wdt", "snps,dw-wdt"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 449 | reg = <0x50400000 0x100>; |
| 450 | interrupts = <21>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 451 | clocks = <&sysclk K210_CLK_WDT0>, |
| 452 | <&sysclk K210_CLK_APB1>; |
| 453 | clock-names = "tclk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 454 | resets = <&sysrst K210_RST_WDT0>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 455 | }; |
| 456 | |
| 457 | wdt1: watchdog@50410000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 458 | compatible = "canaan,k210-wdt", "snps,dw-wdt"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 459 | reg = <0x50410000 0x100>; |
| 460 | interrupts = <22>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 461 | clocks = <&sysclk K210_CLK_WDT1>, |
| 462 | <&sysclk K210_CLK_APB1>; |
| 463 | clock-names = "tclk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 464 | resets = <&sysrst K210_RST_WDT1>; |
| 465 | status = "disabled"; |
| 466 | }; |
| 467 | |
| 468 | otp0: nvmem@50420000 { |
| 469 | #address-cells = <1>; |
| 470 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 471 | compatible = "canaan,k210-otp"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 472 | reg = <0x50420000 0x100>, |
| 473 | <0x88000000 0x20000>; |
| 474 | reg-names = "reg", "mem"; |
| 475 | clocks = <&sysclk K210_CLK_ROM>; |
| 476 | resets = <&sysrst K210_RST_ROM>; |
| 477 | read-only; |
| 478 | status = "disabled"; |
| 479 | |
| 480 | /* Bootloader */ |
| 481 | firmware@00000 { |
| 482 | reg = <0x00000 0xC200>; |
| 483 | }; |
| 484 | |
| 485 | /* |
| 486 | * config string as described in RISC-V |
| 487 | * privileged spec 1.9 |
| 488 | */ |
| 489 | config-1-9@1c000 { |
| 490 | reg = <0x1C000 0x1000>; |
| 491 | }; |
| 492 | |
| 493 | /* |
| 494 | * Device tree containing only registers, |
| 495 | * interrupts, and cpus |
| 496 | */ |
| 497 | fdt@1d000 { |
| 498 | reg = <0x1D000 0x2000>; |
| 499 | }; |
| 500 | |
| 501 | /* CPU/ROM credits */ |
| 502 | credits@1f000 { |
| 503 | reg = <0x1F000 0x1000>; |
| 504 | }; |
| 505 | }; |
| 506 | |
| 507 | dvp0: camera@50430000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 508 | compatible = "canaan,k210-dvp"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 509 | reg = <0x50430000 0x100>; |
| 510 | interrupts = <24>; |
| 511 | clocks = <&sysclk K210_CLK_DVP>; |
| 512 | resets = <&sysrst K210_RST_DVP>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 513 | canaan,k210-sysctl = <&sysctl>; |
| 514 | canaan,k210-misc-offset = <K210_SYSCTL_MISC>; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 515 | status = "disabled"; |
| 516 | }; |
| 517 | |
| 518 | sysctl: syscon@50440000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 519 | compatible = "canaan,k210-sysctl", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 520 | "syscon", "simple-mfd"; |
| 521 | reg = <0x50440000 0x100>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 522 | clocks = <&sysclk K210_CLK_APB1>; |
| 523 | clock-names = "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 524 | reg-io-width = <4>; |
Sean Anderson | e8d9e3a | 2021-04-08 22:13:09 -0400 | [diff] [blame] | 525 | u-boot,dm-pre-reloc; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 526 | |
| 527 | sysclk: clock-controller { |
| 528 | #clock-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 529 | compatible = "canaan,k210-clk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 530 | clocks = <&in0>; |
Sean Anderson | e6638b4 | 2021-06-11 00:16:15 -0400 | [diff] [blame] | 531 | assigned-clocks = <&sysclk K210_CLK_PLL1>; |
| 532 | assigned-clock-rates = <390000000>; |
Sean Anderson | e8d9e3a | 2021-04-08 22:13:09 -0400 | [diff] [blame] | 533 | u-boot,dm-pre-reloc; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 534 | }; |
| 535 | |
| 536 | sysrst: reset-controller { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 537 | compatible = "canaan,k210-rst", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 538 | "syscon-reset"; |
| 539 | #reset-cells = <1>; |
| 540 | regmap = <&sysctl>; |
| 541 | offset = <K210_SYSCTL_PERI_RESET>; |
| 542 | mask = <0x27FFFFFF>; |
| 543 | assert-high = <1>; |
| 544 | }; |
| 545 | |
| 546 | reboot { |
| 547 | compatible = "syscon-reboot"; |
| 548 | regmap = <&sysctl>; |
| 549 | offset = <K210_SYSCTL_SOFT_RESET>; |
| 550 | mask = <1>; |
| 551 | value = <1>; |
| 552 | }; |
| 553 | }; |
| 554 | |
| 555 | aes0: aes@50450000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 556 | compatible = "canaan,k210-aes"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 557 | reg = <0x50450000 0x100>; |
| 558 | clocks = <&sysclk K210_CLK_AES>; |
| 559 | resets = <&sysrst K210_RST_AES>; |
| 560 | status = "disabled"; |
| 561 | }; |
| 562 | |
| 563 | rtc: rtc@50460000 { |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 564 | compatible = "canaan,k210-rtc"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 565 | reg = <0x50460000 0x100>; |
| 566 | clocks = <&in0>; |
| 567 | resets = <&sysrst K210_RST_RTC>; |
| 568 | interrupts = <20>; |
| 569 | status = "disabled"; |
| 570 | }; |
| 571 | }; |
| 572 | |
| 573 | apb2: bus@52000000 { |
| 574 | #address-cells = <1>; |
| 575 | #size-cells = <1>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 576 | compatible = "canaan,k210-apb", "simple-pm-bus"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 577 | ranges; |
| 578 | clocks = <&sysclk K210_CLK_APB2>; |
| 579 | |
| 580 | spi0: spi@52000000 { |
| 581 | #address-cells = <1>; |
| 582 | #size-cells = <0>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 583 | compatible = "canaan,k210-spi", |
Sean Anderson | fd9571a | 2020-10-16 18:57:50 -0400 | [diff] [blame] | 584 | "snps,dw-apb-ssi-4.01", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 585 | "snps,dw-apb-ssi"; |
| 586 | reg = <0x52000000 0x100>; |
| 587 | interrupts = <1>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 588 | clocks = <&sysclk K210_CLK_SPI0>, |
| 589 | <&sysclk K210_CLK_APB2>; |
| 590 | clock-names = "ssi_clk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 591 | resets = <&sysrst K210_RST_SPI0>; |
| 592 | spi-max-frequency = <25000000>; |
| 593 | num-cs = <4>; |
| 594 | reg-io-width = <4>; |
| 595 | status = "disabled"; |
| 596 | }; |
| 597 | |
| 598 | spi1: spi@53000000 { |
| 599 | #address-cells = <1>; |
| 600 | #size-cells = <0>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 601 | compatible = "canaan,k210-spi", |
Sean Anderson | fd9571a | 2020-10-16 18:57:50 -0400 | [diff] [blame] | 602 | "snps,dw-apb-ssi-4.01", |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 603 | "snps,dw-apb-ssi"; |
| 604 | reg = <0x53000000 0x100>; |
| 605 | interrupts = <2>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 606 | clocks = <&sysclk K210_CLK_SPI1>, |
| 607 | <&sysclk K210_CLK_APB2>; |
| 608 | clock-names = "ssi_clk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 609 | resets = <&sysrst K210_RST_SPI1>; |
| 610 | spi-max-frequency = <25000000>; |
| 611 | num-cs = <4>; |
| 612 | reg-io-width = <4>; |
| 613 | status = "disabled"; |
| 614 | }; |
| 615 | |
| 616 | spi3: spi@54000000 { |
| 617 | #address-cells = <1>; |
| 618 | #size-cells = <0>; |
Damien Le Moal | 6e5a8b7 | 2022-03-01 10:35:39 +0000 | [diff] [blame] | 619 | compatible = "canaan,k210-ssi", |
Sean Anderson | fd9571a | 2020-10-16 18:57:50 -0400 | [diff] [blame] | 620 | "snps,dwc-ssi-1.01a"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 621 | reg = <0x54000000 0x200>; |
| 622 | interrupts = <4>; |
Damien Le Moal | 0a876d7 | 2022-03-01 10:35:40 +0000 | [diff] [blame^] | 623 | clocks = <&sysclk K210_CLK_SPI3>, |
| 624 | <&sysclk K210_CLK_APB2>; |
| 625 | clock-names = "ssi_clk", "pclk"; |
Sean Anderson | d11b582 | 2020-06-24 06:41:23 -0400 | [diff] [blame] | 626 | resets = <&sysrst K210_RST_SPI3>; |
| 627 | /* Could possibly go up to 200 MHz */ |
| 628 | spi-max-frequency = <100000000>; |
| 629 | num-cs = <4>; |
| 630 | reg-io-width = <4>; |
| 631 | status = "disabled"; |
| 632 | }; |
| 633 | }; |
| 634 | }; |
| 635 | }; |