forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
....@@ -122,260 +122,45 @@
122122 power-off-delay-us = <10>;
123123 };
124124
125
- soc {
126
- spi0: spi@f7106000 {
127
- status = "ok";
128
- };
129
-
130
- i2c0: i2c@f7100000 {
131
- status = "ok";
132
- };
133
-
134
- i2c1: i2c@f7101000 {
135
- status = "ok";
136
- };
137
-
138
- uart1: uart@f7111000 {
139
- assigned-clocks = <&sys_ctrl HI6220_UART1_SRC>;
140
- assigned-clock-rates = <150000000>;
141
- status = "ok";
142
-
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
- };
150
-
151
- uart2: uart@f7112000 {
152
- status = "ok";
153
- };
154
-
155
- uart3: uart@f7113000 {
156
- status = "ok";
157
- };
158
-
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
- };
188
-
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
- };
193
-
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
- };
204
-
205
- gpio3: gpio@f8014000 {
206
- gpio-line-names = "GPIO3_0", "NC", "NC", "", "NC", "",
207
- "WLAN_ACTIVE", "NC", "NC";
208
- };
209
-
210
- gpio4: gpio@f7020000 {
211
- gpio-line-names = "USER_LED1", "USER_LED2", "USER_LED3",
212
- "USER_LED4", "SD_SEL", "NC", "NC", "BT_ACTIVE";
213
- };
214
-
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
- };
223
-
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
- };
233
-
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
- };
240
-
241
- gpio8: gpio@f7024000 {
242
- gpio-line-names = "NC", "[CEC_CLK_19_2MHZ]", "NC",
243
- "", "", "", "", "", "";
244
- };
245
-
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
- };
252
-
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
- };
262
-
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
- };
269
-
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
- };
276
-
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
- };
284
-
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
- };
295
-
296
- gpio15: gpio@f702b000 {
297
- gpio-line-names = "", "", "", "", "", "", "NC", "";
298
- };
299
-
300
- /* GPIO blocks 16 thru 19 do not appear to be routed to pins */
301
-
302
- dwmmc_0: dwmmc0@f723d000 {
303
- cap-mmc-highspeed;
304
- non-removable;
305
- bus-width = <0x8>;
306
- vmmc-supply = <&ldo19>;
307
- };
308
-
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
- };
321
-
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>;
328
-
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
- };
340
-
341125 leds {
342126 compatible = "gpio-leds";
343
- user_led4 {
344
- label = "user_led4";
127
+
128
+ user_led1 {
129
+ label = "green:user1";
345130 gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
346131 linux,default-trigger = "heartbeat";
347132 };
348133
349
- user_led3 {
350
- label = "user_led3";
134
+ user_led2 {
135
+ label = "green:user2";
351136 gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
352137 linux,default-trigger = "mmc0";
353138 };
354139
355
- user_led2 {
356
- label = "user_led2";
140
+ user_led3 {
141
+ label = "green:user3";
357142 gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
358143 linux,default-trigger = "mmc1";
359144 };
360145
361
- user_led1 {
362
- label = "user_led1";
146
+ user_led4 {
147
+ label = "green:user4";
363148 gpios = <&gpio4 3 0>; /* <&gpio_user_led_4>; */
364149 panic-indicator;
365
- linux,default-trigger = "cpu0";
150
+ linux,default-trigger = "none";
366151 };
367152
368153 wlan_active_led {
369
- label = "wifi_active";
154
+ label = "yellow:wlan";
370155 gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
371156 linux,default-trigger = "phy0tx";
372157 default-state = "off";
373158 };
374159
375160 bt_active_led {
376
- label = "bt_active";
161
+ label = "blue:bt";
377162 gpios = <&gpio4 7 0>; /* <&gpio_bt_active_led>; */
378
- linux,default-trigger = "hci0rx";
163
+ linux,default-trigger = "hci0-power";
379164 default-state = "off";
380165 };
381166 };
....@@ -479,19 +264,35 @@
479264 };
480265 };
481266
267
+&uart1 {
268
+ assigned-clocks = <&sys_ctrl HI6220_UART1_SRC>;
269
+ assigned-clock-rates = <150000000>;
270
+ status = "okay";
271
+
272
+ bluetooth {
273
+ compatible = "ti,wl1835-st";
274
+ enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
275
+ clocks = <&pmic>;
276
+ clock-names = "ext_clock";
277
+ };
278
+};
279
+
482280 &uart2 {
281
+ status = "okay";
483282 label = "LS-UART0";
484283 };
284
+
485285 &uart3 {
286
+ status = "okay";
486287 label = "LS-UART1";
487288 };
488289
489290 &ade {
490
- status = "ok";
291
+ status = "okay";
491292 };
492293
493294 &dsi {
494
- status = "ok";
295
+ status = "okay";
495296
496297 ports {
497298 /* 1 for output port */
....@@ -505,10 +306,200 @@
505306 };
506307 };
507308
309
+&dwmmc_0 {
310
+ cap-mmc-highspeed;
311
+ non-removable;
312
+ bus-width = <0x8>;
313
+ vmmc-supply = <&ldo19>;
314
+};
315
+
316
+&dwmmc_1 {
317
+ card-detect-delay = <200>;
318
+ cap-sd-highspeed;
319
+ sd-uhs-sdr12;
320
+ sd-uhs-sdr25;
321
+ sd-uhs-sdr50;
322
+ vqmmc-supply = <&ldo7>;
323
+ vmmc-supply = <&ldo10>;
324
+ bus-width = <0x4>;
325
+ disable-wp;
326
+ cd-gpios = <&gpio1 0 1>;
327
+};
328
+
329
+&dwmmc_2 {
330
+ bus-width = <0x4>;
331
+ non-removable;
332
+ cap-power-off-card;
333
+ vmmc-supply = <&reg_vdd_3v3>;
334
+ mmc-pwrseq = <&wl1835_pwrseq>;
335
+
336
+ #address-cells = <0x1>;
337
+ #size-cells = <0x0>;
338
+ wlcore: wlcore@2 {
339
+ compatible = "ti,wl1835";
340
+ reg = <2>; /* sdio func num */
341
+ /* WL_IRQ, WL_HOST_WAKE_GPIO1_3 */
342
+ interrupt-parent = <&gpio1>;
343
+ interrupts = <3 IRQ_TYPE_EDGE_RISING>;
344
+ };
345
+};
346
+
347
+/*
348
+ * Legend: proper name = the GPIO line is used as GPIO
349
+ * NC = not connected (not routed from the SoC)
350
+ * "[PER]" = pin is muxed for peripheral (not GPIO)
351
+ * "" = no idea, schematic doesn't say, could be
352
+ * unrouted (not connected to any external pin)
353
+ * LSEC = Low Speed External Connector
354
+ * HSEC = High Speed External Connector
355
+ *
356
+ * Pin assignments taken from LeMaker and CircuitCo Schematics
357
+ * Rev A1.
358
+ *
359
+ * For the lines routed to the external connectors the
360
+ * lines are named after the 96Boards CE Specification 1.0,
361
+ * Appendix "Expansion Connector Signal Description".
362
+ *
363
+ * When the 96Board naming of a line and the schematic name of
364
+ * the same line are in conflict, the 96Board specification
365
+ * takes precedence, which means that the external UART on the
366
+ * LSEC is named UART0 while the schematic and SoC names this
367
+ * UART2. This is only for the informational lines i.e. "[FOO]",
368
+ * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
369
+ * ones actually used for GPIO.
370
+ */
371
+&gpio0 {
372
+ gpio-line-names = "PWR_HOLD", "DSI_SEL",
373
+ "USB_HUB_RESET_N", "USB_SEL", "HDMI_PD", "WL_REG_ON",
374
+ "PWRON_DET", "5V_HUB_EN";
375
+};
376
+
377
+&gpio1 {
378
+ gpio-line-names = "SD_DET", "HDMI_INT", "PMU_IRQ_N",
379
+ "WL_HOST_WAKE", "NC", "NC", "NC", "BT_REG_ON";
380
+};
381
+
382
+&gpio2 {
383
+ gpio-line-names =
384
+ "GPIO-A", /* LSEC Pin 23: GPIO2_0 */
385
+ "GPIO-B", /* LSEC Pin 24: GPIO2_1 */
386
+ "GPIO-C", /* LSEC Pin 25: GPIO2_2 */
387
+ "GPIO-D", /* LSEC Pin 26: GPIO2_3 */
388
+ "GPIO-E", /* LSEC Pin 27: GPIO2_4 */
389
+ "USB_ID_DET", "USB_VBUS_DET",
390
+ "GPIO-H"; /* LSEC Pin 30: GPIO2_7 */
391
+};
392
+
393
+&gpio3 {
394
+ gpio-line-names = "GPIO3_0", "NC", "NC", "", "NC", "",
395
+ "WLAN_ACTIVE", "NC", "NC";
396
+};
397
+
398
+&gpio4 {
399
+ gpio-line-names = "USER_LED1", "USER_LED2", "USER_LED3",
400
+ "USER_LED4", "SD_SEL", "NC", "NC", "BT_ACTIVE";
401
+};
402
+
403
+&gpio5 {
404
+ gpio-line-names = "NC", "NC",
405
+ "[UART1_RxD]", /* LSEC Pin 11: UART3_RX */
406
+ "[UART1_TxD]", /* LSEC Pin 13: UART3_TX */
407
+ "[AUX_SSI1]", "NC",
408
+ "[PCM_CLK]", /* LSEC Pin 18: MODEM_PCM_XCLK */
409
+ "[PCM_FS]"; /* LSEC Pin 16: MODEM_PCM_XFS */
410
+};
411
+
412
+&gpio6 {
413
+ gpio-line-names =
414
+ "[SPI0_DIN]", /* Pin 10: SPI0_DI */
415
+ "[SPI0_DOUT]", /* Pin 14: SPI0_DO */
416
+ "[SPI0_CS]", /* Pin 12: SPI0_CS_N */
417
+ "[SPI0_SCLK]", /* Pin 8: SPI0_SCLK */
418
+ "NC", "NC", "NC",
419
+ "GPIO-G"; /* Pin 29: GPIO6_7_DSI_TE0 */
420
+};
421
+
422
+&gpio7 {
423
+ gpio-line-names = "NC", "NC", "NC", "NC",
424
+ "[PCM_DI]", /* Pin 22: MODEM_PCM_DI */
425
+ "[PCM_DO]", /* Pin 20: MODEM_PCM_DO */
426
+ "NC", "NC";
427
+};
428
+
429
+&gpio8 {
430
+ gpio-line-names = "NC", "[CEC_CLK_19_2MHZ]", "NC",
431
+ "", "", "", "", "", "";
432
+};
433
+
434
+&gpio9 {
435
+ gpio-line-names = "",
436
+ "GPIO-J", /* LSEC Pin 32: ISP_PWDN0_GPIO9_1 */
437
+ "GPIO-L", /* LSEC Pin 34: ISP_PWDN1_GPIO9_2 */
438
+ "NC", "NC", "NC", "NC", "[ISP_CCLK0]";
439
+};
440
+
441
+&gpio10 {
442
+ gpio-line-names = "BOOT_SEL",
443
+ "[ISP_CCLK1]",
444
+ "GPIO-I", /* LSEC Pin 31: ISP_RSTB0_GPIO10_2 */
445
+ "GPIO-K", /* LSEC Pin 33: ISP_RSTB1_GPIO10_3 */
446
+ "NC", "NC",
447
+ "[I2C2_SDA]", /* HSEC Pin 34: ISP0_SDA */
448
+ "[I2C2_SCL]"; /* HSEC Pin 32: ISP0_SCL */
449
+};
450
+
451
+&gpio11 {
452
+ gpio-line-names =
453
+ "[I2C3_SDA]", /* HSEC Pin 38: ISP1_SDA */
454
+ "[I2C3_SCL]", /* HSEC Pin 36: ISP1_SCL */
455
+ "", "NC", "NC", "NC", "", "";
456
+};
457
+
458
+&gpio12 {
459
+ gpio-line-names = "[BT_PCM_XFS]", "[BT_PCM_DI]",
460
+ "[BT_PCM_DO]",
461
+ "NC", "NC", "NC", "NC",
462
+ "GPIO-F"; /* LSEC Pin 28: BL_PWM_GPIO12_7 */
463
+};
464
+
465
+&gpio13 {
466
+ gpio-line-names = "[UART0_RX]", "[UART0_TX]",
467
+ "[BT_UART1_CTS]", "[BT_UART1_RTS]",
468
+ "[BT_UART1_RX]", "[BT_UART1_TX]",
469
+ "[UART0_CTS]", /* LSEC Pin 3: UART2_CTS_N */
470
+ "[UART0_RTS]"; /* LSEC Pin 9: UART2_RTS_N */
471
+};
472
+
473
+&gpio14 {
474
+ gpio-line-names =
475
+ "[UART0_RxD]", /* LSEC Pin 7: UART2_RX */
476
+ "[UART0_TxD]", /* LSEC Pin 5: UART2_TX */
477
+ "[I2C0_SCL]", /* LSEC Pin 15: I2C0_SCL */
478
+ "[I2C0_SDA]", /* LSEC Pin 17: I2C0_SDA */
479
+ "[I2C1_SCL]", /* LSEC Pin 19: I2C1_SCL */
480
+ "[I2C1_SDA]", /* LSEC Pin 21: I2C1_SDA */
481
+ "[I2C2_SCL]", "[I2C2_SDA]";
482
+};
483
+
484
+&gpio15 {
485
+ gpio-line-names = "", "", "", "", "", "", "NC", "";
486
+};
487
+
488
+/* GPIO blocks 16 thru 19 do not appear to be routed to pins */
489
+
490
+
491
+&i2c0 {
492
+ status = "okay";
493
+};
494
+
495
+&i2c1 {
496
+ status = "okay";
497
+};
498
+
508499 &i2c2 {
509500 #address-cells = <1>;
510501 #size-cells = <0>;
511
- status = "ok";
502
+ status = "okay";
512503
513504 adv7533: adv7533@39 {
514505 compatible = "adi,adv7533";
....@@ -548,3 +539,7 @@
548539 };
549540 };
550541 };
542
+
543
+&spi0 {
544
+ status = "okay";
545
+};