rk3399-kobol-helios64.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 Aditya Prayoga <[email protected]>
  4. */
  5. /*
  6. * The Kobol Helios64 is a board designed to operate as a NAS and optionally
  7. * ships with an enclosing that can host five 2.5" hard disks.
  8. *
  9. * See https://wiki.kobol.io/helios64/intro/ for further details.
  10. */
  11. /dts-v1/;
  12. #include "rk3399.dtsi"
  13. #include "rk3399-opp.dtsi"
  14. / {
  15. model = "Kobol Helios64";
  16. compatible = "kobol,helios64", "rockchip,rk3399";
  17. aliases {
  18. mmc0 = &sdmmc;
  19. mmc1 = &sdhci;
  20. spi1 = &spi1;
  21. spi2 = &spi2;
  22. spi5 = &spi5;
  23. };
  24. avdd_0v9_s0: avdd-0v9-s0 {
  25. compatible = "regulator-fixed";
  26. regulator-name = "avdd_0v9_s0";
  27. regulator-always-on;
  28. regulator-boot-on;
  29. regulator-min-microvolt = <900000>;
  30. regulator-max-microvolt = <900000>;
  31. vin-supply = <&vcc1v8_sys_s3>;
  32. };
  33. avdd_1v8_s0: avdd-1v8-s0 {
  34. compatible = "regulator-fixed";
  35. regulator-name = "avdd_1v8_s0";
  36. regulator-always-on;
  37. regulator-boot-on;
  38. regulator-min-microvolt = <1800000>;
  39. regulator-max-microvolt = <1800000>;
  40. vin-supply = <&vcc3v3_sys_s3>;
  41. };
  42. chosen {
  43. stdout-path = "serial2:1500000n8";
  44. };
  45. clkin_gmac: external-gmac-clock {
  46. compatible = "fixed-clock";
  47. clock-frequency = <125000000>;
  48. clock-output-names = "clkin_gmac";
  49. #clock-cells = <0>;
  50. };
  51. fan1 {
  52. /* fan connected to P7 */
  53. compatible = "pwm-fan";
  54. pwms = <&pwm0 0 40000 0>;
  55. cooling-levels = <0 80 170 255>;
  56. };
  57. fan2 {
  58. /* fan connected to P6 */
  59. compatible = "pwm-fan";
  60. pwms = <&pwm1 0 40000 0>;
  61. cooling-levels = <0 80 170 255>;
  62. };
  63. leds {
  64. compatible = "gpio-leds";
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&sys_grn_led_on &sys_red_led_on>;
  67. led-0 {
  68. label = "helios64:green:status";
  69. gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  70. default-state = "on";
  71. };
  72. led-1 {
  73. label = "helios64:red:fault";
  74. gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  75. default-state = "keep";
  76. };
  77. };
  78. hdd_a_power: hdd-a-power {
  79. compatible = "regulator-fixed";
  80. enable-active-high;
  81. gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
  82. pinctrl-0 = <&hdd_a_power_en>;
  83. pinctrl-names = "default";
  84. regulator-always-on;
  85. regulator-boot-on;
  86. regulator-name = "hdd_a_power";
  87. startup-delay-us = <2000000>;
  88. };
  89. hdd_b_power: hdd-b-power {
  90. compatible = "regulator-fixed";
  91. enable-active-high;
  92. gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
  93. pinctrl-0 = <&hdd_b_power_en>;
  94. pinctrl-names = "default";
  95. regulator-always-on;
  96. regulator-boot-on;
  97. regulator-name = "hdd_b_power";
  98. startup-delay-us = <2000000>;
  99. };
  100. pcie_power: pcie-power {
  101. compatible = "regulator-fixed";
  102. enable-active-high;
  103. gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
  104. pinctrl-0 = <&pcie_pwr>;
  105. pinctrl-names = "default";
  106. regulator-boot-on;
  107. regulator-name = "pcie_power";
  108. startup-delay-us = <10000>;
  109. vin-supply = <&vcc5v0_perdev>;
  110. };
  111. usblan_power: usblan-power {
  112. compatible = "regulator-fixed";
  113. enable-active-high;
  114. gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&usb_lan_en>;
  117. regulator-name = "usblan_power";
  118. regulator-always-on;
  119. regulator-boot-on;
  120. vin-supply = <&vcc5v0_usb>;
  121. };
  122. vcc1v8_sys_s0: vcc1v8-sys-s0 {
  123. compatible = "regulator-fixed";
  124. regulator-name = "vcc1v8_sys_s0";
  125. regulator-always-on;
  126. regulator-boot-on;
  127. regulator-min-microvolt = <1800000>;
  128. regulator-max-microvolt = <1800000>;
  129. vin-supply = <&vcc1v8_sys_s3>;
  130. };
  131. vcc3v0_sd: vcc3v0-sd {
  132. compatible = "regulator-fixed";
  133. enable-active-high;
  134. gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
  135. regulator-name = "vcc3v0_sd";
  136. regulator-boot-on;
  137. regulator-min-microvolt = <3000000>;
  138. regulator-max-microvolt = <3000000>;
  139. pinctrl-names = "default";
  140. pinctrl-0 = <&sdmmc0_pwr_h>;
  141. vin-supply = <&vcc3v3_sys_s3>;
  142. };
  143. vcc3v3_sys_s3: vcc_lan: vcc3v3-sys-s3 {
  144. compatible = "regulator-fixed";
  145. regulator-name = "vcc3v3_sys_s3";
  146. regulator-always-on;
  147. regulator-boot-on;
  148. regulator-min-microvolt = <3300000>;
  149. regulator-max-microvolt = <3300000>;
  150. vin-supply = <&vcc5v0_sys>;
  151. regulator-state-mem {
  152. regulator-on-in-suspend;
  153. };
  154. };
  155. vcc5v0_perdev: vcc5v0-perdev {
  156. compatible = "regulator-fixed";
  157. regulator-name = "vcc5v0_perdev";
  158. regulator-always-on;
  159. regulator-boot-on;
  160. regulator-min-microvolt = <5000000>;
  161. regulator-max-microvolt = <5000000>;
  162. vin-supply = <&vcc12v_dcin_bkup>;
  163. };
  164. vcc5v0_sys: vcc5v0-sys {
  165. compatible = "regulator-fixed";
  166. regulator-name = "vcc5v0_sys";
  167. regulator-always-on;
  168. regulator-boot-on;
  169. regulator-min-microvolt = <5000000>;
  170. regulator-max-microvolt = <5000000>;
  171. vin-supply = <&vcc12v_dcin_bkup>;
  172. regulator-state-mem {
  173. regulator-on-in-suspend;
  174. };
  175. };
  176. vcc5v0_usb: vcc5v0-usb {
  177. compatible = "regulator-fixed";
  178. enable-active-high;
  179. gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&vcc5v0_usb_en>;
  182. regulator-name = "vcc5v0_usb";
  183. regulator-always-on;
  184. regulator-boot-on;
  185. regulator-min-microvolt = <5000000>;
  186. regulator-max-microvolt = <5000000>;
  187. vin-supply = <&vcc5v0_perdev>;
  188. };
  189. vcc12v_dcin: vcc12v-dcin {
  190. compatible = "regulator-fixed";
  191. regulator-name = "vcc12v_dcin";
  192. regulator-always-on;
  193. regulator-boot-on;
  194. regulator-min-microvolt = <12000000>;
  195. regulator-max-microvolt = <12000000>;
  196. };
  197. vcc12v_dcin_bkup: vcc12v-dcin-bkup {
  198. compatible = "regulator-fixed";
  199. regulator-name = "vcc12v_dcin_bkup";
  200. regulator-always-on;
  201. regulator-boot-on;
  202. regulator-min-microvolt = <12000000>;
  203. regulator-max-microvolt = <12000000>;
  204. vin-supply = <&vcc12v_dcin>;
  205. };
  206. };
  207. /*
  208. * The system doesn't run stable with cpu freq enabled, so disallow the lower
  209. * frequencies until this problem is properly understood and resolved.
  210. */
  211. &cluster0_opp {
  212. /delete-node/ opp00;
  213. /delete-node/ opp01;
  214. /delete-node/ opp02;
  215. /delete-node/ opp03;
  216. /delete-node/ opp04;
  217. };
  218. &cluster1_opp {
  219. /delete-node/ opp00;
  220. /delete-node/ opp01;
  221. /delete-node/ opp02;
  222. /delete-node/ opp03;
  223. /delete-node/ opp04;
  224. /delete-node/ opp05;
  225. /delete-node/ opp06;
  226. };
  227. &cpu_b0 {
  228. cpu-supply = <&vdd_cpu_b>;
  229. };
  230. &cpu_b1 {
  231. cpu-supply = <&vdd_cpu_b>;
  232. };
  233. &cpu_l0 {
  234. cpu-supply = <&vdd_cpu_l>;
  235. };
  236. &cpu_l1 {
  237. cpu-supply = <&vdd_cpu_l>;
  238. };
  239. &cpu_l2 {
  240. cpu-supply = <&vdd_cpu_l>;
  241. };
  242. &cpu_l3 {
  243. cpu-supply = <&vdd_cpu_l>;
  244. };
  245. &emmc_phy {
  246. status = "okay";
  247. };
  248. &gmac {
  249. assigned-clock-parents = <&clkin_gmac>;
  250. assigned-clocks = <&cru SCLK_RMII_SRC>;
  251. clock_in_out = "input";
  252. phy-mode = "rgmii";
  253. phy-supply = <&vcc_lan>;
  254. pinctrl-names = "default";
  255. pinctrl-0 = <&rgmii_pins &gphy_reset>;
  256. rx_delay = <0x20>;
  257. tx_delay = <0x28>;
  258. snps,reset-active-low;
  259. snps,reset-delays-us = <0 10000 50000>;
  260. snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  261. status = "okay";
  262. };
  263. &i2c0 {
  264. clock-frequency = <400000>;
  265. i2c-scl-rising-time-ns = <168>;
  266. i2c-scl-falling-time-ns = <4>;
  267. status = "okay";
  268. rk808: pmic@1b {
  269. compatible = "rockchip,rk808";
  270. reg = <0x1b>;
  271. interrupt-parent = <&gpio0>;
  272. interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
  273. clock-output-names = "xin32k", "rk808-clkout2";
  274. pinctrl-names = "default";
  275. pinctrl-0 = <&pmic_int_l>;
  276. rockchip,system-power-controller;
  277. vcc1-supply = <&vcc5v0_sys>;
  278. vcc2-supply = <&vcc5v0_sys>;
  279. vcc3-supply = <&vcc5v0_sys>;
  280. vcc4-supply = <&vcc5v0_sys>;
  281. vcc6-supply = <&vcc5v0_sys>;
  282. vcc7-supply = <&vcc5v0_sys>;
  283. vcc8-supply = <&vcc3v3_sys_s3>;
  284. vcc9-supply = <&vcc5v0_sys>;
  285. vcc10-supply = <&vcc5v0_sys>;
  286. vcc11-supply = <&vcc5v0_sys>;
  287. vcc12-supply = <&vcc3v3_sys_s3>;
  288. vddio-supply = <&vcc3v0_s3>;
  289. wakeup-source;
  290. #clock-cells = <1>;
  291. regulators {
  292. vdd_cpu_l: DCDC_REG2 {
  293. regulator-name = "vdd_cpu_l";
  294. regulator-always-on;
  295. regulator-boot-on;
  296. regulator-min-microvolt = <750000>;
  297. regulator-max-microvolt = <1350000>;
  298. regulator-ramp-delay = <6001>;
  299. regulator-state-mem {
  300. regulator-off-in-suspend;
  301. };
  302. };
  303. vcc1v8_sys_s3: DCDC_REG4 {
  304. regulator-name = "vcc1v8_sys_s3";
  305. regulator-always-on;
  306. regulator-boot-on;
  307. regulator-min-microvolt = <1800000>;
  308. regulator-max-microvolt = <1800000>;
  309. regulator-state-mem {
  310. regulator-on-in-suspend;
  311. regulator-suspend-microvolt = <1800000>;
  312. };
  313. };
  314. vcc_sdio_s0: LDO_REG4 {
  315. regulator-name = "vcc_sdio_s0";
  316. regulator-always-on;
  317. regulator-boot-on;
  318. regulator-min-microvolt = <1800000>;
  319. regulator-max-microvolt = <3000000>;
  320. regulator-state-mem {
  321. regulator-on-in-suspend;
  322. regulator-suspend-microvolt = <3000000>;
  323. };
  324. };
  325. vcc3v0_s3: LDO_REG8 {
  326. regulator-name = "vcc3v0_s3";
  327. regulator-always-on;
  328. regulator-boot-on;
  329. regulator-min-microvolt = <3000000>;
  330. regulator-max-microvolt = <3000000>;
  331. regulator-state-mem {
  332. regulator-on-in-suspend;
  333. regulator-suspend-microvolt = <3000000>;
  334. };
  335. };
  336. };
  337. };
  338. vdd_cpu_b: regulator@40 {
  339. compatible = "silergy,syr827";
  340. reg = <0x40>;
  341. fcs,suspend-voltage-selector = <1>;
  342. regulator-name = "vdd_cpu_b";
  343. regulator-always-on;
  344. regulator-boot-on;
  345. regulator-min-microvolt = <712500>;
  346. regulator-max-microvolt = <1500000>;
  347. regulator-ramp-delay = <1000>;
  348. vin-supply = <&vcc5v0_sys>;
  349. regulator-state-mem {
  350. regulator-off-in-suspend;
  351. };
  352. };
  353. };
  354. &i2c2 {
  355. clock-frequency = <400000>;
  356. i2c-scl-rising-time-ns = <160>;
  357. i2c-scl-falling-time-ns = <30>;
  358. status = "okay";
  359. temp@4c {
  360. compatible = "national,lm75";
  361. reg = <0x4c>;
  362. };
  363. };
  364. &io_domains {
  365. audio-supply = <&vcc1v8_sys_s0>;
  366. bt656-supply = <&vcc1v8_sys_s0>;
  367. gpio1830-supply = <&vcc3v0_s3>;
  368. sdmmc-supply = <&vcc_sdio_s0>;
  369. status = "okay";
  370. };
  371. &pcie_phy {
  372. status = "okay";
  373. };
  374. &pcie0 {
  375. ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
  376. max-link-speed = <2>;
  377. num-lanes = <2>;
  378. pinctrl-names = "default";
  379. status = "okay";
  380. vpcie12v-supply = <&vcc12v_dcin>;
  381. vpcie3v3-supply = <&pcie_power>;
  382. vpcie1v8-supply = <&avdd_1v8_s0>;
  383. vpcie0v9-supply = <&avdd_0v9_s0>;
  384. };
  385. &pinctrl {
  386. gmac {
  387. gphy_reset: gphy-reset {
  388. rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>;
  389. };
  390. };
  391. leds {
  392. sys_grn_led_on: sys-grn-led-on {
  393. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
  394. };
  395. sys_red_led_on: sys-red-led-on {
  396. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
  397. };
  398. };
  399. pcie {
  400. pcie_pwr: pcie-pwr {
  401. rockchip,pins =
  402. <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  403. };
  404. };
  405. pmic {
  406. pmic_int_l: pmic-int-l {
  407. rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  408. };
  409. };
  410. power {
  411. hdd_a_power_en: hdd-a-power-en {
  412. rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  413. };
  414. hdd_b_power_en: hdd-b-power-en {
  415. rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  416. };
  417. vcc5v0_usb_en: vcc5v0-usb-en {
  418. rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  419. };
  420. usb_lan_en: usb-lan-en {
  421. rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
  422. };
  423. };
  424. vcc3v0-sd {
  425. sdmmc0_pwr_h: sdmmc0-pwr-h {
  426. rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  427. };
  428. };
  429. };
  430. &pmu_io_domains {
  431. pmu1830-supply = <&vcc3v0_s3>;
  432. status = "okay";
  433. };
  434. &pwm0 {
  435. /* pwm-fan on P7 */
  436. status = "okay";
  437. };
  438. &pwm1 {
  439. /* pwm-fan on P6 */
  440. status = "okay";
  441. };
  442. &sdhci {
  443. bus-width = <8>;
  444. mmc-hs200-1_8v;
  445. non-removable;
  446. vqmmc-supply = <&vcc1v8_sys_s0>;
  447. status = "okay";
  448. };
  449. &sdmmc {
  450. bus-width = <4>;
  451. cap-sd-highspeed;
  452. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  453. disable-wp;
  454. pinctrl-names = "default";
  455. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  456. vmmc-supply = <&vcc3v0_sd>;
  457. vqmmc-supply = <&vcc_sdio_s0>;
  458. status = "okay";
  459. };
  460. &spi1 {
  461. status = "okay";
  462. spiflash: flash@0 {
  463. compatible = "jedec,spi-nor";
  464. reg = <0x0>;
  465. spi-max-frequency = <25000000>;
  466. status = "okay";
  467. m25p,fast-read;
  468. };
  469. };
  470. /* UEXT connector */
  471. &spi2 {
  472. status = "okay";
  473. };
  474. &spi5 {
  475. status = "okay";
  476. };
  477. &tcphy1 {
  478. /* phy for &usbdrd_dwc3_1 */
  479. status = "okay";
  480. };
  481. &tsadc {
  482. /* tshut mode 0:CRU 1:GPIO */
  483. rockchip,hw-tshut-mode = <1>;
  484. /* tshut polarity 0:LOW 1:HIGH */
  485. rockchip,hw-tshut-polarity = <1>;
  486. status = "okay";
  487. };
  488. &u2phy1 {
  489. status = "okay";
  490. otg-port {
  491. /* phy for &usbdrd_dwc3_1 */
  492. phy-supply = <&vcc5v0_usb>;
  493. status = "okay";
  494. };
  495. };
  496. &uart2 {
  497. status = "okay";
  498. };
  499. &usbdrd3_1 {
  500. status = "okay";
  501. usb@fe900000 {
  502. dr_mode = "host";
  503. status = "okay";
  504. #address-cells = <1>;
  505. #size-cells = <0>;
  506. hub@1 {
  507. compatible = "usb2109,0815";
  508. reg = <1>;
  509. #address-cells = <1>;
  510. #size-cells = <0>;
  511. port@1 {
  512. reg = <1>;
  513. #trigger-source-cells = <0>;
  514. };
  515. port@2 {
  516. reg = <2>;
  517. #trigger-source-cells = <0>;
  518. };
  519. port@3 {
  520. reg = <3>;
  521. #trigger-source-cells = <0>;
  522. };
  523. device@4 {
  524. compatible = "usbbda,8156";
  525. reg = <4>;
  526. #address-cells = <2>;
  527. #size-cells = <0>;
  528. interface@0 { /* interface 0 of configuration 1 */
  529. compatible = "usbbda,8156.config1.0";
  530. reg = <0 1>;
  531. };
  532. };
  533. };
  534. };
  535. };