rk3288-firefly.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2014, 2015 FUKAUMI Naoki <[email protected]>
  4. */
  5. #include <dt-bindings/input/input.h>
  6. #include "rk3288.dtsi"
  7. / {
  8. memory@0 {
  9. device_type = "memory";
  10. reg = <0x0 0x0 0x0 0x80000000>;
  11. };
  12. adc-keys {
  13. compatible = "adc-keys";
  14. io-channels = <&saradc 1>;
  15. io-channel-names = "buttons";
  16. keyup-threshold-microvolt = <1800000>;
  17. button-recovery {
  18. label = "Recovery";
  19. linux,code = <KEY_VENDOR>;
  20. press-threshold-microvolt = <0>;
  21. };
  22. };
  23. dovdd_1v8: dovdd-1v8-regulator {
  24. compatible = "regulator-fixed";
  25. regulator-name = "dovdd_1v8";
  26. regulator-min-microvolt = <1800000>;
  27. regulator-max-microvolt = <1800000>;
  28. vin-supply = <&vcc28_dvp>;
  29. };
  30. ext_gmac: external-gmac-clock {
  31. compatible = "fixed-clock";
  32. #clock-cells = <0>;
  33. clock-frequency = <125000000>;
  34. clock-output-names = "ext_gmac";
  35. };
  36. ir: ir-receiver {
  37. compatible = "gpio-ir-receiver";
  38. pinctrl-names = "default";
  39. pinctrl-0 = <&ir_int>;
  40. };
  41. keys: gpio-keys {
  42. compatible = "gpio-keys";
  43. key-power {
  44. wakeup-source;
  45. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  46. label = "GPIO Power";
  47. linux,code = <KEY_POWER>;
  48. pinctrl-names = "default";
  49. pinctrl-0 = <&pwr_key>;
  50. };
  51. };
  52. leds {
  53. compatible = "gpio-leds";
  54. work_led: led-0 {
  55. gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
  56. label = "firefly:blue:user";
  57. linux,default-trigger = "rc-feedback";
  58. pinctrl-names = "default";
  59. pinctrl-0 = <&work_led_pin>;
  60. };
  61. power_led: led-1 {
  62. gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
  63. label = "firefly:green:power";
  64. linux,default-trigger = "default-on";
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&power_led_pin>;
  67. };
  68. };
  69. vbat_wl: vcc_sys: vsys-regulator {
  70. compatible = "regulator-fixed";
  71. regulator-name = "vcc_sys";
  72. regulator-min-microvolt = <5000000>;
  73. regulator-max-microvolt = <5000000>;
  74. regulator-always-on;
  75. regulator-boot-on;
  76. };
  77. vcc_sd: sdmmc-regulator {
  78. compatible = "regulator-fixed";
  79. gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&sdmmc_pwr>;
  82. regulator-name = "vcc_sd";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. startup-delay-us = <100000>;
  86. vin-supply = <&vcc_io>;
  87. };
  88. vcc_flash: flash-regulator {
  89. compatible = "regulator-fixed";
  90. regulator-name = "vcc_flash";
  91. regulator-min-microvolt = <1800000>;
  92. regulator-max-microvolt = <1800000>;
  93. vin-supply = <&vcc_io>;
  94. };
  95. vcc_5v: usb-regulator {
  96. compatible = "regulator-fixed";
  97. regulator-name = "vcc_5v";
  98. regulator-min-microvolt = <5000000>;
  99. regulator-max-microvolt = <5000000>;
  100. regulator-always-on;
  101. regulator-boot-on;
  102. vin-supply = <&vcc_sys>;
  103. };
  104. vcc_host_5v: usb-host-regulator {
  105. compatible = "regulator-fixed";
  106. enable-active-high;
  107. gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&host_vbus_drv>;
  110. regulator-name = "vcc_host_5v";
  111. regulator-min-microvolt = <5000000>;
  112. regulator-max-microvolt = <5000000>;
  113. regulator-always-on;
  114. vin-supply = <&vcc_5v>;
  115. };
  116. vcc_otg_5v: usb-otg-regulator {
  117. compatible = "regulator-fixed";
  118. enable-active-high;
  119. gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  120. pinctrl-names = "default";
  121. pinctrl-0 = <&otg_vbus_drv>;
  122. regulator-name = "vcc_otg_5v";
  123. regulator-min-microvolt = <5000000>;
  124. regulator-max-microvolt = <5000000>;
  125. regulator-always-on;
  126. vin-supply = <&vcc_5v>;
  127. };
  128. /*
  129. * A TT8142 creates both dovdd_1v8 and vcc28_dvp, controlled
  130. * by the dvp_pwr pin.
  131. */
  132. vcc28_dvp: vcc28-dvp-regulator {
  133. compatible = "regulator-fixed";
  134. enable-active-high;
  135. gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&dvp_pwr>;
  138. regulator-name = "vcc28_dvp";
  139. regulator-min-microvolt = <2800000>;
  140. regulator-max-microvolt = <2800000>;
  141. regulator-always-on;
  142. vin-supply = <&vcc_io>;
  143. };
  144. };
  145. &cpu0 {
  146. cpu0-supply = <&vdd_cpu>;
  147. };
  148. &emmc {
  149. bus-width = <8>;
  150. cap-mmc-highspeed;
  151. disable-wp;
  152. non-removable;
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
  155. vmmc-supply = <&vcc_io>;
  156. vqmmc-supply = <&vcc_flash>;
  157. status = "okay";
  158. };
  159. &gmac {
  160. assigned-clocks = <&cru SCLK_MAC>;
  161. assigned-clock-parents = <&ext_gmac>;
  162. clock_in_out = "input";
  163. pinctrl-names = "default";
  164. pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
  165. phy-supply = <&vcc_lan>;
  166. phy-mode = "rgmii";
  167. snps,reset-active-low;
  168. snps,reset-delays-us = <0 10000 1000000>;
  169. snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
  170. tx_delay = <0x30>;
  171. rx_delay = <0x10>;
  172. status = "okay";
  173. };
  174. &gpu {
  175. mali-supply = <&vdd_gpu>;
  176. status = "okay";
  177. };
  178. &hdmi {
  179. ddc-i2c-bus = <&i2c5>;
  180. status = "okay";
  181. };
  182. &i2c0 {
  183. clock-frequency = <400000>;
  184. status = "okay";
  185. vdd_cpu: syr827@40 {
  186. compatible = "silergy,syr827";
  187. fcs,suspend-voltage-selector = <1>;
  188. reg = <0x40>;
  189. regulator-name = "vdd_cpu";
  190. regulator-min-microvolt = <850000>;
  191. regulator-max-microvolt = <1350000>;
  192. regulator-always-on;
  193. regulator-boot-on;
  194. regulator-enable-ramp-delay = <300>;
  195. regulator-ramp-delay = <8000>;
  196. vin-supply = <&vcc_sys>;
  197. };
  198. vdd_gpu: syr828@41 {
  199. compatible = "silergy,syr828";
  200. fcs,suspend-voltage-selector = <1>;
  201. reg = <0x41>;
  202. regulator-name = "vdd_gpu";
  203. regulator-min-microvolt = <850000>;
  204. regulator-max-microvolt = <1350000>;
  205. regulator-always-on;
  206. vin-supply = <&vcc_sys>;
  207. };
  208. hym8563: rtc@51 {
  209. compatible = "haoyu,hym8563";
  210. reg = <0x51>;
  211. #clock-cells = <0>;
  212. clock-output-names = "xin32k";
  213. interrupt-parent = <&gpio7>;
  214. interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
  215. pinctrl-names = "default";
  216. pinctrl-0 = <&rtc_int>;
  217. };
  218. act8846: act8846@5a {
  219. compatible = "active-semi,act8846";
  220. reg = <0x5a>;
  221. pinctrl-names = "default";
  222. pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
  223. system-power-controller;
  224. vp1-supply = <&vcc_sys>;
  225. vp2-supply = <&vcc_sys>;
  226. vp3-supply = <&vcc_sys>;
  227. vp4-supply = <&vcc_sys>;
  228. inl1-supply = <&vcc_sys>;
  229. inl2-supply = <&vcc_sys>;
  230. inl3-supply = <&vcc_20>;
  231. regulators {
  232. vcc_ddr: REG1 {
  233. regulator-name = "vcc_ddr";
  234. regulator-min-microvolt = <1200000>;
  235. regulator-max-microvolt = <1200000>;
  236. regulator-always-on;
  237. };
  238. vcc_io: REG2 {
  239. regulator-name = "vcc_io";
  240. regulator-min-microvolt = <3300000>;
  241. regulator-max-microvolt = <3300000>;
  242. regulator-always-on;
  243. };
  244. vdd_log: REG3 {
  245. regulator-name = "vdd_log";
  246. regulator-min-microvolt = <1100000>;
  247. regulator-max-microvolt = <1100000>;
  248. regulator-always-on;
  249. };
  250. vcc_20: REG4 {
  251. regulator-name = "vcc_20";
  252. regulator-min-microvolt = <2000000>;
  253. regulator-max-microvolt = <2000000>;
  254. regulator-always-on;
  255. };
  256. vccio_sd: REG5 {
  257. regulator-name = "vccio_sd";
  258. regulator-min-microvolt = <3300000>;
  259. regulator-max-microvolt = <3300000>;
  260. regulator-always-on;
  261. };
  262. vdd10_lcd: REG6 {
  263. regulator-name = "vdd10_lcd";
  264. regulator-min-microvolt = <1000000>;
  265. regulator-max-microvolt = <1000000>;
  266. regulator-always-on;
  267. };
  268. vcca_18: REG7 {
  269. regulator-name = "vcca_18";
  270. regulator-min-microvolt = <1800000>;
  271. regulator-max-microvolt = <1800000>;
  272. };
  273. vcca_33: REG8 {
  274. regulator-name = "vcca_33";
  275. regulator-min-microvolt = <3300000>;
  276. regulator-max-microvolt = <3300000>;
  277. };
  278. vcc_lan: REG9 {
  279. regulator-name = "vcc_lan";
  280. regulator-min-microvolt = <3300000>;
  281. regulator-max-microvolt = <3300000>;
  282. };
  283. vdd_10: REG10 {
  284. regulator-name = "vdd_10";
  285. regulator-min-microvolt = <1000000>;
  286. regulator-max-microvolt = <1000000>;
  287. regulator-always-on;
  288. };
  289. vccio_wl: vcc_18: REG11 {
  290. regulator-name = "vcc_18";
  291. regulator-min-microvolt = <1800000>;
  292. regulator-max-microvolt = <1800000>;
  293. regulator-always-on;
  294. };
  295. vcc18_lcd: REG12 {
  296. regulator-name = "vcc18_lcd";
  297. regulator-min-microvolt = <1800000>;
  298. regulator-max-microvolt = <1800000>;
  299. regulator-always-on;
  300. };
  301. };
  302. };
  303. };
  304. &i2c1 {
  305. status = "okay";
  306. };
  307. &i2c2 {
  308. status = "okay";
  309. };
  310. &i2c4 {
  311. status = "okay";
  312. };
  313. &i2c5 {
  314. status = "okay";
  315. };
  316. &io_domains {
  317. status = "okay";
  318. audio-supply = <&vcca_33>;
  319. bb-supply = <&vcc_io>;
  320. dvp-supply = <&dovdd_1v8>;
  321. flash0-supply = <&vcc_flash>;
  322. flash1-supply = <&vcc_lan>;
  323. gpio30-supply = <&vcc_io>;
  324. gpio1830-supply = <&vcc_io>;
  325. lcdc-supply = <&vcc_io>;
  326. sdcard-supply = <&vccio_sd>;
  327. wifi-supply = <&vccio_wl>;
  328. };
  329. &pinctrl {
  330. pcfg_output_high: pcfg-output-high {
  331. output-high;
  332. };
  333. pcfg_output_low: pcfg-output-low {
  334. output-low;
  335. };
  336. pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
  337. bias-pull-up;
  338. drive-strength = <12>;
  339. };
  340. act8846 {
  341. pwr_hold: pwr-hold {
  342. rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
  343. };
  344. };
  345. dvp {
  346. dvp_pwr: dvp-pwr {
  347. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  348. };
  349. };
  350. gmac {
  351. phy_int: phy-int {
  352. rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
  353. };
  354. phy_pmeb: phy-pmeb {
  355. rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
  356. };
  357. phy_rst: phy-rst {
  358. rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
  359. };
  360. };
  361. hym8563 {
  362. rtc_int: rtc-int {
  363. rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  364. };
  365. };
  366. keys {
  367. pwr_key: pwr-key {
  368. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  369. };
  370. };
  371. leds {
  372. power_led_pin: power-led-pin {
  373. rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  374. };
  375. work_led_pin: work-led-pin {
  376. rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  377. };
  378. };
  379. sdmmc {
  380. /*
  381. * Default drive strength isn't enough to achieve even
  382. * high-speed mode on firefly board so bump up to 12ma.
  383. */
  384. sdmmc_bus4: sdmmc-bus4 {
  385. rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
  386. <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
  387. <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
  388. <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
  389. };
  390. sdmmc_clk: sdmmc-clk {
  391. rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
  392. };
  393. sdmmc_cmd: sdmmc-cmd {
  394. rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
  395. };
  396. sdmmc_pwr: sdmmc-pwr {
  397. rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  398. };
  399. };
  400. usb_host {
  401. host_vbus_drv: host-vbus-drv {
  402. rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
  403. };
  404. usbhub_rst: usbhub-rst {
  405. rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
  406. };
  407. };
  408. usb_otg {
  409. otg_vbus_drv: otg-vbus-drv {
  410. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
  411. };
  412. };
  413. };
  414. &saradc {
  415. vref-supply = <&vcc_18>;
  416. status = "okay";
  417. };
  418. &sdio0 {
  419. bus-width = <4>;
  420. disable-wp;
  421. non-removable;
  422. pinctrl-names = "default";
  423. pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
  424. vmmc-supply = <&vbat_wl>;
  425. vqmmc-supply = <&vccio_wl>;
  426. status = "okay";
  427. };
  428. &sdmmc {
  429. bus-width = <4>;
  430. cap-mmc-highspeed;
  431. cap-sd-highspeed;
  432. card-detect-delay = <200>;
  433. disable-wp;
  434. pinctrl-names = "default";
  435. pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
  436. vmmc-supply = <&vcc_sd>;
  437. vqmmc-supply = <&vccio_sd>;
  438. status = "okay";
  439. };
  440. &spi0 {
  441. pinctrl-names = "default";
  442. pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
  443. status = "okay";
  444. };
  445. &tsadc {
  446. rockchip,hw-tshut-mode = <0>;
  447. rockchip,hw-tshut-polarity = <0>;
  448. status = "okay";
  449. };
  450. &uart0 {
  451. pinctrl-names = "default";
  452. pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
  453. status = "okay";
  454. };
  455. &uart1 {
  456. status = "okay";
  457. };
  458. &uart2 {
  459. status = "okay";
  460. };
  461. &uart3 {
  462. status = "okay";
  463. };
  464. &usbphy {
  465. status = "okay";
  466. };
  467. &usb_host1 {
  468. pinctrl-names = "default";
  469. pinctrl-0 = <&usbhub_rst>;
  470. status = "okay";
  471. };
  472. &usb_otg {
  473. status = "okay";
  474. };
  475. &vopb {
  476. status = "okay";
  477. };
  478. &vopb_mmu {
  479. status = "okay";
  480. };
  481. &vopl {
  482. status = "okay";
  483. };
  484. &vopl_mmu {
  485. status = "okay";
  486. };
  487. &wdt {
  488. status = "okay";
  489. };