-
Notifications
You must be signed in to change notification settings - Fork 109
/
config.in
1526 lines (1309 loc) · 45.4 KB
/
config.in
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
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
if [ "$MT7621_FPGA_BOARD" = "y" -o "$MT7621_ASIC_BOARD" = "y" ]; then
string 'Cross Compiler Path' CONFIG_CROSS_COMPILER_PATH /opt/mips-2012.03/bin/
elif [ "$RT2880_FPGA_BOARD" = "y" -o "$RT2880_ASIC_BOARD" = "y" -o
"$RT3052_FPGA_BOARD" = "y" -o "$RT3052_ASIC_BOARD" = "y" -o
"$RT3352_FPGA_BOARD" = "y" -o "$RT3352_ASIC_BOARD" = "y" -o
"$RT3883_FPGA_BOARD" = "y" -o "$RT3883_ASIC_BOARD" = "y" -o
"$RT5350_FPGA_BOARD" = "y" -o "$RT5350_ASIC_BOARD" = "y" -o
"$RT6855A_FPGA_BOARD" = "y" -o "$RT6855A_ASIC_BOARD" = "y" -o
"$MT7620_FPGA_BOARD" = "y" -o "$MT7620_ASIC_BOARD" = "y" -o
"$MT7628_FPGA_BOARD" = "y" -o "$MT7628_ASIC_BOARD" = "y" ]; then
string 'Cross Compiler Path' CONFIG_CROSS_COMPILER_PATH /opt/buildroot-gcc342/bin
fi
comment ""
mainmenu_name 'Uboot Configuration'
define_bool ASIC_BOARD y
if [ "$FPGA_BOARD" = "y" ]; then
choice 'Chip ID' "RT2880 RT2880_FPGA_BOARD \
RT3052 RT3052_FPGA_BOARD \
RT3352 RT3352_FPGA_BOARD \
RT3883 RT3883_FPGA_BOARD \
RT5350 RT5350_FPGA_BOARD \
RT6855A RT6855A_FPGA_BOARD \
MT7620 MT7620_FPGA_BOARD \
MT7621 MT7621_FPGA_BOARD \
MT7628 MT7628_FPGA_BOARD
"
else
choice 'Chip ID' " RT2880 RT2880_ASIC_BOARD \
RT3350 RT3350_ASIC_BOARD \
RT3052 RT3052_ASIC_BOARD \
RT3352 RT3352_ASIC_BOARD \
RT3883 RT3883_ASIC_BOARD \
RT5350 RT5350_ASIC_BOARD \
RT6855A RT6855A_ASIC_BOARD \
MT7620 MT7620_ASIC_BOARD \
MT7621 MT7621_ASIC_BOARD \
MT7628 MT7628_ASIC_BOARD
"
fi
#########################################################################################3
# RT2880
#########################################################################################3
if [ "$RT2880_FPGA_BOARD" = "y" -o "$RT2880_ASIC_BOARD" = "y" ]; then
define_bool RT2880_MP y
#-----------------------
# RT2880 GMAC
#-----------------------
choice 'GMAC connected to ' "100Switch MAC_TO_100SW_MODE \
100Phy MAC_TO_100PHY_MODE \
GigaSW MAC_TO_VITESSE_MODE \
GigaPhy MAC_TO_GIGAPHY_MODE
" 100Switch
if [ "$MAC_TO_VITESSE_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
if [ "$MAC_TO_100PHY_MODE" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$MAC_TO_GIGAPHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
#-----------------------
# RT2880 FLASH
#-----------------------
define_bool ON_BOARD_NOR_FLASH_COMPONENT y
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
#-----------------------
# RT2880 DRAM
#-----------------------
define_bool ON_BOARD_SDR y
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 32bits
#-----------------------
# RT2880 Option
#-----------------------
comment ""
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
" W/LLLL
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0x8A200000
else
define_hex TEXT_BASE 0xBFC00000
fi
fi
#########################################################################################3
# RT3052
#########################################################################################3
if [ "$RT3052_FPGA_BOARD" = "y" -o "$RT3052_ASIC_BOARD" = "y" ]; then
define_bool RT3052_MP2 y
#-----------------------
# RT3052 GMAC
#-----------------------
choice 'Port 5 Connect to' "None P5_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P5_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P5_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P5_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P5_RMII_TO_MAC_MODE
" None
if [ "$P5_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$P5_RGMII_TO_MAC_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
#-----------------------
# RT3052 FLASH
#-----------------------
choice 'Flash Type' "NOR ON_BOARD_NOR_FLASH_COMPONENT \
NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
"NOR
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT3052 DRAM
#-----------------------
define_bool ON_BOARD_SDR y
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 32bits
#-----------------------
# RT3052 Option
#-----------------------
comment ""
if [ "$ON_BOARD_NOR_FLASH_COMPONENT" == "y" ]; then
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
else
define_bool UBOOT_RAM y
fi
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
" W/LLLL
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0x80200000
else
define_hex TEXT_BASE 0xBF000000
fi
fi
#########################################################################################5
# RT3350
#########################################################################################3
if [ "$RT3350_ASIC_BOARD" = "y" ]; then
define_bool RT3052_ASIC_BOARD y
define_bool RT3052_MP2 y
#-----------------------
# RT3350 GMAC
#-----------------------
define_bool P5_MAC_TO_NONE_MODE y
#-----------------------
# RT3350 FLASH
#-----------------------
choice 'Flash Type' "NOR ON_BOARD_NOR_FLASH_COMPONENT \
NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
"NOR
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT3350 DRAM
#-----------------------
define_bool ON_BOARD_SDR y
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
define_bool ON_BOARD_16BIT_DRAM_BUS y
#-----------------------
# RT3350 Option
#-----------------------
comment ""
if [ "$ON_BOARD_NOR_FLASH_COMPONENT" == "y" ]; then
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
else
define_bool UBOOT_RAM y
fi
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0x80200000
else
define_hex TEXT_BASE 0xBF000000
fi
fi
#########################################################################################3
# RT3883
#########################################################################################3
if [ "$RT3883_FPGA_BOARD" = "y" -o "$RT3883_ASIC_BOARD" = "y" ]; then
define_bool RT3883_MP y
#-----------------------
# RT3883 GMAC
#-----------------------
choice 'Use GE1 or GE2' "GMAC1 RT3883_USE_GE1 \
GMAC2 RT3883_USE_GE2
"
if [ "$RT3883_USE_GE1" = "y" ]; then
choice 'GE1 connected to' "GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000(MT7530) GE_RGMII_FORCE_1000 \
GE_RGMII_FORCE_VITESSE GE_RGMII_FORCE_VITESSE \
GE_RGMII_AN GE_RGMII_AN
"
else
choice 'GE2 connected to' "GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN
"
fi
if [ "$GE_MII_FORCE_100" = "y" -o \
"$GE_RVMII_FORCE_100" = "y" ]; then
define_bool MAC_TO_100SW_MODE y
fi
if [ "$GE_MII_AN" = "y" ]; then
define_bool MAC_TO_100PHY_MODE y
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$GE_RGMII_FORCE_VITESSE" = "y" ]; then
define_bool MAC_TO_VITESSE_MODE y
define_bool GPIOx_RESET_MODE y
fi
if [ "$GE_RGMII_FORCE_1000" = "y" ]; then
define_bool MAC_TO_MT7530_MODE y
define_bool GPIOx_RESET_MODE y
fi
if [ "$GE_RGMII_AN" = "y" ]; then
define_bool MAC_TO_GIGAPHY_MODE y
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
#-----------------------
# RT3883 FLASH
#-----------------------
choice 'Flash Type' "NOR ON_BOARD_NOR_FLASH_COMPONENT \
NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
" NOR
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT3883 DRAM
#-----------------------
choice 'DRAM Type' "SDR ON_BOARD_SDR \
DDR2 ON_BOARD_DDR2
"DDR2
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 32bits
else
choice 'DDR Component' "256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT
" 512Mb
choice 'DDR Width' "8bits ON_BOARD_DDR_WIDTH_8 \
16bits ON_BOARD_DDR_WIDTH_16
" 16bits
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 16bits
fi
#-----------------------
# RT3883 Option
#-----------------------
comment ""
if [ "$ON_BOARD_NOR_FLASH_COMPONENT" == "y" ]; then
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
else
define_bool UBOOT_RAM y
fi
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"W/LLLL
fi
bool "Static DRAM Parameter" DRAM_PARAMETERS
if [ "$DRAM_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
hex " SDRAM_CFG0" DRAM_CFG0 0
hex " SDRAM_CFG1" DRAM_CFG1 0
else
hex " SYSCFG1(hex)" DRAM_CFG0 26
hex " DDR_CFG3_ODT(hex)" DRAM_CFG1 2
fi
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0x80200000
else
define_hex TEXT_BASE 0xBC000000
fi
fi
#########################################################################################3
# RT3352
#########################################################################################3
if [ "$RT3352_FPGA_BOARD" = "y" -o "$RT3352_ASIC_BOARD" = "y" ]; then
define_bool RT3352_MP y
#-----------------------
# RT3352 GMAC
#-----------------------
choice 'Port 5 Connect to' "None P5_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P5_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P5_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P5_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P5_RMII_TO_MAC_MODE
" None
if [ "$P5_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$P5_RGMII_TO_MAC_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
#-----------------------
# RT3352 FLASH
#-----------------------
define_bool ON_BOARD_SPI_FLASH_COMPONENT y
define_bool UBOOT_RAM y
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT3352 DRAM
#-----------------------
choice 'DRAM Type' "SDR ON_BOARD_SDR \
DDR2 ON_BOARD_DDR2
"SDR
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 16bits
else
choice 'DDR Component' "256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT
" 512Mb
choice 'DDR Width' "8bits ON_BOARD_DDR_WIDTH_8 \
16bits ON_BOARD_DDR_WIDTH_16
" 16bits
choice 'DRAM Bus' "16bits ON_BOARD_16BIT_DRAM_BUS \
32bits ON_BOARD_32BIT_DRAM_BUS
" 16bits
fi
#-----------------------
# RT3352 Option
#-----------------------
comment ""
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"
fi
bool "Static DRAM Parameter" DRAM_PARAMETERS
if [ "$DRAM_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
hex " SDRAM_CFG0" DRAM_CFG0 0
hex " SDRAM_CFG1" DRAM_CFG1 0
else
hex " SYSCFG1(hex)" DRAM_CFG0 26
hex " DDR_CFG3_ODT(hex)" DRAM_CFG1 2
fi
fi
define_hex TEXT_BASE 0x80200000
fi
#########################################################################################3
# RT5350
#########################################################################################3
if [ "$RT5350_FPGA_BOARD" = "y" -o "$RT5350_ASIC_BOARD" = "y" ]; then
define_bool RT5350_MP y
#-----------------------
# RT5350 GMAC
#-----------------------
define_bool P5_MAC_TO_NONE_MODE y
#-----------------------
# RT5350 FLASH
#-----------------------
define_bool ON_BOARD_SPI_FLASH_COMPONENT y
define_bool UBOOT_RAM y
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT5350 DRAM
#-----------------------
define_bool ON_BOARD_SDR y
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
define_bool ON_BOARD_16BIT_DRAM_BUS y
#-----------------------
# RT5350 Option
#-----------------------
comment ""
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"
fi
bool "Static DRAM Parameter" DRAM_PARAMETERS
if [ "$DRAM_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
hex " SDRAM_CFG0" DRAM_CFG0 0
hex " SDRAM_CFG1" DRAM_CFG1 0
else
hex " SYSCFG1(hex)" DRAM_CFG0 26
hex " DDR_CFG3_ODT(hex)" DRAM_CFG1 2
fi
fi
bool "CPU PLL adjustment" CPU_PLL_PARAMETERS
if [ "$CPU_PLL_PARAMETERS" = "y" ]; then
hex " CPU PLL ADJUSTMENT " CPUPLLCFG 0
fi
define_hex TEXT_BASE 0x80200000
fi
#########################################################################################3
# RT6855
#########################################################################################3
if [ "$RT6855_FPGA_BOARD" = "y" -o "$RT6855_ASIC_BOARD" = "y" ]; then
define_bool RT6855_MP y
#-----------------------
# RT6855 GMAC
#-----------------------
choice 'Port 5 Connect to' "None P5_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P5_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P5_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P5_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P5_RMII_TO_MAC_MODE
" None
if [ "$P5_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$P5_RGMII_TO_MAC_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
#-----------------------
# RT6855 FLASH
#-----------------------
choice 'Flash Type' "NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
"SPI
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# RT6855 DRAM
#-----------------------
choice 'DRAM Type' "SDR ON_BOARD_SDR \
DDR1 ON_BOARD_DDR1 \
DDR2 ON_BOARD_DDR2
"SDR
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
else
choice 'DDR Component' "256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT
" 512Mb
choice 'DDR Width' "8bits ON_BOARD_DDR_WIDTH_8 \
16bits ON_BOARD_DDR_WIDTH_16
" 16bits
fi
define_bool ON_BOARD_16BIT_DRAM_BUS y
#-----------------------
# RT6855 Option
#-----------------------
comment ""
if [ "$ON_BOARD_SPI_FLASH_COMPONENT" == "y" ]; then
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
#choice 'Small Uboot/Config partition' "Normal_Partition_5_sectors NORMAL_UBOOT_PARTITION \
# Small_Partition_3_sectors SMALL_UBOOT_PARTITION
# " Normal_Partition_5_sectors
else
define_bool UBOOT_RAM y
fi
bool "Dual Image" DUAL_IMAGE_SUPPORT
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"
fi
bool "Static DRAM Parameter" DRAM_PARAMETERS
if [ "$DRAM_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
hex " SDRAM_CFG0" DRAM_CFG0 0
hex " SDRAM_CFG1" DRAM_CFG1 0
else
hex " SYSCFG1(hex)" DRAM_CFG0 26
hex " DDR_CFG3_ODT(hex)" DRAM_CFG1 2
fi
fi
bool "CPU PLL adjustment" CPU_PLL_PARAMETERS
if [ "$CPU_PLL_PARAMETERS" = "y" ]; then
hex " CPU PLL ADJUSTMENT " CPUPLLCFG 0
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0x80200000
else
define_hex TEXT_BASE 0xBC000000
fi
fi
#########################################################################################3
# RT6855A
#########################################################################################3
if [ "$RT6855A_FPGA_BOARD" = "y" -o "$RT6855A_ASIC_BOARD" = "y" ]; then
define_bool RT6855A_MP y
#-----------------------
# RT6855A GMAC
#-----------------------
choice 'Port 5 Connect to' "None P5_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P5_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P5_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P5_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P5_RMII_TO_MAC_MODE
" None
if [ "$P5_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
fi
if [ "$P5_RGMII_TO_MAC_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
#-----------------------
# RT6855A FLASH
#-----------------------
choice 'Flash Type' "NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
"SPI
#-----------------------
# RT6855A DRAM
#-----------------------
choice 'DRAM Type' "SDR ON_BOARD_SDR \
DDR1 ON_BOARD_DDR1 \
DDR2 ON_BOARD_DDR2
"SDR
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'DRAM Component' "16Mb ON_BOARD_16M_DRAM_COMPONENT \
64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT
"128Mb
else
if [ "$ON_BOARD_DDR1" = "y" ]; then
choice 'DDR Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
"256Mb
else
if [ "$ON_BOARD_DDR2" = "y" ]; then
choice 'DDR Component' "256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT \
2048Mb ON_BOARD_2048M_DRAM_COMPONENT
"512Mb
fi
fi
define_bool ON_BOARD_DDR_WIDTH_16 y
fi
define_bool ON_BOARD_16BIT_DRAM_BUS y
#-----------------------
# RT6855A Option
#-----------------------
comment ""
if [ "$ON_BOARD_SPI_FLASH_COMPONENT" == "y" ]; then
#choice 'Ram/Rom version' "RAM UBOOT_RAM \
# ROM UBOOT_ROM
# " ROM
#choice 'Small Uboot/Config partition' "Normal_Partition_5_sectors NORMAL_UBOOT_PARTITION \
# Small_Partition_3_sectors SMALL_UBOOT_PARTITION
# " Normal_Partition_5_sectors
define_bool UBOOT_ROM y
define_bool UBOOT_RAM n
else
define_bool UBOOT_ROM n
define_bool UBOOT_RAM y
fi
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "W/LLLL RALINK_DEMO_BOARD_PVLAN \
LLLL/W RALINK_EV_BOARD_PVLAN
"
fi
bool "Dual Image" DUAL_IMAGE_SUPPORT
if [ "$ON_BOARD_NAND_FLASH_COMPONENT" = "y" ]; then
bool "Static DRAM Parameter" DRAM_PARAMETERS
if [ "$DRAM_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
hex " SDRAM_CFG0" DRAM_CFG0 11925282
hex " SDRAM_CFG1" DRAM_CFG1 8011088B
else
if [ "$ON_BOARD_DDR1" = "y" ]; then
hex " DDR_CFG0" DRAM_CFG0 352A2E34
hex " DDR_CFG1" DRAM_CFG1 202A2424
hex " DDR_CFG2" DDR_CFG2_SETTING 33
hex " DDR_CFG3" DDR_CFG3_SETTING 0
hex " DDR_CFG4" DDR_CFG4_SETTING 0
hex " DRAM_PAD_SETTING" DRAM_PAD_SETTING 00094054
else
if [ "$ON_BOARD_DDR2" = "y" ]; then
hex " DDR_CFG0" DRAM_CFG0 35A3238D
hex " DDR_CFG1" DRAM_CFG1 22322424
hex " DDR_CFG2" DDR_CFG2_SETTING 40000E43
hex " DDR_CFG3" DDR_CFG3_SETTING 10000400
hex " DDR_CFG4" DDR_CFG4_SETTING 0010080C
hex " DRAM_PAD_SETTING" DRAM_PAD_SETTING 00094054
fi
fi
fi
fi
fi
if [ "$UBOOT_RAM" = "y" ]; then
define_hex TEXT_BASE 0xa0200000
else
define_hex TEXT_BASE 0xBFC00000
fi
fi
#########################################################################################3
# MT7620
#########################################################################################3
if [ "$MT7620_FPGA_BOARD" = "y" -o "$MT7620_ASIC_BOARD" = "y" ]; then
define_bool MT7620_MP y
#-----------------------
# MT7620 GMAC
#-----------------------
choice 'Port 5 Connect to' "None P5_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P5_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P5_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P5_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P5_RMII_TO_MAC_MODE
" None
if [ "$P5_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
fi
if [ "$P5_RGMII_TO_MAC_MODE" = "y" ]; then
define_bool GPIOx_RESET_MODE y
fi
choice 'Port 4 Connect to' "None P4_MAC_TO_NONE_MODE \
Giga_Phy(RGMII) P4_MAC_TO_PHY_MODE \
Giga_SW/iNIC(RGMII) P4_RGMII_TO_MAC_MODE \
External_CPU(MII_RvMII) P4_MII_TO_MAC_MODE \
External_CPU(RvMII_MII) P4_RMII_TO_MAC_MODE
" None
if [ "$P4_MAC_TO_PHY_MODE" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR2 0x4
fi
#-----------------------
# MT7620 FLASH
#-----------------------
choice 'Flash Type' "NAND ON_BOARD_NAND_FLASH_COMPONENT \
SPI ON_BOARD_SPI_FLASH_COMPONENT
"SPI
if [ "$DUAL_IMAGE_SUPPORT" = "y" ]; then
choice 'Flash Size' "4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 4M
fi
#-----------------------
# MT7620 DRAM
#-----------------------
choice 'DRAM Type' "SDR ON_BOARD_SDR \
DDR1 ON_BOARD_DDR1 \
DDR2 ON_BOARD_DDR2
"SDR
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'DRAM Component' "64Mb ON_BOARD_64M_DRAM_COMPONENT \
128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT
" 128Mb
else
if [ "$ON_BOARD_DDR1" = "y" ]; then
choice 'DDR Component' "128Mb ON_BOARD_128M_DRAM_COMPONENT \
256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT
" 256Mb
else
if [ "$ON_BOARD_DDR2" = "y" ]; then
choice 'DDR Component' "256Mb ON_BOARD_256M_DRAM_COMPONENT \
512Mb ON_BOARD_512M_DRAM_COMPONENT \
1024Mb ON_BOARD_1024M_DRAM_COMPONENT \
2048Mb ON_BOARD_2048M_DRAM_COMPONENT
" 512Mb
fi
fi
fi
if [ "$ON_BOARD_DDR1" = "y" -o "$ON_BOARD_DDR2" = "y" ]; then
choice 'DDR Width' "8bits ON_BOARD_DDR_WIDTH_8 \
16bits ON_BOARD_DDR_WIDTH_16
" 16bits
fi
define_bool ON_BOARD_16BIT_DRAM_BUS y
#-----------------------
# MT7620 Option
#-----------------------
comment ""
define_bool PDMA_NEW y
define_bool RX_SCATTER_GATTER_DMA y
if [ "$ON_BOARD_SPI_FLASH_COMPONENT" == "y" ]; then
choice 'Ram/Rom version' "RAM UBOOT_RAM \
ROM UBOOT_ROM
" ROM
#choice 'Small Uboot/Config partition' "Normal_Partition_5_sectors NORMAL_UBOOT_PARTITION \
# Small_Partition_3_sectors SMALL_UBOOT_PARTITION
# " Normal_Partition_5_sectors
else
define_bool UBOOT_RAM y
fi
#
# Enable(uncomment) following line to enable the adjustment for CPU PLL settings in menuconfig,
# and then input: make mrproper;make menuconfig
#define_bool MT7620_CPU_PLL_PARAMETERS y
if [ "$MT7620_CPU_PLL_PARAMETERS" = "y" ]; then
if [ "$ON_BOARD_SDR" = "y" ]; then
choice 'CPU PLL source' "None CPLL_NONE \
AUX0 CPLL_FROM_480MHZ \
AUX1 CPLL_FROM_XTAL \
CONF CPLL_FROM_CONF
" None
else
choice 'CPU PLL source' "None CPLL_NONE \
AUX0 CPLL_FROM_480MHZ \
AUX1 CPLL_FROM_XTAL \
CONF CPLL_FROM_CONF
" CONF
fi
if [ "$CPLL_NONE" = "n" ]; then
define_hex CPU_PLL_PARAMETERS 1
fi
if [ "$CPLL_FROM_CONF" = "y" ]; then
choice ' PLL_MULTI_RATIO conf' "24 MT7620_PLL_MULTI_RATIO_24 \
25 MT7620_PLL_MULTI_RATIO_25 \
26 MT7620_PLL_MULTI_RATIO_26 \
27 MT7620_PLL_MULTI_RATIO_27 \
28 MT7620_PLL_MULTI_RATIO_28 \
29 MT7620_PLL_MULTI_RATIO_29 \
30 MT7620_PLL_MULTI_RATIO_30 \
" 29
if [ "$MT7620_PLL_MULTI_RATIO_24" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 0
fi
if [ "$MT7620_PLL_MULTI_RATIO_25" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 1
fi
if [ "$MT7620_PLL_MULTI_RATIO_26" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 2
fi
if [ "$MT7620_PLL_MULTI_RATIO_27" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 3
fi
if [ "$MT7620_PLL_MULTI_RATIO_28" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 4
fi
if [ "$MT7620_PLL_MULTI_RATIO_29" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 5
fi
if [ "$MT7620_PLL_MULTI_RATIO_30" = "y" ]; then
define_hex CPLL_MULTI_RATIO_CFG 6
fi
choice ' PLL_DIV_RATIO conf' "2 MT7620_PLL_DIV_RATIO_2 \
3 MT7620_PLL_DIV_RATIO_3 \
4 MT7620_PLL_DIV_RATIO_4 \
" 2
if [ "$MT7620_PLL_DIV_RATIO_2" = "y" ]; then
define_hex CPLL_DIV_RATIO_CFG 0
fi
if [ "$MT7620_PLL_DIV_RATIO_3" = "y" ]; then
define_hex CPLL_DIV_RATIO_CFG 1