rk3288-veyron.dtsi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Google Veyron (and derivatives) board device tree source
  4. *
  5. * Copyright 2015 Google, Inc
  6. */
  7. #include <dt-bindings/clock/rockchip,rk808.h>
  8. #include <dt-bindings/input/input.h>
  9. #include "rk3288.dtsi"
  10. / {
  11. chosen {
  12. stdout-path = "serial2:115200n8";
  13. };
  14. /*
  15. * The default coreboot on veyron devices ignores memory@0 nodes
  16. * and would instead create another memory node.
  17. */
  18. memory {
  19. device_type = "memory";
  20. reg = <0x0 0x0 0x0 0x80000000>;
  21. };
  22. power_button: power-button {
  23. compatible = "gpio-keys";
  24. pinctrl-names = "default";
  25. pinctrl-0 = <&pwr_key_l>;
  26. key-power {
  27. label = "Power";
  28. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  29. linux,code = <KEY_POWER>;
  30. debounce-interval = <100>;
  31. wakeup-source;
  32. };
  33. };
  34. gpio-restart {
  35. compatible = "gpio-restart";
  36. gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&ap_warm_reset_h>;
  39. priority = <200>;
  40. };
  41. emmc_pwrseq: emmc-pwrseq {
  42. compatible = "mmc-pwrseq-emmc";
  43. pinctrl-0 = <&emmc_reset>;
  44. pinctrl-names = "default";
  45. reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
  46. };
  47. sdio_pwrseq: sdio-pwrseq {
  48. compatible = "mmc-pwrseq-simple";
  49. clocks = <&rk808 RK808_CLKOUT1>;
  50. clock-names = "ext_clock";
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&wifi_enable_h>;
  53. /*
  54. * Depending on the actual card populated GPIO4 D4
  55. * correspond to one of these signals on the module:
  56. *
  57. * D4:
  58. * - SDIO_RESET_L_WL_REG_ON
  59. * - PDN (power down when low)
  60. */
  61. reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
  62. };
  63. vcc_5v: vcc-5v {
  64. compatible = "regulator-fixed";
  65. regulator-name = "vcc_5v";
  66. regulator-always-on;
  67. regulator-boot-on;
  68. regulator-min-microvolt = <5000000>;
  69. regulator-max-microvolt = <5000000>;
  70. };
  71. vcc33_sys: vcc33-sys {
  72. compatible = "regulator-fixed";
  73. regulator-name = "vcc33_sys";
  74. regulator-always-on;
  75. regulator-boot-on;
  76. regulator-min-microvolt = <3300000>;
  77. regulator-max-microvolt = <3300000>;
  78. };
  79. vcc50_hdmi: vcc50-hdmi {
  80. compatible = "regulator-fixed";
  81. regulator-name = "vcc50_hdmi";
  82. regulator-always-on;
  83. regulator-boot-on;
  84. vin-supply = <&vcc_5v>;
  85. };
  86. vdd_logic: vdd-logic {
  87. compatible = "pwm-regulator";
  88. regulator-name = "vdd_logic";
  89. pwms = <&pwm1 0 1994 0>;
  90. pwm-supply = <&vcc33_sys>;
  91. pwm-dutycycle-range = <0x7b 0>;
  92. pwm-dutycycle-unit = <0x94>;
  93. regulator-always-on;
  94. regulator-boot-on;
  95. regulator-min-microvolt = <950000>;
  96. regulator-max-microvolt = <1350000>;
  97. regulator-ramp-delay = <4000>;
  98. };
  99. };
  100. &cpu0 {
  101. cpu0-supply = <&vdd_cpu>;
  102. };
  103. &cpu_crit {
  104. temperature = <100000>;
  105. };
  106. /* rk3288-c used in Veyron Chrome-devices has slightly changed OPPs */
  107. &cpu_opp_table {
  108. /delete-node/ opp-312000000;
  109. opp-1512000000 {
  110. opp-microvolt = <1250000>;
  111. };
  112. opp-1608000000 {
  113. opp-microvolt = <1300000>;
  114. };
  115. opp-1704000000 {
  116. opp-hz = /bits/ 64 <1704000000>;
  117. opp-microvolt = <1350000>;
  118. };
  119. opp-1800000000 {
  120. opp-hz = /bits/ 64 <1800000000>;
  121. opp-microvolt = <1400000>;
  122. };
  123. };
  124. &emmc {
  125. status = "okay";
  126. bus-width = <8>;
  127. cap-mmc-highspeed;
  128. rockchip,default-sample-phase = <158>;
  129. disable-wp;
  130. mmc-hs200-1_8v;
  131. mmc-pwrseq = <&emmc_pwrseq>;
  132. non-removable;
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  135. };
  136. &gpu {
  137. mali-supply = <&vdd_gpu>;
  138. status = "okay";
  139. };
  140. &gpu_alert0 {
  141. temperature = <72500>;
  142. };
  143. &gpu_crit {
  144. temperature = <100000>;
  145. };
  146. &hdmi {
  147. pinctrl-names = "default", "unwedge";
  148. pinctrl-0 = <&hdmi_ddc>;
  149. pinctrl-1 = <&hdmi_ddc_unwedge>;
  150. status = "okay";
  151. };
  152. &i2c0 {
  153. status = "okay";
  154. clock-frequency = <400000>;
  155. i2c-scl-falling-time-ns = <50>; /* 2.5ns measured */
  156. i2c-scl-rising-time-ns = <100>; /* 45ns measured */
  157. rk808: pmic@1b {
  158. compatible = "rockchip,rk808";
  159. reg = <0x1b>;
  160. clock-output-names = "xin32k", "wifibt_32kin";
  161. interrupt-parent = <&gpio0>;
  162. interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
  163. pinctrl-names = "default";
  164. pinctrl-0 = <&pmic_int_l>;
  165. rockchip,system-power-controller;
  166. wakeup-source;
  167. #clock-cells = <1>;
  168. vcc1-supply = <&vcc33_sys>;
  169. vcc2-supply = <&vcc33_sys>;
  170. vcc3-supply = <&vcc33_sys>;
  171. vcc4-supply = <&vcc33_sys>;
  172. vcc6-supply = <&vcc_5v>;
  173. vcc7-supply = <&vcc33_sys>;
  174. vcc8-supply = <&vcc33_sys>;
  175. vcc12-supply = <&vcc_18>;
  176. vddio-supply = <&vcc33_io>;
  177. regulators {
  178. vdd_cpu: DCDC_REG1 {
  179. regulator-name = "vdd_arm";
  180. regulator-always-on;
  181. regulator-boot-on;
  182. regulator-min-microvolt = <750000>;
  183. regulator-max-microvolt = <1450000>;
  184. regulator-ramp-delay = <6001>;
  185. regulator-state-mem {
  186. regulator-off-in-suspend;
  187. };
  188. };
  189. vdd_gpu: DCDC_REG2 {
  190. regulator-name = "vdd_gpu";
  191. regulator-always-on;
  192. regulator-boot-on;
  193. regulator-min-microvolt = <800000>;
  194. regulator-max-microvolt = <1250000>;
  195. regulator-ramp-delay = <6001>;
  196. regulator-state-mem {
  197. regulator-off-in-suspend;
  198. };
  199. };
  200. vcc135_ddr: DCDC_REG3 {
  201. regulator-name = "vcc135_ddr";
  202. regulator-always-on;
  203. regulator-boot-on;
  204. regulator-state-mem {
  205. regulator-on-in-suspend;
  206. };
  207. };
  208. /*
  209. * vcc_18 has several aliases. (vcc18_flashio and
  210. * vcc18_wl). We'll add those aliases here just to
  211. * make it easier to follow the schematic. The signals
  212. * are actually hooked together and only separated for
  213. * power measurement purposes).
  214. */
  215. vcc18_wl: vcc18_flashio: vcc_18: DCDC_REG4 {
  216. regulator-name = "vcc_18";
  217. regulator-always-on;
  218. regulator-boot-on;
  219. regulator-min-microvolt = <1800000>;
  220. regulator-max-microvolt = <1800000>;
  221. regulator-state-mem {
  222. regulator-on-in-suspend;
  223. regulator-suspend-microvolt = <1800000>;
  224. };
  225. };
  226. /*
  227. * Note that both vcc33_io and vcc33_pmuio are always
  228. * powered together. To simplify the logic in the dts
  229. * we just refer to vcc33_io every time something is
  230. * powered from vcc33_pmuio. In fact, on later boards
  231. * (such as danger) they're the same net.
  232. */
  233. vcc33_io: LDO_REG1 {
  234. regulator-name = "vcc33_io";
  235. regulator-always-on;
  236. regulator-boot-on;
  237. regulator-min-microvolt = <3300000>;
  238. regulator-max-microvolt = <3300000>;
  239. regulator-state-mem {
  240. regulator-on-in-suspend;
  241. regulator-suspend-microvolt = <3300000>;
  242. };
  243. };
  244. vdd_10: LDO_REG3 {
  245. regulator-name = "vdd_10";
  246. regulator-always-on;
  247. regulator-boot-on;
  248. regulator-min-microvolt = <1000000>;
  249. regulator-max-microvolt = <1000000>;
  250. regulator-state-mem {
  251. regulator-on-in-suspend;
  252. regulator-suspend-microvolt = <1000000>;
  253. };
  254. };
  255. vdd10_lcd_pwren_h: LDO_REG7 {
  256. regulator-name = "vdd10_lcd_pwren_h";
  257. regulator-always-on;
  258. regulator-boot-on;
  259. regulator-min-microvolt = <2500000>;
  260. regulator-max-microvolt = <2500000>;
  261. regulator-state-mem {
  262. regulator-off-in-suspend;
  263. };
  264. };
  265. vcc33_lcd: SWITCH_REG1 {
  266. regulator-name = "vcc33_lcd";
  267. regulator-always-on;
  268. regulator-boot-on;
  269. regulator-state-mem {
  270. regulator-off-in-suspend;
  271. };
  272. };
  273. };
  274. };
  275. };
  276. &i2c1 {
  277. status = "okay";
  278. clock-frequency = <400000>;
  279. i2c-scl-falling-time-ns = <50>; /* 2.5ns measured */
  280. i2c-scl-rising-time-ns = <100>; /* 40ns measured */
  281. tpm: tpm@20 {
  282. compatible = "infineon,slb9645tt";
  283. reg = <0x20>;
  284. powered-while-suspended;
  285. };
  286. };
  287. &i2c2 {
  288. status = "okay";
  289. /* 100kHz since 4.7k resistors don't rise fast enough */
  290. clock-frequency = <100000>;
  291. i2c-scl-falling-time-ns = <50>; /* 10ns measured */
  292. i2c-scl-rising-time-ns = <800>; /* 600ns measured */
  293. };
  294. &i2c4 {
  295. status = "okay";
  296. clock-frequency = <400000>;
  297. i2c-scl-falling-time-ns = <50>; /* 11ns measured */
  298. i2c-scl-rising-time-ns = <300>; /* 225ns measured */
  299. };
  300. &io_domains {
  301. status = "okay";
  302. bb-supply = <&vcc33_io>;
  303. dvp-supply = <&vcc_18>;
  304. flash0-supply = <&vcc18_flashio>;
  305. gpio1830-supply = <&vcc33_io>;
  306. gpio30-supply = <&vcc33_io>;
  307. lcdc-supply = <&vcc33_lcd>;
  308. wifi-supply = <&vcc18_wl>;
  309. };
  310. &pwm1 {
  311. status = "okay";
  312. };
  313. &sdio0 {
  314. status = "okay";
  315. bus-width = <4>;
  316. cap-sd-highspeed;
  317. cap-sdio-irq;
  318. keep-power-in-suspend;
  319. mmc-pwrseq = <&sdio_pwrseq>;
  320. non-removable;
  321. pinctrl-names = "default";
  322. pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
  323. sd-uhs-sdr12;
  324. sd-uhs-sdr25;
  325. sd-uhs-sdr50;
  326. sd-uhs-sdr104;
  327. vmmc-supply = <&vcc33_sys>;
  328. vqmmc-supply = <&vcc18_wl>;
  329. };
  330. &spi2 {
  331. status = "okay";
  332. rx-sample-delay-ns = <12>;
  333. flash@0 {
  334. compatible = "jedec,spi-nor";
  335. spi-max-frequency = <50000000>;
  336. reg = <0>;
  337. };
  338. };
  339. &tsadc {
  340. status = "okay";
  341. rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
  342. rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
  343. rockchip,hw-tshut-temp = <125000>;
  344. };
  345. &uart0 {
  346. status = "okay";
  347. /* Pins don't include flow control by default; add that in */
  348. pinctrl-names = "default";
  349. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  350. };
  351. &uart1 {
  352. status = "okay";
  353. };
  354. &uart2 {
  355. status = "okay";
  356. };
  357. &usbphy {
  358. status = "okay";
  359. };
  360. &usb_host0_ehci {
  361. status = "okay";
  362. needs-reset-on-resume;
  363. };
  364. &usb_host1 {
  365. status = "okay";
  366. snps,need-phy-for-wake;
  367. };
  368. &usb_otg {
  369. status = "okay";
  370. assigned-clocks = <&cru SCLK_USBPHY480M_SRC>;
  371. assigned-clock-parents = <&usbphy0>;
  372. dr_mode = "host";
  373. snps,need-phy-for-wake;
  374. };
  375. &vopb {
  376. status = "okay";
  377. };
  378. &vopb_mmu {
  379. status = "okay";
  380. };
  381. &wdt {
  382. status = "okay";
  383. };
  384. &pinctrl {
  385. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  386. bias-disable;
  387. drive-strength = <8>;
  388. };
  389. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  390. bias-pull-up;
  391. drive-strength = <8>;
  392. };
  393. pcfg_output_high: pcfg-output-high {
  394. output-high;
  395. };
  396. pcfg_output_low: pcfg-output-low {
  397. output-low;
  398. };
  399. buttons {
  400. pwr_key_l: pwr-key-l {
  401. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  402. };
  403. };
  404. emmc {
  405. emmc_reset: emmc-reset {
  406. rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
  407. };
  408. /*
  409. * We run eMMC at max speed; bump up drive strength.
  410. * We also have external pulls, so disable the internal ones.
  411. */
  412. emmc_clk: emmc-clk {
  413. rockchip,pins = <3 RK_PC2 2 &pcfg_pull_none_drv_8ma>;
  414. };
  415. emmc_cmd: emmc-cmd {
  416. rockchip,pins = <3 RK_PC0 2 &pcfg_pull_none_drv_8ma>;
  417. };
  418. emmc_bus8: emmc-bus8 {
  419. rockchip,pins = <3 RK_PA0 2 &pcfg_pull_none_drv_8ma>,
  420. <3 RK_PA1 2 &pcfg_pull_none_drv_8ma>,
  421. <3 RK_PA2 2 &pcfg_pull_none_drv_8ma>,
  422. <3 RK_PA3 2 &pcfg_pull_none_drv_8ma>,
  423. <3 RK_PA4 2 &pcfg_pull_none_drv_8ma>,
  424. <3 RK_PA5 2 &pcfg_pull_none_drv_8ma>,
  425. <3 RK_PA6 2 &pcfg_pull_none_drv_8ma>,
  426. <3 RK_PA7 2 &pcfg_pull_none_drv_8ma>;
  427. };
  428. };
  429. pmic {
  430. pmic_int_l: pmic-int-l {
  431. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  432. };
  433. };
  434. reboot {
  435. ap_warm_reset_h: ap-warm-reset-h {
  436. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  437. };
  438. };
  439. recovery-switch {
  440. rec_mode_l: rec-mode-l {
  441. rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
  442. };
  443. };
  444. sdio0 {
  445. wifi_enable_h: wifienable-h {
  446. rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  447. };
  448. /* NOTE: mislabelled on schematic; should be bt_enable_h */
  449. bt_enable_l: bt-enable-l {
  450. rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
  451. };
  452. bt_host_wake: bt-host-wake {
  453. rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_down>;
  454. };
  455. bt_host_wake_l: bt-host-wake-l {
  456. rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
  457. };
  458. /*
  459. * We run sdio0 at max speed; bump up drive strength.
  460. * We also have external pulls, so disable the internal ones.
  461. */
  462. sdio0_bus4: sdio0-bus4 {
  463. rockchip,pins = <4 RK_PC4 1 &pcfg_pull_none_drv_8ma>,
  464. <4 RK_PC5 1 &pcfg_pull_none_drv_8ma>,
  465. <4 RK_PC6 1 &pcfg_pull_none_drv_8ma>,
  466. <4 RK_PC7 1 &pcfg_pull_none_drv_8ma>;
  467. };
  468. sdio0_cmd: sdio0-cmd {
  469. rockchip,pins = <4 RK_PD0 1 &pcfg_pull_none_drv_8ma>;
  470. };
  471. sdio0_clk: sdio0-clk {
  472. rockchip,pins = <4 RK_PD1 1 &pcfg_pull_none_drv_8ma>;
  473. };
  474. /*
  475. * These pins are only present on very new veyron boards; on
  476. * older boards bt_dev_wake is simply always high. Note that
  477. * gpio4_D2 is a NC on old veyron boards, so it doesn't hurt
  478. * to map this pin everywhere
  479. */
  480. bt_dev_wake_sleep: bt-dev-wake-sleep {
  481. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_output_low>;
  482. };
  483. bt_dev_wake_awake: bt-dev-wake-awake {
  484. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_output_high>;
  485. };
  486. bt_dev_wake: bt-dev-wake {
  487. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  488. };
  489. };
  490. tpm {
  491. tpm_int_h: tpm-int-h {
  492. rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  493. };
  494. };
  495. write-protect {
  496. fw_wp_ap: fw-wp-ap {
  497. rockchip,pins = <7 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  498. };
  499. };
  500. };