zynqmp-zu7cg-rev1-ad9694.dts 16.9 KB
Newer Older
Rene Habraken's avatar
Rene Habraken committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * dts file from: FMCDAQ3 on Xilinx ZynqMP ZCU102 Rev 1.0
 *            to: GRANDproto_v1 Xilinx ZynqMP ZU7CG Rev 1.0
 *
 * Copyright (C) 2018 Analog Devices Inc.
 * Modified by R. Habraken: Radboud University Nijmegen
 *
 * Licensed under the GPL-2.
 */

/* i2c and axi-bus*/


#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/iio/frequency/ad9528.h>
19
#include <dt-bindings/iio/adi,ad5592r.h>
Rene Habraken's avatar
Rene Habraken committed
20
21
22
23
#include "zynqmp-zcu102-rev1.0.dts"
/ {

    /* U-BOOT ARGUMENTS AND ROOTFS SETTINGS */
Rene Habraken's avatar
Rene Habraken committed
24
25
    
    aliases { serial0 = &uart1; };
Rene Habraken's avatar
Rene Habraken committed
26
27
    aliases { serial1 = &uart0; };
        
Rene Habraken's avatar
Rene Habraken committed
28
    chosen  {
29
        bootargs = "earlyprintk console=ttyPS0,115200 clk_ignore_unused root=/dev/nfs nfsroot=192.168.10.1:/srv/nfs,vers=3,nolock,tcp ip=192.168.10.2:192.168.10.1 rw nfsrootdebug";
Rene Habraken's avatar
Rene Habraken committed
30
31
32
33
34
35
36
37
        stdout-path = "serial0:115200n8";
        xlnx,eeprom = &eeprom;
        };
    
    /* XTAL FOR Si5340 */
    xtal48MHz: xtal_48_clock {
        compatible = "fixed-clock";
        #clock-cells = <0x0>;
38
39
40
41
42
43
44
45
46
47
        clock-frequency = <48000000>;
    };

    /* VREF FOR AD5593 */
    vref: regulator-vref {
        compatible = "regulator-fixed";
        regulator-name = "vref-ad559x";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-always-on;
Rene Habraken's avatar
Rene Habraken committed
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
    };

    /* AXI INTERFACE */
    fpga_axi: fpga-axi@0 {
        interrupt-parent = <&gic>;
        compatible = "simple-bus";
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        ranges = <0 0 0 0xffffffff>;

        rx_dma: rx-dmac@9c400000 {
            #dma-cells = <1>;
            compatible = "adi,axi-dmac-1.00.a";
            reg = <0x9c400000 0x10000>;
            interrupts = <0 109 0>;
            clocks = <&clk 71>;

            adi,channels {
                #size-cells = <0>;
                #address-cells = <1>;

                dma-channel@0 {
                    reg = <0>;
                    adi,source-bus-width = <64>;
                    adi,source-bus-type = <1>;
                    adi,destination-bus-width = <64>;
                    adi,destination-bus-type = <0>;
                };
            };
        };

        axi_ad9694_core: axi-ad9694-hpc@84a10000 {
Rene Habraken's avatar
Rene Habraken committed
80
            compatible = "adi,axi-ad9694-1.0";
Rene Habraken's avatar
Rene Habraken committed
81
82
83
84
85
86
87
88
89
90
91
92
93
            reg = <0x84a10000 0x10000>;
            dmas = <&rx_dma 0>;
            dma-names = "rx";
            spibus-connected = <&adc0_ad9694>;
        };

        axi_ad9694_jesd: axi-jesd204-rx@84aa0000 {
            compatible = "adi,axi-jesd204-rx-1.0";
            reg = <0x84aa0000 0x4000>;
            interrupts = <0 107 0>;

            clocks = <&clk 71>, <&axi_ad9694_adxcvr 1>, <&axi_ad9694_adxcvr 0>;
            clock-names = "s_axi_aclk", "device_clk", "lane_clk";
94
95
            
            adi,subclass = <0>;
Rene Habraken's avatar
Rene Habraken committed
96
            adi,frames-per-multiframe = <32>;
97
98
99
100
            adi,octets-per-frame = <2>;
            adi,converter-resolution = <16>;
            adi,bits-per-sample = <16>;
            adi,converters-per-device = <4>;      
Rene Habraken's avatar
Rene Habraken committed
101
102
103
104
105
106
107
108
109
110
111
112

            #clock-cells = <0>;
            clock-output-names = "jesd_adc_lane_clk";
        };

        axi_ad9694_adxcvr: axi-adxcvr-rx@84a50000 {
            compatible = "adi,axi-adxcvr-1.0";
            reg = <0x84a50000 0x1000>;

            clocks = <&si5340 0 2>;
            clock-names = "conv";
            
113
            adi,sys-clk-select = <3>;
114
            adi,out-clk-select = <3>;
Rene Habraken's avatar
Rene Habraken committed
115
            adi,use-lpm-enable;
116
117
            /* RH: Change to QPLL see zynqMP datasheet max line rate CPLL=8.5Gb/s */
            /* adi,use-cpll-enable; */
Rene Habraken's avatar
Rene Habraken committed
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

            #clock-cells = <1>;
            clock-output-names = "adc_gt_clk", "rx_out_clk";
        };

        axi_sysid_0: axi-sysid-0@85000000 {
            compatible = "adi,axi-sysid-1.00.a";
            reg = <0x85000000 0x10000>;
        };
    };
};
/* END AXI INTERFACE */


