sf21.dtsi 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. /*
  2. * Copyright 2023 SiFlower Corporation.
  3. */
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/interrupt-controller/irq.h>
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/pinctrl/siflower,sf21-iomux.h>
  8. #include <dt-bindings/clock/siflower,sf21-topcrm.h>
  9. #include <dt-bindings/reset/siflower,sf21-reset.h>
  10. / {
  11. #address-cells = <2>;
  12. #size-cells = <2>;
  13. aliases {
  14. serial0 = &uart0;
  15. serial1 = &uart1;
  16. };
  17. cpus: cpus {
  18. #address-cells = <1>;
  19. #size-cells = <0>;
  20. cpu@0 {
  21. compatible = "riscv";
  22. device_type = "cpu";
  23. riscv,isa = "rv64imafdc_svpbmt_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz";
  24. riscv,isa-base = "rv64i";
  25. riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
  26. "sstc", "svinval", "svnapot", "svpbmt", "zba", "zbb", "zbc", "zbs", "zfh", "zicbom", "zicbop", "zicboz", "zicntr", "zicsr", "zifencei", "zihintpause", "zihpm";
  27. reg = <0>;
  28. i-cache-block-size = <64>;
  29. i-cache-size = <32768>;
  30. i-cache-sets = <128>;
  31. d-cache-block-size = <64>;
  32. d-cache-size = <32768>;
  33. d-cache-sets = <128>;
  34. riscv,cbom-block-size = <64>;
  35. riscv,cbop-block-size = <64>;
  36. riscv,cboz-block-size = <64>;
  37. clocks = <&topcrm CLK_CPU>;
  38. next-level-cache = <&l2_cache>;
  39. mmu-type = "riscv,sv39";
  40. cpu0_intc: interrupt-controller {
  41. #interrupt-cells = <1>;
  42. compatible = "riscv,cpu-intc";
  43. interrupt-controller;
  44. };
  45. };
  46. cpu@1 {
  47. compatible = "riscv";
  48. device_type = "cpu";
  49. riscv,isa = "rv64imafdc_svpbmt_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz";
  50. riscv,isa-base = "rv64i";
  51. riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
  52. "sstc", "svinval", "svnapot", "svpbmt", "zba", "zbb", "zbc", "zbs", "zfh", "zicbom", "zicbop", "zicboz", "zicntr", "zicsr", "zifencei", "zihintpause", "zihpm";
  53. reg = <1>;
  54. i-cache-block-size = <64>;
  55. i-cache-size = <32768>;
  56. i-cache-sets = <128>;
  57. d-cache-block-size = <64>;
  58. d-cache-size = <32768>;
  59. d-cache-sets = <128>;
  60. riscv,cbom-block-size = <64>;
  61. riscv,cbop-block-size = <64>;
  62. riscv,cboz-block-size = <64>;
  63. clocks = <&topcrm CLK_CPU>;
  64. next-level-cache = <&l2_cache>;
  65. mmu-type = "riscv,sv39";
  66. cpu1_intc: interrupt-controller {
  67. #interrupt-cells = <1>;
  68. compatible = "riscv,cpu-intc";
  69. interrupt-controller;
  70. };
  71. };
  72. cpu@2 {
  73. compatible = "riscv";
  74. device_type = "cpu";
  75. riscv,isa = "rv64imafdc_svpbmt_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz";
  76. riscv,isa-base = "rv64i";
  77. riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
  78. "sstc", "svinval", "svnapot", "svpbmt", "zba", "zbb", "zbc", "zbs", "zfh", "zicbom", "zicbop", "zicboz", "zicntr", "zicsr", "zifencei", "zihintpause", "zihpm";
  79. reg = <2>;
  80. i-cache-block-size = <64>;
  81. i-cache-size = <32768>;
  82. i-cache-sets = <128>;
  83. d-cache-block-size = <64>;
  84. d-cache-size = <32768>;
  85. d-cache-sets = <128>;
  86. riscv,cbom-block-size = <64>;
  87. riscv,cbop-block-size = <64>;
  88. riscv,cboz-block-size = <64>;
  89. clocks = <&topcrm CLK_CPU>;
  90. next-level-cache = <&l2_cache>;
  91. mmu-type = "riscv,sv39";
  92. cpu2_intc: interrupt-controller {
  93. #interrupt-cells = <1>;
  94. compatible = "riscv,cpu-intc";
  95. interrupt-controller;
  96. };
  97. };
  98. cpu@3 {
  99. compatible = "riscv";
  100. device_type = "cpu";
  101. riscv,isa = "rv64imafdc_svpbmt_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz";
  102. riscv,isa-base = "rv64i";
  103. riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
  104. "sstc", "svinval", "svnapot", "svpbmt", "zba", "zbb", "zbc", "zbs", "zfh", "zicbom", "zicbop", "zicboz", "zicntr", "zicsr", "zifencei", "zihintpause", "zihpm";
  105. reg = <3>;
  106. i-cache-block-size = <64>;
  107. i-cache-size = <32768>;
  108. i-cache-sets = <128>;
  109. d-cache-block-size = <64>;
  110. d-cache-size = <32768>;
  111. d-cache-sets = <128>;
  112. riscv,cbom-block-size = <64>;
  113. riscv,cbop-block-size = <64>;
  114. riscv,cboz-block-size = <64>;
  115. clocks = <&topcrm CLK_CPU>;
  116. next-level-cache = <&l2_cache>;
  117. mmu-type = "riscv,sv39";
  118. cpu3_intc: interrupt-controller {
  119. #interrupt-cells = <1>;
  120. compatible = "riscv,cpu-intc";
  121. interrupt-controller;
  122. };
  123. };
  124. l2_cache: l2-cache {
  125. compatible = "cache";
  126. cache-level = <2>;
  127. cache-block-size = <64>;
  128. cache-size = <262144>;
  129. cache-sets = <256>;
  130. cache-unified;
  131. };
  132. };
  133. xin25m: xin25m {
  134. compatible = "fixed-clock";
  135. clock-output-names = "xin25m";
  136. clock-frequency = <25000000>;
  137. #clock-cells = <0>;
  138. };
  139. pmu {
  140. compatible = "riscv,pmu";
  141. riscv,event-to-mhpmevent =
  142. <0x00003 0x0 0x9b>, // L1 Dcache Access
  143. <0x00004 0x0 0x9c>, // L1 Dcache Miss
  144. <0x00005 0x0 0x36>, // Branch Instruction
  145. <0x00006 0x0 0x38>, // Branch Mispred
  146. <0x00008 0x0 0x27>, // Stalled Cycles Frontend
  147. <0x00009 0x0 0x28>, // Stalled Cycles Backend
  148. <0x10000 0x0 0x0c>, // L1-dcache load access
  149. <0x10001 0x0 0x0d>, // L1-dcache load miss
  150. <0x10002 0x0 0x0e>, // L1-dcache store access
  151. <0x10003 0x0 0x0f>, // L1-dcache store miss
  152. <0x10004 0x0 0xa2>, // Dcache Hit Caused by Prefetch
  153. <0x10005 0x0 0xa1>, // Dcache Refill Caused by Prefetch
  154. <0x10008 0x0 0x01>, // L1-icache Access
  155. <0x10009 0x0 0x02>, // L1-icache Miss
  156. <0x1000c 0x0 0x9e>, // Icache Prefetch
  157. <0x1000d 0x0 0xa0>, // Icache Prefetch Miss
  158. <0x10010 0x0 0xa5>, // L2 Access
  159. <0x10011 0x0 0xa6>, // L2 Miss
  160. <0x10019 0x0 0xa4>, // Load Dtlb Miss
  161. <0x1001b 0x0 0xa3>, // Store Dtlb Miss
  162. <0x10021 0x0 0x03>; // iTLB Miss
  163. riscv,event-to-mhpmcounters =
  164. <0x00001 0x00001 0x00000001>, // cycles
  165. <0x00002 0x00002 0x00000004>, // instructions
  166. <0x00003 0x1ffff 0xfffffff8>; // others
  167. riscv,raw-event-to-mhpmcounters =
  168. <0x0 0x0 0xffffffff 0xffffff00 0xfffffff8>;
  169. };
  170. timer: timer {
  171. compatible = "riscv,timer";
  172. };
  173. reset: reset-controller {
  174. compatible = "siflower,sf21-reset";
  175. #reset-cells = <1>;
  176. siflower,crm = <&topcrm>;
  177. };
  178. soc {
  179. #address-cells = <2>;
  180. #size-cells = <2>;
  181. compatible = "simple-bus";
  182. dma-noncoherent;
  183. ranges;
  184. interrupt-parent = <&plic>;
  185. pcie0: pcie@00200000 {
  186. compatible = "siflower,sf21-pcie";
  187. status = "disabled";
  188. reg = <0x0 0x00000000 0x0 0x200000>,
  189. <0x0 0x00200000 0x0 0x100000>,
  190. <0x0 0x00300000 0x0 0x080000>,
  191. <0x0 0x00380000 0x0 0x080000>,
  192. <0x0 0xa0000000 0x0 0x080000>;
  193. reg-names = "dbi", "elbi", "atu", "dma", "config";
  194. clocks = <&topcrm CLK_SERDES_CSR>,
  195. <&topcrm CLK_PCIE_REFP>,
  196. <&topcrm CLK_PCIEPLL_FOUT3>;
  197. clock-names = "csr", "ref", "phy";
  198. #address-cells = <3>;
  199. #size-cells = <2>;
  200. device_type = "pci";
  201. bus-range = <0x0 0xff>;
  202. ranges = <0x81000000 0x0 0xa0080000 0x0 0xa0080000 0x0 0x00080000 /* downstream I/O 256KB */
  203. 0x82000000 0x0 0xa0100000 0x0 0xa0100000 0x0 0x2ff00000>; /* non-prefetchable memory */
  204. siflower,ctlr-idx = <0>;
  205. num-viewport = <8>;
  206. interrupts = <124 IRQ_TYPE_LEVEL_HIGH>,
  207. <160 IRQ_TYPE_LEVEL_HIGH>, <161 IRQ_TYPE_LEVEL_HIGH>, <162 IRQ_TYPE_LEVEL_HIGH>, <163 IRQ_TYPE_LEVEL_HIGH>, <164 IRQ_TYPE_LEVEL_HIGH>, <165 IRQ_TYPE_LEVEL_HIGH>, <166 IRQ_TYPE_LEVEL_HIGH>, <167 IRQ_TYPE_LEVEL_HIGH>;
  208. interrupt-names = "intr", "msi0", "msi1", "msi2", "msi3", "msi4", "msi5", "msi6", "msi7";
  209. #interrupt-cells = <1>;
  210. interrupt-map-mask = <0 0 0 7>;
  211. interrupt-map = <0 0 0 1 &plic 151 IRQ_TYPE_EDGE_RISING>,
  212. <0 0 0 2 &plic 150 IRQ_TYPE_EDGE_RISING>,
  213. <0 0 0 3 &plic 149 IRQ_TYPE_EDGE_RISING>,
  214. <0 0 0 4 &plic 148 IRQ_TYPE_EDGE_RISING>;
  215. siflower,pcie-sysm = <&pcie_phy>;
  216. phys = <&pcie_phy0>;
  217. linux,pci-domain = <0>;
  218. };
  219. pcie1: pcie@04200000 {
  220. compatible = "siflower,sf21-pcie";
  221. status = "disabled";
  222. reg = <0x0 0x04000000 0x0 0x200000>,
  223. <0x0 0x04200000 0x0 0x100000>,
  224. <0x0 0x04300000 0x0 0x080000>,
  225. <0x0 0x04380000 0x0 0x080000>,
  226. <0x0 0xd0000000 0x0 0x080000>;
  227. reg-names = "dbi", "elbi", "atu", "dma", "config";
  228. clocks = <&topcrm CLK_SERDES_CSR>,
  229. <&topcrm CLK_PCIE_REFP>,
  230. <&topcrm CLK_PCIEPLL_FOUT3>;
  231. clock-names = "csr", "ref", "phy";
  232. #address-cells = <3>;
  233. #size-cells = <2>;
  234. device_type = "pci";
  235. bus-range = <0x0 0xff>;
  236. ranges = <0x81000000 0x0 0xd0080000 0x0 0xd0080000 0x0 0x00080000 /* downstream I/O 256KB */
  237. 0x82000000 0x0 0xd0100000 0x0 0xd0100000 0x0 0x2ff00000>; /* non-prefetchable memory */
  238. siflower,ctlr-idx = <1>;
  239. num-viewport = <8>;
  240. interrupts = <125 IRQ_TYPE_LEVEL_HIGH>,
  241. <168 IRQ_TYPE_LEVEL_HIGH>, <169 IRQ_TYPE_LEVEL_HIGH>, <170 IRQ_TYPE_LEVEL_HIGH>, <171 IRQ_TYPE_LEVEL_HIGH>, <172 IRQ_TYPE_LEVEL_HIGH>, <173 IRQ_TYPE_LEVEL_HIGH>, <174 IRQ_TYPE_LEVEL_HIGH>, <175 IRQ_TYPE_LEVEL_HIGH>;
  242. interrupt-names = "intr", "msi0", "msi1", "msi2", "msi3", "msi4", "msi5", "msi6", "msi7";
  243. #interrupt-cells = <1>;
  244. interrupt-map-mask = <0 0 0 7>;
  245. interrupt-map = <0 0 0 1 &plic 159 IRQ_TYPE_EDGE_RISING>,
  246. <0 0 0 2 &plic 158 IRQ_TYPE_EDGE_RISING>,
  247. <0 0 0 3 &plic 157 IRQ_TYPE_EDGE_RISING>,
  248. <0 0 0 4 &plic 156 IRQ_TYPE_EDGE_RISING>;
  249. siflower,pcie-sysm = <&pcie_phy>;
  250. phys = <&pcie_phy1>;
  251. linux,pci-domain = <1>;
  252. };
  253. topcrm: clock-controller@0ce00400 {
  254. compatible = "siflower,sf21-topcrm", "syscon";
  255. reg = <0x0 0x0ce00400 0x0 0x400>;
  256. clocks = <&xin25m>;
  257. clock-names = "xin25m";
  258. #clock-cells = <1>;
  259. };
  260. i2crst: reset-controller@0ce08400 {
  261. compatible = "siflower,sf19a2890-periph-reset";
  262. reg = <0x0 0x0ce08400 0x0 0x4>;
  263. #reset-cells = <1>;
  264. siflower,num-resets = <2>;
  265. };
  266. i2cclk: clock-controller@0ce08404 {
  267. compatible = "siflower,sf19a2890-periph-clk";
  268. reg = <0x0 0x0ce08404 0x0 0x4>;
  269. clocks = <&topcrm CLK_APB>, <&topcrm CLK_APB>;
  270. clock-output-names = "i2c0", "i2c1";
  271. #clock-cells = <1>;
  272. };
  273. spirst: reset-controller@0ce08800 {
  274. compatible = "siflower,sf19a2890-periph-reset";
  275. reg = <0x0 0x0ce08800 0x0 0x4>;
  276. #reset-cells = <1>;
  277. siflower,reset-masks = <0x3 0xc>;
  278. };
  279. spiclk: clock-controller@0ce08804 {
  280. compatible = "siflower,sf19a2890-periph-clk";
  281. reg = <0x0 0x0ce08804 0x0 0x4>;
  282. clocks = <&topcrm CLK_APB>, <&topcrm CLK_APB>, <&topcrm CLK_APB>,
  283. <&topcrm CLK_APB>;
  284. clock-output-names = "spi0_apb", "spi0_ssp", "spi1_apb",
  285. "spi1_ssp";
  286. #clock-cells = <1>;
  287. };
  288. uartrst: reset-controller@0ce08c00 {
  289. compatible = "siflower,sf19a2890-periph-reset";
  290. reg = <0x0 0x0ce08c00 0x0 0x4>;
  291. #reset-cells = <1>;
  292. siflower,reset-masks = <0x11 0x22>;
  293. };
  294. uartclk: clock-controller@0ce08c04 {
  295. compatible = "siflower,sf19a2890-periph-clk";
  296. reg = <0x0 0x0ce08c04 0x0 0x4>;
  297. clocks = <&topcrm CLK_APB>, <&topcrm CLK_APB>,
  298. <&topcrm CLK_UART>, <&topcrm CLK_UART>;
  299. clock-output-names = "uart0_apb", "uart1_apb",
  300. "uart0", "uart1";
  301. siflower,valid-gates = <0x33>;
  302. siflower,critical-gates = <0x22>;
  303. #clock-cells = <1>;
  304. };
  305. timerst: reset-controller@0ce09800 {
  306. compatible = "siflower,sf19a2890-periph-reset";
  307. reg = <0x0 0x0ce09800 0x0 0x4>;
  308. #reset-cells = <1>;
  309. siflower,reset-masks = <0x1>;
  310. };
  311. timerclk: clock-controller@0ce09804 {
  312. compatible = "siflower,sf19a2890-periph-clk";
  313. reg = <0x0 0x0ce09804 0x0 0x4>;
  314. clocks = <&topcrm CLK_APB>;
  315. clock-output-names = "timer";
  316. #clock-cells = <1>;
  317. };
  318. wdtrst: reset-controller@0ce09c00 {
  319. compatible = "siflower,sf19a2890-periph-reset";
  320. reg = <0x0 0x0ce09c00 0x0 0x4>;
  321. #reset-cells = <1>;
  322. siflower,reset-masks = <0x1>;
  323. };
  324. wdtclk: clock-controller@0ce09c04 {
  325. compatible = "siflower,sf19a2890-periph-clk";
  326. reg = <0x0 0x0ce09c04 0x0 0x4>;
  327. clocks = <&topcrm CLK_APB>;
  328. clock-output-names = "wdt";
  329. #clock-cells = <1>;
  330. };
  331. gpiorst: reset-controller@0ce0a000 {
  332. compatible = "siflower,sf19a2890-periph-reset";
  333. reg = <0x0 0x0ce0a000 0x0 0x4>;
  334. #reset-cells = <1>;
  335. siflower,reset-masks = <0x1>;
  336. };
  337. gpioclk: clock-controller@0ce0a004 {
  338. compatible = "siflower,sf19a2890-periph-clk";
  339. reg = <0x0 0x0ce0a004 0x0 0x4>;
  340. clocks = <&topcrm CLK_APB>;
  341. clock-output-names = "gpio";
  342. #clock-cells = <1>;
  343. };
  344. uart0: uart@c300000 {
  345. compatible = "arm,pl011", "arm,primecell";
  346. reg = <0x0 0xc300000 0x0 0x1000>;
  347. clocks = <&uartclk 2>, <&uartclk 0>;
  348. clock-names = "uartclk", "apb_pclk";
  349. resets = <&uartrst 0>;
  350. pinctrl-names = "default";
  351. pinctrl-0 = <&uart0_pins>;
  352. interrupts = <43 IRQ_TYPE_LEVEL_HIGH>;
  353. current-speed = <115200>;
  354. status = "disabled";
  355. };
  356. uart1: uart@c301000 {
  357. compatible = "arm,pl011", "arm,primecell";
  358. reg = <0x0 0xc301000 0x0 0x1000>;
  359. clocks = <&uartclk 3>, <&uartclk 1>;
  360. clock-names = "uartclk", "apb_pclk";
  361. resets = <&uartrst 1>;
  362. pinctrl-names = "default";
  363. pinctrl-0 = <&uart1_pins>;
  364. interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
  365. current-speed = <115200>;
  366. status = "disabled";
  367. };
  368. spi0: spi@c200000 {
  369. compatible = "siflower,sf21-qspi";
  370. reg = <0x0 0xc200000 0x0 0x1000>;
  371. clocks = <&spiclk 0>, <&spiclk 1>;
  372. clock-names = "apb_pclk", "sspclk";
  373. resets = <&spirst 0>;
  374. interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
  375. pinctrl-names = "default";
  376. pinctrl-0 = <&spi0_pins>;
  377. status = "disabled";
  378. #address-cells = <1>;
  379. #size-cells = <0>;
  380. };
  381. spi1: spi@c201000 {
  382. compatible = "siflower,sf21-qspi";
  383. reg = <0x0 0xc201000 0x0 0x1000>;
  384. clocks = <&spiclk 2>, <&spiclk 3>;
  385. clock-names = "apb_pclk", "sspclk";
  386. resets = <&spirst 1>;
  387. interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
  388. pinctrl-names = "default";
  389. pinctrl-0 = <&spi1_pins>;
  390. status = "disabled";
  391. #address-cells = <1>;
  392. #size-cells = <0>;
  393. };
  394. watchdog: watchdog@0c700000 {
  395. compatible = "snps,dw-wdt";
  396. reg = <0x0 0x0c700000 0x0 0x1000>;
  397. interrupts = <51 IRQ_TYPE_LEVEL_HIGH>;
  398. clocks = <&wdtclk 0>;
  399. resets = <&wdtrst 0>;
  400. };
  401. usb_phy: phy@0ce02400 {
  402. compatible = "siflower,sf21-usb-phy";
  403. reg = <0x0 0x0ce02400 0x0 0x14>;
  404. clocks = <&topcrm CLK_USBPHY>;
  405. clock-names = "usb_phy_clk";
  406. #phy-cells = <0>;
  407. status = "disabled";
  408. };
  409. pcie_phy: phy@0d810000 {
  410. compatible = "siflower,sf21-pcie-phy", "syscon";
  411. reg = <0x0 0x0d810000 0x0 0x100>;
  412. clocks = <&topcrm CLK_PCIE_REFP>, <&topcrm CLK_SERDES_CSR>;
  413. clock-names = "ref", "csr";
  414. siflower,topcrm = <&topcrm>;
  415. #address-cells = <1>;
  416. #size-cells = <0>;
  417. status = "disabled";
  418. pcie_phy0: phy@0 {
  419. reg = <0>;
  420. siflower,num-lanes = <1>;
  421. #phy-cells = <0>;
  422. };
  423. pcie_phy1: phy@1 {
  424. reg = <1>;
  425. siflower,num-lanes = <1>;
  426. #phy-cells = <0>;
  427. };
  428. };
  429. usb: usb@10000000 {
  430. compatible = "siflower,sf19a2890-usb";
  431. reg = <0x0 0x10000000 0x0 0x80000>;
  432. interrupts = <33 IRQ_TYPE_LEVEL_HIGH>;
  433. clocks = <&topcrm CLK_USB>;
  434. clock-names = "otg";
  435. resets = <&reset SF21_RESET_USB>;
  436. reset-names = "dwc2";
  437. dr_mode = "host";
  438. phys = <&usb_phy>;
  439. phy-names = "usb2-phy";
  440. g-rx-fifo-size = <512>;
  441. g-np-tx-fifo-size = <128>;
  442. g-tx-fifo-size = <128 128 128 128 128 128 128 128
  443. 16 16 16 16 16 16 16>;
  444. status = "disabled";
  445. };
  446. iram: sram@1c000000 {
  447. compatible = "mmio-sram";
  448. reg = <0x0 0x1c000000 0x0 0x10000>;
  449. clocks = <&topcrm CLK_IRAM>;
  450. ranges;
  451. };
  452. xgmac0: ethernet@8000000 {
  453. compatible = "siflower,sf21-xgmac";
  454. reg = <0x0 0x8000000 0x0 0x4000>;
  455. dmas = <&edma>;
  456. ethsys = <&ethsys>;
  457. clocks = <&topcrm CLK_SERDES_CSR>;
  458. clock-names = "csr";
  459. pcs-handle = <&qsgmii_pcs 0>;
  460. phy-mode = "qsgmii";
  461. pinctrl-names = "default";
  462. pinctrl-0 = <&mac0_mdio_pins>;
  463. interrupts = <176 IRQ_TYPE_LEVEL_HIGH>, <20 IRQ_TYPE_LEVEL_HIGH>, <26 IRQ_TYPE_LEVEL_HIGH>;
  464. interrupt-names = "sbd", "lpi", "pmt";
  465. status = "disabled";
  466. mdio0: mdio {
  467. #address-cells = <1>;
  468. #size-cells = <0>;
  469. };
  470. };
  471. xgmac1: ethernet@8004000 {
  472. compatible = "siflower,sf21-xgmac";
  473. reg = <0x0 0x8004000 0x0 0x4000>;
  474. dmas = <&edma>;
  475. ethsys = <&ethsys>;
  476. clocks = <&topcrm CLK_SERDES_CSR>;
  477. clock-names = "csr";
  478. pcs-handle = <&qsgmii_pcs 1>;
  479. phy-mode = "qsgmii";
  480. interrupts = <1 IRQ_TYPE_LEVEL_HIGH>, <21 IRQ_TYPE_LEVEL_HIGH>, <27 IRQ_TYPE_LEVEL_HIGH>;
  481. interrupt-names = "sbd", "lpi", "pmt";
  482. status = "disabled";
  483. };
  484. xgmac2: ethernet@8008000 {
  485. compatible = "siflower,sf21-xgmac";
  486. reg = <0x0 0x8008000 0x0 0x4000>;
  487. dmas = <&edma>;
  488. ethsys = <&ethsys>;
  489. clocks = <&topcrm CLK_SERDES_CSR>;
  490. clock-names = "csr";
  491. pcs-handle = <&qsgmii_pcs 2>;
  492. phy-mode = "qsgmii";
  493. interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, <22 IRQ_TYPE_LEVEL_HIGH>, <28 IRQ_TYPE_LEVEL_HIGH>;
  494. interrupt-names = "sbd", "lpi", "pmt";
  495. status = "disabled";
  496. };
  497. xgmac3: ethernet@800c000 {
  498. compatible = "siflower,sf21-xgmac";
  499. reg = <0x0 0x800c000 0x0 0x4000>;
  500. dmas = <&edma>;
  501. ethsys = <&ethsys>;
  502. clocks = <&topcrm CLK_SERDES_CSR>;
  503. clock-names = "csr";
  504. pcs-handle = <&qsgmii_pcs 3>;
  505. phy-mode = "qsgmii";
  506. interrupts = <3 IRQ_TYPE_LEVEL_HIGH>, <23 IRQ_TYPE_LEVEL_HIGH>, <29 IRQ_TYPE_LEVEL_HIGH>;
  507. interrupt-names = "sbd", "lpi", "pmt";
  508. status = "disabled";
  509. };
  510. xgmac4: ethernet@8010000 {
  511. compatible = "siflower,sf21-xgmac";
  512. reg = <0x0 0x8010000 0x0 0x4000>;
  513. dmas = <&edma>;
  514. ethsys = <&ethsys>;
  515. clocks = <&topcrm CLK_SERDES_CSR>;
  516. clock-names = "csr";
  517. pcs-handle = <&sgmii_pcs 0>;
  518. phy-mode = "2500base-x";
  519. pinctrl-names = "default";
  520. pinctrl-0 = <&mac4_mdio_pins>;
  521. interrupts = <4 IRQ_TYPE_LEVEL_HIGH>, <24 IRQ_TYPE_LEVEL_HIGH>, <30 IRQ_TYPE_LEVEL_HIGH>;
  522. interrupt-names = "sbd", "lpi", "pmt";
  523. status = "disabled";
  524. mdio1: mdio {
  525. #address-cells = <1>;
  526. #size-cells = <0>;
  527. };
  528. };
  529. edma: dma-controller@8018000 {
  530. compatible = "siflower,sf21-xgmac-dma";
  531. reg = <0x0 0x8018000 0x0 0x4000>;
  532. #dma-cells = <0>;
  533. ethsys = <&ethsys>;
  534. iram = <&iram>;
  535. clocks = <&topcrm CLK_AXI>, <&topcrm CLK_NPU>, <&topcrm CLK_SERDES_CSR>;
  536. clock-names = "axi", "npu", "csr";
  537. interrupts = <6 IRQ_TYPE_LEVEL_HIGH>, <9 IRQ_TYPE_LEVEL_HIGH>, <10 IRQ_TYPE_LEVEL_HIGH>, <11 IRQ_TYPE_LEVEL_HIGH>, <12 IRQ_TYPE_LEVEL_HIGH>, <13 IRQ_TYPE_LEVEL_HIGH>, <14 IRQ_TYPE_LEVEL_HIGH>, <15 IRQ_TYPE_LEVEL_HIGH>, <16 IRQ_TYPE_LEVEL_HIGH>, <17 IRQ_TYPE_LEVEL_HIGH>, <18 IRQ_TYPE_LEVEL_HIGH>, <19 IRQ_TYPE_LEVEL_HIGH>;
  538. interrupt-names = "sbd", "tx0", "tx1", "tx2", "tx3", "tx4",
  539. "rx0", "rx1", "rx2", "rx3", "rx4", "rxovf";
  540. status = "disabled";
  541. };
  542. qsgmii_pcs: xpcs@8800000 {
  543. compatible = "siflower,sf21-xpcs";
  544. reg = <0x0 0x8800000 0x0 0x800000>;
  545. ethsys = <&ethsys>;
  546. clocks = <&topcrm CLK_ETH_REF_P>, <&topcrm CLK_ETHTSU>, <&topcrm CLK_SERDES_CSR>;
  547. clock-names = "ref", "eee", "csr";
  548. interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
  549. status = "disabled";
  550. };
  551. sgmii_pcs: xpcs@9000000 {
  552. compatible = "siflower,sf21-xpcs";
  553. reg = <0x0 0x9000000 0x0 0x800000>;
  554. ethsys = <&ethsys>;
  555. clocks = <&topcrm CLK_ETH_REF_P>, <&topcrm CLK_ETHTSU>, <&topcrm CLK_SERDES_CSR>;
  556. clock-names = "ref", "eee", "csr";
  557. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
  558. status = "disabled";
  559. };
  560. gpio: gpio@c800000 {
  561. compatible = "siflower,sf19a2890-gpio";
  562. reg = <0x0 0xc800000 0x0 0x100000>;
  563. gpio-controller;
  564. #gpio-cells = <2>;
  565. interrupts = <54 IRQ_TYPE_LEVEL_HIGH>, <55 IRQ_TYPE_LEVEL_HIGH>, <56 IRQ_TYPE_LEVEL_HIGH>, <57 IRQ_TYPE_LEVEL_HIGH>;
  566. interrupt-controller;
  567. #interrupt-cells = <2>;
  568. clocks = <&gpioclk 0>;
  569. resets = <&gpiorst 0>;
  570. ngpios = <41>;
  571. gpio-ranges = <&iomux 0 0 41>;
  572. };
  573. i2c0: i2c@c100000 {
  574. compatible = "snps,designware-i2c";
  575. reg = <0x0 0xc100000 0x0 0x1000>;
  576. clocks = <&i2cclk 0>;
  577. clock-names = "ref";
  578. clock-frequency = <400000>;
  579. interrupts = <35 IRQ_TYPE_LEVEL_HIGH>;
  580. #address-cells = <1>;
  581. #size-cells = <0>;
  582. pinctrl-names="default";
  583. pinctrl-0 = <&i2c0_pins>;
  584. resets = <&i2crst 0>;
  585. status = "disabled";
  586. };
  587. i2c1: i2c@c101000 {
  588. compatible = "snps,designware-i2c";
  589. reg = <0x0 0xc101000 0x0 0x1000>;
  590. clocks = <&i2cclk 1>;
  591. clock-frequency = <400000>;
  592. interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
  593. #address-cells = <1>;
  594. #size-cells = <0>;
  595. pinctrl-names = "default";
  596. pinctrl-0 = <&i2c1_pins>;
  597. status = "disabled";
  598. };
  599. ethsys: syscon@ce01800 {
  600. compatible = "siflower,ethsys", "syscon";
  601. reg = <0x0 0xce01800 0x0 0x800>;
  602. };
  603. dpns: dpns@11000000 {
  604. compatible = "siflower,sf21-dpns";
  605. reg = <0x0 0x11000000 0x0 0x1000000>;
  606. #address-cells = <1>;
  607. dma-ranges = <0 0x0 0 0x20000000 0 0x80000000>;
  608. interrupts = <65 IRQ_TYPE_EDGE_RISING>, <66 IRQ_TYPE_EDGE_RISING>, <67 IRQ_TYPE_EDGE_RISING>, <68 IRQ_TYPE_EDGE_RISING>, <69 IRQ_TYPE_EDGE_RISING>, <70 IRQ_TYPE_EDGE_RISING>, <71 IRQ_TYPE_EDGE_RISING>, <72 IRQ_TYPE_EDGE_RISING>,
  609. <73 IRQ_TYPE_EDGE_RISING>, <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>, <76 IRQ_TYPE_EDGE_RISING>, <77 IRQ_TYPE_EDGE_RISING>, <78 IRQ_TYPE_EDGE_RISING>, <79 IRQ_TYPE_EDGE_RISING>, <80 IRQ_TYPE_EDGE_RISING>,
  610. <81 IRQ_TYPE_EDGE_RISING>, <82 IRQ_TYPE_EDGE_RISING>, <83 IRQ_TYPE_EDGE_RISING>, <84 IRQ_TYPE_EDGE_RISING>, <85 IRQ_TYPE_LEVEL_HIGH>, <86 IRQ_TYPE_LEVEL_HIGH>, <87 IRQ_TYPE_EDGE_RISING>, <88 IRQ_TYPE_EDGE_RISING>,
  611. <89 IRQ_TYPE_EDGE_RISING>, <90 IRQ_TYPE_EDGE_RISING>, <91 IRQ_TYPE_EDGE_RISING>, <92 IRQ_TYPE_EDGE_RISING>, <93 IRQ_TYPE_EDGE_RISING>, <94 IRQ_TYPE_EDGE_RISING>, <95 IRQ_TYPE_EDGE_RISING>, <96 IRQ_TYPE_EDGE_RISING>,
  612. <97 IRQ_TYPE_EDGE_RISING>, <98 IRQ_TYPE_EDGE_RISING>, <99 IRQ_TYPE_EDGE_RISING>, <100 IRQ_TYPE_EDGE_RISING>, <101 IRQ_TYPE_EDGE_RISING>, <102 IRQ_TYPE_EDGE_RISING>, <103 IRQ_TYPE_EDGE_RISING>, <104 IRQ_TYPE_EDGE_RISING>,
  613. <105 IRQ_TYPE_EDGE_RISING>, <106 IRQ_TYPE_EDGE_RISING>, <107 IRQ_TYPE_EDGE_RISING>, <108 IRQ_TYPE_EDGE_RISING>, <109 IRQ_TYPE_EDGE_RISING>, <110 IRQ_TYPE_EDGE_RISING>, <111 IRQ_TYPE_EDGE_RISING>, <112 IRQ_TYPE_EDGE_RISING>,
  614. <113 IRQ_TYPE_EDGE_RISING>, <114 IRQ_TYPE_EDGE_RISING>, <115 IRQ_TYPE_EDGE_RISING>, <116 IRQ_TYPE_EDGE_RISING>, <117 IRQ_TYPE_EDGE_RISING>, <118 IRQ_TYPE_EDGE_RISING>, <119 IRQ_TYPE_EDGE_RISING>, <120 IRQ_TYPE_EDGE_RISING>,
  615. <121 IRQ_TYPE_EDGE_RISING>, <122 IRQ_TYPE_EDGE_RISING>;
  616. ethsys = <&ethsys>;
  617. clocks = <&topcrm CLK_NPU>;
  618. resets = <&reset SF21_RESET_NPU>, <&reset SF21_RESET_NPU2DDR_ASYNCBRIDGE>;
  619. reset-names = "npu", "npu2ddr";
  620. siflower,edma = <&edma>;
  621. status = "disabled";
  622. };
  623. syscon@ce00000 {
  624. compatible = "siflower,brom-sysm";
  625. reg = <0x0 0xce00000 0x0 0x400>;
  626. #reset-cells = <1>;
  627. };
  628. syscon@ce00c00 {
  629. compatible = "siflower,cpu-sysm";
  630. reg = <0x0 0xce00c00 0x0 0x400>;
  631. };
  632. iomux: iomux@ce3c000 {
  633. compatible = "pinconf-single";
  634. reg = <0x0 0xce3c000 0x0 0xa4>;
  635. #pinctrl-cells = <1>;
  636. pinctrl-single,register-width = <32>;
  637. pinctrl-single,function-mask = <FUNC_MODE_MASK>;
  638. pinctrl-single,function-off = <0>;
  639. pinctrl-single,gpio-range = <&range 0 41 GPIO_MODE>;
  640. range: gpio-range {
  641. #pinctrl-single,gpio-range-cells = <3>;
  642. };
  643. clk_pins: clk_pins {
  644. pinctrl-single,pins = <
  645. EXT_CLK_IN FUNC_MODE0
  646. CLK_OUT FUNC_MODE0
  647. >;
  648. };
  649. spi0_pins: spi0_pins {
  650. pinctrl-single,pins = <
  651. SPI0_TXD FUNC_MODE0
  652. SPI0_RXD FUNC_MODE0
  653. SPI0_CLK FUNC_MODE0
  654. SPI0_CSN FUNC_MODE0
  655. SPI0_HOLD FUNC_MODE0
  656. SPI0_WP FUNC_MODE0
  657. >;
  658. };
  659. jtag_pins: jtag_pins {
  660. pinctrl-single,pins = <
  661. JTAG_TDO FUNC_MODE0
  662. JTAG_TDI FUNC_MODE0
  663. JTAG_TMS FUNC_MODE0
  664. JTAG_TCK FUNC_MODE0
  665. JTAG_RST FUNC_MODE0
  666. >;
  667. };
  668. uart0_pins: uart0_pins {
  669. pinctrl-single,pins = <
  670. JTAG_TDO FUNC_MODE1
  671. JTAG_TDI FUNC_MODE1
  672. JTAG_TMS FUNC_MODE1
  673. JTAG_TCK FUNC_MODE1
  674. >;
  675. };
  676. uart1_pins: uart1_pins {
  677. pinctrl-single,pins = <
  678. UART1_TX FUNC_MODE0
  679. UART1_RX FUNC_MODE0
  680. >;
  681. };
  682. uart1_full_pins: uart1_full_pins {
  683. pinctrl-single,pins = <
  684. UART1_TX FUNC_MODE0
  685. UART1_RX FUNC_MODE0
  686. I2C0_DAT FUNC_MODE1
  687. I2C0_CLK FUNC_MODE1
  688. >;
  689. };
  690. i2c0_pins: i2c0_pins {
  691. pinctrl-single,pins = <
  692. I2C0_DAT FUNC_MODE0
  693. I2C0_CLK FUNC_MODE0
  694. >;
  695. };
  696. perst_pins: perst_pins {
  697. pinctrl-single,pins = <
  698. I2C0_DAT FUNC_MODE2
  699. I2C0_CLK FUNC_MODE2
  700. >;
  701. };
  702. i2c1_pins: i2c1_pins {
  703. pinctrl-single,pins = <
  704. I2C1_DAT FUNC_MODE0
  705. I2C1_CLK FUNC_MODE0
  706. >;
  707. };
  708. rgmii_pins: rgmii_pins {
  709. pinctrl-single,pins = <
  710. RGMII_GTX_CLK FUNC_MODE0
  711. RGMII_TXD0 FUNC_MODE0
  712. RGMII_TXD1 FUNC_MODE0
  713. RGMII_TXD2 FUNC_MODE0
  714. RGMII_TXD3 FUNC_MODE0
  715. RGMII_TXCTL FUNC_MODE0
  716. RGMII_RXCLK FUNC_MODE0
  717. RGMII_RXD0 FUNC_MODE0
  718. RGMII_RXD1 FUNC_MODE0
  719. RGMII_RXD2 FUNC_MODE0
  720. RGMII_RXD3 FUNC_MODE0
  721. RGMII_RXCTL FUNC_MODE0
  722. >;
  723. };
  724. spi1_pins: spi1_pins {
  725. pinctrl-single,pins = <
  726. RGMII_GTX_CLK FUNC_MODE1
  727. RGMII_TXCLK FUNC_MODE1
  728. RGMII_TXD0 FUNC_MODE1
  729. RGMII_TXD1 FUNC_MODE1
  730. RGMII_TXD2 FUNC_MODE1
  731. RGMII_TXD3 FUNC_MODE1
  732. >;
  733. };
  734. mac0_mdio_pins: mac0_mdio_pins {
  735. pinctrl-single,pins = <
  736. QSGMII_MDIO FUNC_MODE0
  737. QSGMII_MDC FUNC_MODE0
  738. >;
  739. };
  740. mac4_mdio_pins: mac4_mdio_pins {
  741. pinctrl-single,pins = <
  742. SXGMII_MDIO FUNC_MODE0
  743. SXGMII_MDC FUNC_MODE0
  744. >;
  745. };
  746. };
  747. plic: interrupt-controller@108000000 {
  748. compatible = "thead,c900-plic";
  749. reg = <0x1 0x8000000 0x0 0x400000>, <0x0 0x0ce00c34 0x0 0x20>;
  750. interrupt-controller;
  751. interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
  752. <&cpu1_intc 11>, <&cpu1_intc 9>,
  753. <&cpu2_intc 11>, <&cpu2_intc 9>,
  754. <&cpu3_intc 11>, <&cpu3_intc 9>;
  755. #interrupt-cells = <2>;
  756. riscv,ndev = <176>;
  757. };
  758. interrupt-controller@10c000000 {
  759. compatible = "thead,c900-aclint-mswi";
  760. reg = <0x1 0xc000000 0x0 0x4000>;
  761. interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>,
  762. <&cpu2_intc 3>, <&cpu3_intc 3>;
  763. };
  764. timer@10c004000 {
  765. compatible = "thead,c900-aclint-mtimer";
  766. reg = <0x1 0xc00bff8 0x0 0x8>, <0x1 0xc004000 0x0 0x7ff8>;
  767. interrupts-extended = <&cpu0_intc 7>, <&cpu1_intc 7>,
  768. <&cpu2_intc 7>, <&cpu3_intc 7>;
  769. };
  770. interrupt-controller@10c00c000 {
  771. compatible = "thead,c900-aclint-sswi";
  772. reg = <0x1 0xc00c000 0x0 0x1000>;
  773. interrupts-extended = <&cpu0_intc 1>, <&cpu1_intc 1>,
  774. <&cpu2_intc 1>, <&cpu3_intc 1>;
  775. };
  776. };
  777. };