cn9130-db.dtsi 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2019 Marvell International Ltd.
  4. *
  5. * Device tree for the CN9130-DB board.
  6. */
  7. #include "cn9130.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. / {
  10. chosen {
  11. stdout-path = "serial0:115200n8";
  12. };
  13. aliases {
  14. gpio1 = &cp0_gpio1;
  15. gpio2 = &cp0_gpio2;
  16. i2c0 = &cp0_i2c0;
  17. ethernet0 = &cp0_eth0;
  18. ethernet1 = &cp0_eth1;
  19. ethernet2 = &cp0_eth2;
  20. spi1 = &cp0_spi0;
  21. spi2 = &cp0_spi1;
  22. };
  23. memory@0 {
  24. device_type = "memory";
  25. reg = <0x0 0x0 0x0 0x80000000>;
  26. };
  27. ap0_reg_sd_vccq: ap0_sd_vccq@0 {
  28. compatible = "regulator-gpio";
  29. regulator-name = "ap0_sd_vccq";
  30. regulator-min-microvolt = <1800000>;
  31. regulator-max-microvolt = <3300000>;
  32. gpios = <&expander0 8 GPIO_ACTIVE_HIGH>;
  33. states = <1800000 0x1 3300000 0x0>;
  34. };
  35. cp0_reg_usb3_vbus0: cp0_usb3_vbus@0 {
  36. compatible = "regulator-fixed";
  37. regulator-name = "cp0-xhci0-vbus";
  38. regulator-min-microvolt = <5000000>;
  39. regulator-max-microvolt = <5000000>;
  40. enable-active-high;
  41. gpio = <&expander0 0 GPIO_ACTIVE_HIGH>;
  42. };
  43. cp0_usb3_0_phy0: cp0_usb3_phy@0 {
  44. compatible = "usb-nop-xceiv";
  45. vcc-supply = <&cp0_reg_usb3_vbus0>;
  46. };
  47. cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
  48. compatible = "regulator-fixed";
  49. regulator-name = "cp0-xhci1-vbus";
  50. regulator-min-microvolt = <5000000>;
  51. regulator-max-microvolt = <5000000>;
  52. enable-active-high;
  53. gpio = <&expander0 1 GPIO_ACTIVE_HIGH>;
  54. };
  55. cp0_usb3_0_phy1: cp0_usb3_phy@1 {
  56. compatible = "usb-nop-xceiv";
  57. vcc-supply = <&cp0_reg_usb3_vbus1>;
  58. };
  59. cp0_reg_sd_vccq: cp0_sd_vccq@0 {
  60. compatible = "regulator-gpio";
  61. regulator-name = "cp0_sd_vccq";
  62. regulator-min-microvolt = <1800000>;
  63. regulator-max-microvolt = <3300000>;
  64. gpios = <&expander0 15 GPIO_ACTIVE_HIGH>;
  65. states = <1800000 0x1
  66. 3300000 0x0>;
  67. };
  68. cp0_reg_sd_vcc: cp0_sd_vcc@0 {
  69. compatible = "regulator-fixed";
  70. regulator-name = "cp0_sd_vcc";
  71. regulator-min-microvolt = <3300000>;
  72. regulator-max-microvolt = <3300000>;
  73. gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
  74. enable-active-high;
  75. regulator-always-on;
  76. };
  77. cp0_sfp_eth0: sfp-eth@0 {
  78. compatible = "sff,sfp";
  79. i2c-bus = <&cp0_sfpp0_i2c>;
  80. los-gpios = <&cp0_module_expander1 11 GPIO_ACTIVE_HIGH>;
  81. mod-def0-gpios = <&cp0_module_expander1 10 GPIO_ACTIVE_LOW>;
  82. tx-disable-gpios = <&cp0_module_expander1 9 GPIO_ACTIVE_HIGH>;
  83. tx-fault-gpios = <&cp0_module_expander1 8 GPIO_ACTIVE_HIGH>;
  84. /*
  85. * SFP cages are unconnected on early PCBs because of an the I2C
  86. * lanes not being connected. Prevent the port for being
  87. * unusable by disabling the SFP node.
  88. */
  89. status = "disabled";
  90. };
  91. };
  92. &uart0 {
  93. status = "okay";
  94. };
  95. /* on-board eMMC - U9 */
  96. &ap_sdhci0 {
  97. pinctrl-names = "default";
  98. bus-width = <8>;
  99. vqmmc-supply = <&ap0_reg_sd_vccq>;
  100. status = "okay";
  101. };
  102. &cp0_crypto {
  103. status = "disabled";
  104. };
  105. &cp0_ethernet {
  106. status = "okay";
  107. };
  108. /* SLM-1521-V2, CON9 */
  109. &cp0_eth0 {
  110. status = "okay";
  111. phy-mode = "10gbase-r";
  112. /* Generic PHY, providing serdes lanes */
  113. phys = <&cp0_comphy4 0>;
  114. managed = "in-band-status";
  115. sfp = <&cp0_sfp_eth0>;
  116. };
  117. /* CON56 */
  118. &cp0_eth1 {
  119. status = "okay";
  120. phy = <&phy0>;
  121. phy-mode = "rgmii-id";
  122. };
  123. /* CON57 */
  124. &cp0_eth2 {
  125. status = "okay";
  126. phy = <&phy1>;
  127. phy-mode = "rgmii-id";
  128. };
  129. &cp0_gpio1 {
  130. status = "okay";
  131. };
  132. &cp0_gpio2 {
  133. status = "okay";
  134. };
  135. &cp0_i2c0 {
  136. status = "okay";
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&cp0_i2c0_pins>;
  139. clock-frequency = <100000>;
  140. /* U36 */
  141. expander0: pca953x@21 {
  142. compatible = "nxp,pca9555";
  143. pinctrl-names = "default";
  144. gpio-controller;
  145. #gpio-cells = <2>;
  146. reg = <0x21>;
  147. status = "okay";
  148. };
  149. /* U42 */
  150. eeprom0: eeprom@50 {
  151. compatible = "atmel,24c64";
  152. reg = <0x50>;
  153. pagesize = <0x20>;
  154. };
  155. /* U38 */
  156. eeprom1: eeprom@57 {
  157. compatible = "atmel,24c64";
  158. reg = <0x57>;
  159. pagesize = <0x20>;
  160. };
  161. };
  162. &cp0_i2c1 {
  163. status = "okay";
  164. clock-frequency = <100000>;
  165. /* SLM-1521-V2 - U3 */
  166. i2c-mux@72 { /* verify address - depends on dpr */
  167. compatible = "nxp,pca9544";
  168. #address-cells = <1>;
  169. #size-cells = <0>;
  170. reg = <0x72>;
  171. cp0_sfpp0_i2c: i2c@0 {
  172. #address-cells = <1>;
  173. #size-cells = <0>;
  174. reg = <0>;
  175. };
  176. i2c@1 {
  177. #address-cells = <1>;
  178. #size-cells = <0>;
  179. reg = <1>;
  180. /* U12 */
  181. cp0_module_expander1: pca9555@21 {
  182. compatible = "nxp,pca9555";
  183. pinctrl-names = "default";
  184. gpio-controller;
  185. #gpio-cells = <2>;
  186. reg = <0x21>;
  187. };
  188. };
  189. };
  190. };
  191. &cp0_mdio {
  192. status = "okay";
  193. phy0: ethernet-phy@0 {
  194. reg = <0>;
  195. };
  196. phy1: ethernet-phy@1 {
  197. reg = <1>;
  198. };
  199. };
  200. /* U54 */
  201. &cp0_nand_controller {
  202. status = "disabled";
  203. pinctrl-names = "default";
  204. pinctrl-0 = <&nand_pins &nand_rb>;
  205. nand@0 {
  206. reg = <0>;
  207. label = "main-storage";
  208. nand-rb = <0>;
  209. nand-ecc-mode = "hw";
  210. nand-on-flash-bbt;
  211. nand-ecc-strength = <8>;
  212. nand-ecc-step-size = <512>;
  213. partitions {
  214. compatible = "fixed-partitions";
  215. #address-cells = <1>;
  216. #size-cells = <1>;
  217. partition@0 {
  218. label = "U-Boot";
  219. reg = <0 0x200000>;
  220. };
  221. partition@200000 {
  222. label = "Linux";
  223. reg = <0x200000 0xe00000>;
  224. };
  225. partition@1000000 {
  226. label = "Filesystem";
  227. reg = <0x1000000 0x3f000000>;
  228. };
  229. };
  230. };
  231. };
  232. /* SLM-1521-V2, CON6 */
  233. &cp0_pcie0 {
  234. status = "okay";
  235. num-lanes = <4>;
  236. num-viewport = <8>;
  237. /* Generic PHY, providing serdes lanes */
  238. phys = <&cp0_comphy0 0
  239. &cp0_comphy1 0
  240. &cp0_comphy2 0
  241. &cp0_comphy3 0>;
  242. };
  243. &cp0_sata0 {
  244. status = "okay";
  245. /* SLM-1521-V2, CON2 */
  246. sata-port@1 {
  247. status = "okay";
  248. /* Generic PHY, providing serdes lanes */
  249. phys = <&cp0_comphy5 1>;
  250. };
  251. };
  252. /* CON 28 */
  253. &cp0_sdhci0 {
  254. status = "okay";
  255. pinctrl-names = "default";
  256. pinctrl-0 = <&cp0_sdhci_pins
  257. &cp0_sdhci_cd_pins>;
  258. bus-width = <4>;
  259. cd-gpios = <&cp0_gpio2 11 GPIO_ACTIVE_LOW>;
  260. no-1-8-v;
  261. vqmmc-supply = <&cp0_reg_sd_vccq>;
  262. vmmc-supply = <&cp0_reg_sd_vcc>;
  263. };
  264. /* U55 */
  265. &cp0_spi1 {
  266. status = "disabled";
  267. pinctrl-names = "default";
  268. pinctrl-0 = <&cp0_spi1_pins>;
  269. reg = <0x700680 0x50>;
  270. flash@0 {
  271. #address-cells = <0x1>;
  272. #size-cells = <0x1>;
  273. compatible = "jedec,spi-nor";
  274. reg = <0x0>;
  275. /* On-board MUX does not allow higher frequencies */
  276. spi-max-frequency = <40000000>;
  277. partitions {
  278. compatible = "fixed-partitions";
  279. #address-cells = <1>;
  280. #size-cells = <1>;
  281. partition@0 {
  282. label = "U-Boot-0";
  283. reg = <0x0 0x200000>;
  284. };
  285. partition@400000 {
  286. label = "Filesystem-0";
  287. reg = <0x200000 0xe00000>;
  288. };
  289. };
  290. };
  291. };
  292. &cp0_syscon0 {
  293. cp0_pinctrl: pinctrl {
  294. compatible = "marvell,cp115-standalone-pinctrl";
  295. cp0_i2c0_pins: cp0-i2c-pins-0 {
  296. marvell,pins = "mpp37", "mpp38";
  297. marvell,function = "i2c0";
  298. };
  299. cp0_i2c1_pins: cp0-i2c-pins-1 {
  300. marvell,pins = "mpp35", "mpp36";
  301. marvell,function = "i2c1";
  302. };
  303. cp0_ge1_rgmii_pins: cp0-ge-rgmii-pins-0 {
  304. marvell,pins = "mpp0", "mpp1", "mpp2",
  305. "mpp3", "mpp4", "mpp5",
  306. "mpp6", "mpp7", "mpp8",
  307. "mpp9", "mpp10", "mpp11";
  308. marvell,function = "ge0";
  309. };
  310. cp0_ge2_rgmii_pins: cp0-ge-rgmii-pins-1 {
  311. marvell,pins = "mpp44", "mpp45", "mpp46",
  312. "mpp47", "mpp48", "mpp49",
  313. "mpp50", "mpp51", "mpp52",
  314. "mpp53", "mpp54", "mpp55";
  315. marvell,function = "ge1";
  316. };
  317. cp0_sdhci_cd_pins: cp0-sdhci-cd-pins-0 {
  318. marvell,pins = "mpp43";
  319. marvell,function = "gpio";
  320. };
  321. cp0_sdhci_pins: cp0-sdhi-pins-0 {
  322. marvell,pins = "mpp56", "mpp57", "mpp58",
  323. "mpp59", "mpp60", "mpp61";
  324. marvell,function = "sdio";
  325. };
  326. cp0_spi1_pins: cp0-spi-pins-1 {
  327. marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
  328. marvell,function = "spi1";
  329. };
  330. nand_pins: nand-pins {
  331. marvell,pins = "mpp15", "mpp16", "mpp17", "mpp18",
  332. "mpp19", "mpp20", "mpp21", "mpp22",
  333. "mpp23", "mpp24", "mpp25", "mpp26",
  334. "mpp27";
  335. marvell,function = "dev";
  336. };
  337. nand_rb: nand-rb {
  338. marvell,pins = "mpp13";
  339. marvell,function = "nf";
  340. };
  341. };
  342. };
  343. &cp0_utmi {
  344. status = "okay";
  345. };
  346. &cp0_usb3_0 {
  347. status = "okay";
  348. usb-phy = <&cp0_usb3_0_phy0>;
  349. phys = <&cp0_utmi0>;
  350. phy-names = "utmi";
  351. dr_mode = "host";
  352. };
  353. &cp0_usb3_1 {
  354. status = "okay";
  355. usb-phy = <&cp0_usb3_0_phy1>;
  356. phys = <&cp0_utmi1>;
  357. phy-names = "utmi";
  358. dr_mode = "host";
  359. };