&spi0 {
    status = "okay";
    num-cs = <1>;

    adc0_ad9694: ad9694@0 {
137
        compatible = "adi,ad9694";
Rene Habraken's avatar
Rene Habraken committed
138
139
140
141
142
143
144
145
146
147
148
        reg = <0>;
        spi-max-frequency = <10000000>;
        adi,spi-3wire-enable;
        spi-cpol;
        spi-cpha;

        /* gpio =       78 + 38||35||34 */
        powerdown-gpios = <&gpio 116 0>;
        fastdetect-a-gpios = <&gpio 113 0>;
        fastdetect-b-gpios = <&gpio 114 0>;
    
149
150
        clocks =  <&axi_ad9694_jesd>, <&si5340 0 3>;
        clock-names = "jesd_adc_clk", "adc_clk";
Rene Habraken's avatar
Rene Habraken committed
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
        /*assigned-clock-parents = <&si5340 1 3>; */
        /*assigned-clock-rates   = <1000000000>;  */
    };
};

&qspi {
    status = "okay";
    is-dual = <1>;
    has-io-mode = <1>;
    /delete-node/ flash@0;
    flash@0 {
        compatible = "micron,m25p80", "spi-flash", "n25q512a"; /* dual 512Mb, 1Gb total */
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        reg = <0x0>;
        spi-tx-bus-width = <0x1>;
        spi-rx-bus-width = <0x4>; 
        spi-max-frequency = <0x66ff300>; 
        partition@boot {
            label = "boot";
            reg = <0x0 0x1e00000>;
        };

        partition@bootenv {
            label = "bootenv";
            reg = <0x1e00000 0x40000>;
        };

        partition@kernel {
            label = "kernel";
            reg = <0x1e40000 0x2400000>;
        };

        partition@jffs2 {
            label = "jffs2";
            reg = <0x4240000 0x2EE0000>;
        };
        partition@spare {
            label = "spare";
            reg = <0x7120000 0x20000>;
        };      
    };
};


