blob: c487105f26deba8b279c47e23210b6e95517e047 (
plain)
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
785
786
787
788
789
790
791
792
793
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_NXGE_NXGE_SR_HW_H
#define _SYS_NXGE_NXGE_SR_HW_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define ESR_NEPTUNE_DEV_ADDR 0x1E
#define ESR_NEPTUNE_BASE 0
#define ESR_PORT_ADDR_BASE 0
#define PCISR_DEV_ADDR 0x1E
#define PCISR_BASE 0
#define PCISR_PORT_ADDR_BASE 2
#define PB 0
#define SR_RX_TX_COMMON_CONTROL PB + 0x000
#define SR_RX_TX_RESET_CONTROL PB + 0x004
#define SR_RX_POWER_CONTROL PB + 0x008
#define SR_TX_POWER_CONTROL PB + 0x00C
#define SR_MISC_POWER_CONTROL PB + 0x010
#define SR_RX_TX_CONTROL_A PB + 0x100
#define SR_RX_TX_TUNING_A PB + 0x104
#define SR_RX_SYNCCHAR_A PB + 0x108
#define SR_RX_TX_TEST_A PB + 0x10C
#define SR_GLUE_CONTROL0_A PB + 0x110
#define SR_GLUE_CONTROL1_A PB + 0x114
#define SR_RX_TX_CONTROL_B PB + 0x120
#define SR_RX_TX_TUNING_B PB + 0x124
#define SR_RX_SYNCCHAR_B PB + 0x128
#define SR_RX_TX_TEST_B PB + 0x12C
#define SR_GLUE_CONTROL0_B PB + 0x130
#define SR_GLUE_CONTROL1_B PB + 0x134
#define SR_RX_TX_CONTROL_C PB + 0x140
#define SR_RX_TX_TUNING_C PB + 0x144
#define SR_RX_SYNCCHAR_C PB + 0x148
#define SR_RX_TX_TEST_C PB + 0x14C
#define SR_GLUE_CONTROL0_C PB + 0x150
#define SR_GLUE_CONTROL1_C PB + 0x154
#define SR_RX_TX_CONTROL_D PB + 0x160
#define SR_RX_TX_TUNING_D PB + 0x164
#define SR_RX_SYNCCHAR_D PB + 0x168
#define SR_RX_TX_TEST_D PB + 0x16C
#define SR_GLUE_CONTROL0_D PB + 0x170
#define SR_GLUE_CONTROL1_D PB + 0x174
#define SR_RX_TX_TUNING_1_A PB + 0x184
#define SR_RX_TX_TUNING_1_B PB + 0x1A4
#define SR_RX_TX_TUNING_1_C PB + 0x1C4
#define SR_RX_TX_TUNING_1_D PB + 0x1E4
#define SR_RX_TX_TUNING_2_A PB + 0x204
#define SR_RX_TX_TUNING_2_B PB + 0x224
#define SR_RX_TX_TUNING_2_C PB + 0x244
#define SR_RX_TX_TUNING_2_D PB + 0x264
#define SR_RX_TX_TUNING_3_A PB + 0x284
#define SR_RX_TX_TUNING_3_B PB + 0x2A4
#define SR_RX_TX_TUNING_3_C PB + 0x2C4
#define SR_RX_TX_TUNING_3_D PB + 0x2E4
/*
* Shift right by 1 because the PRM requires that all the serdes register
* address be divided by 2
*/
#define ESR_NEP_RX_TX_COMMON_CONTROL_L_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_TX_COMMON_CONTROL >> 1))
#define ESR_NEP_RX_TX_COMMON_CONTROL_H_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_TX_COMMON_CONTROL >> 1)\
+ 1)
#define ESR_NEP_RX_TX_RESET_CONTROL_L_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_TX_RESET_CONTROL >> 1))
#define ESR_NEP_RX_TX_RESET_CONTROL_H_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_TX_RESET_CONTROL >> 1)\
+ 1)
#define ESR_NEP_RX_POWER_CONTROL_L_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_POWER_CONTROL >> 1))
#define ESR_NEP_RX_POWER_CONTROL_H_ADDR() (ESR_NEPTUNE_BASE +\
(SR_RX_POWER_CONTROL >> 1) + 1)
#define ESR_NEP_TX_POWER_CONTROL_L_ADDR() (ESR_NEPTUNE_BASE +\
(SR_TX_POWER_CONTROL >> 1))
#define ESR_NEP_TX_POWER_CONTROL_H_ADDR() (ESR_NEPTUNE_BASE +\
(SR_TX_POWER_CONTROL >> 1) + 1)
#define ESR_NEP_MISC_POWER_CONTROL_L_ADDR() (ESR_NEPTUNE_BASE +\
(SR_MISC_POWER_CONTROL >> 1))
#define ESR_NEP_MISC_POWER_CONTROL_H_ADDR() (ESR_NEPTUNE_BASE +\
(SR_MISC_POWER_CONTROL >> 1)\
+ 1)
#define ESR_NEP_RX_TX_CONTROL_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_CONTROL_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_CONTROL_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_CONTROL_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_TUNING_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_TUNING_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_SYNCCHAR_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_SYNCCHAR_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_SYNCCHAR_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_SYNCCHAR_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_TEST_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TEST_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_TEST_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TEST_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_GLUE_CONTROL0_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_GLUE_CONTROL0_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_GLUE_CONTROL0_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_GLUE_CONTROL0_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_GLUE_CONTROL1_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_GLUE_CONTROL1_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_GLUE_CONTROL1_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_GLUE_CONTROL1_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_TUNING_1_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_1_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_TUNING_1_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_1_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_TUNING_2_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_2_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_TUNING_2_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_2_A +\
(chan * 0x20)) >> 1) + 1
#define ESR_NEP_RX_TX_TUNING_3_L_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_3_A +\
(chan * 0x20)) >> 1)
#define ESR_NEP_RX_TX_TUNING_3_H_ADDR(chan) ((ESR_NEPTUNE_BASE +\
SR_RX_TX_TUNING_3_A +\
(chan * 0x20)) >> 1) + 1
typedef union _sr_rx_tx_common_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res3 : 3;
uint16_t refclkr_freq : 5;
uint16_t res4 : 8;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res4 : 8;
uint16_t refclkr_freq : 5;
uint16_t res3 : 3;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_common_ctrl_l;
typedef union _sr_rx_tx_common_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 5;
uint16_t tdmaster : 3;
uint16_t tp : 2;
uint16_t tz : 2;
uint16_t res2 : 2;
uint16_t revlbrefsel : 2;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t revlbrefsel : 2;
uint16_t res2 : 2;
uint16_t tz : 2;
uint16_t tp : 2;
uint16_t tdmaster : 3;
uint16_t res1 : 5;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_common_ctrl_h;
/* RX TX Common Control Register field values */
#define TDMASTER_LANE_A 0
#define TDMASTER_LANE_B 1
#define TDMASTER_LANE_C 2
#define TDMASTER_LANE_D 3
#define REVLBREFSEL_GBT_RBC_A_O 0
#define REVLBREFSEL_GBT_RBC_B_O 1
#define REVLBREFSEL_GBT_RBC_C_O 2
#define REVLBREFSEL_GBT_RBC_D_O 3
#define REFCLKR_FREQ_SIM 0
#define REFCLKR_FREQ_53_125 0x1
#define REFCLKR_FREQ_62_5 0x3
#define REFCLKR_FREQ_70_83 0x4
#define REFCLKR_FREQ_75 0x5
#define REFCLKR_FREQ_78_125 0x6
#define REFCLKR_FREQ_79_6875 0x7
#define REFCLKR_FREQ_83_33 0x8
#define REFCLKR_FREQ_85 0x9
#define REFCLKR_FREQ_100 0xA
#define REFCLKR_FREQ_104_17 0xB
#define REFCLKR_FREQ_106_25 0xC
#define REFCLKR_FREQ_120 0xF
#define REFCLKR_FREQ_125 0x10
#define REFCLKR_FREQ_127_5 0x11
#define REFCLKR_FREQ_141_67 0x13
#define REFCLKR_FREQ_150 0x15
#define REFCLKR_FREQ_156_25 0x16
#define REFCLKR_FREQ_159_375 0x17
#define REFCLKR_FREQ_170 0x19
#define REFCLKR_FREQ_212_5 0x1E
typedef union _sr_rx_tx_reset_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t rxreset_0a : 1;
uint16_t rxreset_0b : 1;
uint16_t rxreset_0c : 1;
uint16_t rxreset_0d : 1;
uint16_t rxreset_1a : 1;
uint16_t rxreset_1b : 1;
uint16_t rxreset_1c : 1;
uint16_t rxreset_1d : 1;
uint16_t rxreset_2a : 1;
uint16_t rxreset_2b : 1;
uint16_t rxreset_2c : 1;
uint16_t rxreset_2d : 1;
uint16_t rxreset_3a : 1;
uint16_t rxreset_3b : 1;
uint16_t rxreset_3c : 1;
uint16_t rxreset_3d : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t rxreset_3d : 1;
uint16_t rxreset_3c : 1;
uint16_t rxreset_3b : 1;
uint16_t rxreset_3a : 1;
uint16_t rxreset_2d : 1;
uint16_t rxreset_2c : 1;
uint16_t rxreset_2b : 1;
uint16_t rxreset_2a : 1;
uint16_t rxreset_1d : 1;
uint16_t rxreset_1c : 1;
uint16_t rxreset_1b : 1;
uint16_t rxreset_1a : 1;
uint16_t rxreset_0d : 1;
uint16_t rxreset_0c : 1;
uint16_t rxreset_0b : 1;
uint16_t rxreset_0a : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_reset_ctrl_l;
typedef union _sr_rx_tx_reset_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t txreset_0a : 1;
uint16_t txreset_0b : 1;
uint16_t txreset_0c : 1;
uint16_t txreset_0d : 1;
uint16_t txreset_1a : 1;
uint16_t txreset_1b : 1;
uint16_t txreset_1c : 1;
uint16_t txreset_1d : 1;
uint16_t txreset_2a : 1;
uint16_t txreset_2b : 1;
uint16_t txreset_2c : 1;
uint16_t txreset_2d : 1;
uint16_t txreset_3a : 1;
uint16_t txreset_3b : 1;
uint16_t txreset_3c : 1;
uint16_t txreset_3d : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t txreset_3d : 1;
uint16_t txreset_3c : 1;
uint16_t txreset_3b : 1;
uint16_t txreset_3a : 1;
uint16_t txreset_2d : 1;
uint16_t txreset_2c : 1;
uint16_t txreset_2b : 1;
uint16_t txreset_2a : 1;
uint16_t txreset_1d : 1;
uint16_t txreset_1c : 1;
uint16_t txreset_1b : 1;
uint16_t txreset_1a : 1;
uint16_t txreset_0d : 1;
uint16_t txreset_0c : 1;
uint16_t txreset_0b : 1;
uint16_t txreset_0a : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_reset_ctrl_h;
typedef union _sr_rx_power_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t pdrxlos_0a : 1;
uint16_t pdrxlos_0b : 1;
uint16_t pdrxlos_0c : 1;
uint16_t pdrxlos_0d : 1;
uint16_t pdrxlos_1a : 1;
uint16_t pdrxlos_1b : 1;
uint16_t pdrxlos_1c : 1;
uint16_t pdrxlos_1d : 1;
uint16_t pdrxlos_2a : 1;
uint16_t pdrxlos_2b : 1;
uint16_t pdrxlos_2c : 1;
uint16_t pdrxlos_2d : 1;
uint16_t pdrxlos_3a : 1;
uint16_t pdrxlos_3b : 1;
uint16_t pdrxlos_3c : 1;
uint16_t pdrxlos_3d : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t pdrxlos_3d : 1;
uint16_t pdrxlos_3c : 1;
uint16_t pdrxlos_3b : 1;
uint16_t pdrxlos_3a : 1;
uint16_t pdrxlos_2d : 1;
uint16_t pdrxlos_2c : 1;
uint16_t pdrxlos_2b : 1;
uint16_t pdrxlos_2a : 1;
uint16_t pdrxlos_1d : 1;
uint16_t pdrxlos_1c : 1;
uint16_t pdrxlos_1b : 1;
uint16_t pdrxlos_1a : 1;
uint16_t pdrxlos_0d : 1;
uint16_t pdrxlos_0c : 1;
uint16_t pdrxlos_0b : 1;
uint16_t pdrxlos_0a : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_power_ctrl_l_t;
typedef union _sr_rx_power_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t pdownr_0a : 1;
uint16_t pdownr_0b : 1;
uint16_t pdownr_0c : 1;
uint16_t pdownr_0d : 1;
uint16_t pdownr_1a : 1;
uint16_t pdownr_1b : 1;
uint16_t pdownr_1c : 1;
uint16_t pdownr_1d : 1;
uint16_t pdownr_2a : 1;
uint16_t pdownr_2b : 1;
uint16_t pdownr_2c : 1;
uint16_t pdownr_2d : 1;
uint16_t pdownr_3a : 1;
uint16_t pdownr_3b : 1;
uint16_t pdownr_3c : 1;
uint16_t pdownr_3d : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t pdownr_3d : 1;
uint16_t pdownr_3c : 1;
uint16_t pdownr_3b : 1;
uint16_t pdownr_3a : 1;
uint16_t pdownr_2d : 1;
uint16_t pdownr_2c : 1;
uint16_t pdownr_2b : 1;
uint16_t pdownr_2a : 1;
uint16_t pdownr_1d : 1;
uint16_t pdownr_1c : 1;
uint16_t pdownr_1b : 1;
uint16_t pdownr_1a : 1;
uint16_t pdownr_0d : 1;
uint16_t pdownr_0c : 1;
uint16_t pdownr_0b : 1;
uint16_t pdownr_0a : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_power_ctrl_h_t;
typedef union _sr_tx_power_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 8;
uint16_t pdownppll0 : 1;
uint16_t pdownppll1 : 1;
uint16_t pdownppll2 : 1;
uint16_t pdownppll3 : 1;
uint16_t res2 : 4;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res2 : 4;
uint16_t pdownppll3 : 1;
uint16_t pdownppll2 : 1;
uint16_t pdownppll1 : 1;
uint16_t pdownppll0 : 1;
uint16_t res1 : 8;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_tx_power_ctrl_l_t;
typedef union _sr_tx_power_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t pdownt_0a : 1;
uint16_t pdownt_0b : 1;
uint16_t pdownt_0c : 1;
uint16_t pdownt_0d : 1;
uint16_t pdownt_1a : 1;
uint16_t pdownt_1b : 1;
uint16_t pdownt_1c : 1;
uint16_t pdownt_1d : 1;
uint16_t pdownt_2a : 1;
uint16_t pdownt_2b : 1;
uint16_t pdownt_2c : 1;
uint16_t pdownt_2d : 1;
uint16_t pdownt_3a : 1;
uint16_t pdownt_3b : 1;
uint16_t pdownt_3c : 1;
uint16_t pdownt_3d : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t pdownt_3d : 1;
uint16_t pdownt_3c : 1;
uint16_t pdownt_3b : 1;
uint16_t pdownt_3a : 1;
uint16_t pdownt_2d : 1;
uint16_t pdownt_2c : 1;
uint16_t pdownt_2b : 1;
uint16_t pdownt_2a : 1;
uint16_t pdownt_1d : 1;
uint16_t pdownt_1c : 1;
uint16_t pdownt_1b : 1;
uint16_t pdownt_1a : 1;
uint16_t pdownt_0d : 1;
uint16_t pdownt_0c : 1;
uint16_t pdownt_0b : 1;
uint16_t pdownt_0a : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_tx_power_ctrl_h_t;
typedef union _sr_misc_power_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 3;
uint16_t pdrtrim : 1;
uint16_t pdownpecl0 : 1;
uint16_t pdownpecl1 : 1;
uint16_t pdownpecl2 : 1;
uint16_t pdownpecl3 : 1;
uint16_t pdownppll0 : 1;
uint16_t pdownppll1 : 1;
uint16_t pdownppll2 : 1;
uint16_t pdownppll3 : 1;
uint16_t res2 : 4;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res2 : 4;
uint16_t pdownppll3 : 1;
uint16_t pdownppll2 : 1;
uint16_t pdownppll1 : 1;
uint16_t pdownppll0 : 1;
uint16_t pdownpecl3 : 1;
uint16_t pdownpecl2 : 1;
uint16_t pdownpecl1 : 1;
uint16_t pdownpecl0 : 1;
uint16_t pdrtrim : 1;
uint16_t res1 : 3;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_misc_power_ctrl_l_t;
typedef union _misc_power_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t pdclkout0 : 1;
uint16_t pdclkout1 : 1;
uint16_t pdclkout2 : 1;
uint16_t pdclkout3 : 1;
uint16_t res1 : 12;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res1 : 12;
uint16_t pdclkout3 : 1;
uint16_t pdclkout2 : 1;
uint16_t pdclkout1 : 1;
uint16_t pdclkout0 : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} misc_power_ctrl_h_t;
typedef union _sr_rx_tx_ctrl_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 2;
uint16_t rxpreswin : 2;
uint16_t res2 : 1;
uint16_t risefall : 3;
uint16_t res3 : 7;
uint16_t enstretch : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t enstretch : 1;
uint16_t res3 : 7;
uint16_t risefall : 3;
uint16_t res2 : 1;
uint16_t rxpreswin : 2;
uint16_t res1 : 2;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_ctrl_l_t;
typedef union _sr_rx_tx_ctrl_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t biascntl : 1;
uint16_t res1 : 5;
uint16_t tdenfifo : 1;
uint16_t tdws20 : 1;
uint16_t vmuxlo : 2;
uint16_t vpulselo : 2;
uint16_t res2 : 4;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res2 : 4;
uint16_t vpulselo : 2;
uint16_t vmuxlo : 2;
uint16_t tdws20 : 1;
uint16_t tdenfifo : 1;
uint16_t res1 : 5;
uint16_t biascntl : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_ctrl_h_t;
#define RXPRESWIN_52US_300BITTIMES 0
#define RXPRESWIN_53US_300BITTIMES 1
#define RXPRESWIN_54US_300BITTIMES 2
#define RXPRESWIN_55US_300BITTIMES 3
typedef union _sr_rx_tx_tuning_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t rxeq : 4;
uint16_t res1 : 12;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res1 : 12;
uint16_t rxeq : 4;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_tuning_l_t;
typedef union _sr_rx_tx_tuning_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 8;
uint16_t rp : 2;
uint16_t rz : 2;
uint16_t vtxlo : 4;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t vtxlo : 4;
uint16_t rz : 2;
uint16_t rp : 2;
uint16_t res1 : 8;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_tuning_h_t;
typedef union _sr_rx_syncchar_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t syncchar_0_3 : 4;
uint16_t res1 : 2;
uint16_t syncmask : 10;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t syncmask : 10;
uint16_t res1 : 2;
uint16_t syncchar_0_3 : 4;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_syncchar_l_t;
typedef union _sr_rx_syncchar_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 1;
uint16_t syncpol : 1;
uint16_t res2 : 8;
uint16_t syncchar_4_10 : 6;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t syncchar_4_10 : 6;
uint16_t res2 : 8;
uint16_t syncpol : 1;
uint16_t res1 : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_syncchar_h_t;
typedef union _sr_rx_tx_test_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 15;
uint16_t ref50 : 1;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t ref50 : 1;
uint16_t res1 : 15;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_test_l_t;
typedef union _sr_rx_tx_test_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 5;
uint16_t selftest : 3;
uint16_t res2 : 8;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res2 : 8;
uint16_t selftest : 3;
uint16_t res1 : 5;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_rx_tx_test_h_t;
typedef union _sr_glue_ctrl0_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t rxlos_test : 1;
uint16_t res1 : 1;
uint16_t rxlosenable : 1;
uint16_t fastresync : 1;
uint16_t samplerate : 4;
uint16_t thresholdcount : 8;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t thresholdcount : 8;
uint16_t samplerate : 4;
uint16_t fastresync : 1;
uint16_t rxlosenable : 1;
uint16_t res1 : 1;
uint16_t rxlos_test : 1;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_glue_ctrl0_l_t;
typedef union _sr_glue_ctrl0_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 5;
uint16_t bitlocktime : 3;
uint16_t res2 : 8;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res2 : 8;
uint16_t bitlocktime : 3;
uint16_t res1 : 5;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_glue_ctrl0_h_t;
#define BITLOCKTIME_64_CYCLES 0
#define BITLOCKTIME_128_CYCLES 1
#define BITLOCKTIME_256_CYCLES 2
#define BITLOCKTIME_300_CYCLES 3
#define BITLOCKTIME_384_CYCLES 4
#define BITLOCKTIME_512_CYCLES 5
#define BITLOCKTIME_1024_CYCLES 6
#define BITLOCKTIME_2048_CYCLES 7
typedef union _sr_glue_ctrl1_l {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t res1 : 14;
uint16_t inittime : 2;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t inittime : 2;
uint16_t res1 : 14;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} sr_glue_ctrl1_l_t;
typedef union glue_ctrl1_h {
uint16_t value;
struct {
#if defined(_BIT_FIELDS_HTOL)
uint16_t termr_cfg : 2;
uint16_t termt_cfg : 2;
uint16_t rtrimen : 2;
uint16_t res1 : 10;
#elif defined(_BIT_FIELDS_LTOH)
uint16_t res1 : 10;
uint16_t rtrimen : 2;
uint16_t termt_cfg : 2;
uint16_t termr_cfg : 2;
#else
#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
#endif
} bits;
} glue_ctrl1_h_t;
#define TERM_CFG_67OHM 0
#define TERM_CFG_72OHM 1
#define TERM_CFG_80OHM 2
#define TERM_CFG_87OHM 3
#define TERM_CFG_46OHM 4
#define TERM_CFG_48OHM 5
#define TERM_CFG_52OHM 6
#define TERM_CFG_55OHM 7
#define INITTIME_60US 0
#define INITTIME_120US 1
#define INITTIME_240US 2
#define INITTIME_480US 3
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NXGE_NXGE_SR_HW_H */
|