1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
|
/*
* Copyright 2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/dts-v1/;
/memreserve/ 0x84000000 0x4000000;
/memreserve/ 0x90000000 0x400000;
/memreserve/ 0x90400000 0x2000000;
/memreserve/ 0x92400000 0x2000000;
/memreserve/ 0x94400000 0x1800000;
#include "fsl-imx8qm-mek.dtsi"
#include "fsl-imx8qm-xen.dtsi"
/ {
model = "Freescale i.MX8QM MEK DOM0";
compatible = "fsl,imx8qm-mek", "fsl,imx8qm";
chosen {
#address-cells = <2>;
#size-cells = <2>;
/* Could be updated by U-Boot */
module@0 {
bootargs = "earlycon=xen console=hvc0 loglevel=8 root=/dev/mmcblk1p2 rw rootwait";
compatible = "xen,linux-zimage", "xen,multiboot-module";
reg = <0x00000000 0x80a00000 0x00000000 0xf93a00>;
};
};
domu {
/*
* There are 5 MUs, 0A is used by Dom0, 1A is used
* by ATF, so for DomU, 2A/3A/4A could be used.
* SC_R_MU_0A
* SC_R_MU_1A
* SC_R_MU_2A
* SC_R_MU_3A
* SC_R_MU_4A
* The rsrcs and pads will be configured by uboot scu_rm cmd
*/
#address-cells = <1>;
#size-cells = <0>;
doma {
compatible = "xen,domu";
/*
* The name entry in VM configuration file
* needs to be same as here.
*/
domain_name = "DomU";
/*
* The reg property will be updated by U-Boot to
* reflect the partition id.
*/
reg = <0>;
init_on_rsrcs = <
SC_R_MU_2A
>;
rsrcs = <
SC_R_MU_6A
SC_R_GPU_0_PID0
SC_R_GPU_0_PID1
SC_R_GPU_0_PID2
SC_R_GPU_0_PID3
SC_R_LVDS_0
SC_R_LVDS_0_I2C_0
SC_R_LVDS_0_PWM_0
SC_R_DC_0
SC_R_DC_0_BLIT0
SC_R_DC_0_BLIT1
SC_R_DC_0_BLIT2
SC_R_DC_0_BLIT_OUT
SC_R_UNUSED9
SC_R_UNUSED10
SC_R_DC_0_WARP
SC_R_UNUSED11
SC_R_UNUSED12
SC_R_DC_0_VIDEO0
SC_R_DC_0_VIDEO1
SC_R_DC_0_FRAC0
SC_R_UNUSED13
SC_R_DC_0_PLL_0
SC_R_DC_0_PLL_1
SC_R_MIPI_0
SC_R_MIPI_0_I2C_0
SC_R_MIPI_0_I2C_1
SC_R_MIPI_0_PWM_0
SC_R_HDMI
SC_R_HDMI_PLL_0
SC_R_HDMI_PLL_1
SC_R_HDMI_I2C_0
SC_R_HDMI_I2S
SC_R_HDMI_RX
SC_R_SDHC_0
SC_R_USB_0
SC_R_USB_0_PHY
SC_R_UART_1
SC_R_DMA_0_CH14
SC_R_DMA_0_CH15
SC_R_MU_2A
/* pcie */
SC_R_PCIE_B
SC_R_PCIE_A
SC_R_SERDES_0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A_SS0_B
SC_P_USB_SS3_TC3
SC_P_QSPI1A_DATA0
/* isl29023 */
SC_P_USDHC2_WP
>;
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>,
<&gpio1 27 GPIO_ACTIVE_LOW>,
<&gpio4 6 GPIO_ACTIVE_LOW>,
<&gpio4 9 GPIO_ACTIVE_LOW>,
<&gpio4 11 GPIO_ACTIVE_HIGH>,
<&gpio4 19 GPIO_ACTIVE_HIGH>,
<&gpio4 26 GPIO_ACTIVE_HIGH>,
<&gpio4 27 GPIO_ACTIVE_LOW>,
<&gpio4 29 GPIO_ACTIVE_LOW>;
};
};
reserved-memory {
/* global autoconfigured region for contiguous allocations */
linux,cma {
compatible = "shared-dma-pool";
reusable;
size = <0 0x28000000>;
alloc-ranges = <0 0xa0000000 0 0x40000000>;
linux,cma-default;
};
};
display-subsystem {
compatible = "fsl,imx-display-subsystem";
ports = <&dpu2_disp0>, <&dpu2_disp1>;
};
/* Passthrough to domu */
mu2: mu@5d1d0000 {
compatible = "fsl,imx8-mu";
reg = <0x0 0x5d1d0000 0x0 0x10000>;
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
fsl,scu_ap_mu_id = <0>;
xen,passthrough;
status = "disabled";
};
cm41: cm41@1 {
fsl,sc_rsrc_id = <SC_R_M4_1_PID0>,
<SC_R_M4_1_PID1>,
<SC_R_M4_1_PID2>,
<SC_R_M4_1_PID3>,
<SC_R_M4_1_PID4>;
#stream-id-cells = <1>;
iommus = <&smmu>;
xen,passthrough;
};
irqsteer_cm41: irqsteer_cm41@0x51080000 {
reg = <0x0 0x51080000 0x0 0x10000>;
xen,passthrough;
};
mu_rpmsg1_b: mu_rpmsg1_b@0x5d2a0000 {
reg = <0x0 0x5d2a0000 0x0 0x10000>;
xen,passthrough;
};
decoder_boot_mem: decoder_boot_mem@0x84000000 {
xen,passthrough;
reg = <0 0x84000000 0 0x2000000>;
};
encoder_boot_mem: encoder_boot_mem@0x86000000 {
xen,passthrough;
reg = <0 0x86000000 0 0x2000000>;
};
rpmsg_reserved_mem: rpmsg_reserved_mem@90000000 {
reg = <0x0 0x90000000 0x0 0x400000>;
xen,passthrough;
};
decoder_rpc_mem: decoder_rpc_mem@0x90400000 {
xen,passthrough;
reg = <0 0x90400000 0 0x1000000>;
};
encoder_rpc_mem: encoder_rpc_mem@0x91400000 {
xen,passthrough;
reg = <0 0x91400000 0 0x1000000>;
};
encoder_reserved_mem: encoder_reserved_mem@0x94400000 {
xen,passthrough;
reg = <0 0x94400000 0 0x800000>;
};
decoder_str_mem: str_mem@0x94400000 {
xen,passthrough;
reg = <0 0x94400000 0 0x1800000>;
};
gpio4_dummy: gpio4_dummy@0{
/* Passthrough gpio4 interrupt to DomU */
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
xen,passthrough;
};
};
&mu_rpmsg1 {
xen,passthrough;
};
&rpmsg1 {
/* Let xen not create mapping form dom0 */
/delete-property/ reg;
status = "disabled";
};
&mu_6_lpcg {
xen,passthrough;
};
&mu_6_lpcg_b {
xen,passthrough;
};
&mu_7_lpcg_b {
xen,passthrough;
};
&usbotg1_lpcg {
xen,passthrough;
};
&sdhc1_lpcg {
xen,passthrough;
};
&lpuart1 {
xen,passthrough;
};
&lpuart1_lpcg {
xen,passthrough;
};
/*
* DomU CM41 use this, but DomU OS not need this,
* because smmu is enabled for CM41, so need to
*create the lpuart2 mapping in SMMU
*/
&lpuart2 {
xen,passthrough;
};
&lpuart2_lpcg {
xen,passthrough;
};
&di_lvds0_lpcg {
xen,passthrough;
};
&dc_0_lpcg {
xen,passthrough;
};
&edma01 {
#stream-id-cells = <1>;
xen,passthrough;
fsl,sc_rsrc_id = <SC_R_DMA_0_CH14>,
<SC_R_DMA_0_CH15>;
};
/*
* SMMU, for simplity, we put all all the resources needs to programmed
* for VPU under vpu_decoder node, then in cfg file only add vpu_decoder
* in dt_dev is enough.
*/
&smmu {
mmu-masters = <&dpu1 0x13>, <&gpu_3d0 0x15>,
<&usdhc1 0x12>, <&usbotg1 0x11>,
<&edma01 0x10>, <&cm41 0x09>, <&pciea 0x08>,
<&vpu_decoder 0x7>, <&crypto 0x6>, <&isi_0 0x5>,
<&usbotg3 0x4>, <&hdmi 0x3>;
};
&lvds_region1 {
xen,passthrough;
};
&irqsteer_lvds0 {
xen,passthrough;
};
&i2c1_lvds0 {
xen,passthrough;
};
&ldb1_phy {
xen,passthrough;
};
&ldb1 {
xen,passthrough;
};
&dpu1_intsteer {
xen,passthrough;
};
&dpu1 {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
};
&pixel_combiner1 {
xen,passthrough;
};
&prg1 {
xen,passthrough;
};
&prg2 {
xen,passthrough;
};
&prg3 {
xen,passthrough;
};
&prg4 {
xen,passthrough;
};
&prg5 {
xen,passthrough;
};
&prg6 {
xen,passthrough;
};
&prg7 {
xen,passthrough;
};
&prg8 {
xen,passthrough;
};
&prg9 {
xen,passthrough;
};
&dpr1_channel1 {
xen,passthrough;
};
&dpr1_channel2 {
xen,passthrough;
};
&dpr1_channel3 {
xen,passthrough;
};
&dpr2_channel1 {
xen,passthrough;
};
&dpr2_channel2 {
xen,passthrough;
};
&dpr2_channel3 {
xen,passthrough;
};
/* GPU */
&pd_gpu0 {
xen,passthrough;
};
&gpu_3d0 {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
};
&imx8_gpu_ss {
cores = <&gpu_3d1>;
/delete-property/ reg;
/delete-property/ reg-names;
};
&sata {
status = "disabled";
};
&usdhc1 {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
};
&usbotg1 {
/* Hack reg */
reg = <0x0 0x5b0d0000 0x0 0x1000>;
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
};
&usbmisc1 {
/* Hack */
/delete-property/ reg;
status = "disabled";
};
&usbphy1 {
reg = <0x0 0x5b100000 0x0 0x1000>;
xen,passthrough;
};
&hsio {
xen,passthrough;
};
&hsio_pcie_x2_lpcg {
xen,passthrough;
};
&hsio_phy_x2_lpcg {
xen,passthrough;
};
&hsio_pcie_x2_crr2_lpcg {
xen,passthrough;
};
&hsio_pcie_x1_lpcg {
xen,passthrough;
};
&pciea {
#stream-id-cells = <1>;
iommus = <&smmu>;
xen,passthrough;
fsl,sc_rsrc_id = <SC_R_PCIE_A>;
};
&pcieb {
xen,passthrough;
};
&gpio1 {
xen,shared;
};
&gpt0 {
/delete-property/ interrupts;
status = "disabled";
};
&gpio4 {
/*
* Use GPT0 interrupt for hack
* This could be removed when interrupt sharing be supported.
*/
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
xen,domu-irq;
xen,shared;
};
&dsp {
xen,passthrough;
};
&mu_m0 {
xen,passthrough;
};
&mu1_m0 {
xen,passthrough;
};
&mu2_m0 {
xen,passthrough;
};
&vpu_decoder {
#stream-id-cells = <1>;
iommus = <&smmu>;
xen,passthrough;
fsl,sc_rsrc_id = <SC_R_VPU>,
<SC_R_VPU_PID0>,
<SC_R_VPU_PID1>,
<SC_R_VPU_PID2>,
<SC_R_VPU_PID3>,
<SC_R_VPU_PID4>,
<SC_R_VPU_PID5>,
<SC_R_VPU_PID6>,
<SC_R_VPU_PID7>,
<SC_R_VPU_DEC_0>,
<SC_R_VPU_ENC_0>,
<SC_R_VPU_ENC_1>,
<SC_R_VPU_TS_0>,
<SC_R_VPU_MU_0>,
<SC_R_VPU_MU_1>,
<SC_R_VPU_MU_2>,
<SC_R_VPU_MU_3>;
};
&vpu_decoder_csr {
xen,passthrough;
};
&vpu_encoder {
iommus = <&smmu>;
#stream-id-cells = <1>;
xen,passthrough;
};
&crypto {
xen,passthrough;
iommus = <&smmu>;
#stream-id-cells = <1>;
/* JR1 is not used by Linux */
fsl,sc_rsrc_id = <SC_R_CAAM_JR2>, <SC_R_CAAM_JR2_OUT>,
<SC_R_CAAM_JR3>, <SC_R_CAAM_JR3_OUT>;
};
&sec_jr2 {
xen,passthrough;
};
&sec_jr3 {
xen,passthrough;
};
&caam_sm {
xen,passthrough;
};
&i2c0 {
isl29023@44 {
xen,passthrough;
};
fxos8700@1e {
xen,passthrough;
};
fxas2100x@20 {
xen,passthrough;
};
mpl3115@60 {
xen,passthrough;
};
typec_ptn5110: typec@50 {
xen,passthrough;
};
};
/* Camera */
&img_pdma_0_lpcg {
xen,passthrough;
};
&img_pdma_1_lpcg {
xen,passthrough;
};
&img_pdma_2_lpcg {
xen,passthrough;
};
&img_pdma_3_lpcg {
xen,passthrough;
};
&mipi_csi_0_lpcg {
xen,passthrough;
};
&img_pxl_link_csi0_lpcg {
xen,passthrough;
};
&gpio0_mipi_csi0 {
xen,passthrough;
};
&irqsteer_csi0 {
xen,passthrough;
};
&isi_0 {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
fsl,sc_rsrc_id = <SC_R_ISI_CH0>,
<SC_R_ISI_CH1>,
<SC_R_ISI_CH2>,
<SC_R_ISI_CH3>;
};
&isi_1 {
xen,passthrough;
};
&isi_2 {
xen,passthrough;
};
&isi_3 {
xen,passthrough;
};
&mipi_csi_0 {
xen,passthrough;
};
&i2c0_mipi_csi0 {
xen,passthrough;
};
&isi_4 {
status = "okay";
};
&isi_5 {
status = "okay";
};
&isi_6 {
status = "okay";
};
&isi_7 {
status = "okay";
};
&mipi_csi_1 {
status = "okay";
};
&i2c0_mipi_csi1 {
status = "okay";
};
&usbotg3_lpcg {
xen,passthrough;
};
&usbotg3 {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
};
/* hdmi */
&hdmi {
xen,passthrough;
#stream-id-cells = <1>;
iommus = <&smmu>;
fsl,sc_rsrc_id = <SC_R_HDMI>,
<SC_R_HDMI_RX>;
};
&hdmi_rx {
xen,passthrough;
};
&irqsteer_hdmi {
xen,passthrough;
};
&irqsteer_hdmi_rx {
xen,passthrough;
};
&i2c0_hdmi {
xen,passthrough;
};
&sai_hdmi_rx {
xen,passthrough;
};
&sai_hdmi_tx {
xen,passthrough;
};
|