cn9130-crb.dtsi 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2020 Marvell International Ltd.
  4. */
  5. #include "cn9130.dtsi" /* include SoC device tree */
  6. #include <dt-bindings/gpio/gpio.h>
  7. / {
  8. chosen {
  9. stdout-path = "serial0:115200n8";
  10. };
  11. aliases {
  12. i2c0 = &cp0_i2c0;
  13. ethernet0 = &cp0_eth0;
  14. ethernet1 = &cp0_eth1;
  15. ethernet2 = &cp0_eth2;
  16. gpio1 = &cp0_gpio1;
  17. gpio2 = &cp0_gpio2;
  18. };
  19. memory@0 {
  20. device_type = "memory";
  21. reg = <0x0 0x0 0x0 0x80000000>;
  22. };
  23. ap0_reg_mmc_vccq: ap0_mmc_vccq@0 {
  24. compatible = "regulator-gpio";
  25. regulator-name = "ap0_mmc_vccq";
  26. regulator-min-microvolt = <1800000>;
  27. regulator-max-microvolt = <3300000>;
  28. gpios = <&expander0 5 GPIO_ACTIVE_HIGH>;
  29. states = <1800000 0x1
  30. 3300000 0x0>;
  31. };
  32. cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
  33. compatible = "regulator-fixed";
  34. regulator-name = "cp0-xhci1-vbus";
  35. regulator-min-microvolt = <5000000>;
  36. regulator-max-microvolt = <5000000>;
  37. enable-active-high;
  38. gpio = <&expander0 8 GPIO_ACTIVE_HIGH>;
  39. };
  40. cp0_usb3_0_phy0: cp0_usb3_phy0 {
  41. compatible = "usb-nop-xceiv";
  42. };
  43. cp0_usb3_0_phy1: cp0_usb3_phy1 {
  44. compatible = "usb-nop-xceiv";
  45. vcc-supply = <&cp0_reg_usb3_vbus1>;
  46. };
  47. cp0_reg_sd_vccq: cp0_sd_vccq@0 {
  48. compatible = "regulator-gpio";
  49. regulator-name = "cp0_sd_vccq";
  50. regulator-min-microvolt = <1800000>;
  51. regulator-max-microvolt = <3300000>;
  52. gpios = <&cp0_gpio2 18 GPIO_ACTIVE_HIGH>;
  53. states = <1800000 0x1
  54. 3300000 0x0>;
  55. };
  56. cp0_reg_sd_vcc: cp0_sd_vcc@0 {
  57. compatible = "regulator-fixed";
  58. regulator-name = "cp0_sd_vcc";
  59. regulator-min-microvolt = <3300000>;
  60. regulator-max-microvolt = <3300000>;
  61. gpio = <&cp0_gpio2 19 GPIO_ACTIVE_HIGH>;
  62. enable-active-high;
  63. regulator-always-on;
  64. };
  65. sfp: sfp {
  66. compatible = "sff,sfp";
  67. i2c-bus = <&cp0_i2c1>;
  68. mod-def0-gpios = <&expander0 3 GPIO_ACTIVE_LOW>;
  69. los-gpios = <&expander0 15 GPIO_ACTIVE_HIGH>;
  70. tx-disable-gpios = <&expander0 2 GPIO_ACTIVE_HIGH>;
  71. tx-fault-gpios = <&cp0_gpio1 24 GPIO_ACTIVE_HIGH>;
  72. maximum-power-milliwatt = <3000>;
  73. status = "okay";
  74. };
  75. };
  76. &uart0 {
  77. status = "okay";
  78. };
  79. /* on-board eMMC U6 */
  80. &ap_sdhci0 {
  81. pinctrl-names = "default";
  82. bus-width = <8>;
  83. status = "okay";
  84. mmc-ddr-1_8v;
  85. vqmmc-supply = <&ap0_reg_mmc_vccq>;
  86. };
  87. &cp0_syscon0 {
  88. cp0_pinctrl: pinctrl {
  89. compatible = "marvell,cp115-standalone-pinctrl";
  90. cp0_i2c0_pins: cp0-i2c-pins-0 {
  91. marvell,pins = "mpp37", "mpp38";
  92. marvell,function = "i2c0";
  93. };
  94. cp0_i2c1_pins: cp0-i2c-pins-1 {
  95. marvell,pins = "mpp35", "mpp36";
  96. marvell,function = "i2c1";
  97. };
  98. cp0_sdhci_cd_pins_crb: cp0-sdhci-cd-pins-crb {
  99. marvell,pins = "mpp55";
  100. marvell,function = "gpio";
  101. };
  102. cp0_sdhci_pins: cp0-sdhi-pins-0 {
  103. marvell,pins = "mpp56", "mpp57", "mpp58",
  104. "mpp59", "mpp60", "mpp61";
  105. marvell,function = "sdio";
  106. };
  107. cp0_spi1_pins: cp0-spi-pins-1 {
  108. marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
  109. marvell,function = "spi1";
  110. };
  111. };
  112. };
  113. &cp0_gpio1 {
  114. status = "okay";
  115. };
  116. &cp0_gpio2 {
  117. status = "okay";
  118. };
  119. &cp0_i2c0 {
  120. pinctrl-names = "default";
  121. pinctrl-0 = <&cp0_i2c0_pins>;
  122. status = "okay";
  123. clock-frequency = <100000>;
  124. expander0: mcp23x17@20 {
  125. compatible = "microchip,mcp23017";
  126. gpio-controller;
  127. #gpio-cells = <2>;
  128. reg = <0x20>;
  129. status = "okay";
  130. };
  131. };
  132. &cp0_i2c1 {
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&cp0_i2c1_pins>;
  135. clock-frequency = <100000>;
  136. status = "okay";
  137. };
  138. &cp0_sdhci0 {
  139. pinctrl-names = "default";
  140. pinctrl-0 = <&cp0_sdhci_pins
  141. &cp0_sdhci_cd_pins_crb>;
  142. bus-width = <4>;
  143. cd-gpios = <&cp0_gpio2 23 GPIO_ACTIVE_HIGH>;
  144. vqmmc-supply = <&cp0_reg_sd_vccq>;
  145. vmmc-supply = <&cp0_reg_sd_vcc>;
  146. status = "okay";
  147. };
  148. &cp0_spi1 {
  149. pinctrl-names = "default";
  150. pinctrl-0 = <&cp0_spi1_pins>;
  151. reg = <0x700680 0x50>, /* control */
  152. <0x2000000 0x1000000>; /* CS0 */
  153. status = "okay";
  154. flash@0 {
  155. #address-cells = <0x1>;
  156. #size-cells = <0x1>;
  157. compatible = "jedec,spi-nor";
  158. reg = <0x0>;
  159. /* On-board MUX does not allow higher frequencies */
  160. spi-max-frequency = <40000000>;
  161. partitions {
  162. compatible = "fixed-partitions";
  163. #address-cells = <1>;
  164. #size-cells = <1>;
  165. partition@0 {
  166. label = "U-Boot";
  167. reg = <0x0 0x200000>;
  168. };
  169. partition@400000 {
  170. label = "Filesystem";
  171. reg = <0x200000 0xe00000>;
  172. };
  173. };
  174. };
  175. };
  176. &cp0_mdio {
  177. status = "okay";
  178. phy0: ethernet-phy@0 {
  179. reg = <0>;
  180. };
  181. switch6: switch0@6 {
  182. /* Actual device is MV88E6393X */
  183. compatible = "marvell,mv88e6190";
  184. #address-cells = <1>;
  185. #size-cells = <0>;
  186. reg = <6>;
  187. interrupt-parent = <&cp0_gpio1>;
  188. interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
  189. interrupt-controller;
  190. #interrupt-cells = <2>;
  191. dsa,member = <0 0>;
  192. ports {
  193. #address-cells = <1>;
  194. #size-cells = <0>;
  195. port@1 {
  196. reg = <1>;
  197. label = "p1";
  198. phy-handle = <&switch0phy1>;
  199. };
  200. port@2 {
  201. reg = <2>;
  202. label = "p2";
  203. phy-handle = <&switch0phy2>;
  204. };
  205. port@3 {
  206. reg = <3>;
  207. label = "p3";
  208. phy-handle = <&switch0phy3>;
  209. };
  210. port@4 {
  211. reg = <4>;
  212. label = "p4";
  213. phy-handle = <&switch0phy4>;
  214. };
  215. port@5 {
  216. reg = <5>;
  217. label = "p5";
  218. phy-handle = <&switch0phy5>;
  219. };
  220. port@6 {
  221. reg = <6>;
  222. label = "p6";
  223. phy-handle = <&switch0phy6>;
  224. };
  225. port@7 {
  226. reg = <7>;
  227. label = "p7";
  228. phy-handle = <&switch0phy7>;
  229. };
  230. port@8 {
  231. reg = <8>;
  232. label = "p8";
  233. phy-handle = <&switch0phy8>;
  234. };
  235. port@9 {
  236. reg = <9>;
  237. label = "p9";
  238. phy-mode = "10gbase-r";
  239. sfp = <&sfp>;
  240. managed = "in-band-status";
  241. };
  242. port@a {
  243. reg = <10>;
  244. label = "cpu";
  245. ethernet = <&cp0_eth0>;
  246. };
  247. };
  248. mdio {
  249. #address-cells = <1>;
  250. #size-cells = <0>;
  251. switch0phy1: switch0phy1@1 {
  252. reg = <0x1>;
  253. };
  254. switch0phy2: switch0phy2@2 {
  255. reg = <0x2>;
  256. };
  257. switch0phy3: switch0phy3@3 {
  258. reg = <0x3>;
  259. };
  260. switch0phy4: switch0phy4@4 {
  261. reg = <0x4>;
  262. };
  263. switch0phy5: switch0phy5@5 {
  264. reg = <0x5>;
  265. };
  266. switch0phy6: switch0phy6@6 {
  267. reg = <0x6>;
  268. };
  269. switch0phy7: switch0phy7@7 {
  270. reg = <0x7>;
  271. };
  272. switch0phy8: switch0phy8@8 {
  273. reg = <0x8>;
  274. };
  275. };
  276. };
  277. };
  278. &cp0_xmdio {
  279. status = "okay";
  280. nbaset_phy0: ethernet-phy@0 {
  281. compatible = "ethernet-phy-ieee802.3-c45";
  282. reg = <0>;
  283. };
  284. };
  285. &cp0_ethernet {
  286. status = "okay";
  287. };
  288. &cp0_eth0 {
  289. /* This port is connected to 88E6393X switch */
  290. status = "okay";
  291. phy-mode = "10gbase-r";
  292. managed = "in-band-status";
  293. phys = <&cp0_comphy4 0>;
  294. };
  295. &cp0_eth1 {
  296. status = "okay";
  297. phy = <&phy0>;
  298. phy-mode = "rgmii-id";
  299. };
  300. &cp0_eth2 {
  301. /* This port uses "2500base-t" phy-mode */
  302. status = "disabled";
  303. phy = <&nbaset_phy0>;
  304. phys = <&cp0_comphy5 2>;
  305. };