Add the AMD Torpedo mainboard
[coreboot.git] / src / mainboard / amd / torpedo / cfg.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 Advanced Micro Devices, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18  */
19
20
21 #ifndef _SB900_CFG_H_
22 #define _SB900_CFG_H_
23
24 #include <stdint.h>
25
26
27 /**
28  *   @section BIOSSize BIOSSize
29  *    @li <b>0</b> - 1M
30  *    @li <b>1</b> - 2M
31  *    @li <b>3</b> - 4M
32  *    @li <b>7</b> - 8M
33  *    In Hudson-2, default ROM size is 1M Bytes, if your platform
34  *  ROM bigger then 1M you have to set the ROM size outside CIMx
35  *  module and before AGESA module get call.
36  */
37 #define BIOS_SIZE_1M                    0
38 #define BIOS_SIZE_2M                    1
39 #define BIOS_SIZE_4M                    3
40 #define BIOS_SIZE_8M                    7
41
42 #ifndef BIOS_SIZE
43 #if CONFIG_COREBOOT_ROMSIZE_KB_1024 == 1
44   #define BIOS_SIZE BIOS_SIZE_1M
45 #elif CONFIG_COREBOOT_ROMSIZE_KB_2048 == 1
46   #define BIOS_SIZE BIOS_SIZE_2M
47 #elif CONFIG_COREBOOT_ROMSIZE_KB_4096 == 1
48   #define BIOS_SIZE BIOS_SIZE_4M
49 #elif CONFIG_COREBOOT_ROMSIZE_KB_8192 == 1
50   #define BIOS_SIZE BIOS_SIZE_8M
51 #endif
52 #endif
53
54 /**
55  *   @section SBCIMx_LEGACY_FREE SBCIMx_LEGACY_FREE
56  *    @li <b>1</b> - Legacy free enable
57  *    @li <b>0</b> - Legacy free disable
58  */
59 #ifndef SBCIMx_LEGACY_FREE
60   #define SBCIMx_LEGACY_FREE        0
61 #endif
62
63 /**
64  *   @section SpiSpeed
65  *    @li <b>0</b> - Disable
66  *    @li <b>1</b> - Enable
67  */
68 #ifndef SBCIMX_SPI_SPEED
69   #define SBCIMX_SPI_SPEED 0
70 #endif
71
72 /**
73  *   @section SpiFastSpeed
74  *    @li <b>0</b> - Disable
75  *    @li <b>1</b> - Enable
76  */
77 #ifndef SBCIMX_SPI_FASTSPEED
78   #define SBCIMX_SPI_FASTSPEED 0
79 #endif
80
81 /**
82  *   @section SpiMode
83  *    @li <b>0</b> - Disable
84  *    @li <b>1</b> - Enable
85  */
86 #ifndef SBCIMX_SPI_MODE
87   #define SBCIMX_SPI_MODE 0
88 #endif
89
90 /**
91  *   @section SpiBurstWrite
92  *    @li <b>0</b> - Disable
93  *    @li <b>1</b> - Enable
94  */
95 #ifndef SBCIMX_SPI_BURST_WRITE
96   #define SBCIMX_SPI_BURST_WRITE 0
97 #endif
98
99 /**
100  *   @section INCHIP_EC_KBD INCHIP_EC_KBD
101  *    @li <b>0</b> - Use SIO PS/2 function.
102  *    @li <b>1</b> - Use EC PS/2 function.
103  */
104 #ifndef INCHIP_EC_KBD
105   #define INCHIP_EC_KBD             0
106 #endif
107
108 /**
109  *   @section INCHIP_EC_CHANNEL10 INCHIP_EC_CHANNEL10
110  *    @li <b>0</b> - EC controller NOT support Channel10
111  *    @li <b>1</b> - EC controller support Channel10.
112  */
113 #ifndef INCHIP_EC_CHANNEL10
114   #define INCHIP_EC_CHANNEL10       1
115 #endif
116
117 /**
118  *   @section Smbus0BaseAddress
119  */
120 // #ifndef SMBUS0_BASE_ADDRESS
121 //  #define SMBUS0_BASE_ADDRESS 0xB00
122 // #endif
123
124 /**
125  *   @section Smbus1BaseAddress
126  */
127 // #ifndef SMBUS1_BASE_ADDRESS
128 //   #define SMBUS1_BASE_ADDRESS 0xB21
129 // #endif
130
131 /**
132  *   @section SioPmeBaseAddress
133  */
134 // #ifndef SIO_PME_BASE_ADDRESS
135 //   #define SIO_PME_BASE_ADDRESS 0xE00
136 // #endif
137
138 /**
139  *   @section WatchDogTimerBase
140  */
141 // #ifndef WATCHDOG_TIMER_BASE_ADDRESS
142 //   #define WATCHDOG_TIMER_BASE_ADDRESS 0xFEC00000
143 // #endif
144
145 /**
146  *   @section GecShadowRomBase
147  */
148 #ifndef GEC_ROM_SHADOW_ADDRESS
149   #define GEC_ROM_SHADOW_ADDRESS 0xFED61000
150 #endif
151
152 /**
153  *   @section SpiRomBaseAddress
154  */
155 // #ifndef SPI_BASE_ADDRESS
156 //   #define SPI_BASE_ADDRESS 0xFEC10000
157 // #endif
158
159 /**
160  *   @section AcpiPm1EvtBlkAddr
161  */
162 // #ifndef PM1_EVT_BLK_ADDRESS
163 //   #define PM1_EVT_BLK_ADDRESS 0x400
164 // #endif
165
166 /**
167  *   @section AcpiPm1CntBlkAddr
168  */
169 // #ifndef PM1_CNT_BLK_ADDRESS
170 //   #define PM1_CNT_BLK_ADDRESS 0x404
171 // #endif
172
173 /**
174  *   @section AcpiPmTmrBlkAddr
175  */
176 // #ifndef PM1_TMR_BLK_ADDRESS
177 //   #define PM1_TMR_BLK_ADDRESS 0x408
178 // #endif
179
180 /**
181  *   @section CpuControlBlkAddr
182  */
183 // #ifndef CPU_CNT_BLK_ADDRESS
184 //   #define CPU_CNT_BLK_ADDRESS 0x410
185 // #endif
186
187 /**
188  *   @section AcpiGpe0BlkAddr
189  */
190 // #ifndef GPE0_BLK_ADDRESS
191 //   #define GPE0_BLK_ADDRESS 0x420
192 // #endif
193
194 /**
195  *   @section SmiCmdPortAddr
196  */
197 // #ifndef SMI_CMD_PORT
198 //   #define SMI_CMD_PORT 0xB0
199 // #endif
200
201 /**
202  *   @section AcpiPmaCntBlkAddr
203  */
204 // #ifndef ACPI_PMA_CNT_BLK_ADDRESS
205 //   #define ACPI_PMA_CNT_BLK_ADDRESS 0xFE00
206 // #endif
207
208 /**
209  *   @section SataController
210  *    @li <b>0</b> - Disable
211  *    @li <b>1</b> - Enable
212  */
213 #ifndef INCHIP_SATA_CONTROLLER
214   #define INCHIP_SATA_CONTROLLER    1
215 #endif
216
217 /**
218  *  @section SataIdeCombMdPriSecOpt
219  *    @li <b>0</b> - Primary
220  *    @li <b>1</b> - Secondary<TD></TD>
221  *  Sata Controller set as primary or
222  *      secondary while Combined Mode is enabled
223  */
224 #ifndef SATA_COMBINE_MODE_CHANNEL
225   #define SATA_COMBINE_MODE_CHANNEL 0
226 #endif
227
228 /**
229  *   @section SataSetMaxGen2
230  *    @li <b>0</b> - Disable
231  *    @li <b>1</b> - Enable
232  *    SataController Set to Max Gen2 mode
233  */
234 #ifndef SATA_MAX_GEN2_MODE
235   #define SATA_MAX_GEN2_MODE        0
236 #endif
237
238 /**
239  *   @section SataIdeCombinedMode
240  *    @li <b>0</b> - Disable
241  *    @li <b>1</b> - Enable
242  *    Sata IDE Controller set to Combined Mode
243  */
244 #ifndef SATA_COMBINE_MODE
245   #define SATA_COMBINE_MODE         0
246 #endif
247
248 #define SATA_CLK_RESERVED           9
249
250 /**
251  *   @section NbSbGen2
252  *    @li <b>0</b> - Disable
253  *    @li <b>1</b> - Enable
254  */
255 #ifndef NB_SB_GEN2
256   #define NB_SB_GEN2 1
257 #endif
258
259 /**
260  *   @section SataInternal100Spread
261  *    @li <b>0</b> - Disable
262  *    @li <b>1</b> - Enable
263  */
264 #ifndef INCHIP_SATA_INTERNAL_100_SPREAD
265   #define INCHIP_SATA_INTERNAL_100_SPREAD     0
266 #endif
267
268 /**
269  *   @section Cg2Pll
270  *    @li <b>0</b> - Disable
271  *    @li <b>1</b> - Enable
272  */
273 #ifndef INCHIP_CG2_PLL
274   #define INCHIP_CG2_PLL 0
275 #endif
276
277
278
279
280 /**
281  *   @section SpreadSpectrum
282  *    @li <b>0</b> - Disable
283  *    @li <b>1</b> - Enable
284  *    Spread Spectrum function
285  */
286 #define INCHIP_SPREAD_SPECTRUM     1
287
288 /**
289  *   @section INCHIP_USB_CINFIG INCHIP_USB_CINFIG
290  *
291  * - Usb Ohci1 Contoller is define at BIT0
292  *    0:Disable 1:Enable
293  *                             (Bus 0 Dev 18 Func0)
294  * - Usb Ehci1 Contoller is define at BIT1
295  *    0:Disable 1:Enable
296  *                             (Bus 0 Dev 18 Func2)
297  * - Usb Ohci2 Contoller is define at BIT2
298  *    0:Disable 1:Enable
299  *                             (Bus 0 Dev 19 Func0)
300  * - Usb Ehci2 Contoller is define at BIT3
301  *    0:Disable 1:Enable
302  *                             (Bus 0 Dev 19 Func2)
303  * - Usb Ohci3 Contoller is define at BIT4
304  *    0:Disable 1:Enable
305  *                             (Bus 0 Dev 22 Func0)
306  * - Usb Ehci3 Contoller is define at BIT5
307  *    0:Disable 1:Enable
308  *                             (Bus 0 Dev 22 Func2)
309  * - Usb Ohci4 Contoller is define at BIT6
310  *    0:Disable 1:Enable
311  *                             (Bus 0 Dev 20 Func5)
312  */
313 #define INCHIP_USB_CINFIG          0x7F
314 #define INCHIP_USB_OHCI1_CINFIG    0x01
315 #define INCHIP_USB_OHCI2_CINFIG    0x01
316 #if CONFIG_ONBOARD_USB30 == 1
317 #define INCHIP_USB_OHCI3_CINFIG    0x00
318 #else
319 #define INCHIP_USB_OHCI3_CINFIG    0x01
320 #endif
321 #define INCHIP_USB_OHCI4_CINFIG    0x01
322 #define INCHIP_USB_EHCI1_CINFIG    0x01
323 #define INCHIP_USB_EHCI2_CINFIG    0x01
324 #define INCHIP_USB_EHCI3_CINFIG    0x01
325
326 /**
327  *   @section INCHIP_SATA_MODE INCHIP_SATA_MODE
328  *    @li <b>000</b> - Native IDE mode
329  *    @li <b>001</b> - RAID mode
330  *    @li <b>010</b> - AHCI mode
331  *    @li <b>011</b> - Legacy IDE mode
332  *    @li <b>100</b> - IDE->AHCI mode
333  *    @li <b>101</b> - AHCI mode as 7804 ID (AMD driver)
334  *    @li <b>110</b> - IDE->AHCI mode as 7804 ID (AMD driver)
335  */
336 #define INCHIP_SATA_MODE           0
337
338 /**
339  *   @section INCHIP_IDE_MODE INCHIP_IDE_MODE
340  *    @li <b>0</b> - Legacy IDE mode
341  *    @li <b>1</b> - Native IDE mode<TD></TD>
342  *     ** DO NOT ALLOW SATA & IDE use same mode **
343  */
344 #define INCHIP_IDE_MODE            1
345
346 #define SATA_PORT_MULT_CAP_RESERVED  1
347
348 /**
349  *   @section INCHIP_AZALIA_CONTROLLER INCHIP_AZALIA_CONTROLLER
350  *    @li <b>0</b> - Auto   : Detect Azalia controller automatically.
351  *    @li <b>1</b> - Diable : Disable Azalia controller.
352  *    @li <b>2</b> - Enable : Enable Azalia controller.
353  */
354 #define INCHIP_AZALIA_CONTROLLER   2
355 #define AZALIA_AUTO                             0
356 #define AZALIA_DISABLE                  1
357 #define AZALIA_ENABLE                   2
358
359 /**
360  *   @section INCHIP_AZALIA_PIN_CONFIG INCHIP_AZALIA_PIN_CONFIG
361  *    @li <b>0</b> - disable
362  *    @li <b>1</b> - enable
363  */
364 #define INCHIP_AZALIA_PIN_CONFIG   1
365
366 /**
367  *   @section AZALIA_PIN_CONFIG AZALIA_PIN_CONFIG
368  *
369  * SDIN0 is define at BIT0 & BIT1
370  *   - 00: GPIO PIN
371  *   - 01: Reserved
372  *   - 10: As a Azalia SDIN pin<TD></TD>
373  * SDIN1 is define at BIT2 & BIT3
374  *   - 00: GPIO PIN
375  *   - 01: Reserved
376  *   - 10: As a Azalia SDIN pin<TD></TD>
377  * SDIN2 is define at BIT4 & BIT5
378  *   - 00: GPIO PIN
379  *   - 01: Reserved
380  *   - 10: As a Azalia SDIN pin<TD></TD>
381  * SDIN3 is define at BIT6 & BIT7
382  *   - 00: GPIO PIN
383  *   - 01: Reserved
384  *   - 10: As a Azalia SDIN pin
385  */
386 #define AZALIA_PIN_CONFIG          0x2A
387
388 /**
389  *   @section AzaliaSnoop
390  *    @li <b>0</b> - disable
391  *    @li <b>1</b> - enable *
392  */
393 #define INCHIP_AZALIA_SNOOP        0x01
394
395 /**
396  *   @section NCHIP_GEC_CONTROLLER
397  *    @li <b>0</b> - Enable *
398  *    @li <b>1</b> - Disable
399  */
400 #define INCHIP_GEC_CONTROLLER      0x00
401
402 /**
403  *   @section SB_HPET_TIMER SB_HPET_TIMER
404  *    @li <b>0</b> - Disable
405  *    @li <b>1</b> - Enable
406  */
407 #define SB_HPET_TIMER              1
408
409 /**
410  *   @section SB_GPP_CONTROLLER SB_GPP_CONTROLLER
411  *    @li <b>0</b> - Disable
412  *    @li <b>1</b> - Enable
413  */
414 #define SB_GPP_CONTROLLER          1
415
416 /**
417  *   @section GPP_LINK_CONFIG GPP_LINK_CONFIG
418  *    @li  <b>0000</b> - Port ABCD -> 4:0:0:0
419  *    @li  <b>0001</b> - N/A
420  *    @li  <b>0010</b> - Port ABCD -> 2:2:0:0
421  *    @li  <b>0011</b> - Port ABCD -> 2:1:1:0
422  *    @li  <b>0100</b> - Port ABCD -> 1:1:1:1
423  */
424 #define GPP_LINK_CONFIG          4
425
426 /**
427  *   @section SB_GPP_PORT0 SB_GPP_PORT0
428  *    @li <b>0</b> - Disable
429  *    @li <b>1</b> - Enable
430  */
431 #define SB_GPP_PORT0               1
432
433 /**
434  *   @section SB_GPP_PORT1 SB_GPP_PORT1
435  *    @li <b>0</b> - Disable
436  *    @li <b>1</b> - Enable
437  */
438 #define SB_GPP_PORT1               1
439
440 /**
441  *   @section SB_GPP_PORT2 SB_GPP_PORT2
442  *    @li <b>0</b> - Disable
443  *    @li <b>1</b> - Enable
444  */
445 #define SB_GPP_PORT2               1
446
447 /**
448  *   @section SB_GPP_PORT3 SB_GPP_PORT3
449  *    @li <b>0</b> - Disable
450  *    @li <b>1</b> - Enable
451  */
452 #define SB_GPP_PORT3               1
453
454 /**
455  *   @section SB_IR_CONTROLLER
456  *    @li <b>00 </b> - disable
457  *    @li <b>01 </b> - Rx and Tx0
458  *    @li <b>10 </b> - Rx and Tx1
459  *    @li <b>11 </b> - Rx and both Tx0,Tx1
460  */
461 #define SB_IR_CONTROLLER           3
462
463 /**
464  *   @section INCHIP_USB_PHY_POWER_DOWN
465  *    @li <b>0</b> - Disable
466  *    @li <b>1</b> - Enable
467  */
468 #define INCHIP_USB_PHY_POWER_DOWN  0
469
470 /**
471  *   @section INCHIP_NATIVE_PCIE_SUPPOORT
472  *    @li <b>0</b> - Disable
473  *    @li <b>1</b> - Enable
474  */
475 #define INCHIP_NATIVE_PCIE_SUPPOORT 1
476
477 /**
478  *   @section INCHIP_NB_SB_GEN2
479  *    @li <b>0</b> - Disable
480  *    @li <b>1</b> - Enable
481  */
482 #define INCHIP_NB_SB_GEN2           1
483
484 /**
485  *   @section INCHIP_GPP_GEN2
486  *    @li <b>0</b> - Disable
487  *    @li <b>1</b> - Enable
488  */
489 #define INCHIP_GPP_GEN2             1
490
491 /**
492  *   @section INCHIP_GPP_MEMORY_WRITE_IMPROVE
493  *    @li <b>0</b> - Disable
494  *    @li <b>1</b> - Enable
495  */
496 #define INCHIP_GPP_MEMORY_WRITE_IMPROVE  1
497
498 /**
499  *   @section INCHIP_GEC_PHY_STATUS
500  *    @li <b>0</b> - Gb PHY Mode *
501  *    @li <b>1</b> - 100/10 PHY Mode
502  */
503 #define INCHIP_GEC_PHY_STATUS       0
504
505 /**
506  *   @section INCHIP_GEC_POWER_POLICY
507  *    @li <b>0</b> - S3/S5
508  *    @li <b>1</b> - S5
509  *    @li <b>2</b> - S3
510  *    @li <b>3</b> - Never power down *
511  */
512 #define INCHIP_GEC_POWER_POLICY     3
513
514 /**
515  *   @section INCHIP_GEC_DEBUGBUS
516  *    @li <b>0</b> - Disable *
517  *    @li <b>1</b> - Enable
518  */
519 #define INCHIP_GEC_DEBUGBUS         0
520
521 /**
522  *   @section SATA_MAX_GEN2_MODE SATA_MAX_GEN2_MODE
523  *    @li <b>0</b> - Disable *
524  *    @li <b>1</b> - Enable
525  *    SataController Set to Max Gen2 mode
526  */
527 #define SATA_MAX_GEN2_MODE        0
528
529 /**
530  *   @section INCHIP_SATA_AGGR_LINK_PM_CAP
531  *    @li <b>0</b> - Disable
532  *    @li <b>1</b> - Enable *
533  *    SataController Set to aggressive link PM capability
534  */
535 #define INCHIP_SATA_AGGR_LINK_PM_CAP  0
536
537 /**
538  *   @section INCHIP_SATA_PORT_MULT_CAP
539  *    @li <b>0</b> - Disable
540  *    @li <b>1</b> - Enable *
541  *    SataController Set to Port Multiple capability
542  */
543 #define INCHIP_SATA_PORT_MULT_CAP     1
544
545 /**
546  *   @section INCHIP_SATA_PSC_CAP
547  *    @li <b>0</b> - Disable
548  *    @li <b>1</b> - Enable *
549 */
550 #define INCHIP_SATA_PSC_CAP           0
551
552 /**
553  *   @section INCHIP_SATA_SSC_CAP
554  *    @li <b>0</b> - Disable
555  *    @li <b>1</b> - Enable *
556  */
557 #define INCHIP_SATA_SSC_CAP           0
558
559 /**
560  *   @section INCHIP_SATA_CLK_AUTO_OFF
561  *    @li <b>0</b> - Disable
562  *    @li <b>1</b> - Enable *
563  */
564 #define INCHIP_SATA_CLK_AUTO_OFF      1
565
566 /**
567  *   @section INCHIP_SATA_FIS_BASE_SW
568  *    @li <b>0</b> - Disable
569  *    @li <b>1</b> - Enable *
570  */
571 #define INCHIP_SATA_FIS_BASE_SW       1
572
573 /**
574  *   @section INCHIP_SATA_CCC_SUPPORT
575  *    @li <b>0</b> - Disable
576  *    @li <b>1</b> - Enable *
577  */
578 #define INCHIP_SATA_CCC_SUPPORT       1
579
580 /**
581  *   @section INCHIP_SATA_MSI_CAP
582  *    @li <b>0</b> - Disable
583  *    @li <b>1</b> - Enable *
584  */
585 #define INCHIP_SATA_MSI_CAP           1
586
587 /**
588  *   @section CIMXSB_SATA_TARGET_8DEVICE_CAP
589  *    @li <b>0</b> - Disable *
590  *    @li <b>1</b> - Enable
591  */
592 #define CIMXSB_SATA_TARGET_8DEVICE_CAP 0
593
594 /**
595  *   @section SATA_DISABLE_GENERIC_MODE
596  *    @li <b>0</b> - Disable *
597  *    @li <b>1</b> - Enable
598  */
599 #define SATA_DISABLE_GENERIC_MODE_CAP 0
600
601 /**
602  *   @section SATA_AHCI_ENCLOSURE_CAP
603  *    @li <b>0</b> - Disable *
604  *    @li <b>1</b> - Enable
605  */
606 #define SATA_AHCI_ENCLOSURE_CAP 0
607
608 /**
609  *   @section SataForceRaid (RISD5 mode)
610  *    @li <b>0</b> - Disable *
611  *    @li <b>1</b> - Enable
612  */
613 #define INCHIP_SATA_FORCE_RAID5    0
614
615 /**
616  *   @section SATA_GPIO_0_CAP
617  *    @li <b>0</b> - Disable *
618  *    @li <b>1</b> - Enable
619  */
620 #define SATA_GPIO_0_CAP 0
621
622 /**
623  *   @section SATA_GPIO_1_CAP
624  *    @li <b>0</b> - Disable *
625  *    @li <b>1</b> - Enable
626  */
627 #define SATA_GPIO_1_CAP 0
628
629 /**
630  *   @section SataPhyPllShutDown
631  *    @li <b>0</b> - Disable
632  *    @li <b>1</b> - Enable *
633  */
634 #define SATA_PHY_PLL_SHUTDOWN 1
635
636 /**
637  *   @section ImcEnableOverWrite
638  *    @li <b>0</b> - Disable
639  *    @li <b>1</b> - Enable
640  */
641 #define IMC_ENABLE_OVER_WRITE 0
642
643 /**
644  *   @section UsbMsi
645  *    @li <b>0</b> - Disable
646  *    @li <b>1</b> - Enable
647  */
648 #define USB_MSI 0
649
650 /**
651  *   @section HdAudioMsi
652  *    @li <b>0</b> - Disable
653  *    @li <b>1</b> - Enable
654  */
655 #define HDAUDIO_MSI 0
656
657 /**
658  *   @section LpcMsi
659  *    @li <b>0</b> - Disable
660  *    @li <b>1</b> - Enable
661  */
662 #define LPC_MSI 0
663
664 /**
665  *   @section PcibMsi
666  *    @li <b>0</b> - Disable
667  *    @li <b>1</b> - Enable
668  */
669 #define PCIB_MSI 0
670
671 /**
672  *   @section AbMsi
673  *    @li <b>0</b> - Disable
674  *    @li <b>1</b> - Enable
675  */
676 #define AB_MSI 0
677
678 /**
679  *   @section GecShadowRomBase
680  *    @li <b>0</b> - Disable
681  *    @li <b>1</b> - Enable *
682  */
683 #define GEC_SHADOWROM_BASE 0xFED61000
684
685 /**
686  *   @section SataController
687  *    @li <b>0</b> - Disable
688  *    @li <b>1</b> - Enable *
689  */
690 #define SATA_CONTROLLER 1
691
692 /**
693  *   @section SataIdeCombMdPriSecOpt
694  *    @li <b>0</b> - Disable
695  *    @li <b>1</b> - Enable
696  */
697 #define SATA_IDE_COMBMD_PRISEC_OPT 0
698
699 /**
700  *   @section SataIdeCombinedMode
701  *    @li <b>0</b> - Disable
702  *    @li <b>1</b> - Enable
703  */
704 #define SATA_IDECOMBINED_MODE 0
705
706 /**
707  *   @section sdConfig
708  *    @li <b>0</b> - Disable
709  *    @li <b>1</b> - Enable *
710  */
711 #define SB_SD_CONFIG 1
712
713 /**
714  *   @section sdSpeed
715  *    @li <b>0</b> - Disable
716  *    @li <b>1</b> - Enable *
717  */
718 #define SB_SD_SPEED 1
719
720 /**
721  *   @section sdBitwidth
722  *    @li <b>0</b> - Disable
723  *    @li <b>1</b> - Enable *
724  */
725 #define SB_SD_BITWIDTH 1
726
727 /**
728  *   @section SataDisUnusedIdePChannel
729  *    @li <b>0</b> - Disable
730  *    @li <b>1</b> - Enable
731  */
732 #define SATA_DISUNUSED_IDE_P_CHANNEL 0
733
734 /**
735  *   @section SataDisUnusedIdeSChannel
736  *    @li <b>0</b> - Disable
737  *    @li <b>1</b> - Enable
738  */
739 #define SATA_DISUNUSED_IDE_S_CHANNEL 0
740
741 /**
742  *   @section IdeDisUnusedIdePChannel
743  *    @li <b>0</b> - Disable
744  *    @li <b>1</b> - Enable
745  */
746 #define IDE_DISUNUSED_IDE_P_CHANNEL 0
747
748 /**
749  *   @section IdeDisUnusedIdeSChannel
750  *    @li <b>0</b> - Disable
751  *    @li <b>1</b> - Enable
752  */
753 #define IDE_DISUNUSED_IDE_S_CHANNEL 0
754
755 /**
756  *   @section IdeDisUnusedIdeSChannel
757  *    @li <b>0</b> - Disable
758  *    @li <b>1</b> - Enable
759  */
760
761 /**
762  *   @section SataEspPort0
763  *    @li <b>0</b> - Disable
764  *    @li <b>1</b> - Enable
765  */
766 #define SATA_ESP_PORT0 0
767
768 /**
769  *   @section  SataEspPort1
770  *    @li <b>0</b> - Disable
771  *    @li <b>1</b> - Enable
772  */
773 #define SATA_ESP_PORT1 0
774
775 /**
776  *   @section  SataEspPort2
777  *    @li <b>0</b> - Disable
778  *    @li <b>1</b> - Enable
779  */
780 #define SATA_ESP_PORT2 0
781
782 /**
783  *   @section  SataEspPort3
784  *    @li <b>0</b> - Disable
785  *    @li <b>1</b> - Enable
786  */
787 #define SATA_ESP_PORT3 0
788
789 /**
790  *   @section  SataEspPort4
791  *    @li <b>0</b> - Disable
792  *    @li <b>1</b> - Enable
793  */
794 #define SATA_ESP_PORT4 0
795
796 /**
797  *   @section  SataEspPort5
798  *    @li <b>0</b> - Disable
799  *    @li <b>1</b> - Enable
800  */
801 #define SATA_ESP_PORT5 0
802
803 /**
804  *   @section  SataEspPort6
805  *    @li <b>0</b> - Disable
806  *    @li <b>1</b> - Enable
807  */
808 #define SATA_ESP_PORT6 0
809
810 /**
811  *   @section  SataEspPort7
812  *    @li <b>0</b> - Disable
813  *    @li <b>1</b> - Enable
814  */
815 #define SATA_ESP_PORT7 0
816
817 /**
818  *   @section  SataPortPower0
819  *    @li <b>0</b> - Disable
820  *    @li <b>1</b> - Enable
821  */
822 #define SATA_PORT_POWER_PORT0 0
823
824 /**
825  *   @section  SataPortPower1
826  *    @li <b>0</b> - Disable
827  *    @li <b>1</b> - Enable
828  */
829 #define SATA_PORT_POWER_PORT1 0
830
831 /**
832  *   @section  SataPortPower2
833  *    @li <b>0</b> - Disable
834  *    @li <b>1</b> - Enable
835  */
836 #define SATA_PORT_POWER_PORT2 0
837
838 /**
839  *   @section  SataPortPower3
840  *    @li <b>0</b> - Disable
841  *    @li <b>1</b> - Enable
842  */
843 #define SATA_PORT_POWER_PORT3 0
844
845 /**
846  *   @section  SataPortPower4
847  *    @li <b>0</b> - Disable
848  *    @li <b>1</b> - Enable
849  */
850 #define SATA_PORT_POWER_PORT4 0
851
852 /**
853  *   @section  SataPortPower5
854  *    @li <b>0</b> - Disable
855  *    @li <b>1</b> - Enable
856  */
857 #define SATA_PORT_POWER_PORT5 0
858
859 /**
860  *   @section  SataPortPower6
861  *    @li <b>0</b> - Disable
862  *    @li <b>1</b> - Enable
863  */
864 #define SATA_PORT_POWER_PORT6 0
865
866 /**
867  *   @section  SataPortPower7
868  *    @li <b>0</b> - Disable
869  *    @li <b>1</b> - Enable
870  */
871 #define SATA_PORT_POWER_PORT7 0
872
873 /**
874  *   @section  SataPortMd0
875  *    @li <b>0</b> - Disable
876  *    @li <b>1</b> - Enable
877  */
878 #define SATA_PORTMODE_PORT0 3
879
880 /**
881  *   @section  SataPortMd1
882  *    @li <b>0</b> - Disable
883  *    @li <b>1</b> - Enable
884  */
885 #define SATA_PORTMODE_PORT1 3
886
887 /**
888  *   @section  SataPortMd2
889  *    @li <b>0</b> - Disable
890  *    @li <b>1</b> - Enable
891  */
892 #define SATA_PORTMODE_PORT2 3
893
894 /**
895  *   @section  SataPortMd3
896  *    @li <b>0</b> - Disable
897  *    @li <b>1</b> - Enable
898  */
899 #define SATA_PORTMODE_PORT3 3
900
901 /**
902  *   @section  SataPortMd4
903  *    @li <b>0</b> - Disable
904  *    @li <b>1</b> - Enable
905  */
906 #define SATA_PORTMODE_PORT4 0
907
908 /**
909  *   @section  SataPortMd5
910  *    @li <b>0</b> - Disable
911  *    @li <b>1</b> - Enable
912  */
913 #define SATA_PORTMODE_PORT5 0
914
915 /**
916  *   @section  SataPortMd6
917  *    @li <b>0</b> - Disable
918  *    @li <b>1</b> - Enable
919  */
920 #define SATA_PORTMODE_PORT6 0
921
922 /**
923  *   @section  SataPortMd7
924  *    @li <b>0</b> - Disable
925  *    @li <b>1</b> - Enable
926  */
927 #define SATA_PORTMODE_PORT7 0
928
929 /**
930  *   @section  SataHotRemovelEnh0
931  *    @li <b>0</b> - Disable
932  *    @li <b>1</b> - Enable
933  */
934 #define SATA_HOTREMOVEL_ENH_PORT0 0
935
936 /**
937  *   @section  SataHotRemovelEnh1
938  *    @li <b>0</b> - Disable
939  *    @li <b>1</b> - Enable
940  */
941 #define SATA_HOTREMOVEL_ENH_PORT1 0
942
943 /**
944  *   @section  SataHotRemovelEnh2
945  *    @li <b>0</b> - Disable
946  *    @li <b>1</b> - Enable
947  */
948 #define SATA_HOTREMOVEL_ENH_PORT2 0
949
950 /**
951  *   @section  SataHotRemovelEnh3
952  *    @li <b>0</b> - Disable
953  *    @li <b>1</b> - Enable
954  */
955 #define SATA_HOTREMOVEL_ENH_PORT3 0
956
957 /**
958  *   @section  SataHotRemovelEnh4
959  *    @li <b>0</b> - Disable
960  *    @li <b>1</b> - Enable
961  */
962 #define SATA_HOTREMOVEL_ENH_PORT4 0
963
964 /**
965  *   @section  SataHotRemovelEnh5
966  *    @li <b>0</b> - Disable
967  *    @li <b>1</b> - Enable
968  */
969 #define SATA_HOTREMOVEL_ENH_PORT5 0
970
971 /**
972  *   @section  SataHotRemovelEnh6
973  *    @li <b>0</b> - Disable
974  *    @li <b>1</b> - Enable
975  */
976 #define SATA_HOTREMOVEL_ENH_PORT6 0
977
978 /**
979  *   @section  SataHotRemovelEnh7
980  *    @li <b>0</b> - Disable
981  *    @li <b>1</b> - Enable
982  */
983 #define SATA_HOTREMOVEL_ENH_PORT7 0
984
985 /**
986  *   @section  XhciSwitch
987  *    @li <b>0</b> - Disable
988  *    @li <b>1</b> - Enable
989  */
990 #if CONFIG_ONBOARD_USB30 == 1
991         #define SB_XHCI_SWITCH 0
992 #else
993 #define SB_XHCI_SWITCH 1
994 #endif
995
996 /**
997  *   @section  FrontPanelDetected
998  *    @li <b>0</b> - Disable
999  *    @li <b>1</b> - Enable
1000  */
1001 #define INCHIP_FRONT_PANEL_DETECTED 0
1002
1003 /**
1004  *   @section  AnyHT200MhzLink
1005  *    @li <b>0</b> - Disable
1006  *    @li <b>1</b> - Enable
1007  */
1008 #define INCHIP_ANY_HT_200MHZ_LINK 0
1009
1010 /**
1011  *   @section  PcibClkStopOverride
1012  *    @li <b>0</b> - Disable
1013  *    @li <b>1</b> - Enable
1014  */
1015 #define INCHIP_PCIB_CLK_STOP_OVERRIDE 0
1016
1017 /**
1018  *   @section  GppLinkConfig
1019  * @li  <b>0000</b> - Port ABCD -> 4:0:0:0
1020  * @li  <b>0001</b> - N/A
1021  * @li  <b>0010</b> - Port ABCD -> 2:2:0:0
1022  * @li  <b>0011</b> - Port ABCD -> 2:1:1:0
1023  * @li  <b>0100</b> - Port ABCD -> 1:1:1:1
1024  */
1025 #define INCHIP_GPP_LINK_CONFIG 4
1026
1027 /**
1028  *   @section  GppUnhidePorts
1029  *    @li <b>0</b> - Disable
1030  *    @li <b>1</b> - Enable
1031  */
1032 #define INCHIP_GPP_UNHIDE_PORTS 0
1033
1034 /**
1035  *   @section  GppPortAspm
1036  * @li   <b>01</b> - Disabled
1037  * @li   <b>01</b> - L0s
1038  * @li   <b>10</b> - L1
1039  * @li   <b>11</b> - L0s + L1
1040  */
1041 #define INCHIP_GPP_PORT_ASPM 3
1042
1043 /**
1044  *   @section  GppLaneReversal
1045  *    @li <b>0</b> - Disable
1046  *    @li <b>1</b> - Enable
1047  */
1048 #define INCHIP_GPP_LANEREVERSAL 0
1049
1050 /**
1051  *   @section  AlinkPhyPllPowerDown
1052  *    @li <b>0</b> - Disable
1053  *    @li <b>1</b> - Enable
1054  */
1055 #define INCHIP_ALINK_PHY_PLL_POWER_DOWN 1
1056
1057 /**
1058  *   @section  GppPhyPllPowerDown
1059  *    @li <b>0</b> - Disable
1060  *    @li <b>1</b> - Enable
1061  */
1062 #define INCHIP_GPP_PHY_PLL_POWER_DOWN 1
1063
1064 /**
1065  *   @section  GppDynamicPowerSaving
1066  *    @li <b>0</b> - Disable
1067  *    @li <b>1</b> - Enable
1068  */
1069 #define INCHIP_GPP_DYNAMIC_POWER_SAVING 1
1070
1071 /**
1072  *   @section  PcieAER
1073  *    @li <b>0</b> - Disable
1074  *    @li <b>1</b> - Enable
1075  */
1076 #define INCHIP_PCIE_AER 0
1077
1078 /**
1079  *   @section  PcieRAS
1080  *    @li <b>0</b> - Disable
1081  *    @li <b>1</b> - Enable
1082  */
1083 #define INCHIP_PCIE_RAS 0
1084
1085 /**
1086  *   @section  GppHardwareDowngrade
1087  *    @li <b>0</b> - Disable
1088  *    @li <b>1</b> - Enable
1089  */
1090 #define INCHIP_GPP_HARDWARE_DOWNGRADE 0
1091
1092 /**
1093  *   @section  GppToggleReset
1094  *    @li <b>0</b> - Disable
1095  *    @li <b>1</b> - Enable
1096  */
1097 #define INCHIP_GPP_TOGGLE_RESET 0
1098
1099 /**
1100  *   @section  SbPcieOrderRule
1101  *    @li <b>00</b> - Disable
1102  *    @li <b>01</b> - Rule 1
1103  *    @li <b>10</b> - Rule 2
1104  */
1105 #define INCHIP_SB_PCIE_ORDER_RULE 2
1106
1107 /**
1108  *   @section  AcDcMsg
1109  *    @li <b>0</b> - Disable
1110  *    @li <b>1</b> - Enable
1111  */
1112 #define INCHIP_ACDC_MSG 0
1113
1114 /**
1115  *   @section  TimerTickTrack
1116  *    @li <b>0</b> - Disable
1117  *    @li <b>1</b> - Enable
1118  */
1119 #define INCHIP_TIMER_TICK_TRACK 1
1120
1121 /**
1122  *   @section  ClockInterruptTag
1123  *    @li <b>0</b> - Disable
1124  *    @li <b>1</b> - Enable
1125  */
1126 #define INCHIP_CLOCK_INTERRUPT_TAG 1
1127
1128 /**
1129  *   @section  OhciTrafficHanding
1130  *    @li <b>0</b> - Disable
1131  *    @li <b>1</b> - Enable
1132  */
1133 #define INCHIP_OHCI_TRAFFIC_HANDING 0
1134
1135 /**
1136  *   @section  EhciTrafficHanding
1137  *    @li <b>0</b> - Disable
1138  *    @li <b>1</b> - Enable
1139  */
1140 #define INCHIP_EHCI_TRAFFIC_HANDING 0
1141
1142 /**
1143  *   @section  FusionMsgCMultiCore
1144  *    @li <b>0</b> - Disable
1145  *    @li <b>1</b> - Enable
1146  */
1147 #define INCHIP_FUSION_MSGC_MULTICORE 0
1148
1149 /**
1150  *   @section  FusionMsgCStage
1151  *    @li <b>0</b> - Disable
1152  *    @li <b>1</b> - Enable
1153  */
1154 #define INCHIP_FUSION_MSGC_STAGE 0
1155
1156 /**
1157  *   @section  ALinkClkGateOff
1158  *    @li <b>0</b> - Disable
1159  *    @li <b>1</b> - Enable
1160  */
1161 #define INCHIP_ALINK_CLK_GATE_OFF 0
1162
1163 /**
1164  *   @section  BLinkClkGateOff
1165  *    @li <b>0</b> - Disable
1166  *    @li <b>1</b> - Enable
1167  */
1168 #define INCHIP_BLINK_CLK_GATE_OFF 0
1169
1170 /**
1171  *   @section  SlowSpeedABlinkClock
1172  *    @li <b>0</b> - Disable
1173  *    @li <b>1</b> - Enable
1174  */
1175 #define INCHIP_SLOW_SPEED_ABLINK_CLOCK 0
1176
1177 /**
1178  *   @section  AbClockGating
1179  *    @li <b>0</b> - Disable
1180  *    @li <b>1</b> - Enable
1181  */
1182 #define INCHIP_AB_CLOCK_GATING 1
1183
1184 /**
1185  *   @section  GppClockGating
1186  *    @li <b>0</b> - Disable
1187  *    @li <b>1</b> - Enable
1188  */
1189 #define INCHIP_GPP_CLOCK_GATING 1
1190
1191 /**
1192  *   @section  L1TimerOverwrite
1193  *    @li <b>0</b> - Disable
1194  *    @li <b>1</b> - Enable
1195  */
1196 #define INCHIP_L1_TIMER_OVERWRITE 0
1197
1198 /**
1199  *   @section  UmiDynamicSpeedChange
1200  *    @li <b>0</b> - Disable
1201  *    @li <b>1</b> - Enable
1202  */
1203 #define INCHIP_UMI_DYNAMIC_SPEED_CHANGE 0
1204
1205 /**
1206  *   @section  SbAlinkGppTxDriverStrength
1207  *    @li <b>0</b> - Disable
1208  *    @li <b>1</b> - Enable
1209  */
1210 #define INCHIP_ALINK_GPP_TX_DRV_STRENGTH 0
1211
1212 /**
1213  *   @section  StressResetMode
1214  *    @li <b>0</b> - Disable
1215  *    @li <b>1</b> - Enable
1216  */
1217 #define INCHIP_STRESS_RESET_MODE 0
1218
1219 #ifndef SB_PCI_CLOCK_RESERVED
1220   #define SB_PCI_CLOCK_RESERVED      0x0 //according to CIMx change 0x1F
1221 #endif
1222
1223 /**
1224  * @brief South Bridge CIMx configuration
1225  *
1226  */
1227 void sb900_cimx_config(AMDSBCFG *sb_cfg);
1228 void SbPowerOnInit_Config(AMDSBCFG *sb_cfg);
1229
1230 /**
1231  * @brief Entry point of Southbridge CIMx callout
1232  *
1233  * prototype UINT32 (*SBCIM_HOOK_ENTRY)(UINT32 Param1, UINT32 Param2, void* pConfig)
1234  *
1235  * @param[in] func    Southbridge CIMx Function ID.
1236  * @param[in] data    Southbridge Input Data.
1237  * @param[in] sb_cfg  Southbridge configuration structure pointer.
1238  *
1239  */
1240 u32 sb900_callout_entry(u32 func, u32 data, void* sb_cfg);
1241
1242 #endif