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