hi6220-hikey.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * dts file for Hisilicon HiKey Development Board
  4. *
  5. * Copyright (C) 2015, HiSilicon Ltd.
  6. *
  7. */
  8. /dts-v1/;
  9. #include "hi6220.dtsi"
  10. #include "hikey-pinctrl.dtsi"
  11. #include <dt-bindings/gpio/gpio.h>
  12. / {
  13. model = "HiKey Development Board";
  14. compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
  15. aliases {
  16. serial0 = &uart0; /* On board UART0 */
  17. serial1 = &uart1; /* BT UART */
  18. serial2 = &uart2; /* LS Expansion UART0 */
  19. serial3 = &uart3; /* LS Expansion UART1 */
  20. };
  21. chosen {
  22. stdout-path = "serial3:115200n8";
  23. };
  24. /*
  25. * Reserve below regions from memory node:
  26. *
  27. * 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
  28. * 0x05f0,1000 - 0x05f0,1fff: Reboot reason
  29. * 0x06df,f000 - 0x06df,ffff: Mailbox message data
  30. * 0x0740,f000 - 0x0740,ffff: MCU firmware section
  31. * 0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
  32. * 0x3e00,0000 - 0x3fff,ffff: OP-TEE
  33. */
  34. memory@0 {
  35. device_type = "memory";
  36. reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
  37. <0x00000000 0x05f00000 0x00000000 0x00001000>,
  38. <0x00000000 0x05f02000 0x00000000 0x00efd000>,
  39. <0x00000000 0x06e00000 0x00000000 0x0060f000>,
  40. <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
  41. <0x00000000 0x22000000 0x00000000 0x1c000000>;
  42. };
  43. reserved-memory {
  44. #address-cells = <2>;
  45. #size-cells = <2>;
  46. ranges;
  47. ramoops@21f00000 {
  48. compatible = "ramoops";
  49. reg = <0x0 0x21f00000 0x0 0x00100000>;
  50. record-size = <0x00020000>;
  51. console-size = <0x00020000>;
  52. ftrace-size = <0x00020000>;
  53. };
  54. /* global autoconfigured region for contiguous allocations */
  55. linux,cma {
  56. compatible = "shared-dma-pool";
  57. reusable;
  58. size = <0x00000000 0x08000000>;
  59. linux,cma-default;
  60. };
  61. };
  62. reboot-mode-syscon@5f01000 {
  63. compatible = "syscon", "simple-mfd";
  64. reg = <0x0 0x05f01000 0x0 0x00001000>;
  65. reboot-mode {
  66. compatible = "syscon-reboot-mode";
  67. offset = <0x0>;
  68. mode-normal = <0x77665501>;
  69. mode-bootloader = <0x77665500>;
  70. mode-recovery = <0x77665502>;
  71. };
  72. };
  73. reg_sys_5v: regulator@0 {
  74. compatible = "regulator-fixed";
  75. regulator-name = "SYS_5V";
  76. regulator-min-microvolt = <5000000>;
  77. regulator-max-microvolt = <5000000>;
  78. regulator-boot-on;
  79. regulator-always-on;
  80. };
  81. reg_vdd_3v3: regulator@1 {
  82. compatible = "regulator-fixed";
  83. regulator-name = "VDD_3V3";
  84. regulator-min-microvolt = <3300000>;
  85. regulator-max-microvolt = <3300000>;
  86. regulator-boot-on;
  87. regulator-always-on;
  88. vin-supply = <&reg_sys_5v>;
  89. };
  90. reg_5v_hub: regulator@2 {
  91. compatible = "regulator-fixed";
  92. regulator-name = "5V_HUB";
  93. regulator-min-microvolt = <5000000>;
  94. regulator-max-microvolt = <5000000>;
  95. regulator-boot-on;
  96. gpio = <&gpio0 7 0>;
  97. regulator-always-on;
  98. vin-supply = <&reg_sys_5v>;
  99. };
  100. wl1835_pwrseq: wl1835-pwrseq {
  101. compatible = "mmc-pwrseq-simple";
  102. /* WLAN_EN GPIO */
  103. reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  104. clocks = <&pmic>;
  105. clock-names = "ext_clock";
  106. post-power-on-delay-ms = <10>;
  107. power-off-delay-us = <10>;
  108. };
  109. leds {
  110. compatible = "gpio-leds";
  111. user_led1 {
  112. label = "green:user1";
  113. gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
  114. linux,default-trigger = "heartbeat";
  115. };
  116. user_led2 {
  117. label = "green:user2";
  118. gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
  119. linux,default-trigger = "mmc0";
  120. };
  121. user_led3 {
  122. label = "green:user3";
  123. gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
  124. linux,default-trigger = "mmc1";
  125. };
  126. user_led4 {
  127. label = "green:user4";
  128. gpios = <&gpio4 3 0>; /* <&gpio_user_led_4>; */
  129. panic-indicator;
  130. linux,default-trigger = "none";
  131. };
  132. wlan_active_led {
  133. label = "yellow:wlan";
  134. gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
  135. linux,default-trigger = "phy0tx";
  136. default-state = "off";
  137. };
  138. bt_active_led {
  139. label = "blue:bt";
  140. gpios = <&gpio4 7 0>; /* <&gpio_bt_active_led>; */
  141. linux,default-trigger = "hci0-power";
  142. default-state = "off";
  143. };
  144. };
  145. pmic: pmic@f8000000 {
  146. compatible = "hisilicon,hi655x-pmic";
  147. reg = <0x0 0xf8000000 0x0 0x1000>;
  148. #clock-cells = <0>;
  149. interrupt-controller;
  150. #interrupt-cells = <2>;
  151. pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
  152. regulators {
  153. ldo2: LDO2 {
  154. regulator-name = "LDO2_2V8";
  155. regulator-min-microvolt = <2500000>;
  156. regulator-max-microvolt = <3200000>;
  157. regulator-enable-ramp-delay = <120>;
  158. };
  159. ldo7: LDO7 {
  160. regulator-name = "LDO7_SDIO";
  161. regulator-min-microvolt = <1800000>;
  162. regulator-max-microvolt = <3300000>;
  163. regulator-enable-ramp-delay = <120>;
  164. };
  165. ldo10: LDO10 {
  166. regulator-name = "LDO10_2V85";
  167. regulator-min-microvolt = <1800000>;
  168. regulator-max-microvolt = <3000000>;
  169. regulator-enable-ramp-delay = <360>;
  170. };
  171. ldo13: LDO13 {
  172. regulator-name = "LDO13_1V8";
  173. regulator-min-microvolt = <1600000>;
  174. regulator-max-microvolt = <1950000>;
  175. regulator-enable-ramp-delay = <120>;
  176. };
  177. ldo14: LDO14 {
  178. regulator-name = "LDO14_2V8";
  179. regulator-min-microvolt = <2500000>;
  180. regulator-max-microvolt = <3200000>;
  181. regulator-enable-ramp-delay = <120>;
  182. };
  183. ldo15: LDO15 {
  184. regulator-name = "LDO15_1V8";
  185. regulator-min-microvolt = <1600000>;
  186. regulator-max-microvolt = <1950000>;
  187. regulator-boot-on;
  188. regulator-always-on;
  189. regulator-enable-ramp-delay = <120>;
  190. };
  191. ldo17: LDO17 {
  192. regulator-name = "LDO17_2V5";
  193. regulator-min-microvolt = <2500000>;
  194. regulator-max-microvolt = <3200000>;
  195. regulator-enable-ramp-delay = <120>;
  196. };
  197. ldo19: LDO19 {
  198. regulator-name = "LDO19_3V0";
  199. regulator-min-microvolt = <1800000>;
  200. regulator-max-microvolt = <3000000>;
  201. regulator-enable-ramp-delay = <360>;
  202. };
  203. ldo21: LDO21 {
  204. regulator-name = "LDO21_1V8";
  205. regulator-min-microvolt = <1650000>;
  206. regulator-max-microvolt = <2000000>;
  207. regulator-always-on;
  208. regulator-enable-ramp-delay = <120>;
  209. };
  210. ldo22: LDO22 {
  211. regulator-name = "LDO22_1V2";
  212. regulator-min-microvolt = <900000>;
  213. regulator-max-microvolt = <1200000>;
  214. regulator-boot-on;
  215. regulator-always-on;
  216. regulator-enable-ramp-delay = <120>;
  217. };
  218. };
  219. };
  220. firmware {
  221. optee {
  222. compatible = "linaro,optee-tz";
  223. method = "smc";
  224. };
  225. };
  226. sound_card {
  227. compatible = "audio-graph-card";
  228. dais = <&i2s0_port0>;
  229. };
  230. };
  231. &uart1 {
  232. assigned-clocks = <&sys_ctrl HI6220_UART1_SRC>;
  233. assigned-clock-rates = <150000000>;
  234. status = "okay";
  235. bluetooth {
  236. compatible = "ti,wl1835-st";
  237. enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
  238. clocks = <&pmic>;
  239. clock-names = "ext_clock";
  240. };
  241. };
  242. &uart2 {
  243. status = "okay";
  244. label = "LS-UART0";
  245. };
  246. &uart3 {
  247. status = "okay";
  248. label = "LS-UART1";
  249. };
  250. &ade {
  251. status = "okay";
  252. };
  253. &dsi {
  254. status = "okay";
  255. ports {
  256. /* 1 for output port */
  257. port@1 {
  258. reg = <1>;
  259. dsi_out0: endpoint@0 {
  260. remote-endpoint = <&adv7533_in>;
  261. };
  262. };
  263. };
  264. };
  265. &dwmmc_0 {
  266. cap-mmc-highspeed;
  267. non-removable;
  268. bus-width = <0x8>;
  269. vmmc-supply = <&ldo19>;
  270. };
  271. &dwmmc_1 {
  272. card-detect-delay = <200>;
  273. cap-sd-highspeed;
  274. sd-uhs-sdr12;
  275. sd-uhs-sdr25;
  276. sd-uhs-sdr50;
  277. vqmmc-supply = <&ldo7>;
  278. vmmc-supply = <&ldo10>;
  279. bus-width = <0x4>;
  280. disable-wp;
  281. cd-gpios = <&gpio1 0 1>;
  282. };
  283. &dwmmc_2 {
  284. bus-width = <0x4>;
  285. non-removable;
  286. cap-power-off-card;
  287. vmmc-supply = <&reg_vdd_3v3>;
  288. mmc-pwrseq = <&wl1835_pwrseq>;
  289. #address-cells = <0x1>;
  290. #size-cells = <0x0>;
  291. wlcore: wlcore@2 {
  292. compatible = "ti,wl1835";
  293. reg = <2>; /* sdio func num */
  294. /* WL_IRQ, WL_HOST_WAKE_GPIO1_3 */
  295. interrupt-parent = <&gpio1>;
  296. interrupts = <3 IRQ_TYPE_EDGE_RISING>;
  297. };
  298. };
  299. /*
  300. * Legend: proper name = the GPIO line is used as GPIO
  301. * NC = not connected (not routed from the SoC)
  302. * "[PER]" = pin is muxed for peripheral (not GPIO)
  303. * "" = no idea, schematic doesn't say, could be
  304. * unrouted (not connected to any external pin)
  305. * LSEC = Low Speed External Connector
  306. * HSEC = High Speed External Connector
  307. *
  308. * Pin assignments taken from LeMaker and CircuitCo Schematics
  309. * Rev A1.
  310. *
  311. * For the lines routed to the external connectors the
  312. * lines are named after the 96Boards CE Specification 1.0,
  313. * Appendix "Expansion Connector Signal Description".
  314. *
  315. * When the 96Board naming of a line and the schematic name of
  316. * the same line are in conflict, the 96Board specification
  317. * takes precedence, which means that the external UART on the
  318. * LSEC is named UART0 while the schematic and SoC names this
  319. * UART2. This is only for the informational lines i.e. "[FOO]",
  320. * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
  321. * ones actually used for GPIO.
  322. */
  323. &gpio0 {
  324. gpio-line-names = "PWR_HOLD", "DSI_SEL",
  325. "USB_HUB_RESET_N", "USB_SEL", "HDMI_PD", "WL_REG_ON",
  326. "PWRON_DET", "5V_HUB_EN";
  327. };
  328. &gpio1 {
  329. gpio-line-names = "SD_DET", "HDMI_INT", "PMU_IRQ_N",
  330. "WL_HOST_WAKE", "NC", "NC", "NC", "BT_REG_ON";
  331. };
  332. &gpio2 {
  333. gpio-line-names =
  334. "GPIO-A", /* LSEC Pin 23: GPIO2_0 */
  335. "GPIO-B", /* LSEC Pin 24: GPIO2_1 */
  336. "GPIO-C", /* LSEC Pin 25: GPIO2_2 */
  337. "GPIO-D", /* LSEC Pin 26: GPIO2_3 */
  338. "GPIO-E", /* LSEC Pin 27: GPIO2_4 */
  339. "USB_ID_DET", "USB_VBUS_DET",
  340. "GPIO-H"; /* LSEC Pin 30: GPIO2_7 */
  341. };
  342. &gpio3 {
  343. gpio-line-names = "GPIO3_0", "NC", "NC", "", "NC", "",
  344. "WLAN_ACTIVE", "NC", "NC";
  345. };
  346. &gpio4 {
  347. gpio-line-names = "USER_LED1", "USER_LED2", "USER_LED3",
  348. "USER_LED4", "SD_SEL", "NC", "NC", "BT_ACTIVE";
  349. };
  350. &gpio5 {
  351. gpio-line-names = "NC", "NC",
  352. "[UART1_RxD]", /* LSEC Pin 11: UART3_RX */
  353. "[UART1_TxD]", /* LSEC Pin 13: UART3_TX */
  354. "[AUX_SSI1]", "NC",
  355. "[PCM_CLK]", /* LSEC Pin 18: MODEM_PCM_XCLK */
  356. "[PCM_FS]"; /* LSEC Pin 16: MODEM_PCM_XFS */
  357. };
  358. &gpio6 {
  359. gpio-line-names =
  360. "[SPI0_DIN]", /* Pin 10: SPI0_DI */
  361. "[SPI0_DOUT]", /* Pin 14: SPI0_DO */
  362. "[SPI0_CS]", /* Pin 12: SPI0_CS_N */
  363. "[SPI0_SCLK]", /* Pin 8: SPI0_SCLK */
  364. "NC", "NC", "NC",
  365. "GPIO-G"; /* Pin 29: GPIO6_7_DSI_TE0 */
  366. };
  367. &gpio7 {
  368. gpio-line-names = "NC", "NC", "NC", "NC",
  369. "[PCM_DI]", /* Pin 22: MODEM_PCM_DI */
  370. "[PCM_DO]", /* Pin 20: MODEM_PCM_DO */
  371. "NC", "NC";
  372. };
  373. &gpio8 {
  374. gpio-line-names = "NC", "[CEC_CLK_19_2MHZ]", "NC",
  375. "", "", "", "", "", "";
  376. };
  377. &gpio9 {
  378. gpio-line-names = "",
  379. "GPIO-J", /* LSEC Pin 32: ISP_PWDN0_GPIO9_1 */
  380. "GPIO-L", /* LSEC Pin 34: ISP_PWDN1_GPIO9_2 */
  381. "NC", "NC", "NC", "NC", "[ISP_CCLK0]";
  382. };
  383. &gpio10 {
  384. gpio-line-names = "BOOT_SEL",
  385. "[ISP_CCLK1]",
  386. "GPIO-I", /* LSEC Pin 31: ISP_RSTB0_GPIO10_2 */
  387. "GPIO-K", /* LSEC Pin 33: ISP_RSTB1_GPIO10_3 */
  388. "NC", "NC",
  389. "[I2C2_SDA]", /* HSEC Pin 34: ISP0_SDA */
  390. "[I2C2_SCL]"; /* HSEC Pin 32: ISP0_SCL */
  391. };
  392. &gpio11 {
  393. gpio-line-names =
  394. "[I2C3_SDA]", /* HSEC Pin 38: ISP1_SDA */
  395. "[I2C3_SCL]", /* HSEC Pin 36: ISP1_SCL */
  396. "", "NC", "NC", "NC", "", "";
  397. };
  398. &gpio12 {
  399. gpio-line-names = "[BT_PCM_XFS]", "[BT_PCM_DI]",
  400. "[BT_PCM_DO]",
  401. "NC", "NC", "NC", "NC",
  402. "GPIO-F"; /* LSEC Pin 28: BL_PWM_GPIO12_7 */
  403. };
  404. &gpio13 {
  405. gpio-line-names = "[UART0_RX]", "[UART0_TX]",
  406. "[BT_UART1_CTS]", "[BT_UART1_RTS]",
  407. "[BT_UART1_RX]", "[BT_UART1_TX]",
  408. "[UART0_CTS]", /* LSEC Pin 3: UART2_CTS_N */
  409. "[UART0_RTS]"; /* LSEC Pin 9: UART2_RTS_N */
  410. };
  411. &gpio14 {
  412. gpio-line-names =
  413. "[UART0_RxD]", /* LSEC Pin 7: UART2_RX */
  414. "[UART0_TxD]", /* LSEC Pin 5: UART2_TX */
  415. "[I2C0_SCL]", /* LSEC Pin 15: I2C0_SCL */
  416. "[I2C0_SDA]", /* LSEC Pin 17: I2C0_SDA */
  417. "[I2C1_SCL]", /* LSEC Pin 19: I2C1_SCL */
  418. "[I2C1_SDA]", /* LSEC Pin 21: I2C1_SDA */
  419. "[I2C2_SCL]", "[I2C2_SDA]";
  420. };
  421. &gpio15 {
  422. gpio-line-names = "", "", "", "", "", "", "NC", "";
  423. };
  424. /* GPIO blocks 16 thru 19 do not appear to be routed to pins */
  425. &i2c0 {
  426. status = "okay";
  427. };
  428. &i2c1 {
  429. status = "okay";
  430. };
  431. &i2c2 {
  432. #address-cells = <1>;
  433. #size-cells = <0>;
  434. status = "okay";
  435. adv7533: adv7533@39 {
  436. compatible = "adi,adv7533";
  437. reg = <0x39>;
  438. interrupt-parent = <&gpio1>;
  439. interrupts = <1 2>;
  440. pd-gpios = <&gpio0 4 0>;
  441. adi,dsi-lanes = <4>;
  442. #sound-dai-cells = <0>;
  443. ports {
  444. #address-cells = <1>;
  445. #size-cells = <0>;
  446. port@0 {
  447. adv7533_in: endpoint {
  448. remote-endpoint = <&dsi_out0>;
  449. };
  450. };
  451. port@2 {
  452. reg = <2>;
  453. codec_endpoint: endpoint {
  454. remote-endpoint = <&i2s0_cpu_endpoint>;
  455. };
  456. };
  457. };
  458. };
  459. };
  460. &i2s0 {
  461. ports {
  462. i2s0_port0: port@0 {
  463. i2s0_cpu_endpoint: endpoint {
  464. remote-endpoint = <&codec_endpoint>;
  465. dai-format = "i2s";
  466. };
  467. };
  468. };
  469. };
  470. &spi0 {
  471. status = "okay";
  472. };