Patchwork Coreboot for AMD Fusion family 14h: ASRock E350M1

login
register
about
Submitter Scott
Date 2011-02-24 06:05:58
Message ID <C3B6B7A72E0944D4B726F53279440809@m3a78>
Download mbox | patch
Permalink /patch/2688/
State New
Headers show

Comments

Scott - 2011-02-24 06:05:58
Peter wrote:

]Great! Use svn cp to create the directory, then put your changes in
]there, and then svn diff should create the corresponding small patch
]that you sent already. I'm happy to ack. This looks like a nice board
]for a media center system.
]
]//Peter

Thanks Peter. I accidentally did the 'svn cp' step interactively instead
of by patch. The attached patch completes the work of converting AMD
Persimmon into ASRock E350M1.

ASRock E350M1 is built from a branch of AMD Persimmon with these changes:

1) Replace SMSC KBC1100 with Winbond w83627hf.
2) Change the SPD address of the second DIMM slot.
3) Cosmetic changes.

A video option rom needs to be added to support the built-in uma graphics.

Thanks,
Scott
Peter Stuge - 2011-02-24 07:31:39
Scott Duplichan wrote:
> I accidentally did the 'svn cp' step interactively instead of by
> patch. The attached patch completes the work of converting AMD
> Persimmon into ASRock E350M1.

Good stuff. Some simple comments, then I'll ack.


> A video option rom needs to be added to support the built-in uma
> graphics.

Does the default filename match what was extracted from factory EFI?


> +++ src/mainboard/asrock/e350m1/dsdt.asl	(working copy)
> @@ -23,7 +23,7 @@
>  	"DSDT",                 /* Signature */
>  	0x02,		/* DSDT Revision, needs to be 2 for 64bit */
>  	"AMD   ",               /* OEMID */
> -	"PERSIMMO",	     /* TABLE ID */
> +	"E350M1  ",	     /* TABLE ID */

Also change AMD?


> +++ src/mainboard/asrock/e350m1/Kconfig	(working copy)
..
> @@ -64,7 +64,7 @@
>  
>  config MAINBOARD_PART_NUMBER
>          string
> -        default "Persimmon"
> +        default "e350m1"

I think this should be uppercase.

> -#define CONFIG_VGA_BIOS_ID "1002,9804"
> +#define CONFIG_VGA_BIOS_ID "1002,9802"

Why have this comment at all? Better just remove it.


> +++ src/mainboard/asrock/e350m1/mainboard.c	(working copy)
..
> -	printk(BIOS_INFO, "Mainboard Persimmon Enable. dev=0x%p\n", dev);
> +	printk(BIOS_INFO, "Mainboard E350M1 Enable. dev=0x%p\n", dev);

Please change to: "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable." ..


> @@ -110,6 +110,6 @@
>  	return 0;
>  }
>  struct chip_operations mainboard_ops = {
> -	CHIP_NAME("AMD PERSIMMON Mainboard")
> -	.enable_dev = persimmon_enable,
> +	CHIP_NAME("ASRock E350M1 Mainboard")
> +	.enable_dev = e350m1_enable,

Same here.
CHIP_NAME(CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_NUMBER " Mainboard")


> +++ src/mainboard/asrock/e350m1/romstage.c	(working copy)
..
> @@ -52,7 +52,7 @@
>      sb_poweron_init();
>  
>      post_code(0x31);
> -    f81865f_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
> +	w83627hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);

Whitespace?


//Peter
Stefan Reinauer - 2011-02-24 21:28:42
Any chance to move the SSDTs to the northbridge/southbridge/cpu
directory instead of having them live under mainboard?

