ox820.dtsi 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. /*
  2. * Copyright (C) 2013 Ma Haijun <mahaijuns@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include "skeleton.dtsi"
  9. / {
  10. compatible = "plxtech,nas7820", "plxtech,nas782x";
  11. interrupt-parent = <&gic>;
  12. aliases {
  13. serial0 = &uart0;
  14. /* alias to determine bank index */
  15. gpio0 = &GPIOA;
  16. gpio1 = &GPIOB;
  17. ethernet0 = &gmac;
  18. };
  19. cpus {
  20. cpu@0 {
  21. compatible = "arm,arm11mpcore";
  22. };
  23. cpu@1 {
  24. compatible = "arm,arm11mpcore";
  25. };
  26. };
  27. gic: gic@47001000 {
  28. compatible = "arm,arm11mp-gic";
  29. interrupt-controller;
  30. #interrupt-cells = <3>;
  31. reg = <0x47001000 0x1000>,
  32. <0x47000100 0x0100>;
  33. };
  34. rst: reset-controller@44E00034 {
  35. compatible = "plxtech,nas782x-reset";
  36. #reset-cells = <1>;
  37. reg = <0x44E00034 0x8>; /* currently not used */
  38. };
  39. rps: rps@44400000 {
  40. compatible = "plxtech,nas782x-rps";
  41. interrupt-controller;
  42. #interrupt-cells = <1>;
  43. reg = <0x44400000 0x14>;
  44. interrupts = <0 5 0x304>;
  45. };
  46. /* external oscillator */
  47. osc: oscillator {
  48. compatible = "fixed-clock";
  49. #clock-cells = <0>;
  50. clock-frequency = <25000000>;
  51. };
  52. sysclk: sysclk {
  53. compatible = "fixed-factor-clock";
  54. #clock-cells = <0>;
  55. clock-div = <4>;
  56. clock-mult = <1>;
  57. clocks = <&osc>;
  58. };
  59. plla: plla@44e001f0 {
  60. compatible = "plxtech,nas782x-plla";
  61. #clock-cells = <0>;
  62. clocks = <&osc>;
  63. reg = <0x44e001f0 0x10>;
  64. };
  65. pllb: pllb@44f001f0 {
  66. compatible = "plxtech,nas782x-pllb";
  67. #clock-cells = <0>;
  68. clocks = <&osc>;
  69. reg = <0x44f001f0 0x10>;
  70. resets = <&rst 31>;
  71. };
  72. stdclk: stdclk {
  73. compatible = "plxtech,nas782x-stdclk";
  74. #clock-cells = <1>;
  75. clocks = <&osc>;
  76. };
  77. twdclk: twdclk {
  78. compatible = "fixed-factor-clock";
  79. #clock-cells = <0>;
  80. clock-div = <2>;
  81. clock-mult = <1>;
  82. clocks = <&plla>;
  83. };
  84. gmacclk: gmacclk {
  85. compatible = "fixed-clock";
  86. #clock-cells = <0>;
  87. clock-frequency = <125000000>;
  88. };
  89. pinctrl {
  90. /* act as a simple bus, so children will be probed automatically */
  91. #address-cells = <1>;
  92. #size-cells = <1>;
  93. compatible = "plxtech,nas782x-pinctrl", "simple-bus";
  94. ranges;
  95. plxtech,mux-mask = <
  96. 0xFFFFFFFF 0xCC0FFDF9 0xFC000E60 0x0F03F7E0 0xF00C0FE0
  97. 0x0003FFFF 0x00037FFF 0x0003FFF8 0x00000F00 0x0003F7F3
  98. >;
  99. GPIOA: gpio@44000000 {
  100. compatible = "plxtech,nas782x-gpio";
  101. reg = <0x44000000 0x100>, <0x44E00000 0x200>;
  102. interrupts = <0 21 0x304>;
  103. #gpio-cells = <2>;
  104. gpio-controller;
  105. interrupt-controller;
  106. #interrupt-cells = <2>;
  107. #gpio-lines = <32>; /* real gpio pin count */
  108. };
  109. GPIOB: gpio@44100000 {
  110. compatible = "plxtech,nas782x-gpio";
  111. reg = <0x44100000 0x100>, <0x44F00000 0x200>;
  112. interrupts = <0 22 0x304>;
  113. #gpio-cells = <2>;
  114. gpio-controller;
  115. interrupt-controller;
  116. #interrupt-cells = <2>;
  117. #gpio-lines = <18>; /* real gpio pin count */
  118. };
  119. uart0 {
  120. pinctrl_uart0: uart0-0 {
  121. plxtech,pins =
  122. <0 30 5 0 /* MF_A30 PINMUX_ALT PINMUX_UARTA_SIN */
  123. 0 31 5 0>; /* MF_A31 PINMUX_ALT PINMUX_UARTA_SOUT */
  124. };
  125. };
  126. gmac0 {
  127. pinctrl_gmac0: gmac0-0 {
  128. plxtech,pins =
  129. <0 3 1 0 /* MF_A3 PINMUX_2 PINMUX_MACA_MDC */
  130. 0 4 1 0>; /* MF_A4 PINMUX_2 PINMUX_MACA_MDIO */
  131. };
  132. };
  133. nand0 {
  134. pinctrl_nand0: nand0-0 {
  135. plxtech,pins =
  136. <0 12 1 0 /* MF_A12 PINMUX_2 PINMUX_STATIC_DATA0 */
  137. 0 13 1 0 /* MF_A13 PINMUX_2 PINMUX_STATIC_DATA1 */
  138. 0 14 1 0 /* MF_A14 PINMUX_2 PINMUX_STATIC_DATA2 */
  139. 0 15 1 0 /* MF_A15 PINMUX_2 PINMUX_STATIC_DATA3 */
  140. 0 16 1 0 /* MF_A16 PINMUX_2 PINMUX_STATIC_DATA4 */
  141. 0 17 1 0 /* MF_A17 PINMUX_2 PINMUX_STATIC_DATA5 */
  142. 0 18 1 0 /* MF_A18 PINMUX_2 PINMUX_STATIC_DATA6 */
  143. 0 19 1 0 /* MF_A19 PINMUX_2 PINMUX_STATIC_DATA7 */
  144. 0 20 1 0 /* MF_A20 PINMUX_2 PINMUX_STATIC_NWE */
  145. 0 21 1 0 /* MF_A21 PINMUX_2 PINMUX_STATIC_NOE */
  146. 0 22 1 0 /* MF_A22 PINMUX_2 PINMUX_STATIC_NCS */
  147. 0 23 1 0 /* MF_A23 PINMUX_2 PINMUX_STATIC_ADDR18 */
  148. 0 24 1 0>; /* MF_A24 PINMUX_2 PINMUX_STATIC_ADDR19 */
  149. };
  150. };
  151. };
  152. pcie-controller@47C00000 {
  153. compatible = "plxtech,nas782x-pcie";
  154. device_type = "pci";
  155. #address-cells = <3>;
  156. #size-cells = <2>;
  157. /* flag & space bus address host address size */
  158. ranges = < 0x82000000 0 0x48000000 0x48000000 0 0x2000000
  159. 0xC2000000 0 0x4A000000 0x4A000000 0 0x1E00000
  160. 0x81000000 0 0x4BE00000 0x4BE00000 0 0x0100000
  161. 0x80000000 0 0x4BF00000 0x4BF00000 0 0x0100000>;
  162. bus-range = <0x00 0x7f>;
  163. /* cfg inbound translator phy*/
  164. reg = <0x47C00000 0x1000>, <0x47D00000 0x100>, <0x44A00000 0x10>;
  165. #interrupt-cells = <1>;
  166. /* wild card mask, match all bus address & interrupt specifier */
  167. /* format: bus address mask, interrupt specifier mask */
  168. /* each bit 1 means need match, 0 means ignored when match */
  169. interrupt-map-mask = <0 0 0 0>;
  170. /* format: a list of: bus address, interrupt specifier,
  171. * parent interrupt controller & specifier */
  172. interrupt-map = <0 0 0 0 &gic 0 19 0x304>;
  173. gpios = <&GPIOB 12 0>;
  174. clocks = <&stdclk 8>, <&pllb>;
  175. clock-names = "pcie", "busclk";
  176. resets = <&rst 7>, <&rst 14>;
  177. reset-names = "pcie", "phy";
  178. plxtech,pcie-hcsl-bit = <2>;
  179. plxtech,pcie-ctrl-offset = <0x120>;
  180. plxtech,pcie-outbound-offset = <0x138>;
  181. status = "disabled";
  182. };
  183. pcie-controller@47E00000 {
  184. compatible = "plxtech,nas782x-pcie";
  185. device_type = "pci";
  186. #address-cells = <3>;
  187. #size-cells = <2>;
  188. /* flag & space bus address host address size */
  189. ranges = < 0x82000000 0 0x4C000000 0x4C000000 0 0x2000000
  190. 0xC2000000 0 0x4E000000 0x4E000000 0 0x1E00000
  191. 0x81000000 0 0x4FE00000 0x4FE00000 0 0x0100000
  192. 0x80000000 0 0x4FF00000 0x4FF00000 0 0x0100000>;
  193. bus-range = <0x80 0xff>;
  194. /* cfg inbound translator phy*/
  195. reg = <0x47E00000 0x1000>, <0x47F00000 0x100>, <0x44A00000 0x10>;
  196. #interrupt-cells = <1>;
  197. /* wild card mask, match all bus address & interrupt specifier */
  198. /* format: bus address mask, interrupt specifier mask */
  199. /* each bit 1 means need match, 0 means ignored when match */
  200. interrupt-map-mask = <0 0 0 0>;
  201. /* format: a list of: bus address, interrupt specifier,
  202. * parent interrupt controller & specifier */
  203. interrupt-map = <0 0 0 0 &gic 0 20 0x304>;
  204. /* gpios = <&GPIOB 12 0>; */
  205. clocks = <&stdclk 11>, <&pllb>;
  206. clock-names = "pcie", "busclk";
  207. resets = <&rst 23>, <&rst 14>;
  208. reset-names = "pcie", "phy";
  209. plxtech,pcie-hcsl-bit = <3>;
  210. plxtech,pcie-ctrl-offset = <0x124>;
  211. plxtech,pcie-outbound-offset = <0x174>;
  212. status = "disabled";
  213. };
  214. local-timer@47000600 {
  215. compatible = "arm,arm11mp-twd-timer";
  216. reg = <0x47000600 0x20>;
  217. interrupts = <1 13 0x304>; /* percpu, irq 29, cpu mask 3, level high */
  218. clocks = <&twdclk>;
  219. };
  220. watchdog@47000620 {
  221. compatible = "mpcore_wdt";
  222. reg = <0x47000620 0x20>;
  223. interrupts = <1 14 0x304>; /* percpu, irq 30, cpu mask 3, level high */
  224. clocks = <&twdclk>;
  225. };
  226. timer@44400200 {
  227. compatible = "plxtech,nas782x-rps-timer";
  228. reg = <0x44400200 0x40>;
  229. clocks = <&sysclk>;
  230. };
  231. uart0: uart@44200000 {
  232. compatible = "ns16550a";
  233. reg = <0x44200000 0x100>;
  234. clock-frequency = <6250000>;
  235. interrupts = <0 23 0x304>;
  236. reg-shift = <0>;
  237. fifo-size = <16>;
  238. reg-io-width = <1>;
  239. current-speed = <115200>;
  240. no-loopback-test;
  241. pinctrl-names = "default";
  242. pinctrl-0 = <&pinctrl_uart0>;
  243. status = "disabled";
  244. };
  245. sata@45900000 {
  246. compatible = "plxtech,nas782x-sata";
  247. /* ports dmactl sgdma */
  248. reg = <0x45900000 0x20000>, <0x459A0000 0x40>, <0x459B0000 0x20>,
  249. /* core phy descriptors (optional) */
  250. <0x459E0000 0x2000>, <0x44900000 0x0C>, <0x50000000 0x1000>;
  251. interrupts = <0 18 0x304>;
  252. clocks = <&stdclk 4>;
  253. resets = <&rst 11>, <&rst 12>, <&rst 13>;
  254. reset-names = "sata", "link", "phy";
  255. nr-ports = <1>;
  256. status = "disabled";
  257. };
  258. nandc: nand-controller@41000000 {
  259. compatible = "oxsemi,ox820-nand";
  260. reg = <0x41000000 0x100000>;
  261. clocks = <&stdclk 9>;
  262. pinctrl-names = "default";
  263. pinctrl-0 = <&pinctrl_nand0>;
  264. resets = <&rst 15>;
  265. #address-cells = <1>;
  266. #size-cells = <0>;
  267. status = "disabled";
  268. };
  269. gmac: ethernet@40400000 {
  270. compatible = "plxtech,nas782x-gmac", "snps,dwmac";
  271. reg = <0x40400000 0x2000>;
  272. interrupts = <0 8 0x304>, <0 17 0x304>;
  273. interrupt-names = "macirq", "eth_wake_irq";
  274. mac-address = [000000000000]; /* Filled in by U-Boot */
  275. phy-mode = "rgmii";
  276. clocks = <&stdclk 7>, <&gmacclk>;
  277. clock-names = "gmac", "stmmaceth";
  278. pinctrl-names = "default";
  279. pinctrl-0 = <&pinctrl_gmac0>;
  280. resets = <&rst 6>;
  281. status = "disabled";
  282. };
  283. ehci@40200100 {
  284. compatible = "plxtech,nas782x-ehci";
  285. reg = <0x40200100 0xf00>;
  286. interrupts = <0 7 0x304>;
  287. clocks = <&stdclk 6>, <&pllb>, <&stdclk 12>;
  288. clock-names = "usb", "refsrc", "phyref";
  289. resets = <&rst 4>, <&rst 5>, <&rst 26>;
  290. reset-names = "host", "phya", "phyb";
  291. /* Otherwise ref300 is used, which is derived from sata phy
  292. * in that case, usb depends on sata initialization */
  293. /* FIXME: how to make this dependency explicit ? */
  294. plxtech,ehci_use_pllb;
  295. status = "disabled";
  296. };
  297. };