gemini.dtsi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Device Tree file for Cortina systems Gemini SoC
  4. */
  5. #include <dt-bindings/interrupt-controller/irq.h>
  6. #include <dt-bindings/clock/cortina,gemini-clock.h>
  7. #include <dt-bindings/reset/cortina,gemini-reset.h>
  8. #include <dt-bindings/gpio/gpio.h>
  9. / {
  10. soc {
  11. #address-cells = <1>;
  12. #size-cells = <1>;
  13. ranges;
  14. compatible = "simple-bus";
  15. interrupt-parent = <&intcon>;
  16. flash: flash@30000000 {
  17. compatible = "cortina,gemini-flash", "cfi-flash";
  18. syscon = <&syscon>;
  19. pinctrl-names = "default";
  20. pinctrl-0 = <&pflash_default_pins>;
  21. bank-width = <2>;
  22. #address-cells = <1>;
  23. #size-cells = <1>;
  24. status = "disabled";
  25. };
  26. syscon: syscon@40000000 {
  27. compatible = "cortina,gemini-syscon",
  28. "syscon", "simple-mfd";
  29. reg = <0x40000000 0x1000>;
  30. #clock-cells = <1>;
  31. #reset-cells = <1>;
  32. syscon-reboot {
  33. compatible = "syscon-reboot";
  34. regmap = <&syscon>;
  35. /* GLOBAL_RESET register */
  36. offset = <0x0c>;
  37. /* RESET_GLOBAL | RESET_CPU1 */
  38. mask = <0xC0000000>;
  39. };
  40. pinctrl {
  41. compatible = "cortina,gemini-pinctrl";
  42. regmap = <&syscon>;
  43. /* Hog the DRAM pins */
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&dram_default_pins>, <&system_default_pins>,
  46. <&vcontrol_default_pins>;
  47. dram_default_pins: pinctrl-dram {
  48. mux {
  49. function = "dram";
  50. groups = "dramgrp";
  51. };
  52. };
  53. rtc_default_pins: pinctrl-rtc {
  54. mux {
  55. function = "rtc";
  56. groups = "rtcgrp";
  57. };
  58. };
  59. power_default_pins: pinctrl-power {
  60. mux {
  61. function = "power";
  62. groups = "powergrp";
  63. };
  64. };
  65. cir_default_pins: pinctrl-cir {
  66. mux {
  67. function = "cir";
  68. groups = "cirgrp";
  69. };
  70. };
  71. system_default_pins: pinctrl-system {
  72. mux {
  73. function = "system";
  74. groups = "systemgrp";
  75. };
  76. };
  77. vcontrol_default_pins: pinctrl-vcontrol {
  78. mux {
  79. function = "vcontrol";
  80. groups = "vcontrolgrp";
  81. };
  82. };
  83. ice_default_pins: pinctrl-ice {
  84. mux {
  85. function = "ice";
  86. groups = "icegrp";
  87. };
  88. };
  89. uart_default_pins: pinctrl-uart {
  90. mux {
  91. function = "uart";
  92. groups = "uartrxtxgrp";
  93. };
  94. };
  95. pflash_default_pins: pinctrl-pflash {
  96. mux {
  97. function = "pflash";
  98. groups = "pflashgrp";
  99. };
  100. };
  101. usb_default_pins: pinctrl-usb {
  102. mux {
  103. function = "usb";
  104. groups = "usbgrp";
  105. };
  106. };
  107. gmii_default_pins: pinctrl-gmii {
  108. /*
  109. * Only activate GMAC0 by default since
  110. * GMAC1 will overlap with 8 GPIO lines
  111. * gpio2a, gpio2b. Overlay groups with
  112. * "gmii_gmac0_grp", "gmii_gmac1_grp" for
  113. * both ethernet interfaces.
  114. */
  115. mux {
  116. function = "gmii";
  117. groups = "gmii_gmac0_grp";
  118. };
  119. };
  120. pci_default_pins: pinctrl-pci {
  121. mux {
  122. function = "pci";
  123. groups = "pcigrp";
  124. };
  125. };
  126. sata_default_pins: pinctrl-sata {
  127. mux {
  128. function = "sata";
  129. groups = "satagrp";
  130. };
  131. };
  132. /* Activate both groups of pins for this state */
  133. sata_and_ide_pins: pinctrl-sata-ide {
  134. mux0 {
  135. function = "sata";
  136. groups = "satagrp";
  137. };
  138. mux1 {
  139. function = "ide";
  140. groups = "idegrp";
  141. };
  142. };
  143. tvc_default_pins: pinctrl-tvc {
  144. mux {
  145. function = "tvc";
  146. groups = "tvcgrp";
  147. };
  148. };
  149. };
  150. };
  151. watchdog@41000000 {
  152. compatible = "cortina,gemini-watchdog", "faraday,ftwdt010";
  153. reg = <0x41000000 0x1000>;
  154. interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
  155. resets = <&syscon GEMINI_RESET_WDOG>;
  156. clocks = <&syscon GEMINI_CLK_APB>;
  157. clock-names = "PCLK";
  158. };
  159. uart0: serial@42000000 {
  160. compatible = "ns16550a";
  161. reg = <0x42000000 0x100>;
  162. resets = <&syscon GEMINI_RESET_UART>;
  163. clocks = <&syscon GEMINI_CLK_UART>;
  164. interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
  165. pinctrl-names = "default";
  166. pinctrl-0 = <&uart_default_pins>;
  167. reg-shift = <2>;
  168. };
  169. timer@43000000 {
  170. compatible = "faraday,fttmr010";
  171. reg = <0x43000000 0x1000>;
  172. interrupt-parent = <&intcon>;
  173. interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
  174. <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
  175. <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
  176. resets = <&syscon GEMINI_RESET_TIMER>;
  177. /* APB clock or RTC clock */
  178. clocks = <&syscon GEMINI_CLK_APB>, <&syscon GEMINI_CLK_RTC>;
  179. clock-names = "PCLK", "EXTCLK";
  180. syscon = <&syscon>;
  181. };
  182. rtc@45000000 {
  183. compatible = "cortina,gemini-rtc", "faraday,ftrtc010";
  184. reg = <0x45000000 0x100>;
  185. interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
  186. resets = <&syscon GEMINI_RESET_RTC>;
  187. clocks = <&syscon GEMINI_CLK_APB>, <&syscon GEMINI_CLK_RTC>;
  188. clock-names = "PCLK", "EXTCLK";
  189. pinctrl-names = "default";
  190. pinctrl-0 = <&rtc_default_pins>;
  191. };
  192. sata: sata@46000000 {
  193. compatible = "cortina,gemini-sata-bridge";
  194. reg = <0x46000000 0x100>;
  195. resets = <&syscon GEMINI_RESET_SATA0>,
  196. <&syscon GEMINI_RESET_SATA1>;
  197. reset-names = "sata0", "sata1";
  198. clocks = <&syscon GEMINI_CLK_GATE_SATA0>,
  199. <&syscon GEMINI_CLK_GATE_SATA1>;
  200. clock-names = "SATA0_PCLK", "SATA1_PCLK";
  201. /*
  202. * This defines the special "ide" state that needs
  203. * to be explicitly enabled to enable the IDE pins,
  204. * as these pins are normally used for other things.
  205. */
  206. pinctrl-names = "default", "ide";
  207. pinctrl-0 = <&sata_default_pins>;
  208. pinctrl-1 = <&sata_and_ide_pins>;
  209. syscon = <&syscon>;
  210. status = "disabled";
  211. };
  212. intcon: interrupt-controller@48000000 {
  213. compatible = "faraday,ftintc010";
  214. reg = <0x48000000 0x1000>;
  215. resets = <&syscon GEMINI_RESET_INTCON0>;
  216. interrupt-controller;
  217. #interrupt-cells = <2>;
  218. };
  219. power-controller@4b000000 {
  220. compatible = "cortina,gemini-power-controller";
  221. reg = <0x4b000000 0x100>;
  222. interrupts = <26 IRQ_TYPE_EDGE_RISING>;
  223. pinctrl-names = "default";
  224. pinctrl-0 = <&power_default_pins>;
  225. };
  226. gpio0: gpio@4d000000 {
  227. compatible = "cortina,gemini-gpio", "faraday,ftgpio010";
  228. reg = <0x4d000000 0x100>;
  229. interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
  230. resets = <&syscon GEMINI_RESET_GPIO0>;
  231. clocks = <&syscon GEMINI_CLK_APB>;
  232. gpio-controller;
  233. #gpio-cells = <2>;
  234. interrupt-controller;
  235. #interrupt-cells = <2>;
  236. };
  237. gpio1: gpio@4e000000 {
  238. compatible = "cortina,gemini-gpio", "faraday,ftgpio010";
  239. reg = <0x4e000000 0x100>;
  240. interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
  241. resets = <&syscon GEMINI_RESET_GPIO1>;
  242. clocks = <&syscon GEMINI_CLK_APB>;
  243. gpio-controller;
  244. #gpio-cells = <2>;
  245. interrupt-controller;
  246. #interrupt-cells = <2>;
  247. };
  248. gpio2: gpio@4f000000 {
  249. compatible = "cortina,gemini-gpio", "faraday,ftgpio010";
  250. reg = <0x4f000000 0x100>;
  251. interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
  252. resets = <&syscon GEMINI_RESET_GPIO2>;
  253. clocks = <&syscon GEMINI_CLK_APB>;
  254. gpio-controller;
  255. #gpio-cells = <2>;
  256. interrupt-controller;
  257. #interrupt-cells = <2>;
  258. };
  259. pci@50000000 {
  260. compatible = "cortina,gemini-pci", "faraday,ftpci100";
  261. /*
  262. * The first 256 bytes in the IO range is actually used
  263. * to configure the host bridge.
  264. */
  265. reg = <0x50000000 0x100>;
  266. resets = <&syscon GEMINI_RESET_PCI>;
  267. clocks = <&syscon GEMINI_CLK_GATE_PCI>, <&syscon GEMINI_CLK_PCI>;
  268. clock-names = "PCLK", "PCICLK";
  269. pinctrl-names = "default";
  270. pinctrl-0 = <&pci_default_pins>;
  271. device_type = "pci";
  272. #address-cells = <3>;
  273. #size-cells = <2>;
  274. status = "disabled";
  275. #interrupt-cells = <1>;
  276. interrupt-map-mask = <0xf800 0 0 7>;
  277. interrupt-map =
  278. <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
  279. <0x4800 0 0 2 &pci_intc 1>,
  280. <0x4800 0 0 3 &pci_intc 2>,
  281. <0x4800 0 0 4 &pci_intc 3>,
  282. <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
  283. <0x5000 0 0 2 &pci_intc 2>,
  284. <0x5000 0 0 3 &pci_intc 3>,
  285. <0x5000 0 0 4 &pci_intc 0>,
  286. <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
  287. <0x5800 0 0 2 &pci_intc 3>,
  288. <0x5800 0 0 3 &pci_intc 0>,
  289. <0x5800 0 0 4 &pci_intc 1>,
  290. <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
  291. <0x6000 0 0 2 &pci_intc 0>,
  292. <0x6000 0 0 3 &pci_intc 1>,
  293. <0x6000 0 0 4 &pci_intc 2>;
  294. bus-range = <0x00 0xff>;
  295. /* PCI ranges mappings */
  296. ranges =
  297. /* 1MiB I/O space 0x50000000-0x500fffff */
  298. <0x01000000 0 0 0x50000000 0 0x00100000>,
  299. /* 128MiB non-prefetchable memory 0x58000000-0x5fffffff */
  300. <0x02000000 0 0x58000000 0x58000000 0 0x08000000>;
  301. /* DMA ranges */
  302. dma-ranges =
  303. /* 128MiB at 0x00000000-0x07ffffff */
  304. <0x02000000 0 0x00000000 0x00000000 0 0x08000000>,
  305. /* 64MiB at 0x00000000-0x03ffffff */
  306. <0x02000000 0 0x00000000 0x00000000 0 0x04000000>,
  307. /* 64MiB at 0x00000000-0x03ffffff */
  308. <0x02000000 0 0x00000000 0x00000000 0 0x04000000>;
  309. /*
  310. * This PCI host bridge variant has a cascaded interrupt
  311. * controller embedded in the host bridge.
  312. */
  313. pci_intc: interrupt-controller {
  314. interrupt-parent = <&intcon>;
  315. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
  316. interrupt-controller;
  317. #address-cells = <0>;
  318. #interrupt-cells = <1>;
  319. };
  320. };
  321. ethernet: ethernet@60000000 {
  322. compatible = "cortina,gemini-ethernet";
  323. reg = <0x60000000 0x4000>, /* Global registers, queue */
  324. <0x60004000 0x2000>, /* V-bit */
  325. <0x60006000 0x2000>; /* A-bit */
  326. pinctrl-names = "default";
  327. pinctrl-0 = <&gmii_default_pins>;
  328. status = "disabled";
  329. #address-cells = <1>;
  330. #size-cells = <1>;
  331. ranges;
  332. gmac0: ethernet-port@0 {
  333. compatible = "cortina,gemini-ethernet-port";
  334. reg = <0x60008000 0x2000>, /* Port 0 DMA/TOE */
  335. <0x6000a000 0x2000>; /* Port 0 GMAC */
  336. interrupt-parent = <&intcon>;
  337. interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
  338. resets = <&syscon GEMINI_RESET_GMAC0>;
  339. clocks = <&syscon GEMINI_CLK_GATE_GMAC0>;
  340. clock-names = "PCLK";
  341. };
  342. gmac1: ethernet-port@1 {
  343. compatible = "cortina,gemini-ethernet-port";
  344. reg = <0x6000c000 0x2000>, /* Port 1 DMA/TOE */
  345. <0x6000e000 0x2000>; /* Port 1 GMAC */
  346. interrupt-parent = <&intcon>;
  347. interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
  348. resets = <&syscon GEMINI_RESET_GMAC1>;
  349. clocks = <&syscon GEMINI_CLK_GATE_GMAC1>;
  350. clock-names = "PCLK";
  351. };
  352. };
  353. crypto: crypto@62000000 {
  354. compatible = "cortina,sl3516-crypto";
  355. reg = <0x62000000 0x10000>;
  356. interrupts = <7 IRQ_TYPE_EDGE_RISING>;
  357. resets = <&syscon GEMINI_RESET_SECURITY>;
  358. clocks = <&syscon GEMINI_CLK_GATE_SECURITY>;
  359. };
  360. ide0: ide@63000000 {
  361. compatible = "cortina,gemini-pata", "faraday,ftide010";
  362. reg = <0x63000000 0x1000>;
  363. interrupts = <4 IRQ_TYPE_EDGE_RISING>;
  364. resets = <&syscon GEMINI_RESET_IDE>;
  365. clocks = <&syscon GEMINI_CLK_GATE_IDE>;
  366. clock-names = "PCLK";
  367. sata = <&sata>;
  368. status = "disabled";
  369. #address-cells = <1>;
  370. #size-cells = <0>;
  371. };
  372. ide1: ide@63400000 {
  373. compatible = "cortina,gemini-pata", "faraday,ftide010";
  374. reg = <0x63400000 0x1000>;
  375. interrupts = <5 IRQ_TYPE_EDGE_RISING>;
  376. resets = <&syscon GEMINI_RESET_IDE>;
  377. clocks = <&syscon GEMINI_CLK_GATE_IDE>;
  378. clock-names = "PCLK";
  379. sata = <&sata>;
  380. status = "disabled";
  381. #address-cells = <1>;
  382. #size-cells = <0>;
  383. };
  384. dma-controller@67000000 {
  385. compatible = "faraday,ftdma020", "arm,pl080", "arm,primecell";
  386. /* Faraday Technology FTDMAC020 variant */
  387. arm,primecell-periphid = <0x0003b080>;
  388. reg = <0x67000000 0x1000>;
  389. interrupts = <9 IRQ_TYPE_EDGE_RISING>;
  390. resets = <&syscon GEMINI_RESET_DMAC>;
  391. clocks = <&syscon GEMINI_CLK_AHB>;
  392. clock-names = "apb_pclk";
  393. /* Bus interface AHB1 (AHB0) is totally tilted */
  394. lli-bus-interface-ahb2;
  395. mem-bus-interface-ahb2;
  396. memcpy-burst-size = <256>;
  397. memcpy-bus-width = <32>;
  398. #dma-cells = <2>;
  399. };
  400. display-controller@6a000000 {
  401. compatible = "cortina,gemini-tvc", "faraday,tve200";
  402. reg = <0x6a000000 0x1000>;
  403. interrupts = <13 IRQ_TYPE_EDGE_RISING>;
  404. resets = <&syscon GEMINI_RESET_TVC>;
  405. clocks = <&syscon GEMINI_CLK_GATE_TVC>,
  406. <&syscon GEMINI_CLK_TVC>;
  407. clock-names = "PCLK", "TVE";
  408. pinctrl-names = "default";
  409. pinctrl-0 = <&tvc_default_pins>;
  410. status = "disabled";
  411. };
  412. usb0: usb@68000000 {
  413. compatible = "cortina,gemini-usb", "faraday,fotg210";
  414. reg = <0x68000000 0x1000>;
  415. interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
  416. resets = <&syscon GEMINI_RESET_USB0>;
  417. clocks = <&syscon GEMINI_CLK_GATE_USB0>;
  418. clock-names = "PCLK";
  419. /*
  420. * This will claim pins for USB0 and USB1 at the same
  421. * time as they are using some common pins. If you for
  422. * some reason have a system using USB1 at 96000000 but
  423. * NOT using USB0 at 68000000 you wll have to add the
  424. * usb_default_pins to the USB controller at 96000000
  425. * in your .dts for the board.
  426. */
  427. pinctrl-names = "default";
  428. pinctrl-0 = <&usb_default_pins>;
  429. syscon = <&syscon>;
  430. status = "disabled";
  431. };
  432. usb1: usb@69000000 {
  433. compatible = "cortina,gemini-usb", "faraday,fotg210";
  434. reg = <0x69000000 0x1000>;
  435. interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
  436. resets = <&syscon GEMINI_RESET_USB1>;
  437. clocks = <&syscon GEMINI_CLK_GATE_USB1>;
  438. clock-names = "PCLK";
  439. syscon = <&syscon>;
  440. status = "disabled";
  441. };
  442. };
  443. };