* Scott Duplichan <scott@notabs.org> [110224 07:05]:
> Index: src/mainboard/asrock/e350m1/acpi/ssdt2.asl
> ===================================================================
> --- src/mainboard/asrock/e350m1/acpi/ssdt2.asl	(revision 6375)
> +++ src/mainboard/asrock/e350m1/acpi/ssdt2.asl	(working copy)
> @@ -17,7 +17,7 @@
>   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
>   */
>  
> -DefinitionBlock ("SSDT2.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
> +DefinitionBlock ("SSDT2.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
>  {
>  	Scope (_SB)
>  	{
> Index: src/mainboard/asrock/e350m1/acpi/ssdt3.asl
> ===================================================================
> --- src/mainboard/asrock/e350m1/acpi/ssdt3.asl	(revision 6375)
> +++ src/mainboard/asrock/e350m1/acpi/ssdt3.asl	(working copy)
> @@ -17,7 +17,7 @@
>   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
>   */
>  
> -DefinitionBlock ("SSDT3.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
> +DefinitionBlock ("SSDT3.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
>  {
>  	Scope (_SB)
>  	{
> Index: src/mainboard/asrock/e350m1/acpi/ssdt4.asl
> ===================================================================
> --- src/mainboard/asrock/e350m1/acpi/ssdt4.asl	(revision 6375)
> +++ src/mainboard/asrock/e350m1/acpi/ssdt4.asl	(working copy)
> @@ -17,7 +17,7 @@
>   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
>   */
>  
> -DefinitionBlock ("SSDT4.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
> +DefinitionBlock ("SSDT4.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
>  {
>  	Scope (_SB)
>  	{
> Index: src/mainboard/asrock/e350m1/acpi/ssdt5.asl
> ===================================================================
> --- src/mainboard/asrock/e350m1/acpi/ssdt5.asl	(revision 6375)
> +++ src/mainboard/asrock/e350m1/acpi/ssdt5.asl	(working copy)
> @@ -18,7 +18,7 @@
>   */
>  
>  
> -DefinitionBlock ("SSDT5.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
> +DefinitionBlock ("SSDT5.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
>  {
>  	Scope (_SB)
>  	{
Scott - 2011-02-25 01:27:49
Stefan Reinauer wrote:

]Any chance to move the SSDTs to the northbridge/southbridge/cpu
]directory instead of having them live under mainboard?

It looks like SSDT2,3,4,5 are never used and can be removed from 
this project.

Thanks,
Scott	{

Patch

Index: src/mainboard/asrock/e350m1/acpi/ssdt2.asl
===================================================================
--- src/mainboard/asrock/e350m1/acpi/ssdt2.asl	(revision 6375)
+++ src/mainboard/asrock/e350m1/acpi/ssdt2.asl	(working copy)
@@ -17,7 +17,7 @@ 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-DefinitionBlock ("SSDT2.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
+DefinitionBlock ("SSDT2.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
 {
 	Scope (_SB)
 	{
Index: src/mainboard/asrock/e350m1/acpi/ssdt3.asl
===================================================================
--- src/mainboard/asrock/e350m1/acpi/ssdt3.asl	(revision 6375)
+++ src/mainboard/asrock/e350m1/acpi/ssdt3.asl	(working copy)
@@ -17,7 +17,7 @@ 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-DefinitionBlock ("SSDT3.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
+DefinitionBlock ("SSDT3.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
 {
 	Scope (_SB)
 	{
Index: src/mainboard/asrock/e350m1/acpi/ssdt4.asl
===================================================================
--- src/mainboard/asrock/e350m1/acpi/ssdt4.asl	(revision 6375)
+++ src/mainboard/asrock/e350m1/acpi/ssdt4.asl	(working copy)
@@ -17,7 +17,7 @@ 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-DefinitionBlock ("SSDT4.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
+DefinitionBlock ("SSDT4.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
 {
 	Scope (_SB)
 	{
Index: src/mainboard/asrock/e350m1/acpi/ssdt5.asl
===================================================================
--- src/mainboard/asrock/e350m1/acpi/ssdt5.asl	(revision 6375)
+++ src/mainboard/asrock/e350m1/acpi/ssdt5.asl	(working copy)
@@ -18,7 +18,7 @@ 
  */
 
 
-DefinitionBlock ("SSDT5.aml", "SSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
+DefinitionBlock ("SSDT5.aml", "SSDT", 1, "AMD-FAM14", "AMDACPI", 100925440)
 {
 	Scope (_SB)
 	{
Index: src/mainboard/asrock/e350m1/devicetree.cb
===================================================================
--- src/mainboard/asrock/e350m1/devicetree.cb	(revision 6375)
+++ src/mainboard/asrock/e350m1/devicetree.cb	(working copy)
@@ -55,30 +55,46 @@ 
                                         device pci 14.1 on end # IDE    0x439c
                                         device pci 14.2 on end # HDA    0x4383
                                         device pci 14.3 on # LPC        0x439d
-					        chip superio/fintek/f81865f
-							device pnp 4e.0 off		# Floppy
+						chip superio/winbond/w83627hf
+							device pnp 2e.0 off #  Floppy
 								io 0x60 = 0x3f0
 								irq 0x70 = 6
 								drq 0x74 = 2
 							end
-							device pnp 4e.3 off end			# Parallel Port
-							device pnp 4e.4 off end			# Hardware Monitor
-							device pnp 4e.5 on #  Keyboard
-								io 0x60 = 0x60
-								io 0x62 = 0x64
-								irq 0x70 = 1
+							device pnp 2e.1 off #  Parallel Port
+								io 0x60 = 0x378
+								irq 0x70 = 7
 							end
-							device pnp 4e.6 off end			# GPIO
-							device pnp 4e.a off end			# PME
-							device pnp 4e.10 on			# COM1
+							device pnp 2e.2 on #  Com1
 								io 0x60 = 0x3f8
 								irq 0x70 = 4
 							end
-							device pnp 4e.11 off			# COM2
+							device pnp 2e.3 off #  Com2
 								io 0x60 = 0x2f8
 								irq 0x70 = 3
 							end
-                                                end # f81865f
+							device pnp 2e.5 on #  Keyboard
+								io 0x60 = 0x60
+								io 0x62 = 0x64
+								irq 0x70 = 1
+								irq 0x72 = 12
+							end
+							device pnp 2e.6 off #  CIR
+								io 0x60 = 0x100
+							end
+							device pnp 2e.7 off #  GAME_MIDI_GIPO1
+								io 0x60 = 0x220
+								io 0x62 = 0x300
+								irq 0x70 = 9
+							end
+							device pnp 2e.8 off end #  GPIO2
+							device pnp 2e.9 off end #  GPIO3
+							device pnp 2e.a off end #  ACPI
+							device pnp 2e.b on #  HW Monitor
+								io 0x60 = 0x290
+								irq 0x70 = 5
+							end
+						end
 					end #LPC
   					device pci 14.4 on end # PCI 0x4384
 	  				device pci 14.5 on end # USB 2
Index: src/mainboard/asrock/e350m1/dimmSpd.c
===================================================================
--- src/mainboard/asrock/e350m1/dimmSpd.c	(revision 6375)
+++ src/mainboard/asrock/e350m1/dimmSpd.c	(working copy)
@@ -34,8 +34,8 @@ 
    {
    // socket 0
       {
-         {0xA0, 0xA2},  // channel 0 dimms
-         {0xA4, 0xA8},  // channel 1 dimms
+         {0xA0, 0xA4},  // channel 0 dimms
+         {0x00, 0x00},  // channel 1 dimms
       },
    // socket 1
       {
Index: src/mainboard/asrock/e350m1/dsdt.asl
===================================================================
--- src/mainboard/asrock/e350m1/dsdt.asl	(revision 6375)
+++ src/mainboard/asrock/e350m1/dsdt.asl	(working copy)
@@ -23,7 +23,7 @@ 
 	"DSDT",                 /* Signature */
 	0x02,		/* DSDT Revision, needs to be 2 for 64bit */
 	"AMD   ",               /* OEMID */
-	"PERSIMMO",	     /* TABLE ID */
+	"E350M1  ",	     /* TABLE ID */
 	0x00010001	/* OEM Revision */
 	)
 {	/* Start of ASL file */
Index: src/mainboard/asrock/e350m1/Kconfig
===================================================================
--- src/mainboard/asrock/e350m1/Kconfig	(revision 6375)
+++ src/mainboard/asrock/e350m1/Kconfig	(working copy)
@@ -17,7 +17,7 @@ 
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-if BOARD_AMD_PERSIMMON
+if BOARD_ASROCK_E350M1
 
 config BOARD_SPECIFIC_OPTIONS # dummy
         def_bool y
@@ -28,7 +28,7 @@ 
   select NORTHBRIDGE_AMD_AGESA_WRAPPER_FAMILY14_ROOT_COMPLEX
   select NORTHBRIDGE_AMD_AGESA_WRAPPER_FAMILY14
   select SOUTHBRIDGE_AMD_CIMX_WRAPPER_SB800
-	select SUPERIO_FINTEK_F81865F
+	select SUPERIO_WINBOND_W83627HF
   select BOARD_HAS_FADT
         select HAVE_BUS_CONFIG
         select HAVE_OPTION_TABLE
@@ -56,7 +56,7 @@ 
 
 config MAINBOARD_DIR
         string
-        default amd/persimmon
+        default asrock/e350m1
 
 config APIC_ID_OFFSET
         hex
@@ -64,7 +64,7 @@ 
 
 config MAINBOARD_PART_NUMBER
         string
-        default "Persimmon"
+        default "e350m1"
 
 config HW_MEM_HOLE_SIZEK
         hex
@@ -132,16 +132,16 @@ 
 
 config SIO_PORT
         hex
-        default 0x4e
+        default 0x2e
 
 config ONBOARD_VGA_IS_PRIMARY
 	bool
 	default y
 
-#define CONFIG_VGA_BIOS_ID "1002,9804"
+#define CONFIG_VGA_BIOS_ID "1002,9802"
 config VGA_BIOS_ID
         string
-        default "1002,9804"
+        default "1002,9802"
 
 config DRIVERS_PS2_KEYBOARD
 	bool
@@ -151,5 +151,5 @@ 
 	bool
 	default n
 
-endif # BOARD_AMD_PERSIMMON
+endif # BOARD_ASROCK_E350M1
 
Index: src/mainboard/asrock/e350m1/mainboard.c
===================================================================
--- src/mainboard/asrock/e350m1/mainboard.c	(revision 6375)
+++ src/mainboard/asrock/e350m1/mainboard.c	(working copy)
@@ -49,11 +49,11 @@ 
 uint64_t uma_memory_base, uma_memory_size;
 
 /*************************************************
-* enable the dedicated function in persimmon board.
+* enable the dedicated function in e350m1 board.
 *************************************************/
-static void persimmon_enable(device_t dev)
+static void e350m1_enable(device_t dev)
 {
-	printk(BIOS_INFO, "Mainboard Persimmon Enable. dev=0x%p\n", dev);
+	printk(BIOS_INFO, "Mainboard E350M1 Enable. dev=0x%p\n", dev);
 #if (CONFIG_GFXUMA == 1)
 	msr_t msr, msr2;
 	uint32_t sys_mem;
@@ -110,6 +110,6 @@ 
 	return 0;
 }
 struct chip_operations mainboard_ops = {
-	CHIP_NAME("AMD PERSIMMON Mainboard")
-	.enable_dev = persimmon_enable,
+	CHIP_NAME("ASRock E350M1 Mainboard")
+	.enable_dev = e350m1_enable,
 };
Index: src/mainboard/asrock/e350m1/romstage.c
===================================================================
--- src/mainboard/asrock/e350m1/romstage.c	(revision 6375)
+++ src/mainboard/asrock/e350m1/romstage.c	(working copy)
@@ -31,16 +31,16 @@ 
 #include <console/loglevel.h>
 #include "agesawrapper.h"
 #include "cpu/x86/bist.h"
-#include "superio/fintek/f81865f/f81865f_early_serial.c"
+#include "superio/winbond/w83627hf/early_serial.c"
 #include "cpu/x86/lapic/boot_cpu.c"
 #include "pc80/i8254.c"
+#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
 #include "pc80/i8259.c"
 #include "SbEarly.h"
 #include "SBPLATFORM.h"
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
 
-#define SERIAL_DEV PNP_DEV(0x4e, F81865F_SP1)
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
 {
@@ -52,7 +52,7 @@ 
     sb_poweron_init();
 
     post_code(0x31);
-    f81865f_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+	w83627hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
     uart_init();
     console_init();
   }
Index: src/mainboard/asrock/Kconfig
===================================================================
--- src/mainboard/asrock/Kconfig	(revision 6375)
+++ src/mainboard/asrock/Kconfig	(working copy)
@@ -23,10 +23,12 @@ 
 
 config BOARD_ASROCK_939A785GMH
 	bool "939A785GMH/128M"
+config BOARD_ASROCK_E350M1
+	bool "E350M1"
 
 endchoice
 
-source "src/mainboard/asrock/939a785gmh/Kconfig"
+source "src/mainboard/asrock/e350m1/Kconfig"
 
 config MAINBOARD_VENDOR
 	string