mainboards/asrock/e350m1: Use driver for Nuvoton NCT5572D superio chip

On the ASRock E350M1 a Nuvoton NCT5572D is used as SuperIO-chip. The coreboot
port to this board however used the driver of the Winbond W83627HF SuperIO,
which is compatible enough to get most stuff working, but which clears bit 6 in
register 0x2B. This switches the function of pin 38 of the NCT5572D from
RSTOUT1# output to GP36. The PERST# pin of the ethernet chip and the
unpopulated miniPCIe slot are connected to this pin, so they didn't get reset
during a reboot.

Using the newly added driver for the Nuvoton NCT5572D fixes this problem.

There is also a trace from the pin 37 of the SuperIO, which can be configured
as RSTOUT2#, to pin 82 of the USB3-chip with unknown function.

As with the wrong driver, PS/2 keyboard and mouse do work in SeaBIOS and GRUB
but not in Linux.

Change-Id: I4bc78406afd3b0e10a1b04b561147e0ed94cc494
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: http://review.coreboot.org/6266
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Felix Held 2014-07-19 00:21:43 +02:00 committed by Nico Huber
parent 16407abddd
commit c1869666f0
4 changed files with 25 additions and 29 deletions

View File

@ -24,11 +24,6 @@
#include "SB800.h" #include "SB800.h"
#include <stdlib.h> #include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
*
* Board is known to have some issues with integrated NIC and
* might need implementation to drive some GPIOs.
*/
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr); static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
@ -100,6 +95,9 @@ static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *Config
TempData8 |= Data8; TempData8 |= Data8;
Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, TempData8); Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, TempData8);
/* this seems to be just copy-pasted from the AMD reference boards and needs
* some investigation
*/
switch(MemData->ParameterListPtr->DDR3Voltage){ switch(MemData->ParameterListPtr->DDR3Voltage){
case VOLT1_35: case VOLT1_35:
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178); Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);

View File

@ -24,7 +24,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select CPU_AMD_AGESA_FAMILY14 select CPU_AMD_AGESA_FAMILY14
select NORTHBRIDGE_AMD_AGESA_FAMILY14 select NORTHBRIDGE_AMD_AGESA_FAMILY14
select SOUTHBRIDGE_AMD_CIMX_SB800 select SOUTHBRIDGE_AMD_CIMX_SB800
select SUPERIO_WINBOND_W83627HF select SUPERIO_NUVOTON_NCT5572D
select SB_SUPERIO_HWM select SB_SUPERIO_HWM
select HAVE_OPTION_TABLE select HAVE_OPTION_TABLE
select HAVE_PIRQ_TABLE select HAVE_PIRQ_TABLE

View File

@ -54,22 +54,15 @@ chip northbridge/amd/agesa/family14/root_complex
end # SM end # SM
device pci 14.1 on end # IDE 0x439c device pci 14.1 on end # IDE 0x439c
device pci 14.2 on end # HDA 0x4383 device pci 14.2 on end # HDA 0x4383
device pci 14.3 on # LPC 0x439d device pci 14.3 on # LPC
chip superio/winbond/w83627hf chip superio/nuvoton/nct5572d
device pnp 2e.0 off # Floppy device pnp 2e.0 off end # FDC; not externally available on the NCT5572D, but on the die
io 0x60 = 0x3f0 device pnp 2e.1 off end # LPT1; same as FDC
irq 0x70 = 6
drq 0x74 = 2
end
device pnp 2e.1 off # Parallel Port
io 0x60 = 0x378
irq 0x70 = 7
end
device pnp 2e.2 on # Com1 device pnp 2e.2 on # Com1
io 0x60 = 0x3f8 io 0x60 = 0x3f8
irq 0x70 = 4 irq 0x70 = 4
end end
device pnp 2e.3 off # Com2 device pnp 2e.3 off # IR
io 0x60 = 0x2f8 io 0x60 = 0x2f8
irq 0x70 = 3 irq 0x70 = 3
end end
@ -81,19 +74,24 @@ chip northbridge/amd/agesa/family14/root_complex
end end
device pnp 2e.6 off # CIR device pnp 2e.6 off # CIR
io 0x60 = 0x100 io 0x60 = 0x100
irq 0x70 = 0
end end
device pnp 2e.7 off # GAME_MIDI_GIPO1 device pnp 2e.7 off end # GIPO689
io 0x60 = 0x220 device pnp 2e.8 off end # WDT
io 0x62 = 0x300 device pnp 2e.9 off end # GPIO235
irq 0x70 = 9
end
device pnp 2e.8 off end # GPIO2
device pnp 2e.9 off end # GPIO3
device pnp 2e.a on end # ACPI device pnp 2e.a on end # ACPI
device pnp 2e.b on # HW Monitor device pnp 2e.b on # HW Monitor
io 0x60 = 0x290 io 0x60 = 0x290
io 0x62 = 0x0000 # SB-TSI currently not implemented
irq 0x70 = 5 irq 0x70 = 5
end end
device pnp 2e.c off end # PECI
device pnp 2e.d off end # SUSLED
device pnp 2e.e off # CIRWKUP
io 0x60 = 0x0000
irq 0x70 = 0
end
device pnp 2e.f off end # GPIO_PP_OD
end end
end #LPC end #LPC
device pci 14.4 on end # PCIB 0x4384, NOTE: PCI interface pins shared with GPIO {GPIO 35:0} device pci 14.4 on end # PCIB 0x4384, NOTE: PCI interface pins shared with GPIO {GPIO 35:0}

View File

@ -33,14 +33,14 @@
#include "agesawrapper.h" #include "agesawrapper.h"
#include <northbridge/amd/agesa/agesawrapper_call.h> #include <northbridge/amd/agesa/agesawrapper_call.h>
#include "cpu/x86/bist.h" #include "cpu/x86/bist.h"
#include <superio/winbond/common/winbond.h> #include <superio/nuvoton/common/nuvoton.h>
#include <superio/winbond/w83627hf/w83627hf.h> #include <superio/nuvoton/nct5572d/nct5572d.h>
#include "cpu/x86/lapic.h" #include "cpu/x86/lapic.h"
#include <sb_cimx.h> #include <sb_cimx.h>
#include "SBPLATFORM.h" #include "SBPLATFORM.h"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1) #define SERIAL_DEV PNP_DEV(0x2e, NCT5572D_SP1)
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
{ {
@ -61,7 +61,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
sb_Poweron_Init(); sb_Poweron_Init();
post_code(0x31); post_code(0x31);
winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
console_init(); console_init();
} }