cn9130-clearfog-pro.dts 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright SolidRun Ltd.
  4. * Copyright (C) 2024 Tobias Schramm <[email protected]>
  5. *
  6. * Device tree for the CN9130-based ClearFog Pro
  7. */
  8. #include "cn9130.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. / {
  12. model = "SolidRun ClearFog Pro";
  13. compatible = "solidrun,clearfog-pro", "marvell,armada-ap807-quad",
  14. "marvell,armada-ap807";
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. gpio1 = &cp0_gpio1;
  20. gpio2 = &cp0_gpio2;
  21. i2c0 = &cp0_i2c0;
  22. ethernet0 = &cp0_eth0;
  23. ethernet1 = &cp0_eth1;
  24. ethernet2 = &cp0_eth2;
  25. spi1 = &cp0_spi1;
  26. };
  27. memory@00000000 {
  28. reg = <0x0 0x0 0x1 0x0>;
  29. device_type = "memory";
  30. };
  31. /* Virtual regulator, root of power tree */
  32. vin: regulator-vin {
  33. compatible = "regulator-fixed";
  34. regulator-name = "vin";
  35. regulator-always-on;
  36. regulator-min-microvolt = <12000000>;
  37. regulator-max-microvolt = <12000000>;
  38. };
  39. /* Regulators supplied by vin */
  40. v_5v0: regulator-v_5v0 {
  41. compatible = "regulator-fixed";
  42. regulator-name = "v_5v0";
  43. regulator-always-on;
  44. regulator-min-microvolt = <5000000>;
  45. regulator-max-microvolt = <5000000>;
  46. vin-supply = <&vin>;
  47. };
  48. v_3v3: regulator-v_3v3 {
  49. compatible = "regulator-fixed";
  50. regulator-name = "v_3v3";
  51. regulator-always-on;
  52. regulator-min-microvolt = <3300000>;
  53. regulator-max-microvolt = <3300000>;
  54. vin-supply = <&vin>;
  55. };
  56. /* Regulators supplied by v_5v0 */
  57. v_1v8: regulator-v_1v8 {
  58. compatible = "regulator-fixed";
  59. regulator-name = "v_1v8";
  60. regulator-always-on;
  61. regulator-min-microvolt = <1800000>;
  62. regulator-max-microvolt = <1800000>;
  63. vin-supply = <&v_5v0>;
  64. };
  65. v_5v0_usb3_hst_vbus: regulator-v_5v0_usb3_hst_vbus {
  66. compatible = "regulator-fixed";
  67. regulator-name = "v_5v0_usb3_hst_vbus";
  68. regulator-min-microvolt = <5000000>;
  69. regulator-max-microvolt = <5000000>;
  70. gpio = <&expander0 6 GPIO_ACTIVE_LOW>;
  71. vin-supply = <&v_5v0>;
  72. };
  73. /* Regulators internal to SOM */
  74. vqmmc: regulator-vqmmc {
  75. compatible = "regulator-fixed";
  76. regulator-name = "vqmmc";
  77. regulator-always-on;
  78. regulator-min-microvolt = <1800000>;
  79. regulator-max-microvolt = <1800000>;
  80. vin-supply = <&v_5v0>;
  81. };
  82. cp0_usb3_0_phy1: cp0_usb3_phy@1 {
  83. compatible = "usb-nop-xceiv";
  84. vbus-supply = <&v_5v0_usb3_hst_vbus>;
  85. };
  86. cp0_sfp_eth0: sfp-eth@0 {
  87. compatible = "sff,sfp";
  88. i2c-bus = <&cp0_i2c1>;
  89. los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
  90. mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
  91. tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
  92. tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
  93. maximum-power-milliwatt = <2000>;
  94. };
  95. keys {
  96. compatible = "gpio-keys";
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&cp0_button_pin>;
  99. reset {
  100. label = "Reset";
  101. linux,code = <KEY_RESTART>;
  102. gpios = <&cp0_gpio2 0 GPIO_ACTIVE_LOW>;
  103. };
  104. };
  105. };
  106. &uart0 {
  107. status = "okay";
  108. };
  109. /* on-board eMMC */
  110. &ap_sdhci0 {
  111. bus-width = <8>;
  112. pinctrl-names = "default";
  113. vqmmc-supply = <&vqmmc>;
  114. status = "okay";
  115. };
  116. &cp0_crypto {
  117. status = "okay";
  118. };
  119. &cp0_ethernet {
  120. status = "okay";
  121. };
  122. &cp0_gpio1 {
  123. status = "okay";
  124. };
  125. &cp0_gpio2 {
  126. status = "okay";
  127. };
  128. &cp0_i2c0 {
  129. status = "okay";
  130. pinctrl-names = "default";
  131. pinctrl-0 = <&cp0_i2c0_pins>;
  132. clock-frequency = <100000>;
  133. /*
  134. * PCA9655 GPIO expander, up to 1MHz clock.
  135. * 0-CON3 CLKREQ#
  136. * 1-CON3 PERST#
  137. * 2-CON2 PERST#
  138. * 3-CON3 W_DISABLE
  139. * 4-CON2 CLKREQ#
  140. * 5-USB3 overcurrent
  141. * 6-USB3 power
  142. * 7-CON2 W_DISABLE
  143. * 8-JP4 P1
  144. * 9-JP4 P4
  145. * 10-JP4 P5
  146. * 11-m.2 DEVSLP
  147. * 12-SFP_LOS
  148. * 13-SFP_TX_FAULT
  149. * 14-SFP_TX_DISABLE
  150. * 15-SFP_MOD_DEF0
  151. */
  152. expander0: gpio-expander@20 {
  153. compatible = "nxp,pca9555";
  154. reg = <0x20>;
  155. gpio-controller;
  156. #gpio-cells = <2>;
  157. interrupt-controller;
  158. #interrupt-cells = <2>;
  159. interrupt-parent = <&cp0_gpio1>;
  160. interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&cp0_expander0_pins>;
  163. vcc-supply = <&v_3v3>;
  164. pcie1_0_clkreq {
  165. gpio-hog;
  166. gpios = <0 GPIO_ACTIVE_LOW>;
  167. input;
  168. line-name = "pcie1.0-clkreq";
  169. };
  170. pcie1_0_w_disable {
  171. gpio-hog;
  172. gpios = <3 GPIO_ACTIVE_LOW>;
  173. output-low;
  174. line-name = "pcie1.0-w-disable";
  175. };
  176. pcie2_0_clkreq {
  177. gpio-hog;
  178. gpios = <4 GPIO_ACTIVE_LOW>;
  179. input;
  180. line-name = "pcie2.0-clkreq";
  181. };
  182. pcie2_0_w_disable {
  183. gpio-hog;
  184. gpios = <7 GPIO_ACTIVE_LOW>;
  185. output-low;
  186. line-name = "pcie2.0-w-disable";
  187. };
  188. usb3_ilimit {
  189. gpio-hog;
  190. gpios = <5 GPIO_ACTIVE_LOW>;
  191. input;
  192. line-name = "usb3-current-limit";
  193. };
  194. m2_devslp {
  195. gpio-hog;
  196. gpios = <11 GPIO_ACTIVE_HIGH>;
  197. output-low;
  198. line-name = "m.2 devslp";
  199. };
  200. };
  201. /* ADC only for mikroBUS connector */
  202. mcp3021@4c {
  203. compatible = "microchip,mcp3021";
  204. reg = <0x4c>;
  205. };
  206. /* EEPROM on the SOM */
  207. eeprom@53 {
  208. compatible = "atmel,24c02";
  209. reg = <0x53>;
  210. pagesize = <16>;
  211. read-only;
  212. nvmem-layout {
  213. compatible = "onie,tlv-layout";
  214. onie_tlv_macaddr: mac-address {
  215. #nvmem-cell-cells = <1>;
  216. };
  217. };
  218. };
  219. };
  220. /* SMBUS on mini PCIe sockets */
  221. &cp0_i2c1 {
  222. status = "okay";
  223. pinctrl-names = "default";
  224. pinctrl-0 = <&cp0_i2c1_pins>;
  225. clock-frequency = <100000>;
  226. };
  227. &cp0_mdio {
  228. status = "okay";
  229. phy0: ethernet-phy@0 {
  230. reg = <0>;
  231. /* Green led blinks on activity, orange LED on link */
  232. marvell,reg-init = <3 16 0 0x0064>;
  233. };
  234. switch@4 {
  235. compatible = "marvell,mv88e6085";
  236. reg = <4>;
  237. interrupt-controller;
  238. #interrupt-cells = <2>;
  239. interrupt-parent = <&cp0_gpio1>;
  240. interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
  241. pinctrl-names = "default";
  242. pinctrl-0 = <&cp0_dsa0_pins>;
  243. reset-gpios = <&cp0_gpio1 27 GPIO_ACTIVE_LOW>;
  244. mdio-external {
  245. compatible = "marvell,mv88e6xxx-mdio-external";
  246. #address-cells = <1>;
  247. #size-cells = <0>;
  248. /* 88E1512 PHY */
  249. port6_phy: ethernet-phy@1 {
  250. reg = <1>;
  251. };
  252. };
  253. ports {
  254. #address-cells = <1>;
  255. #size-cells = <0>;
  256. port@0 {
  257. reg = <0>;
  258. label = "lan5";
  259. };
  260. port@1 {
  261. reg = <1>;
  262. label = "lan4";
  263. };
  264. port@2 {
  265. reg = <2>;
  266. label = "lan3";
  267. };
  268. port@3 {
  269. reg = <3>;
  270. label = "lan2";
  271. };
  272. port@4 {
  273. reg = <4>;
  274. label = "lan1";
  275. };
  276. port@5 {
  277. reg = <5>;
  278. ethernet = <&cp0_eth1>;
  279. label = "cpu";
  280. phy-mode = "rgmii-id";
  281. fixed-link {
  282. speed = <1000>;
  283. full-duplex;
  284. };
  285. };
  286. port@6 {
  287. /* 88E1512 external phy */
  288. reg = <6>;
  289. label = "lan6";
  290. phy-handle = <&port6_phy>;
  291. phy-mode = "rgmii-id";
  292. };
  293. };
  294. };
  295. };
  296. /* SRDS #0 - SATA on bottom M.2 B-Key connector */
  297. &cp0_sata0 {
  298. status = "okay";
  299. sata-port@0 {
  300. status = "disabled";
  301. };
  302. sata-port@1 {
  303. phys = <&cp0_comphy0 1>;
  304. target-supply = <&v_3v3>;
  305. };
  306. };
  307. &cp0_utmi {
  308. status = "okay";
  309. };
  310. /* mini PCIe slot far from SOM, USB 2.0 only, SS lanes unused */
  311. &cp0_usb3_0 {
  312. status = "okay";
  313. phys = <&cp0_utmi0>;
  314. phy-names = "utmi";
  315. dr_mode = "host";
  316. };
  317. /* SRDS #1 - USB-A 3.0 host port */
  318. &cp0_usb3_1 {
  319. status = "okay";
  320. phys = <&cp0_utmi1>, <&cp0_comphy1 0>;
  321. phy-names = "utmi", "usb";
  322. usb-phy = <&cp0_usb3_0_phy1>;
  323. dr_mode = "host";
  324. };
  325. /* SRDS #2 - SFP+ 10GE */
  326. &cp0_eth0 {
  327. status = "okay";
  328. phy-mode = "10gbase-r";
  329. phys = <&cp0_comphy2 0>;
  330. managed = "in-band-status";
  331. nvmem-cells = <&onie_tlv_macaddr 0>;
  332. nvmem-cell-names = "mac-address";
  333. sfp = <&cp0_sfp_eth0>;
  334. };
  335. /* SRDS #3 - SGMII 1GE to L2 switch */
  336. &cp0_eth1 {
  337. status = "okay";
  338. phys = <&cp0_comphy3 1>;
  339. phy-mode = "sgmii";
  340. nvmem-cells = <&onie_tlv_macaddr 1>;
  341. nvmem-cell-names = "mac-address";
  342. fixed-link {
  343. speed = <1000>;
  344. full-duplex;
  345. };
  346. };
  347. /* SRDS #4 - mini PCIe slot near SOM */
  348. &cp0_pcie1 {
  349. status = "okay";
  350. phys = <&cp0_comphy4 1>;
  351. num-lanes = <1>;
  352. reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
  353. };
  354. /* SRDS #5 - mini PCIe slot far from SOM */
  355. &cp0_pcie2 {
  356. status = "okay";
  357. phys = <&cp0_comphy5 2>;
  358. num-lanes = <1>;
  359. reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
  360. };
  361. /* GE PHY RGMII */
  362. &cp0_eth2 {
  363. status = "okay";
  364. pinctrl-names = "default";
  365. pinctrl-0 = <&cp0_ge2_rgmii_pins>;
  366. phy = <&phy0>;
  367. phy-mode = "rgmii-id";
  368. nvmem-cells = <&onie_tlv_macaddr 2>;
  369. nvmem-cell-names = "mac-address";
  370. };
  371. /* micro SD card slot */
  372. &cp0_sdhci0 {
  373. status = "okay";
  374. pinctrl-names = "default";
  375. pinctrl-0 = <&cp0_sdhci_pins &cp0_sdhci_cd_pins>;
  376. bus-width = <4>;
  377. cd-gpios = <&cp0_gpio2 11 GPIO_ACTIVE_LOW>;
  378. no-1-8-v;
  379. vqmmc-supply = <&v_3v3>;
  380. vmmc-supply = <&v_3v3>;
  381. };
  382. &cp0_spi1 {
  383. status = "okay";
  384. pinctrl-names = "default";
  385. pinctrl-0 = <&cp0_spi1_pins>;
  386. spi-flash@0 {
  387. compatible = "jedec,spi-nor";
  388. reg = <0x0>;
  389. #address-cells = <0x1>;
  390. #size-cells = <0x1>;
  391. spi-max-frequency = <10000000>;
  392. };
  393. };
  394. &cp0_syscon0 {
  395. cp0_pinctrl: pinctrl {
  396. compatible = "marvell,cp115-standalone-pinctrl";
  397. cp0_i2c0_pins: cp0-i2c0-pins {
  398. marvell,pins = "mpp37", "mpp38";
  399. marvell,function = "i2c0";
  400. };
  401. cp0_i2c1_pins: cp0-i2c1-pins {
  402. marvell,pins = "mpp35", "mpp36";
  403. marvell,function = "i2c1";
  404. };
  405. cp0_ge2_rgmii_pins: cp0-ge2-rgmii-pins {
  406. marvell,pins = "mpp44", "mpp45", "mpp46",
  407. "mpp47", "mpp48", "mpp49",
  408. "mpp50", "mpp51", "mpp52",
  409. "mpp53", "mpp54", "mpp55";
  410. marvell,function = "ge1";
  411. };
  412. cp0_sdhci_cd_pins: cp0-sdhci-cd-pins {
  413. marvell,pins = "mpp43";
  414. marvell,function = "sdio";
  415. };
  416. cp0_sdhci_pins: cp0-sdhci-pins {
  417. marvell,pins = "mpp56", "mpp57", "mpp58",
  418. "mpp59", "mpp60", "mpp61";
  419. marvell,function = "sdio";
  420. };
  421. cp0_spi1_pins: cp0-spi1-pins {
  422. marvell,pins = "mpp12", "mpp13", "mpp14",
  423. "mpp15", "mpp16";
  424. marvell,function = "spi1";
  425. };
  426. cp0_dsa0_pins: cp0-dsa0-pins {
  427. marvell,pins = "mpp27", "mpp29";
  428. marvell,function = "gpio";
  429. };
  430. cp0_button_pin: cp0-button-pin {
  431. marvell,pins = "mpp32";
  432. marvell,function = "gpio";
  433. };
  434. cp0_expander0_pins: cp0-expander0-pins {
  435. marvell,pins = "mpp4";
  436. marvell,function = "gpio";
  437. };
  438. };
  439. };