sparx5.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.
  4. */
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/interrupt-controller/arm-gic.h>
  7. #include <dt-bindings/clock/microchip,sparx5.h>
  8. / {
  9. compatible = "microchip,sparx5";
  10. interrupt-parent = <&gic>;
  11. #address-cells = <2>;
  12. #size-cells = <1>;
  13. aliases {
  14. spi0 = &spi0;
  15. serial0 = &uart0;
  16. serial1 = &uart1;
  17. };
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. };
  21. cpus {
  22. #address-cells = <2>;
  23. #size-cells = <0>;
  24. cpu-map {
  25. cluster0 {
  26. core0 {
  27. cpu = <&cpu0>;
  28. };
  29. core1 {
  30. cpu = <&cpu1>;
  31. };
  32. };
  33. };
  34. cpu0: cpu@0 {
  35. compatible = "arm,cortex-a53";
  36. device_type = "cpu";
  37. reg = <0x0 0x0>;
  38. enable-method = "psci";
  39. next-level-cache = <&L2_0>;
  40. };
  41. cpu1: cpu@1 {
  42. compatible = "arm,cortex-a53";
  43. device_type = "cpu";
  44. reg = <0x0 0x1>;
  45. enable-method = "psci";
  46. next-level-cache = <&L2_0>;
  47. };
  48. L2_0: l2-cache0 {
  49. compatible = "cache";
  50. };
  51. };
  52. arm-pmu {
  53. compatible = "arm,cortex-a53-pmu";
  54. interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
  55. interrupt-affinity = <&cpu0>, <&cpu1>;
  56. };
  57. psci: psci {
  58. compatible = "arm,psci-0.2";
  59. method = "smc";
  60. };
  61. timer {
  62. compatible = "arm,armv8-timer";
  63. interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
  64. <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
  65. <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
  66. <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
  67. };
  68. lcpll_clk: lcpll-clk {
  69. compatible = "fixed-clock";
  70. #clock-cells = <0>;
  71. clock-frequency = <2500000000>;
  72. };
  73. clks: clock-controller@61110000c {
  74. compatible = "microchip,sparx5-dpll";
  75. #clock-cells = <1>;
  76. clocks = <&lcpll_clk>;
  77. reg = <0x6 0x1110000c 0x24>;
  78. };
  79. ahb_clk: ahb-clk {
  80. compatible = "fixed-clock";
  81. #clock-cells = <0>;
  82. clock-frequency = <250000000>;
  83. };
  84. sys_clk: sys-clk {
  85. compatible = "fixed-clock";
  86. #clock-cells = <0>;
  87. clock-frequency = <625000000>;
  88. };
  89. axi: axi@600000000 {
  90. compatible = "simple-bus";
  91. #address-cells = <2>;
  92. #size-cells = <1>;
  93. ranges;
  94. gic: interrupt-controller@600300000 {
  95. compatible = "arm,gic-v3";
  96. #interrupt-cells = <3>;
  97. #address-cells = <2>;
  98. #size-cells = <2>;
  99. interrupt-controller;
  100. reg = <0x6 0x00300000 0x10000>, /* GIC Dist */
  101. <0x6 0x00340000 0xc0000>, /* GICR */
  102. <0x6 0x00200000 0x2000>, /* GICC */
  103. <0x6 0x00210000 0x2000>, /* GICV */
  104. <0x6 0x00220000 0x2000>; /* GICH */
  105. interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
  106. };
  107. cpu_ctrl: syscon@600000000 {
  108. compatible = "microchip,sparx5-cpu-syscon", "syscon",
  109. "simple-mfd";
  110. reg = <0x6 0x00000000 0xd0>;
  111. mux: mux-controller {
  112. compatible = "mmio-mux";
  113. #mux-control-cells = <0>;
  114. /*
  115. * SI_OWNER and SI2_OWNER in GENERAL_CTRL
  116. * SPI: value 9 - (SIMC,SIBM) = 0b1001
  117. * SPI2: value 6 - (SIBM,SIMC) = 0b0110
  118. */
  119. mux-reg-masks = <0x88 0xf0>;
  120. };
  121. };
  122. reset: reset-controller@611010008 {
  123. compatible = "microchip,sparx5-switch-reset";
  124. reg = <0x6 0x11010008 0x4>;
  125. reg-names = "gcb";
  126. #reset-cells = <1>;
  127. cpu-syscon = <&cpu_ctrl>;
  128. };
  129. uart0: serial@600100000 {
  130. pinctrl-0 = <&uart_pins>;
  131. pinctrl-names = "default";
  132. compatible = "ns16550a";
  133. reg = <0x6 0x00100000 0x20>;
  134. clocks = <&ahb_clk>;
  135. reg-io-width = <4>;
  136. reg-shift = <2>;
  137. interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
  138. status = "disabled";
  139. };
  140. uart1: serial@600102000 {
  141. pinctrl-0 = <&uart2_pins>;
  142. pinctrl-names = "default";
  143. compatible = "ns16550a";
  144. reg = <0x6 0x00102000 0x20>;
  145. clocks = <&ahb_clk>;
  146. reg-io-width = <4>;
  147. reg-shift = <2>;
  148. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  149. status = "disabled";
  150. };
  151. spi0: spi@600104000 {
  152. #address-cells = <1>;
  153. #size-cells = <0>;
  154. compatible = "microchip,sparx5-spi";
  155. reg = <0x6 0x00104000 0x40>;
  156. num-cs = <16>;
  157. reg-io-width = <4>;
  158. reg-shift = <2>;
  159. clocks = <&ahb_clk>;
  160. interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
  161. status = "disabled";
  162. };
  163. timer1: timer@600105000 {
  164. compatible = "snps,dw-apb-timer";
  165. reg = <0x6 0x00105000 0x1000>;
  166. clocks = <&ahb_clk>;
  167. clock-names = "timer";
  168. interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
  169. };
  170. sdhci0: mmc@600800000 {
  171. compatible = "microchip,dw-sparx5-sdhci";
  172. status = "disabled";
  173. reg = <0x6 0x00800000 0x1000>;
  174. pinctrl-0 = <&emmc_pins>;
  175. pinctrl-names = "default";
  176. clocks = <&clks CLK_ID_AUX1>;
  177. clock-names = "core";
  178. assigned-clocks = <&clks CLK_ID_AUX1>;
  179. assigned-clock-rates = <800000000>;
  180. interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
  181. bus-width = <8>;
  182. };
  183. gpio: pinctrl@6110101e0 {
  184. compatible = "microchip,sparx5-pinctrl";
  185. reg = <0x6 0x110101e0 0x90>, <0x6 0x10508010 0x100>;
  186. gpio-controller;
  187. #gpio-cells = <2>;
  188. gpio-ranges = <&gpio 0 0 64>;
  189. interrupt-controller;
  190. interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
  191. #interrupt-cells = <2>;
  192. cs1_pins: cs1-pins {
  193. pins = "GPIO_16";
  194. function = "si";
  195. };
  196. cs2_pins: cs2-pins {
  197. pins = "GPIO_17";
  198. function = "si";
  199. };
  200. cs3_pins: cs3-pins {
  201. pins = "GPIO_18";
  202. function = "si";
  203. };
  204. si2_pins: si2-pins {
  205. pins = "GPIO_39", "GPIO_40", "GPIO_41";
  206. function = "si2";
  207. };
  208. sgpio0_pins: sgpio-pins {
  209. pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3";
  210. function = "sg0";
  211. };
  212. sgpio1_pins: sgpio1-pins {
  213. pins = "GPIO_4", "GPIO_5", "GPIO_12", "GPIO_13";
  214. function = "sg1";
  215. };
  216. sgpio2_pins: sgpio2-pins {
  217. pins = "GPIO_30", "GPIO_31", "GPIO_32",
  218. "GPIO_33";
  219. function = "sg2";
  220. };
  221. uart_pins: uart-pins {
  222. pins = "GPIO_10", "GPIO_11";
  223. function = "uart";
  224. };
  225. uart2_pins: uart2-pins {
  226. pins = "GPIO_26", "GPIO_27";
  227. function = "uart2";
  228. };
  229. i2c_pins: i2c-pins {
  230. pins = "GPIO_14", "GPIO_15";
  231. function = "twi";
  232. };
  233. i2c2_pins: i2c2-pins {
  234. pins = "GPIO_28", "GPIO_29";
  235. function = "twi2";
  236. };
  237. emmc_pins: emmc-pins {
  238. pins = "GPIO_34", "GPIO_35", "GPIO_36",
  239. "GPIO_37", "GPIO_38", "GPIO_39",
  240. "GPIO_40", "GPIO_41", "GPIO_42",
  241. "GPIO_43", "GPIO_44", "GPIO_45",
  242. "GPIO_46", "GPIO_47";
  243. function = "emmc";
  244. };
  245. miim1_pins: miim1-pins {
  246. pins = "GPIO_56", "GPIO_57";
  247. function = "miim";
  248. };
  249. miim2_pins: miim2-pins {
  250. pins = "GPIO_58", "GPIO_59";
  251. function = "miim";
  252. };
  253. miim3_pins: miim3-pins {
  254. pins = "GPIO_52", "GPIO_53";
  255. function = "miim";
  256. };
  257. };
  258. sgpio0: gpio@61101036c {
  259. #address-cells = <1>;
  260. #size-cells = <0>;
  261. compatible = "microchip,sparx5-sgpio";
  262. status = "disabled";
  263. clocks = <&sys_clk>;
  264. pinctrl-0 = <&sgpio0_pins>;
  265. pinctrl-names = "default";
  266. resets = <&reset 0>;
  267. reset-names = "switch";
  268. reg = <0x6 0x1101036c 0x100>;
  269. sgpio_in0: gpio@0 {
  270. compatible = "microchip,sparx5-sgpio-bank";
  271. reg = <0>;
  272. gpio-controller;
  273. #gpio-cells = <3>;
  274. ngpios = <96>;
  275. interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
  276. interrupt-controller;
  277. #interrupt-cells = <3>;
  278. };
  279. sgpio_out0: gpio@1 {
  280. compatible = "microchip,sparx5-sgpio-bank";
  281. reg = <1>;
  282. gpio-controller;
  283. #gpio-cells = <3>;
  284. ngpios = <96>;
  285. };
  286. };
  287. sgpio1: gpio@611010484 {
  288. #address-cells = <1>;
  289. #size-cells = <0>;
  290. compatible = "microchip,sparx5-sgpio";
  291. status = "disabled";
  292. clocks = <&sys_clk>;
  293. pinctrl-0 = <&sgpio1_pins>;
  294. pinctrl-names = "default";
  295. resets = <&reset 0>;
  296. reset-names = "switch";
  297. reg = <0x6 0x11010484 0x100>;
  298. sgpio_in1: gpio@0 {
  299. compatible = "microchip,sparx5-sgpio-bank";
  300. reg = <0>;
  301. gpio-controller;
  302. #gpio-cells = <3>;
  303. ngpios = <96>;
  304. interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
  305. interrupt-controller;
  306. #interrupt-cells = <3>;
  307. };
  308. sgpio_out1: gpio@1 {
  309. compatible = "microchip,sparx5-sgpio-bank";
  310. reg = <1>;
  311. gpio-controller;
  312. #gpio-cells = <3>;
  313. ngpios = <96>;
  314. };
  315. };
  316. sgpio2: gpio@61101059c {
  317. #address-cells = <1>;
  318. #size-cells = <0>;
  319. compatible = "microchip,sparx5-sgpio";
  320. status = "disabled";
  321. clocks = <&sys_clk>;
  322. pinctrl-0 = <&sgpio2_pins>;
  323. pinctrl-names = "default";
  324. resets = <&reset 0>;
  325. reset-names = "switch";
  326. reg = <0x6 0x1101059c 0x100>;
  327. sgpio_in2: gpio@0 {
  328. reg = <0>;
  329. compatible = "microchip,sparx5-sgpio-bank";
  330. gpio-controller;
  331. #gpio-cells = <3>;
  332. ngpios = <96>;
  333. interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
  334. interrupt-controller;
  335. #interrupt-cells = <3>;
  336. };
  337. sgpio_out2: gpio@1 {
  338. compatible = "microchip,sparx5-sgpio-bank";
  339. reg = <1>;
  340. gpio-controller;
  341. #gpio-cells = <3>;
  342. ngpios = <96>;
  343. };
  344. };
  345. i2c0: i2c@600101000 {
  346. compatible = "snps,designware-i2c";
  347. status = "disabled";
  348. pinctrl-0 = <&i2c_pins>;
  349. pinctrl-names = "default";
  350. reg = <0x6 0x00101000 0x100>;
  351. #address-cells = <1>;
  352. #size-cells = <0>;
  353. interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
  354. i2c-sda-hold-time-ns = <300>;
  355. clock-frequency = <100000>;
  356. clocks = <&ahb_clk>;
  357. };
  358. i2c1: i2c@600103000 {
  359. compatible = "snps,designware-i2c";
  360. status = "disabled";
  361. pinctrl-0 = <&i2c2_pins>;
  362. pinctrl-names = "default";
  363. reg = <0x6 0x00103000 0x100>;
  364. #address-cells = <1>;
  365. #size-cells = <0>;
  366. interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
  367. i2c-sda-hold-time-ns = <300>;
  368. clock-frequency = <100000>;
  369. clocks = <&ahb_clk>;
  370. };
  371. tmon0: tmon@610508110 {
  372. compatible = "microchip,sparx5-temp";
  373. reg = <0x6 0x10508110 0xc>;
  374. #thermal-sensor-cells = <0>;
  375. clocks = <&ahb_clk>;
  376. };
  377. mdio0: mdio@6110102b0 {
  378. compatible = "mscc,ocelot-miim";
  379. status = "disabled";
  380. #address-cells = <1>;
  381. #size-cells = <0>;
  382. reg = <0x6 0x110102b0 0x24>;
  383. };
  384. mdio1: mdio@6110102d4 {
  385. compatible = "mscc,ocelot-miim";
  386. status = "disabled";
  387. pinctrl-0 = <&miim1_pins>;
  388. pinctrl-names = "default";
  389. #address-cells = <1>;
  390. #size-cells = <0>;
  391. reg = <0x6 0x110102d4 0x24>;
  392. };
  393. mdio2: mdio@6110102f8 {
  394. compatible = "mscc,ocelot-miim";
  395. status = "disabled";
  396. pinctrl-0 = <&miim2_pins>;
  397. pinctrl-names = "default";
  398. #address-cells = <1>;
  399. #size-cells = <0>;
  400. reg = <0x6 0x110102d4 0x24>;
  401. };
  402. mdio3: mdio@61101031c {
  403. compatible = "mscc,ocelot-miim";
  404. status = "disabled";
  405. pinctrl-0 = <&miim3_pins>;
  406. pinctrl-names = "default";
  407. #address-cells = <1>;
  408. #size-cells = <0>;
  409. reg = <0x6 0x1101031c 0x24>;
  410. };
  411. serdes: serdes@10808000 {
  412. compatible = "microchip,sparx5-serdes";
  413. #phy-cells = <1>;
  414. clocks = <&sys_clk>;
  415. reg = <0x6 0x10808000 0x5d0000>;
  416. };
  417. switch: switch@0x600000000 {
  418. compatible = "microchip,sparx5-switch";
  419. reg = <0x6 0 0x401000>,
  420. <0x6 0x10004000 0x7fc000>,
  421. <0x6 0x11010000 0xaf0000>;
  422. reg-names = "cpu", "dev", "gcb";
  423. interrupt-names = "xtr", "fdma", "ptp";
  424. interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
  425. <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
  426. <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
  427. resets = <&reset 0>;
  428. reset-names = "switch";
  429. };
  430. };
  431. };