/* I2C0 BUS */
&i2c0 {
    status = "okay";
    clock-frequency = <400000>;
    pinctrl-names = "default", "gpio";
    pinctrl-0 = <&pinctrl_i2c0_default>;
    pinctrl-1 = <&pinctrl_i2c0_gpio>;
    scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
    sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
    /delete-node/ gpio@20;
    /delete-node/ gpio@21;
    /delete-node/ i2c-mux@75;

    /* EEPROM */
    eeprom: eeprom@54 {
        compatible = "at,24c08","atmel,24c08";
        pagesize = <16>;
        reg = <0x54>;
    };

216
217
218
219
220
221
222
223
224
    /* Programmable clock */
    si5340: si5340@76 {
        reg = <0x76>;
        compatible = "silabs,si5340";
        #clock-cells = <2>;
        #address-cells = <1>;
        #size-cells = <0>;
        clocks = <&xtal48MHz>;
        clock-names = "xtal";
225

226
        silabs,pll-m-num = <14000>; /* PLL at 14.0 GHz */
227
228
229
230
231
232
233
234
235
236
237
        silabs,pll-m-den = <48>;

        assigned-clocks = <&si5340 1 0>,
                          <&si5340 1 1>,
                          <&si5340 1 2>,
                          <&si5340 1 3>,
                          <&si5340 0 0>,
                          <&si5340 0 1>,
                          <&si5340 0 2>,
                          <&si5340 0 3>;
        assigned-clock-parents = <0>, <0>, <0>, <0>,
238
239
240
241
                          <&si5340 1 1>, /* output 0 uses PLL 1 */
                          <&si5340 1 2>, /* output 1 uses PLL 2 */
                          <&si5340 1 0>, /* output 2 uses PLL 0 */
                          <&si5340 1 0>; /* output 3 uses PLL 0 */
Rene Habraken's avatar
Rene Habraken committed
242
243
244
        assigned-clock-rates = <2000000000>, /* wat betekent dit en waar komt deze waarde vandaan? 0 */
                          <162000000>,
                          <600000000>,
245
246
247
                          <0>,
                          <27000000>, /* out 0 */
                          <300000000>,
Rene Habraken's avatar
Rene Habraken committed
248
                          <250000000>, /*250 MHz */
Rene Habraken's avatar
Rene Habraken committed
249
                          <500000000>; /*500 MHz */
250
251
252
253
254
255
256
257
258
259
260

        out@1 {
            /* PL_DDR_CLK (300MHz) */
            reg = <1>;
            silabs,format = <1>; /* LVDS 3v3 */
            silabs,common-mode = <3>;
            silabs,amplitude = <3>;
            always-on;
        };

        out@2 {
Rene Habraken's avatar
Rene Habraken committed
261
            /* MGTREFCLK0 RX refclk (250MHz) */
262
263
264
265
266
267
268
269
            reg = <2>;
            silabs,format = <1>; /* LVDS 3v3 */
            silabs,common-mode = <3>;
            silabs,amplitude = <3>;
            always-on;
        };

        out@3 {
Rene Habraken's avatar
Rene Habraken committed
270
            /* ADC_REF_CLK (500MHz) */
271
272
273
274
275
276
            reg = <3>;
            silabs,format = <1>; /* LVDS 3v3 */
            silabs,common-mode = <3>;
            silabs,amplitude = <3>;
            always-on;
        };
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
    /* AD5593 GPIO - ADC - DAC */
    ad5593r@11 {
        #size-cells = <0>;
        #address-cells = <1>;
        #gpio-cells = <2>;
        compatible = "adi,ad5593r";
        reg = <0x11>;
        gpio-controller;

        channel@0 {
            reg = <0>;
            adi,mode = <CH_MODE_DAC>;
            adi,off-state = <CH_OFFSTATE_PULLDOWN>;
        };
        channel@1 {
            reg = <1>;
            adi,mode = <CH_MODE_ADC>;
            adi,off-state = <CH_OFFSTATE_PULLDOWN>;
        };
        channel@2 {
            reg = <2>;
            adi,mode = <CH_MODE_DAC_AND_ADC>;
            adi,off-state = <CH_OFFSTATE_PULLDOWN>;
        };
        channel@6 {
            reg = <6>;
            adi,mode = <CH_MODE_GPIO>;
            adi,off-state = <CH_OFFSTATE_PULLDOWN>;
        };
    };

Rene Habraken's avatar
Rene Habraken committed
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
    /* MAXIM_PMBUS - 00 */
    u88: max15301@0A { /* u88 */
        compatible = "maxim,max15301";
        reg = <0x0A>;
    };
    u91: max15303@0B { /* u91 */
        compatible = "maxim,max15303";
        reg = <0x0B>;
    };
    u81: max15303@10 { /* u81 */
        compatible = "maxim,max15303";
        reg = <0x10>;
    };
    u79: max15301@13 { /* u79 */
        compatible = "maxim,max15301";
        reg = <0x13>;
    };
    u77: max15303@14 { /* u77 */
        compatible = "maxim,max15303";
        reg = <0x14>;
    };
    u75: max15303@15 { /* u75 */
        compatible = "maxim,max15303";
        reg = <0x15>;
    };
    u71: max15303@16 { /* u71 */
        compatible = "maxim,max15303";
        reg = <0x16>;
    };
    u73: max15303@17 { /* u73 */
        compatible = "maxim,max15303";
        reg = <0x17>;
    };
343
    u68: max15301@1a { /* u68 */
Rene Habraken's avatar
Rene Habraken committed
344
345
346
347
348
349
350
        compatible = "maxim,max15301";
        reg = <0x1a>;
    };
    u50: max15303@1d { /* u50 */
        compatible = "maxim,max15303";
        reg = <0x1d>;
    };
351
    u52: max20751@72 { /* u52 */
Rene Habraken's avatar
Rene Habraken committed
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
        compatible = "maxim,max20751";
        reg = <0x72>;
    };
    u54: max20751@73 { /* u54 */
        compatible = "maxim,max20751";
        reg = <0x73>;
    };
};
/*END I2C0 BUS */


/* DEVICE TREE DISABLES */
&i2c1 {
    status = "disabled";

        /delete-node/ i2c-mux@74;
        /delete-node/ i2c-mux@75;
};

&sdhci1 {
 status = "disabled";
};

&pcie {
 status = "disabled";
};

&sata {
 status = "disabled";
};

&can1 {
 status = "disabled";
};

&zynqmp_dpsub {
 status = "disabled";
};

&usb0 {
 status = "disabled";
};

&gpu {
 status = "disabled";
};

&xlnx_dpdma {
 status = "disabled";
};

&spi0 {
    status = "okay";
};

&spi1 {
    status = "disabled";
};

&uart0 {
Rene Habraken's avatar
Rene Habraken committed
412
    status = "disabled";
Rene Habraken's avatar
Rene Habraken committed
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
};

&uart1 {
    status = "okay";
};

/* PINCTRL SETTINGS */
&pinctrl0 {
    status = "okay";
    pinctrl_i2c0_default: i2c0-default {
        mux {
            groups = "i2c0_3_grp";
            function = "i2c0";
        };

        conf {
            groups = "i2c0_3_grp";
            bias-pull-up;
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };

    pinctrl_i2c0_gpio: i2c0-gpio {
        mux {
            groups = "gpio0_14_grp", "gpio0_15_grp";
            function = "gpio0";
        };

        conf {
            groups = "gpio0_14_grp", "gpio0_15_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };

    pinctrl_i2c1_default: i2c1-default {
        mux {
            groups = "i2c1_4_grp";
            function = "i2c1";
        };

        conf {
            groups = "i2c1_4_grp";
            bias-pull-up;
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };

    pinctrl_i2c1_gpio: i2c1-gpio {
        mux {
            groups = "gpio0_16_grp", "gpio0_17_grp";
            function = "gpio0";
        };

        conf {
            groups = "gpio0_16_grp", "gpio0_17_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };

    pinctrl_i2c0_gpio: i2c0-gpio {
        mux {
            groups = "gpio0_14_grp", "gpio0_15_grp";
            function = "gpio0";
        };

        conf {
            groups = "gpio0_14_grp", "gpio0_15_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };
    pinctrl_uart0_default: uart0-default {
        mux {
            groups = "uart0_4_grp";
            function = "uart0";
        };

        conf {
            groups = "uart0_4_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-rx {
            pins = "MIO18";
            bias-high-impedance;
        };

        conf-tx {
            pins = "MIO19";
            bias-disable;
        };
    };

    pinctrl_uart1_default: uart1-default {
        mux {
            groups = "uart1_5_grp";
            function = "uart1";
        };

        conf {
            groups = "uart1_5_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-rx {
            pins = "MIO21";
            bias-high-impedance;
        };

        conf-tx {
            pins = "MIO20";
            bias-disable;
        };
    };

    pinctrl_usb0_default: usb0-default {
        mux {
            groups = "usb0_0_grp";
            function = "usb0";
        };

        conf {
            groups = "usb0_0_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-rx {
            pins = "MIO52", "MIO53", "MIO55";
            bias-high-impedance;
        };

        conf-tx {
            pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59",
                   "MIO60", "MIO61", "MIO62", "MIO63";
            bias-disable;
        };
    };

    pinctrl_gem3_default: gem3-default {
        mux {
            function = "ethernet3";
            groups = "ethernet3_0_grp";
        };

        conf {
            groups = "ethernet3_0_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-rx {
            pins = "MIO70", "MIO71", "MIO72", "MIO73", "MIO74",
                                    "MIO75";
            bias-high-impedance;
            low-power-disable;
        };

        conf-tx {
            pins = "MIO64", "MIO65", "MIO66", "MIO67", "MIO68",
                                    "MIO69";
            bias-disable;
            low-power-enable;
        };

        mux-mdio {
            function = "mdio3";
            groups = "mdio3_0_grp";
        };

        conf-mdio {
            groups = "mdio3_0_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
            bias-disable;
        };
    };

    pinctrl_can1_default: can1-default {
        mux {
            function = "can1";
            groups = "can1_6_grp";
        };

        conf {
            groups = "can1_6_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-rx {
            pins = "MIO25";
            bias-high-impedance;
        };

        conf-tx {
            pins = "MIO24";
            bias-disable;
        };
    };

    pinctrl_sdhci1_default: sdhci1-default {
        mux {
            groups = "sdio1_0_grp";
            function = "sdio1";
        };

        conf {
            groups = "sdio1_0_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
            bias-disable;
        };

        mux-cd {
            groups = "sdio1_cd_0_grp";
            function = "sdio1_cd";
        };

        conf-cd {
            groups = "sdio1_cd_0_grp";
            bias-high-impedance;
            bias-pull-up;
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        mux-wp {
            groups = "sdio1_wp_0_grp";
            function = "sdio1_wp";
        };

        conf-wp {
            groups = "sdio1_wp_0_grp";
            bias-high-impedance;
            bias-pull-up;
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };
    };

    pinctrl_gpio_default: gpio-default {
        mux-sw {
            function = "gpio0";
            groups = "gpio0_22_grp", "gpio0_23_grp";
        };

        conf-sw {
            groups = "gpio0_22_grp", "gpio0_23_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        mux-msp {
            function = "gpio0";
            groups = "gpio0_13_grp", "gpio0_38_grp";
        };

        conf-msp {
            groups = "gpio0_13_grp", "gpio0_38_grp";
            slew-rate = <SLEW_RATE_SLOW>;
            io-standard = <IO_STANDARD_LVCMOS18>;
        };

        conf-pull-up {
            pins = "MIO22", "MIO23";
            bias-pull-up;
        };

        conf-pull-none {
            pins = "MIO13", "MIO38";
            bias-disable;
        };
    };
};