Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33772
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
We can get into ramstage with the state of Mandolin. Still no AGESA running, and therefore we hang when trying to scan the PCI bus.
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,242 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/1
diff --git a/src/mainboard/amd/mandolin/Kconfig b/src/mainboard/amd/mandolin/Kconfig new file mode 100644 index 0000000..5d1c287 --- /dev/null +++ b/src/mainboard/amd/mandolin/Kconfig @@ -0,0 +1,98 @@ +# +# This file is part of the coreboot project. +# +# Copyright (C) 2019 Advanced Micro Devices, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +if BOARD_AMD_MANDOLIN + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SOC_AMD_PICASSO + select HAVE_PIRQ_TABLE + select HAVE_MP_TABLE + select HAVE_ACPI_TABLES + select BOARD_ROMSIZE_KB_8192 + select GFXUMA + +config AMD_LPC_DEBUG_CARD + bool "Enable LPC-Serial debug card on the debug header" + default n + select SUPERIO_SMSC_SIO1036 + help + AMD's debug card contains an SMSC SIO1036 device which provides + an I/O-based UART in the system. This feature is not compatible with + CONFIG_HUDSON_UART enabling the memory-mapped UART in the chipset. + Note that Kconfig does not currently enforce this restriction. + +config CBFS_SIZE + default 0x400000 + help + TODO: Adjust this! Right now it's simply making a lot of room for + amdfw.rom and EC firmware. + +config MAINBOARD_DIR + string + default amd/mandolin + +config MAINBOARD_PART_NUMBER + string + default "MANDOLIN" + +config MAX_CPUS + int + default 8 + +config IRQ_SLOT_COUNT + int + default 11 + +config ONBOARD_VGA_IS_PRIMARY + bool + default y + +config PICASSO_LEGACY_FREE + bool + default y + +config MANDOLIN_HAVE_APCB_BLOB + bool "Have AGESA PSP Customization Block file?" + default n + help + The PSP requires the APCB file to know how to configure memory, as + well as other settings it will initialize. To build an image that + will get to POST, select 'y' and provide the file path/name. The + default of 'n' allows the board to build successfully but it avoids + redistributing the APCB blob extracted from UEFI. + TODO: Add the ability to construct APCB on the fly for any mainboard. + +config PSP_APCB_FILE + string "APCB file" + depends on MANDOLIN_HAVE_APCB_BLOB + default "3rdparty/blobs/mainboard/amd/mandolin/apcb.bin" + help + The name of the AGESA Parameter Customization Block. TODO: will we + be able to generate this at build-time? Build it offline for + inclusion? + +config MANDOLIN_HAVE_MCHP_FW + bool "Have Microchip EC firmware?" + default n + select AMDFW_OUTSIDE_CBFS + # todo: fix build the "inside" build. + +config MANDOLIN_MCHP_FW_FILE + string + depends on MANDOLIN_HAVE_MCHP_FW + default "3rdparty/blobs/mainboard/amd/mandolin/mchp.bin" + +endif # BOARD_AMD_MANDOLIN diff --git a/src/mainboard/amd/mandolin/Kconfig.name b/src/mainboard/amd/mandolin/Kconfig.name new file mode 100644 index 0000000..7dbfc3f --- /dev/null +++ b/src/mainboard/amd/mandolin/Kconfig.name @@ -0,0 +1,2 @@ +config BOARD_AMD_MANDOLIN + bool "Mandolin" diff --git a/src/mainboard/amd/mandolin/Makefile.inc b/src/mainboard/amd/mandolin/Makefile.inc new file mode 100644 index 0000000..fe17e8e --- /dev/null +++ b/src/mainboard/amd/mandolin/Makefile.inc @@ -0,0 +1,41 @@ +# +# This file is part of the coreboot project. +# +# Copyright (C) 2019 Advanced Micro Devices, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +romstage-y += gpio.c +ramstage-y += gpio.c + +PHONY+=add_mchp_fw +INTERMEDIATE+=add_mchp_fw + +ifeq ($(CONFIG_MANDOLIN_HAVE_MCHP_FW),y) + +MANDOLIN_MICROCHIP_FW_OFFSET=0 +add_mchp_fw: + printf " DD Adding Microchip firmware at ROM offset 0x%x\n" \ + "$(MANDOLIN_MICROCHIP_FW_OFFSET)" + dd if=$(CONFIG_MANDOLIN_MCHP_FW_FILE) \ + of=$(obj)/coreboot.pre conv=notrunc bs=1 \ + seek=$(MANDOLIN_MICROCHIP_FW_OFFSET) >/dev/null 2>&1 + +else +files_added:: warn_no_mchp +endif # CONFIG_MANDOLIN_HAVE_MCHP_FW + +PHONY+=warn_no_mchp +warn_no_mchp: + printf "\n\t** WARNING **\n" + printf "coreboot has been built without an the Microchip EC.\n" + printf "Do not flash this image. Your Mandolin's power button\n" + printf "will not respond when you press it.\n\n" diff --git a/src/mainboard/amd/mandolin/acpi/gpe.asl b/src/mainboard/amd/mandolin/acpi/gpe.asl new file mode 100644 index 0000000..d3c89fd --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/gpe.asl @@ -0,0 +1,76 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2013 Sage Electronic Engineering, LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// +// +// + +Scope(_GPE) { /* Start Scope GPE */ + + /* General event 3 */ + Method(_L03) { + /* DBGO("\_GPE\_L00\n") */ + Notify(_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ + } + + /* Legacy PM event */ + Method(_L08) { + /* DBGO("\_GPE\_L08\n") */ + } + + /* Temp warning (TWarn) event */ + Method(_L09) { + /* DBGO("\_GPE\_L09\n") */ + /* Notify (_TZ.TZ00, 0x80) */ + } + + /* USB controller PME# */ + Method(_L0B) { + /* DBGO("\_GPE\_L0B\n") */ + Notify(_SB.PCI0.EHC0, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.XHC0, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ + } + + /* ExtEvent0 SCI event */ + Method(_L10) { + /* DBGO("\_GPE\_L10\n") */ + } + + /* ExtEvent1 SCI event */ + Method(_L11) { + /* DBGO("\_GPE\_L11\n") */ + } + + /* GPIO0 or GEvent8 event */ + Method(_L18) { + /* DBGO("\_GPE\_L18\n") */ + Notify(_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ + } + + /* Azalia SCI event */ + Method(_L1B) { + /* DBGO("\_GPE\_L1B\n") */ + Notify(_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ + } +} /* End Scope GPE */ diff --git a/src/mainboard/amd/mandolin/acpi/mainboard.asl b/src/mainboard/amd/mandolin/acpi/mainboard.asl new file mode 100644 index 0000000..d73fbea --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/mainboard.asl @@ -0,0 +1,35 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2013 Sage Electronic Engineering, LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// +// +// + +/* Memory related values */ +Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */ +Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */ +Name(PBLN, 0x0) /* Length of BIOS area */ + +Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */ +Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */ +Name(HPBA, 0xFED00000) /* Base address of HPET table */ + +/* Some global data */ +Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */ +Name(OSV, Ones) /* Assume nothing */ +Name(PMOD, One) /* Assume APIC */ diff --git a/src/mainboard/amd/mandolin/acpi/routing.asl b/src/mainboard/amd/mandolin/acpi/routing.asl new file mode 100644 index 0000000..969def7 --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/routing.asl @@ -0,0 +1,173 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015, 2016 Advanced Micro Devices, Inc. + * Copyright (C) 2013 Sage Electronic Engineering, LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// +// +// + +/* +#include <arch/acpi.h> +DefinitionBlock ("DSDT.AML", "DSDT", 0x01, OEM_ID, ACPI_TABLE_CREATOR, 0x00010001 + ) + { + #include "routing.asl" + } +*/ + +/* Routing is in System Bus scope */ +Name(PR0, Package(){ + /* NB devices */ + /* Bus 0, Dev 0 - F15 Host Controller */ + + /* Bus 0, Dev 1, Func 0 - PCI Bridge for Internal Graphics(IGP) */ + /* Bus 0, Dev 1, Func 1 - HDMI Audio Controller */ + Package(){0x0001FFFF, 0, INTB, 0 }, + Package(){0x0001FFFF, 1, INTC, 0 }, + + + /* Bus 0, Dev 2 Func 0,1,2,3,4,5 - PCIe Bridges */ + Package(){0x0002FFFF, 0, INTC, 0 }, + Package(){0x0002FFFF, 1, INTD, 0 }, + Package(){0x0002FFFF, 2, INTA, 0 }, + Package(){0x0002FFFF, 3, INTB, 0 }, + + /* FCH devices */ + /* Bus 0, Dev 20 - F0:SMBus/ACPI;F3:LPC;F7:SD */ + Package(){0x0014FFFF, 0, INTA, 0 }, + Package(){0x0014FFFF, 1, INTB, 0 }, + Package(){0x0014FFFF, 2, INTC, 0 }, + Package(){0x0014FFFF, 3, INTD, 0 }, + + /* Bus 0, Dev 18 Func 0 - USB: EHCI */ + Package(){0x0012FFFF, 0, INTC, 0 }, + Package(){0x0012FFFF, 1, INTB, 0 }, + + /* Bus 0, Dev 10 Func 0 - USB: xHCI */ + Package(){0x0010FFFF, 0, INTC, 0 }, + Package(){0x0010FFFF, 1, INTB, 0 }, + + /* Bus 0, Dev 17 - SATA controller */ + Package(){0x0011FFFF, 0, INTD, 0 }, + +}) + +Name(APR0, Package(){ + /* NB devices in APIC mode */ + /* Bus 0, Dev 0 - F15 Host Controller */ + + /* Bus 0, Dev 1 - PCI Bridge for Internal Graphics(IGP) */ + Package(){0x0001FFFF, 0, 0, 43 }, + Package(){0x0001FFFF, 1, 0, 40 }, + + /* Bus 0, Dev 2 - PCIe Bridges */ + Package(){0x0002FFFF, 0, 0, 44 }, + Package(){0x0002FFFF, 1, 0, 45 }, + Package(){0x0002FFFF, 2, 0, 46 }, + Package(){0x0002FFFF, 3, 0, 47 }, + + /* SB devices in APIC mode */ + /* Bus 0, Dev 20 - F0:SMBus/ACPI;F3:LPC;F7:SD */ + Package(){0x0014FFFF, 0, 0, 16 }, + Package(){0x0014FFFF, 1, 0, 17 }, + Package(){0x0014FFFF, 2, 0, 18 }, + Package(){0x0014FFFF, 3, 0, 19 }, + + /* Bus 0, Dev 18 Func 0 - USB: EHCI */ + Package(){0x0012FFFF, 0, 0, 18 }, + Package(){0x0012FFFF, 1, 0, 17 }, + + /* Bus 0, Dev 10 Func 0 - USB: xHCI */ + Package(){0x0010FFFF, 0, 0, 18}, + Package(){0x0010FFFF, 1, 0, 17}, + + /* Bus 0, Dev 17 - SATA controller */ + Package(){0x0011FFFF, 0, 0, 19 }, +}) + + +/* GPP 0 */ +Name(PS4, Package(){ + Package(){0x0000FFFF, 0, INTA, 0 }, + Package(){0x0000FFFF, 1, INTB, 0 }, + Package(){0x0000FFFF, 2, INTC, 0 }, + Package(){0x0000FFFF, 3, INTD, 0 }, +}) +Name(APS4, Package(){ + /* PCIe slot - Hooked to PCIe slot 4 */ + Package(){0x0000FFFF, 0, 0, 24 }, + Package(){0x0000FFFF, 1, 0, 25 }, + Package(){0x0000FFFF, 2, 0, 26 }, + Package(){0x0000FFFF, 3, 0, 27 }, +}) + +/* GPP 1 */ +Name(PS5, Package(){ + Package(){0x0000FFFF, 0, INTB, 0 }, + Package(){0x0000FFFF, 1, INTC, 0 }, + Package(){0x0000FFFF, 2, INTD, 0 }, + Package(){0x0000FFFF, 3, INTA, 0 }, +}) +Name(APS5, Package(){ + Package(){0x0000FFFF, 0, 0, 28 }, + Package(){0x0000FFFF, 1, 0, 29 }, + Package(){0x0000FFFF, 2, 0, 30 }, + Package(){0x0000FFFF, 3, 0, 31 }, +}) + +/* GPP 2 */ +Name(PS6, Package(){ + Package(){0x0000FFFF, 0, INTC, 0 }, + Package(){0x0000FFFF, 1, INTD, 0 }, + Package(){0x0000FFFF, 2, INTA, 0 }, + Package(){0x0000FFFF, 3, INTB, 0 }, +}) +Name(APS6, Package(){ + Package(){0x0000FFFF, 0, 0, 32 }, + Package(){0x0000FFFF, 1, 0, 33 }, + Package(){0x0000FFFF, 2, 0, 34 }, + Package(){0x0000FFFF, 3, 0, 35 }, +}) + +/* GPP 3 */ +Name(PS7, Package(){ + Package(){0x0000FFFF, 0, INTD, 0 }, + Package(){0x0000FFFF, 1, INTA, 0 }, + Package(){0x0000FFFF, 2, INTB, 0 }, + Package(){0x0000FFFF, 3, INTC, 0 }, +}) +Name(APS7, Package(){ + Package(){0x0000FFFF, 0, 0, 36 }, + Package(){0x0000FFFF, 1, 0, 37 }, + Package(){0x0000FFFF, 2, 0, 38 }, + Package(){0x0000FFFF, 3, 0, 39 }, +}) + +/* GPP 4 */ +Name(PS8, Package(){ + Package(){0x0000FFFF, 0, INTA, 0 }, + Package(){0x0000FFFF, 1, INTB, 0 }, + Package(){0x0000FFFF, 2, INTC, 0 }, + Package(){0x0000FFFF, 3, INTD, 0 }, +}) +Name(APS8, Package(){ + Package(){0x0000FFFF, 0, 0, 40 }, + Package(){0x0000FFFF, 1, 0, 41 }, + Package(){0x0000FFFF, 2, 0, 42 }, + Package(){0x0000FFFF, 3, 0, 43 }, +}) diff --git a/src/mainboard/amd/mandolin/acpi/sleep.asl b/src/mainboard/amd/mandolin/acpi/sleep.asl new file mode 100644 index 0000000..baf3ca5 --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/sleep.asl @@ -0,0 +1,93 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2013 Sage Electronic Engineering, LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// +// +// + +/* Wake status package */ +Name(WKST,Package(){Zero, Zero}) + +/* +* _PTS - Prepare to Sleep method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2, etc +* +* Exit: +* -none- +* +* The _PTS control method is executed at the beginning of the sleep process +* for S1-S5. The sleeping value is passed to the _PTS control method. This +* control method may be executed a relatively long time before entering the +* sleep state and the OS may abort the operation without notification to +* the ACPI driver. This method cannot modify the configuration or power +* state of any device in the system. +*/ +Method(_PTS, 1) { + /* DBGO("\_PTS\n") */ + /* DBGO("From S0 to S") */ + /* DBGO(Arg0) */ + /* DBGO("\n") */ + + /* Clear wake status structure. */ + Store(0, PEWD) + Store(0, Index(WKST,0)) + Store(0, Index(WKST,1)) + Store(7, UPWS) +} /* End Method(_PTS) */ + +/* +* _BFS OEM Back From Sleep method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2 +* +* Exit: +* -none- +*/ +Method(_BFS, 1) { + /* DBGO("\_BFS\n") */ + /* DBGO("From S") */ + /* DBGO(Arg0) */ + /* DBGO(" to S0\n") */ +} + +/* +* _WAK System Wake method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2 +* +* Exit: +* Return package of 2 DWords +* Dword 1 - Status +* 0x00000000 wake succeeded +* 0x00000001 Wake was signaled but failed due to lack of power +* 0x00000002 Wake was signaled but failed due to thermal condition +* Dword 2 - Power Supply state +* if non-zero the effective S-state the power supply entered +*/ +Method(_WAK, 1) { + /* DBGO("\_WAK\n") */ + /* DBGO("From S") */ + /* DBGO(Arg0) */ + /* DBGO(" to S0\n") */ + + Return(WKST) +} /* End Method(_WAK) */ diff --git a/src/mainboard/amd/mandolin/acpi/usb_oc.asl b/src/mainboard/amd/mandolin/acpi/usb_oc.asl new file mode 100644 index 0000000..ea7bd27 --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/usb_oc.asl @@ -0,0 +1,47 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015 Advanced Micro Devices, Inc. + * Copyright (C) 2013 Sage Electronic Engineering, LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// - file had a todo to update for Gardenia +// +// +// + +/* simple name description */ +/* +#include <arch/acpi.h> +DefinitionBlock ("DSDT.AML", "DSDT", 0x01, OEM_ID, ACPI_TABLE_CREATOR, 0x00010001 + ) + { + #include "usb.asl" + } +*/ + +/* USB overcurrent mapping pins. */ +Name(UOM0, 0) +Name(UOM1, 2) +Name(UOM2, 0) +Name(UOM3, 7) +Name(UOM4, 2) +Name(UOM5, 2) +Name(UOM6, 6) +Name(UOM7, 2) +Name(UOM8, 6) +Name(UOM9, 6) + +/* USB Overcurrent GPEs */ diff --git a/src/mainboard/amd/mandolin/acpi_tables.c b/src/mainboard/amd/mandolin/acpi_tables.c new file mode 100644 index 0000000..8d4d1cf --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi_tables.c @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Blank file required by build system assumptions of this file being present. + */ diff --git a/src/mainboard/amd/mandolin/board_info.txt b/src/mainboard/amd/mandolin/board_info.txt new file mode 100644 index 0000000..b351b8e --- /dev/null +++ b/src/mainboard/amd/mandolin/board_info.txt @@ -0,0 +1 @@ +Category: eval diff --git a/src/mainboard/amd/mandolin/devicetree.cb b/src/mainboard/amd/mandolin/devicetree.cb new file mode 100644 index 0000000..8cb7da9 --- /dev/null +++ b/src/mainboard/amd/mandolin/devicetree.cb @@ -0,0 +1,60 @@ +# +# This file is part of the coreboot project. +# +# Copyright (C) 2015-2019 Advanced Micro Devices, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +chip soc/amd/picasso + device cpu_cluster 0 on + device lapic 0 on end + end + device domain 0 on + subsystemid 0x1022 0x1510 inherit + device pci 0.0 on end # Root Complex + device pci 0.2 on end # IOMMU + device pci 1.0 on end # Dummy Host Bridge + device pci 1.2 on end # Bridge + device pci 1.3 on end # Bridge + device pci 8.0 on end # Dummy Host Bridge + device pci 8.1 on end # Bridge + device pci 8.2 on end # Bridge + device pci 14.0 on # SM + chip drivers/generic/generic # dimm 0-0-0 + device i2c 50 on end + device i2c 51 on end + end + chip superio/smsc/sio1036 # optional debug card + end + end # SM + device pci 14.3 on end # LPC + device pci 14.6 on end # + device pci 18.0 on end + device pci 18.1 on end + device pci 18.2 on end + device pci 18.3 on end + device pci 18.4 on end + device pci 18.5 on end + device pci 18.6 on end + device pci 18.7 on end + end # domain + # todo: on a separate bus now: + # 2:0.0 15D8 display controller + # 2:0.1 15DE HD Audio + # 2:0.2 15DF Crypto Coprocessor + # 2:0.3 15E0 serial + # 2:0.4 15E1 serial + # 2:0.5 15E2 Audio Processor + # 2:0.6 15E3 Audio Processor - HD Audio Controller + # 2:0.7 15E6 Non-Sensor Fusion hub device + # 3:0.0 7901 SATA + # 3:0.1 1458 10GbE (per HDT) + # 3:0.2 1458 10GbE (per HDT) +end # chip soc/amd/picasso diff --git a/src/mainboard/amd/mandolin/dsdt.asl b/src/mainboard/amd/mandolin/dsdt.asl new file mode 100644 index 0000000..25c0e78 --- /dev/null +++ b/src/mainboard/amd/mandolin/dsdt.asl @@ -0,0 +1,83 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015-2017 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +// +// +// +// todo: check file for accuracy +// +// +// + +#define MAINBOARD_HAS_SPEAKER 1 + +/* DefinitionBlock Statement */ +#include <arch/acpi.h> +DefinitionBlock ( + "DSDT.AML", /* Output filename */ + "DSDT", /* Signature */ + 0x02, /* DSDT Revision, needs to be 2 for 64bit */ + OEM_ID, + ACPI_TABLE_CREATOR, + 0x00010001 /* OEM Revision */ + ) +{ /* Start of ASL file */ + /* #include <arch/x86/acpi/debug.asl> */ /* as needed */ + + /* global NVS and variables */ + #include <globalnvs.asl> + + /* Globals for the platform */ + #include "acpi/mainboard.asl" + + /* Describe the USB Overcurrent pins */ + #include "acpi/usb_oc.asl" + + /* PCI IRQ mapping for the Southbridge */ + #include <pcie.asl> + + /* Describe the processor tree (_PR) */ + #include <cpu.asl> + + /* Contains the supported sleep states for this chipset */ + #include <sleepstates.asl> + + /* Contains the Sleep methods (WAK, PTS, GTS, etc.) */ + #include "acpi/sleep.asl" + + /* System Bus */ + Scope(_SB) { /* Start _SB scope */ + /* global utility methods expected within the _SB scope */ + #include <arch/x86/acpi/globutil.asl> + + /* IRQ Routing mapping for this platform (in _SB scope) */ + #include "acpi/routing.asl" + + Device(PWRB) { + Name(_HID, EISAID("PNP0C0C")) + Name(_UID, 0xAA) + Name(_PRW, Package () {3, 0x04}) + Name(_STA, 0x0B) + } + + /* Describe the SOC */ + #include <soc.asl> + + } /* End _SB scope */ + + /* Define the General Purpose Events for the platform */ + #include "acpi/gpe.asl" +} +/* End of ASL file */ diff --git a/src/mainboard/amd/mandolin/gpio.c b/src/mainboard/amd/mandolin/gpio.c new file mode 100644 index 0000000..aa16826 --- /dev/null +++ b/src/mainboard/amd/mandolin/gpio.c @@ -0,0 +1,83 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015-2019 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <soc/southbridge.h> +#include <stdlib.h> +#include <soc/gpio.h> + +#include "gpio.h" + +/* + * As a rule of thumb, GPIO pins used by coreboot should be initialized at + * bootblock while GPIO pins used only by the OS should be initialized at + * ramstage. + */ +static const struct soc_amd_gpio gpio_set_stage_reset[] = { + /* not LLB */ + PAD_GPI(GPIO_12, PULL_UP), + /* not USB_OC5_L */ + PAD_GPI(GPIO_13, PULL_UP), + /* not USB_OC4_L */ + PAD_GPI(GPIO_14, PULL_UP), + /* not USB_OC1_L */ + PAD_GPI(GPIO_17, PULL_UP), + /* not USB_OC2_L */ + PAD_GPI(GPIO_18, PULL_UP), + /* SDIO eMMC power control */ + PAD_NF(GPIO_22, EMMC_PRW_CTRL, PULL_NONE), + /* PCIe SSD power enable */ + PAD_GPO(GPIO_23, HIGH), + /* PCIe Reset to DP0, DP1, J2105, TP, FP */ + PAD_NF(GPIO_27, PCIE_RST1_L, PULL_NONE), + /* eSPI CS# */ + PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE), + /* FANOUT0 */ + PAD_NF(GPIO_85, FANOUT0, PULL_NONE), + /* PC beep to codec */ + PAD_NF(GPIO_91, SPKR, PULL_NONE), +}; + +static const struct soc_amd_gpio gpio_set_stage_ram[] = { + /* SSD DEVSLP */ + PAD_NF(GPIO_5, DEVSLP0_S5, PULL_NONE), + /* SATA Express DEVSLP */ + PAD_NF(GPIO_6, DEVSLP1_S5, PULL_NONE), + /* I2S SDIN */ + PAD_NF(GPIO_7, ACP_I2S_SDIN, PULL_NONE), + /* I2S LRCLK */ + PAD_NF(GPIO_8, ACP_I2S_LRCLK, PULL_NONE), + /* Blink */ + PAD_NF(GPIO_11, BLINK, PULL_NONE), + /* APU_ALS_INT# */ + PAD_SCI(GPIO_24, PULL_UP, EDGE_LOW), + /* Finger print CS# */ + PAD_GPO(GPIO_31, HIGH), + /* NFC IRQ */ + PAD_INT(GPIO_69, PULL_UP, EDGE_LOW, STATUS), + /* Rear camera power enable */ + PAD_GPO(GPIO_89, HIGH), +}; + +const struct soc_amd_gpio *early_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(gpio_set_stage_reset); + return gpio_set_stage_reset; +} + +const struct soc_amd_gpio *gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(gpio_set_stage_ram); + return gpio_set_stage_ram; +} diff --git a/src/mainboard/amd/mandolin/gpio.h b/src/mainboard/amd/mandolin/gpio.h new file mode 100644 index 0000000..1d3a8a2 --- /dev/null +++ b/src/mainboard/amd/mandolin/gpio.h @@ -0,0 +1,22 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2018 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef MAINBOARD_GPIO_H +#define MAINBOARD_GPIO_H + +const struct soc_amd_gpio *early_gpio_table(size_t *size); +const struct soc_amd_gpio *gpio_table(size_t *size); + +#endif /* MAINBOARD_GPIO_H */ diff --git a/src/mainboard/amd/mandolin/irq_tables.c b/src/mainboard/amd/mandolin/irq_tables.c new file mode 100644 index 0000000..bf1daec --- /dev/null +++ b/src/mainboard/amd/mandolin/irq_tables.c @@ -0,0 +1,100 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <console/console.h> +#include <device/pci.h> +#include <string.h> +#include <stdint.h> +#include <arch/pirq_routing.h> + +static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, + u8 link0, u16 bitmap0, u8 link1, u16 bitmap1, + u8 link2, u16 bitmap2, u8 link3, u16 bitmap3, + u8 slot, u8 rfu) +{ + pirq_info->bus = bus; + pirq_info->devfn = devfn; + pirq_info->irq[0].link = link0; + pirq_info->irq[0].bitmap = bitmap0; + pirq_info->irq[1].link = link1; + pirq_info->irq[1].bitmap = bitmap1; + pirq_info->irq[2].link = link2; + pirq_info->irq[2].bitmap = bitmap2; + pirq_info->irq[3].link = link3; + pirq_info->irq[3].bitmap = bitmap3; + pirq_info->slot = slot; + pirq_info->rfu = rfu; +} + +unsigned long write_pirq_routing_table(unsigned long addr) +{ + struct irq_routing_table *pirq; + struct irq_info *pirq_info; + u32 slot_num; + u8 *v; + + u8 sum = 0; + int i; + + /* Align the table to be 16 byte aligned. */ + addr += 15; + addr &= ~15; + + /* This table must be between 0xf0000 & 0x100000 */ + printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr); + + pirq = (void *)(addr); + v = (u8 *) (addr); + + pirq->signature = PIRQ_SIGNATURE; + pirq->version = PIRQ_VERSION; + + pirq->rtr_bus = 0; + pirq->rtr_devfn = PCI_DEVFN(0x14, 4); + + pirq->exclusive_irqs = 0; + + pirq->rtr_vendor = 0x1002; + pirq->rtr_device = 0x4384; + + pirq->miniport_data = 0; + + memset(pirq->rfu, 0, sizeof(pirq->rfu)); + + pirq_info = (void *)(&pirq->checksum + 1); + slot_num = 0; + + /* pci bridge */ + write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4), + 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, + 0); + pirq_info++; + + slot_num++; + + pirq->size = 32 + 16 * slot_num; + + for (i = 0; i < pirq->size; i++) + sum += v[i]; + + sum = pirq->checksum - sum; + + if (sum != pirq->checksum) + pirq->checksum = sum; + + printk(BIOS_INFO, "write_pirq_routing_table done.\n"); + + return (unsigned long)pirq_info; +} diff --git a/src/mainboard/amd/mandolin/mainboard.c b/src/mainboard/amd/mandolin/mainboard.c new file mode 100644 index 0000000..6f2d1d9 --- /dev/null +++ b/src/mainboard/amd/mandolin/mainboard.c @@ -0,0 +1,110 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <console/console.h> +#include <device/device.h> +#include <arch/acpi.h> +#include <amdblocks/amd_pci_util.h> +#include <soc/southbridge.h> + +#include "gpio.h" +// +// +// +// todo: check file for accuracy +// +// +// + +/*********************************************************** + * These arrays set up the FCH PCI_INTR registers 0xC00/0xC01. + * This table is responsible for physically routing the PIC and + * IOAPIC IRQs to the different PCI devices on the system. It + * is read and written via registers 0xC00/0xC01 as an + * Index/Data pair. These values are chipset and mainboard + * dependent and should be updated accordingly. + * + * These values are used by the PCI configuration space, + * MP Tables. TODO: Make ACPI use these values too. + */ +const u8 mainboard_picr_data[] = { + [0x00] = 0x03, 0x04, 0x05, 0x07, 0x0B, 0x0A, 0x1F, 0x1F, + [0x08] = 0xFA, 0xF1, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, + [0x10] = 0x1F, 0x1F, 0x1F, 0x03, 0x1F, 0x1F, 0x1F, 0x1F, + [0x18] = 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x20] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, + [0x28] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x30] = 0x05, 0x04, 0x05, 0x04, 0x04, 0x05, 0x04, 0x05, + [0x38] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x40] = 0x04, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x48] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x50] = 0x03, 0x04, 0x05, 0x07, 0x1F, 0x1F, 0x1F, 0x1F, + [0x58] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + [0x60] = 0x1F, 0x1F, 0x07, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + [0x68] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + [0x70] = 0x03, 0x0F, 0x06, 0x0E, 0x0A, 0x0B, 0x1F, 0x1F, + [0x78] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, +}; + +const u8 mainboard_intr_data[] = { + [0x00] = 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + [0x08] = 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, + [0x10] = 0x09, 0x1F, 0x1F, 0x10, 0x1F, 0x1F, 0x1F, 0x10, + [0x18] = 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x20] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, + [0x28] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x30] = 0x12, 0x11, 0x12, 0x11, 0x12, 0x11, 0x12, 0x00, + [0x38] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x40] = 0x11, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x48] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x50] = 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, + [0x58] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x60] = 0x1F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x68] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + [0x70] = 0x03, 0x0F, 0x06, 0x0E, 0x0A, 0x0B, 0x1F, 0x1F, + [0x78] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +/* PIRQ Setup */ +static void pirq_setup(void) +{ + intr_data_ptr = mainboard_intr_data; + picr_data_ptr = mainboard_picr_data; +} + +static void mainboard_init(void *chip_info) +{ + size_t num_gpios; + const struct soc_amd_gpio *gpios; + gpios = gpio_table(&num_gpios); + program_gpios(gpios, num_gpios); +} + +/************************************************* + * enable the dedicated function in mandolin board. + *************************************************/ +static void mandolin_enable(struct device *dev) +{ + printk(BIOS_INFO, "Mainboard " + CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); + + /* Initialize the PIRQ data structures for consumption */ + pirq_setup(); +} + +struct chip_operations mainboard_ops = { + .init = mainboard_init, + .enable_dev = mandolin_enable, +}; diff --git a/src/mainboard/amd/mandolin/mptable.c b/src/mainboard/amd/mandolin/mptable.c new file mode 100644 index 0000000..4e80ce1 --- /dev/null +++ b/src/mainboard/amd/mandolin/mptable.c @@ -0,0 +1,171 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +// +// +// +// todo: check file for accuracy +// +// +// + +#include <arch/smp/mpspec.h> +#include <device/pci.h> +#include <arch/io.h> +#include <arch/ioapic.h> +#include <string.h> +#include <stdint.h> +#include <cpu/x86/lapic.h> +#include <soc/southbridge.h> +#include <amdblocks/amd_pci_util.h> + +static void smp_add_mpc_entry(struct mp_config_table *mc, unsigned int length) +{ + mc->mpc_length += length; + mc->mpc_entry_count++; +} + +static void my_smp_write_bus(struct mp_config_table *mc, + unsigned char id, const char *bustype) +{ + struct mpc_config_bus *mpc; + mpc = smp_next_mpc_entry(mc); + memset(mpc, '\0', sizeof(*mpc)); + mpc->mpc_type = MP_BUS; + mpc->mpc_busid = id; + memcpy(mpc->mpc_bustype, bustype, sizeof(mpc->mpc_bustype)); + smp_add_mpc_entry(mc, sizeof(*mpc)); +} + +static void *smp_write_config_table(void *v) +{ + struct mp_config_table *mc; + int bus_isa; + + /* + * By the time this function gets called, the IOAPIC registers + * have been written so they can be read to get the correct + * APIC ID and Version + */ + u8 ioapic_id = (io_apic_read(VIO_APIC_VADDR, 0x00) >> 24); + u8 ioapic_ver = (io_apic_read(VIO_APIC_VADDR, 0x01) & 0xFF); + + mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); + + mptable_init(mc, LOCAL_APIC_ADDR); + memcpy(mc->mpc_oem, "AMD ", 8); + + smp_write_processors(mc); + + //mptable_write_buses(mc, NULL, &bus_isa); + my_smp_write_bus(mc, 0, "PCI "); + my_smp_write_bus(mc, 1, "PCI "); + bus_isa = 0x02; + my_smp_write_bus(mc, bus_isa, "ISA "); + + /* I/O APICs: APIC ID Version State Address */ + smp_write_ioapic(mc, ioapic_id, ioapic_ver, VIO_APIC_VADDR); + + smp_write_ioapic(mc, ioapic_id+1, 0x21, (void *)0xFEC20000); + + /* I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# */ +#define IO_LOCAL_INT(type, intr, apicid, pin) \ + smp_write_lintsrc(mc, (type), \ + MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, \ + (intr), (apicid), (pin)) + mptable_add_isa_interrupts(mc, bus_isa, ioapic_id, 0); + + /* PCI interrupts are level triggered, and are + * associated with a specific bus/device/function tuple. + */ +#define PCI_INT(bus, dev, int_sign, pin) \ + smp_write_intsrc(mc, mp_INT, \ + MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, (bus), \ + (((dev)<<2)|(int_sign)), ioapic_id, (pin)) + + /* Internal VGA */ + PCI_INT(0x0, 0x01, 0x0, intr_data_ptr[0x02]); + PCI_INT(0x0, 0x01, 0x1, intr_data_ptr[0x03]); + + /* SMBUS */ + PCI_INT(0x0, 0x14, 0x0, 0x10); + + /* HD Audio */ + PCI_INT(0x0, 0x14, 0x0, intr_data_ptr[0x13]); + + /* USB */ + PCI_INT(0x0, 0x12, 0x0, intr_data_ptr[0x30]); + PCI_INT(0x0, 0x12, 0x1, intr_data_ptr[0x31]); + PCI_INT(0x0, 0x13, 0x0, intr_data_ptr[0x32]); + PCI_INT(0x0, 0x13, 0x1, intr_data_ptr[0x33]); + PCI_INT(0x0, 0x16, 0x0, intr_data_ptr[0x34]); + PCI_INT(0x0, 0x16, 0x1, intr_data_ptr[0x35]); + PCI_INT(0x0, 0x14, 0x2, intr_data_ptr[0x36]); + + /* sata */ + PCI_INT(0x0, 0x11, 0x0, intr_data_ptr[0x40]); + PCI_INT(0x0, 0x11, 0x0, intr_data_ptr[0x41]); + + /* on board NIC & Slot PCIE. */ + + /* PCI slots */ + struct device *dev = pcidev_on_root(0x14, 4); + if (dev && dev->enabled) { + u8 bus_pci = dev->link_list->secondary; + /* PCI_SLOT 0. */ + PCI_INT(bus_pci, 0x5, 0x0, 0x14); + PCI_INT(bus_pci, 0x5, 0x1, 0x15); + PCI_INT(bus_pci, 0x5, 0x2, 0x16); + PCI_INT(bus_pci, 0x5, 0x3, 0x17); + + /* PCI_SLOT 1. */ + PCI_INT(bus_pci, 0x6, 0x0, 0x15); + PCI_INT(bus_pci, 0x6, 0x1, 0x16); + PCI_INT(bus_pci, 0x6, 0x2, 0x17); + PCI_INT(bus_pci, 0x6, 0x3, 0x14); + + /* PCI_SLOT 2. */ + PCI_INT(bus_pci, 0x7, 0x0, 0x16); + PCI_INT(bus_pci, 0x7, 0x1, 0x17); + PCI_INT(bus_pci, 0x7, 0x2, 0x14); + PCI_INT(bus_pci, 0x7, 0x3, 0x15); + } + + /* PCIe Lan*/ + PCI_INT(0x0, 0x06, 0x0, 0x13); + + /* FCH PCIe PortA */ + PCI_INT(0x0, 0x15, 0x0, 0x10); + /* FCH PCIe PortB */ + PCI_INT(0x0, 0x15, 0x1, 0x11); + /* FCH PCIe PortC */ + PCI_INT(0x0, 0x15, 0x2, 0x12); + /* FCH PCIe PortD */ + PCI_INT(0x0, 0x15, 0x3, 0x13); + + /*Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# */ + IO_LOCAL_INT(mp_ExtINT, 0, MP_APIC_ALL, 0x0); + IO_LOCAL_INT(mp_NMI, 0, MP_APIC_ALL, 0x1); + /* There is no extension information... */ + + /* Compute the checksums */ + return mptable_finalize(mc); +} + +unsigned long write_smp_table(unsigned long addr) +{ + void *v; + v = smp_write_floating_table(addr, 0); + return (unsigned long)smp_write_config_table(v); +} diff --git a/src/mainboard/amd/mandolin/romstage.c b/src/mainboard/amd/mandolin/romstage.c new file mode 100644 index 0000000..1741a39 --- /dev/null +++ b/src/mainboard/amd/mandolin/romstage.c @@ -0,0 +1,33 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <stddef.h> +#include <soc/romstage.h> +#include <superio/smsc/sio1036/sio1036.h> +#include <soc/gpio.h> +#include "gpio.h" + +#define SERIAL_DEV PNP_DEV(0x4e, SIO1036_SP1) + +void romstage_mainboard_early_init(void) +{ + size_t num_gpios; + const struct soc_amd_gpio *gpios; + gpios = early_gpio_table(&num_gpios); + program_gpios(gpios, num_gpios); + + if (CONFIG(SUPERIO_SMSC_SIO1036)) + sio1036_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); +}
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33772/1/src/mainboard/amd/mandolin/irq_table... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/#/c/33772/1/src/mainboard/amd/mandolin/irq_table... PS1, Line 97: printk(BIOS_INFO, "write_pirq_routing_table done.\n"); Prefer using '"%s...", __func__' to using 'write_pirq_routing_table', this function's name, in a string
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/33772/2/src/mainboard/amd/mandolin/irq_table... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/#/c/33772/2/src/mainboard/amd/mandolin/irq_table... PS2, Line 97: printk(BIOS_INFO, "write_pirq_routing_table done.\n"); Prefer using '"%s...", __func__' to using 'write_pirq_routing_table', this function's name, in a string
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/3/src/mainboard/amd/mandolin/... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/c/coreboot/+/33772/3/src/mainboard/amd/mandolin/... PS3, Line 97: printk(BIOS_INFO, "write_pirq_routing_table done.\n"); Prefer using '"%s...", __func__' to using 'write_pirq_routing_table', this function's name, in a string
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#7).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,276 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/7
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#11).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,314 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/11
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#14).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,432 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/14
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#15).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,432 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/15
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#16).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,431 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/16
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#17).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c M src/soc/amd/picasso/romstage.c 20 files changed, 1,495 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/17
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#18).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c M src/soc/amd/picasso/romstage.c 20 files changed, 1,495 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/18
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#20).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,523 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/20
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33772
to look at the new patch set (#24).
Change subject: _WIP_ mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 20 files changed, 1,675 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/24
Felix Held has uploaded a new patch set (#25) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 20 files changed, 1,444 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/25
Felix Held has uploaded a new patch set (#28) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
_WIP_ NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/routing.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/acpi_tables.c A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 20 files changed, 1,440 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/28
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: _WIP_ NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 29:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/29/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/acpi_tables.c:
PS29: nit: this should no longer be needed
Felix Held has uploaded a new patch set (#31) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
There is some sort of regression between e04c2c4527d07583201003aa95f1ebc596c11e00 and now resulting in something, likely the PSP bootloader, getting stuck at post code 0x000d
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://chromium-review.googlesource.com/2146440 --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/acpi/usb_oc.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,374 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/31
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 31:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33772/31/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/31/src/mainboard/amd/mandolin... PS31, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/33772/31/src/mainboard/amd/mandolin... PS31, Line 245: { that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33772/31/src/mainboard/amd/mandolin... PS31, Line 301: { that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33772/31/src/mainboard/amd/mandolin... PS31, Line 325: { that open brace { should be on the previous line
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 31:
The problem resulting in getting stuck at post code 0x000d was not a PSP-BL or ABL issue, but a APCB issue. will update the commit message with the next push
Felix Held has uploaded a new patch set (#32) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
b07e262c48eb964617c4413a88c37f0db31805b6 needs to be reverted for this to compile.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://chromium-review.googlesource.com/2146440 --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 17 files changed, 1,324 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/32
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 32:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33772/32/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/32/src/mainboard/amd/mandolin... PS32, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/33772/32/src/mainboard/amd/mandolin... PS32, Line 245: { that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33772/32/src/mainboard/amd/mandolin... PS32, Line 301: { that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33772/32/src/mainboard/amd/mandolin... PS32, Line 325: { that open brace { should be on the previous line
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 32:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/29/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/acpi_tables.c:
PS29:
nit: this should no longer be needed
Done
Felix Held has uploaded a new patch set (#33) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
b07e262c48eb964617c4413a88c37f0db31805b6 needs to be reverted for this to compile.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://chromium-review.googlesource.com/2146440 --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 17 files changed, 1,320 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/33
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 33:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/33/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/33/src/mainboard/amd/mandolin... PS33, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#34) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
b07e262c48eb964617c4413a88c37f0db31805b6 needs to be reverted for this to compile.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://chromium-review.googlesource.com/2146440 --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 17 files changed, 1,320 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/34
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 34:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/34/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/34/src/mainboard/amd/mandolin... PS34, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 34:
even with https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+... applied, https://review.coreboot.org/c/coreboot/+/42107 still breaks the build
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 34:
https://review.coreboot.org/c/coreboot/+/42339 fixes the issue b07e262c48eb964617c4413a88c37f0db31805b6 caused for mandolin, so cherry-pick that fix instead of doing the revert
Felix Held has uploaded a new patch set (#35) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB
f9be2d10c9a5e377304944de33357ae1ec9bdb7b needs to be reverted for this to build.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://chromium-review.googlesource.com/2146440 --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 17 files changed, 1,320 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/35
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] NOTFORMERGE mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 35:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/35/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/35/src/mainboard/amd/mandolin... PS35, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#36) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] mb/amd/mandolin: Add Picasso CRB
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,335 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/36
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 36:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/36/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/36/src/mainboard/amd/mandolin... PS36, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#37) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] mb/amd/mandolin: Add Picasso CRB
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,314 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/37
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 37:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/37/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/37/src/mainboard/amd/mandolin... PS37, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#38) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
[WIP] mb/amd/mandolin: Add Picasso CRB
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,297 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/38
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: [WIP] mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 38:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/38/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/38/src/mainboard/amd/mandolin... PS38, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#39) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,297 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/39
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 39:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/39/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/gpio.c:
https://review.coreboot.org/c/coreboot/+/33772/39/src/mainboard/amd/mandolin... PS39, Line 15: static const struct soc_amd_gpio gpio_set_stage_reset[] = { duplicated in bootblock.c
Felix Held has uploaded a new patch set (#40) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 18 files changed, 1,297 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/40
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 40:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/40/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/40/src/mainboard/amd/mandolin... PS40, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 40:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/39/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/gpio.c:
https://review.coreboot.org/c/coreboot/+/33772/39/src/mainboard/amd/mandolin... PS39, Line 15: static const struct soc_amd_gpio gpio_set_stage_reset[] = {
duplicated in bootblock. […]
refactored the gpio setup in early gpio and well, non-early gpio setup and dropped the array and function from the bootblock file
Felix Held has uploaded a new patch set (#41) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,277 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/41
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 41:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/41/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/41/src/mainboard/amd/mandolin... PS41, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#42) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,277 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/42
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 42:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 147: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#43) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,271 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/43
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 43:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 148: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 43:
(8 comments)
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/acpi/gpe.asl:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 34: I don't think we have any of these method on zork. Do we need them?
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 5: cim_verb_data Whats all this do?
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 28: write_pirq_routing_table wow, this method is complicated...
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 56: 0x1002 Can you use the ids from pci_ids.h?
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 68: 0xdef8 What is this bitmap format?
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 88: 0 0 or NC?
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 108: 0 NC?
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mptable.c:
PS43: Do we care about mp tables anymore? We deleted them for zork.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 43:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/acpi/gpe.asl:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 34:
I don't think we have any of these method on zork. […]
haven't investigated yet, since i didn't get the UEFI image for Mandolin to boot; if that worked, i'd just have looked at the ACPI tables from the UEFI firmware
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 5: cim_verb_data
Whats all this do?
it's comsumed by src/device/azalia_device.c to configure the Azalia audio codec
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 56: 0x1002
Can you use the ids from pci_ids. […]
good idea
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mptable.c:
PS43:
Do we care about mp tables anymore? We deleted them for zork.
not sure. I think Zheng already figured out when needs to be changed on the whole IRC config, but haven't integrated that yet
Felix Held has uploaded a new patch set (#44) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c M src/mainboard/google/zork/mainboard.c 20 files changed, 1,259 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/44
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 44:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/44/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/44/src/mainboard/amd/mandolin... PS44, Line 134: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#45) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/irq_tables.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/mptable.c A src/mainboard/amd/mandolin/romstage.c 19 files changed, 1,257 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/45
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 45:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/45/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/45/src/mainboard/amd/mandolin... PS45, Line 134: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Felix Held has uploaded a new patch set (#46) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/romstage.c 17 files changed, 1,010 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/46
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 46:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/irq_tables.c:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 28: write_pirq_routing_table
wow, this method is complicated...
Done. removed the whole file
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 56: 0x1002
good idea
Done
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 68: 0xdef8
What is this bitmap format?
Done
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mptable.c:
PS43:
not sure. […]
Done. removed mptable
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 46:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/46/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/46/src/mainboard/amd/mandolin... PS46, Line 134: if (!CONFIG(PICASSO_LPC_IOMUX)) { braces {} are not necessary for single statement blocks
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 46: Code-Review+2
(2 comments)
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 88: 0
0 or NC?
Done
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 108: 0
NC?
Still 0?
Felix Held has uploaded a new patch set (#47) to the change originally created by Marshall Dawson. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/romstage.c 17 files changed, 988 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/33772/47
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 47:
(2 comments)
Fixed the IRQ routing; now the Linux kernel doesn't complain about wrong IRQ numbers of the serial ports 2 and 3 any more
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/acpi/gpe.asl:
https://review.coreboot.org/c/coreboot/+/33772/42/src/mainboard/amd/mandolin... PS42, Line 34:
haven't investigated yet, since i didn't get the UEFI image for Mandolin to boot; if that worked, i' […]
I'll do the ACPI GPE cleanup in another patch
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/mainboard.c:
https://review.coreboot.org/c/coreboot/+/33772/43/src/mainboard/amd/mandolin... PS43, Line 108: 0
Still 0?
Done
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 47: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 47: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... PS47, Line 13: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, // Widget node 0x01 : Would be nice to use macros for this, but it's easier if done later (easier to check reproducibility)
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 47:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... PS47, Line 13: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, // Widget node 0x01 :
Would be nice to use macros for this, but it's easier if done later (easier to check reproducibility […]
yep; it's on the list of things i want to look into
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 47:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/33772/47/src/mainboard/amd/mandolin... PS47, Line 13: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, // Widget node 0x01 :
yep; it's on the list of things i want to look into
done. see CB:42610
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
mb/amd/mandolin: Add Picasso CRB
Mandolin is the CRB for AMD Picasso and Dali.
The mainboard code still needs a little cleanup and verification, but I'll do that in a follow-up to have a non Chromebook board using the Picasso SoC code in tree as soon as possible to be able to detect some possible breakage.
BUG=b:130660285
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Signed-off-by: Aaron Durbin adurbin@chromium.org Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Signed-off-by: Furquan Shaikh furquan@google.com Change-Id: I2b4a78e1eef9f998e1986da1506201eb505822eb Reviewed-on: https://review.coreboot.org/c/coreboot/+/33772 Reviewed-by: Raul Rangel rrangel@chromium.org Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- A src/mainboard/amd/mandolin/Kconfig A src/mainboard/amd/mandolin/Kconfig.name A src/mainboard/amd/mandolin/Makefile.inc A src/mainboard/amd/mandolin/acpi/gpe.asl A src/mainboard/amd/mandolin/acpi/mainboard.asl A src/mainboard/amd/mandolin/acpi/sleep.asl A src/mainboard/amd/mandolin/board_info.txt A src/mainboard/amd/mandolin/bootblock.c A src/mainboard/amd/mandolin/devicetree.cb A src/mainboard/amd/mandolin/dsdt.asl A src/mainboard/amd/mandolin/early_gpio.c A src/mainboard/amd/mandolin/gpio.c A src/mainboard/amd/mandolin/gpio.h A src/mainboard/amd/mandolin/hda_verb.c A src/mainboard/amd/mandolin/mainboard.c A src/mainboard/amd/mandolin/mandolin.fmd A src/mainboard/amd/mandolin/romstage.c 17 files changed, 988 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/amd/mandolin/Kconfig b/src/mainboard/amd/mandolin/Kconfig new file mode 100644 index 0000000..9760e45 --- /dev/null +++ b/src/mainboard/amd/mandolin/Kconfig @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: GPL-2.0-only + +if BOARD_AMD_MANDOLIN + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SOC_AMD_COMMON_BLOCK_USE_ESPI + select SOC_AMD_PICASSO + select HAVE_ACPI_TABLES + select BOARD_ROMSIZE_KB_8192 + select AZALIA_PLUGIN_SUPPORT + select HAVE_ACPI_RESUME + +config FMDFILE + string + default "src/mainboard/amd/mandolin/mandolin.fmd" + +config AMD_LPC_DEBUG_CARD + bool "Enable LPC-Serial debug card on the debug header" + default n + select PICASSO_LPC_IOMUX + select SUPERIO_SMSC_SIO1036 + help + AMD's debug card contains an SMSC SIO1036 device which provides + an I/O-based UART in the system. This feature is not compatible with + CONFIG_HUDSON_UART enabling the memory-mapped UART in the chipset. + Note that Kconfig does not currently enforce this restriction. + +config CBFS_SIZE + default 0x780000 + help + TODO: Adjust this to maximize CBFS size + +config MAINBOARD_DIR + string + default amd/mandolin + +config MAINBOARD_PART_NUMBER + string + default "MANDOLIN" + +config MAX_CPUS + int + default 8 + +config IRQ_SLOT_COUNT + int + default 11 + +config ONBOARD_VGA_IS_PRIMARY + bool + default y + +config AMD_FWM_POSITION_INDEX + int + default 3 + help + TODO: might need to be adapted for better placement of files in cbfs + +config MANDOLIN_HAVE_MCHP_FW + bool "Have Microchip EC firmware?" + default n + +config MANDOLIN_MCHP_FW_FILE + string + depends on MANDOLIN_HAVE_MCHP_FW + default "3rdparty/blobs/mainboard/amd/mandolin/mchp.bin" + +if !AMD_LPC_DEBUG_CARD +choice MANDOLIN_LPC_IOMUX + prompt "State of IOMux for LPC/eMMC signals" + default MANDOLIN_IOMUX_USE_EMMC + help + Mandolin is designed to use either LPC or eMMC signals. Use this + selection to determine which are configured for this image. + +config MANDOLIN_IOMUX_USE_LPC + bool "LPC signals" + help + +config MANDOLIN_IOMUX_USE_EMMC + bool "eMMC signals" + +endchoice +endif # !AMD_LPC_DEBUG_CARD + +config PICASSO_LPC_IOMUX + bool + default y if MANDOLIN_IOMUX_USE_LPC + help + Picasso's LPC bus signals are MUXed with some of the EMMC signals. + Select this option if LPC signals are required. + +endif # BOARD_AMD_MANDOLIN diff --git a/src/mainboard/amd/mandolin/Kconfig.name b/src/mainboard/amd/mandolin/Kconfig.name new file mode 100644 index 0000000..7dbfc3f --- /dev/null +++ b/src/mainboard/amd/mandolin/Kconfig.name @@ -0,0 +1,2 @@ +config BOARD_AMD_MANDOLIN + bool "Mandolin" diff --git a/src/mainboard/amd/mandolin/Makefile.inc b/src/mainboard/amd/mandolin/Makefile.inc new file mode 100644 index 0000000..52ad9c6 --- /dev/null +++ b/src/mainboard/amd/mandolin/Makefile.inc @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0-only + +bootblock-y += bootblock.c +bootblock-y += early_gpio.c + +ramstage-y += gpio.c + +# APCB_mandolin.bin +APCB_SOURCES = mandolin + +PHONY+=add_mchp_fw +INTERMEDIATE+=add_mchp_fw + +ifeq ($(CONFIG_MANDOLIN_HAVE_MCHP_FW),y) + +MANDOLIN_MICROCHIP_FW_OFFSET=0 +add_mchp_fw: $(obj)/coreboot.pre + $(CBFSTOOL) $(obj)/coreboot.pre write -r EC -f $(CONFIG_MANDOLIN_MCHP_FW_FILE) --fill-upward + +else +files_added:: warn_no_mchp +endif # CONFIG_MANDOLIN_HAVE_MCHP_FW + +PHONY+=warn_no_mchp +warn_no_mchp: + printf "\n\t** WARNING **\n" + printf "coreboot has been built without an the Microchip EC.\n" + printf "Do not flash this image. Your Mandolin's power button\n" + printf "will not respond when you press it.\n\n" + +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/acpi diff --git a/src/mainboard/amd/mandolin/acpi/gpe.asl b/src/mainboard/amd/mandolin/acpi/gpe.asl new file mode 100644 index 0000000..e28edf8 --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/gpe.asl @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +// +// +// +// todo: check file for accuracy +// +// +// + +External (_SB.PCI0.PBR4, DeviceObj) +External (_SB.PCI0.PBR5, DeviceObj) +External (_SB.PCI0.PBR6, DeviceObj) +External (_SB.PCI0.PBR7, DeviceObj) +External (_SB.PCI0.AZHD, DeviceObj) + +Scope(_GPE) { /* Start Scope GPE */ + + /* General event 3 */ + Method(_L03) { + /* DBGO("\_GPE\_L00\n") */ + } + + /* Legacy PM event */ + Method(_L08) { + /* DBGO("\_GPE\_L08\n") */ + } + + /* Temp warning (TWarn) event */ + Method(_L09) { + /* DBGO("\_GPE\_L09\n") */ + /* Notify (_TZ.TZ00, 0x80) */ + } + + /* USB controller PME# */ + Method(_L0B) { + /* DBGO("\_GPE\_L0B\n") */ + Notify(_SB.PCI0.EHC0, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.XHC0, 0x02) /* NOTIFY_DEVICE_WAKE */ + } + + /* ExtEvent0 SCI event */ + Method(_L10) { + /* DBGO("\_GPE\_L10\n") */ + } + + /* ExtEvent1 SCI event */ + Method(_L11) { + /* DBGO("\_GPE\_L11\n") */ + } + + /* GPIO0 or GEvent8 event */ + Method(_L18) { + /* DBGO("\_GPE\_L18\n") */ + Notify(_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */ + Notify(_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */ + } + + /* Azalia SCI event */ + Method(_L1B) { + /* DBGO("\_GPE\_L1B\n") */ + Notify(_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */ + } +} /* End Scope GPE */ diff --git a/src/mainboard/amd/mandolin/acpi/mainboard.asl b/src/mainboard/amd/mandolin/acpi/mainboard.asl new file mode 100644 index 0000000..d59240b --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/mainboard.asl @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* Memory related values */ +Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */ +Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */ +Name(PBLN, 0x0) /* Length of BIOS area */ + +Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */ +Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */ +Name(HPBA, 0xFED00000) /* Base address of HPET table */ + +/* Some global data */ +Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */ +Name(OSV, Ones) /* Assume nothing */ +Name(PMOD, One) /* Assume APIC */ diff --git a/src/mainboard/amd/mandolin/acpi/sleep.asl b/src/mainboard/amd/mandolin/acpi/sleep.asl new file mode 100644 index 0000000..0b65ab1 --- /dev/null +++ b/src/mainboard/amd/mandolin/acpi/sleep.asl @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* Wake status package */ +Name(WKST,Package(){Zero, Zero}) + +/* +* _PTS - Prepare to Sleep method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2, etc +* +* Exit: +* -none- +* +* The _PTS control method is executed at the beginning of the sleep process +* for S1-S5. The sleeping value is passed to the _PTS control method. This +* control method may be executed a relatively long time before entering the +* sleep state and the OS may abort the operation without notification to +* the ACPI driver. This method cannot modify the configuration or power +* state of any device in the system. +*/ +Method(_PTS, 1) { + /* DBGO("\_PTS\n") */ + /* DBGO("From S0 to S") */ + /* DBGO(Arg0) */ + /* DBGO("\n") */ + + /* Clear wake status structure. */ + Store(0, PEWD) + Store(0, Index(WKST,0)) + Store(0, Index(WKST,1)) + Store(7, UPWS) +} /* End Method(_PTS) */ + +/* +* _BFS OEM Back From Sleep method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2 +* +* Exit: +* -none- +*/ +Method(_BFS, 1) { + /* DBGO("\_BFS\n") */ + /* DBGO("From S") */ + /* DBGO(Arg0) */ + /* DBGO(" to S0\n") */ +} + +/* +* _WAK System Wake method +* +* Entry: +* Arg0=The value of the sleeping state S1=1, S2=2 +* +* Exit: +* Return package of 2 DWords +* Dword 1 - Status +* 0x00000000 wake succeeded +* 0x00000001 Wake was signaled but failed due to lack of power +* 0x00000002 Wake was signaled but failed due to thermal condition +* Dword 2 - Power Supply state +* if non-zero the effective S-state the power supply entered +*/ +Method(_WAK, 1) { + /* DBGO("\_WAK\n") */ + /* DBGO("From S") */ + /* DBGO(Arg0) */ + /* DBGO(" to S0\n") */ + + Return(WKST) +} /* End Method(_WAK) */ diff --git a/src/mainboard/amd/mandolin/board_info.txt b/src/mainboard/amd/mandolin/board_info.txt new file mode 100644 index 0000000..b351b8e --- /dev/null +++ b/src/mainboard/amd/mandolin/board_info.txt @@ -0,0 +1 @@ +Category: eval diff --git a/src/mainboard/amd/mandolin/bootblock.c b/src/mainboard/amd/mandolin/bootblock.c new file mode 100644 index 0000000..06da379 --- /dev/null +++ b/src/mainboard/amd/mandolin/bootblock.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <bootblock_common.h> +#include <amdblocks/lpc.h> +#include <superio/smsc/sio1036/sio1036.h> +#include "gpio.h" + +#define SERIAL_DEV PNP_DEV(0x4e, SIO1036_SP1) + +void bootblock_mainboard_early_init(void) +{ + mainboard_program_early_gpios(); + + if (CONFIG(SUPERIO_SMSC_SIO1036)) { + lpc_enable_sio_decode(LPC_SELECT_SIO_4E4F); + lpc_enable_decode(DECODE_ENABLE_SERIAL_PORT0 << CONFIG_UART_FOR_CONSOLE); + sio1036_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); + } +} diff --git a/src/mainboard/amd/mandolin/devicetree.cb b/src/mainboard/amd/mandolin/devicetree.cb new file mode 100644 index 0000000..179582b --- /dev/null +++ b/src/mainboard/amd/mandolin/devicetree.cb @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/picasso + register "acp_pin_cfg" = "I2S_PINS_MAX_HDA" + + # Set FADT Configuration + register "fadt_pm_profile" = "PM_UNSPECIFIED" + register "fadt_boot_arch" = "ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042" + register "fadt_flags" = "ACPI_FADT_WBINVD | /* See table 5-10 ACPI 3.0a spec */ + ACPI_FADT_C1_SUPPORTED | + ACPI_FADT_SLEEP_BUTTON | + ACPI_FADT_S4_RTC_WAKE | + ACPI_FADT_32BIT_TIMER | + ACPI_FADT_RESET_REGISTER | + ACPI_FADT_PCI_EXPRESS_WAKE | + ACPI_FADT_PLATFORM_CLOCK | + ACPI_FADT_S4_RTC_VALID | + ACPI_FADT_REMOTE_POWER_ON" + + register "sd_emmc_config" = "SD_EMMC_DISABLE" + + # eSPI Configuration + register "common_config.espi_config" = "{ + .std_io_decode_bitmap = ESPI_DECODE_IO_0X60_0X64_EN, + .generic_io_range[0] = { + .base = 0x662, + .size = 8, + }, + + .io_mode = ESPI_IO_MODE_SINGLE, + .op_freq_mhz = ESPI_OP_FREQ_33_MHZ, + .crc_check_enable = 1, + .dedicated_alert_pin = 1, + .periph_ch_en = 0, + .vw_ch_en = 0, + .oob_ch_en = 0, + .flash_ch_en = 0, + }" + + device cpu_cluster 0 on + device lapic 0 on end + end + device domain 0 on + subsystemid 0x1022 0x1510 inherit + device pci 0.0 on end # Root Complex + device pci 0.2 on end # IOMMU + device pci 1.0 on end # Dummy Host Bridge + device pci 1.3 on end # Bridge + device pci 8.0 on end # Dummy Host Bridge + device pci 8.1 on # Bridge to Bus A + device pci 0.0 on end # Internal GPU + device pci 0.1 on end # Display HDA + device pci 0.2 on end # Crypto Coprocesor + device pci 0.3 on end # USB 3.1 + device pci 0.4 on end # USB 3.1 + device pci 0.5 on end # Audio + device pci 0.6 on end # HDA + device pci 0.7 on end # non-Sensor Fusion Hub device + end + device pci 8.2 on # Bridge to Bus B + device pci 0.0 on end # AHCI + device pci 0.1 on end # Ethernet + device pci 0.2 on end # Ethernet + end + device pci 14.0 on # SM + chip drivers/generic/generic # dimm 0-0-0 + device i2c 50 on end + device i2c 51 on end + end + end # SM + device pci 14.3 on # - D14F3 bridge + chip superio/smsc/sio1036 # optional debug card + end + end + device pci 14.6 off end # SDHCI + device pci 18.0 on end # Data fabric [0-7] + device pci 18.1 on end + device pci 18.2 on end + device pci 18.3 on end + device pci 18.4 on end + device pci 18.5 on end + device pci 18.6 on end + device pci 18.7 on end + end # domain +end # chip soc/amd/picasso diff --git a/src/mainboard/amd/mandolin/dsdt.asl b/src/mainboard/amd/mandolin/dsdt.asl new file mode 100644 index 0000000..02a6619 --- /dev/null +++ b/src/mainboard/amd/mandolin/dsdt.asl @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#define MAINBOARD_HAS_SPEAKER 1 + +/* DefinitionBlock Statement */ +#include <acpi/acpi.h> +DefinitionBlock ( + "DSDT.AML", /* Output filename */ + "DSDT", /* Signature */ + 0x02, /* DSDT Revision, needs to be 2 for 64bit */ + OEM_ID, + ACPI_TABLE_CREATOR, + 0x00010001 /* OEM Revision */ + ) +{ /* Start of ASL file */ + /* #include <arch/x86/acpi/debug.asl> */ /* as needed */ + + /* global NVS and variables */ + #include <globalnvs.asl> + + /* Globals for the platform */ + #include "acpi/mainboard.asl" + + /* PCI IRQ mapping for the Southbridge */ + #include <pcie.asl> + + /* Describe the processor tree (_PR) */ + #include <cpu.asl> + + /* Contains the supported sleep states for this chipset */ + #include <sleepstates.asl> + + /* Contains the Sleep methods (WAK, PTS, GTS, etc.) */ + #include "acpi/sleep.asl" + + /* Contains _SWS methods */ + #include <soc/amd/common/acpi/acpi_wake_source.asl> + + /* System Bus */ + Scope(_SB) { /* Start _SB scope */ + /* global utility methods expected within the _SB scope */ + #include <arch/x86/acpi/globutil.asl> + + /* Describe the SOC */ + #include <soc.asl> + + } /* End _SB scope */ + + /* Define the General Purpose Events for the platform */ + #include "acpi/gpe.asl" +} +/* End of ASL file */ diff --git a/src/mainboard/amd/mandolin/early_gpio.c b/src/mainboard/amd/mandolin/early_gpio.c new file mode 100644 index 0000000..b6dd0d6 --- /dev/null +++ b/src/mainboard/amd/mandolin/early_gpio.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <soc/gpio.h> +#include "gpio.h" + +/* GPIO pins used by coreboot should be initialized in bootblock */ + +static const struct soc_amd_gpio gpio_set_stage_reset[] = { + /* not LLB */ + PAD_GPI(GPIO_12, PULL_UP), + /* not USB_OC5_L */ + PAD_GPI(GPIO_13, PULL_UP), + /* not USB_OC4_L */ + PAD_GPI(GPIO_14, PULL_UP), + /* not USB_OC1_L */ + PAD_GPI(GPIO_17, PULL_UP), + /* not USB_OC2_L */ + PAD_GPI(GPIO_18, PULL_UP), + /* SDIO eMMC power control */ + PAD_NF(GPIO_22, EMMC_PRW_CTRL, PULL_NONE), + /* PCIe SSD power enable */ + PAD_GPO(GPIO_23, HIGH), + /* PCIe Reset to DP0, DP1, J2105, TP, FP */ + PAD_NF(GPIO_27, PCIE_RST1_L, PULL_NONE), + /* eSPI CS# */ + PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE), + /* FANOUT0 */ + PAD_NF(GPIO_85, FANOUT0, PULL_NONE), + /* PC beep to codec */ + PAD_NF(GPIO_91, SPKR, PULL_NONE), +}; + +void mainboard_program_early_gpios(void) +{ + program_gpios(gpio_set_stage_reset, ARRAY_SIZE(gpio_set_stage_reset)); +} diff --git a/src/mainboard/amd/mandolin/gpio.c b/src/mainboard/amd/mandolin/gpio.c new file mode 100644 index 0000000..a60f00e --- /dev/null +++ b/src/mainboard/amd/mandolin/gpio.c @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <soc/gpio.h> + +#include "gpio.h" + +/* + * As a rule of thumb, GPIO pins used by coreboot should be initialized at + * bootblock while GPIO pins used only by the OS should be initialized at + * ramstage. + */ +static const struct soc_amd_gpio gpio_set_stage_ram[] = { + /* SSD DEVSLP */ + PAD_NF(GPIO_5, DEVSLP0, PULL_NONE), + /* Defeature SATA Express DEVSLP, as some boards are reworked + * to tie this to GPIO23 to control power */ + PAD_GPI(GPIO_6, PULL_UP), + /* I2S SDIN */ + PAD_NF(GPIO_7, ACP_I2S_SDIN, PULL_NONE), + /* I2S LRCLK */ + PAD_NF(GPIO_8, ACP_I2S_LRCLK, PULL_NONE), + /* Blink */ + PAD_NF(GPIO_11, BLINK, PULL_NONE), + /* APU_ALS_INT# */ + PAD_SCI(GPIO_24, PULL_UP, EDGE_LOW), + /* Finger print CS# */ + PAD_GPO(GPIO_31, HIGH), + /* NFC IRQ */ + PAD_INT(GPIO_69, PULL_UP, EDGE_LOW, STATUS), + /* Rear camera power enable */ + PAD_GPO(GPIO_89, HIGH), +}; + +/* eMMC controller driving either an SD card or eMMC device. */ +static const struct soc_amd_gpio emmc_gpios[] = { + PAD_NF(GPIO_21, EMMC_CMD, PULL_UP), + PAD_NF(GPIO_22, EMMC_PRW_CTRL, PULL_UP), + PAD_NF(GPIO_68, EMMC_CD, PULL_UP), + PAD_NF(GPIO_70, EMMC_CLK, PULL_NONE), + PAD_NF(GPIO_104, EMMC_DATA0, PULL_UP), + PAD_NF(GPIO_105, EMMC_DATA1, PULL_UP), + PAD_NF(GPIO_106, EMMC_DATA2, PULL_UP), + PAD_NF(GPIO_107, EMMC_DATA3, PULL_NONE), + PAD_NF(GPIO_74, EMMC_DATA4, PULL_UP), + PAD_NF(GPIO_75, EMMC_DATA6, PULL_UP), + PAD_NF(GPIO_87, EMMC_DATA7, PULL_UP), + PAD_NF(GPIO_88, EMMC_DATA5, PULL_UP), + PAD_NF(GPIO_109, EMMC_DS, PULL_UP), +}; + +void mainboard_program_gpios(void) +{ + program_gpios(gpio_set_stage_ram, ARRAY_SIZE(gpio_set_stage_ram)); + + /* Re-muxing LPCCLK0 can hang the system if LPC is in use. */ + if (CONFIG(AMD_LPC_DEBUG_CARD)) + printk(BIOS_INFO, "eMMC not available due to LPC requirement\n"); + else + program_gpios(emmc_gpios, ARRAY_SIZE(emmc_gpios)); +} diff --git a/src/mainboard/amd/mandolin/gpio.h b/src/mainboard/amd/mandolin/gpio.h new file mode 100644 index 0000000..04c98c5 --- /dev/null +++ b/src/mainboard/amd/mandolin/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef MAINBOARD_GPIO_H +#define MAINBOARD_GPIO_H + +void mainboard_program_early_gpios(void); /* bootblock GPIO configuration */ +void mainboard_program_gpios(void); /* ramstage GPIO configuration */ + +#endif /* MAINBOARD_GPIO_H */ diff --git a/src/mainboard/amd/mandolin/hda_verb.c b/src/mainboard/amd/mandolin/hda_verb.c new file mode 100644 index 0000000..61ae400 --- /dev/null +++ b/src/mainboard/amd/mandolin/hda_verb.c @@ -0,0 +1,97 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/azalia_device.h> + +const u32 cim_verb_data[] = { + /* Realtek ALC701 */ + 0x10ec0701, + 0x00000000, + 0x00000016, + + AZALIA_SUBVENDOR(0, 0x1022D001), // HDA Codec Subsystem ID: 0x1022D001 + + 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, // Widget node 0x01 : + 0x01271c40, 0x01271d01, 0x01271ea6, 0x01271fb7, // Pin widget 0x12 - DMIC + 0x01371c00, 0x01371d00, 0x01371e00, 0x01371f40, // Pin widget 0x13 - DMIC + 0x01471c10, 0x01471d01, 0x01471e17, 0x01471f90, // Pin widget 0x14 - FRONT (Port-D) + 0x01571cf0, 0x01571d11, 0x01571e11, 0x01571f41, // Pin widget 0x15 - I2S-OUT + 0x01671cf0, 0x01671d11, 0x01671e11, 0x01671f41, // Pin widget 0x16 - LINE3 (Port-B) + 0x01771cf0, 0x01771d11, 0x01771e11, 0x01771f41, // Pin widget 0x17 - I2S-OUT + 0x01871cf0, 0x01871d11, 0x01871e11, 0x01871f41, // Pin widget 0x18 - I2S-IN + 0x01971cf0, 0x01971d11, 0x01971e11, 0x01971f41, // Pin widget 0x19 - MIC2 (Port-F) + 0x01a71cf0, 0x01a71d11, 0x01a71e11, 0x01a71f41, // Pin widget 0x1A - LINE1 (Port-C) + 0x01b71c50, 0x01b71d10, 0x01b71ea1, 0x01b71f04, // Pin widget 0x1B - LINE2 (Port-E) + 0x01d71c01, 0x01d71d00, 0x01d71e60, 0x01d71f40, // Pin widget 0x1D - PC-BEEP + 0x01e71c30, 0x01e71d11, 0x01e71e45, 0x01e71f04, // Pin widget 0x1E - S/PDIF-OUT + 0x01f71cf0, 0x01f71d11, 0x01f71e11, 0x01f71f41, // Pin widget 0x1F - S/PDIF-IN + 0x02171c20, 0x02171d10, 0x02171e21, 0x02171f04, // Pin widget 0x21 - HP-OUT (Port-I) + 0x02971cf0, 0x02971d11, 0x02971e11, 0x02971f41, // Pin widget 0x29 - I2S-IN + 0x02050038, 0x02047901, 0x0205006b, 0x02040260, // NID 0x20 -0 Set Class-D output + // power as 2.2W@4 Ohm, and + // MIC2-VREFO-R is controlled by + // Line2 port. + 0x0205001a, 0x02048c03, 0x02050045, 0x0204b289, // NID 0x20 - 1 + 0x0205004a, 0x0204201b, 0x0205004a, 0x0204201b, // NID 0x20 - 2 + 0x02050010, 0x02040420, 0x01470c00, 0x02050036, // Dos beep path - 1 + 0x02047151, 0x01470740, 0x0143b000, 0x01470c02, // Dos beep path - 2 + + /* Realtek ALC285 */ + 0x10ec0285, + 0x00000000, + 0x00000028, + + AZALIA_SUBVENDOR(0, 0x1022D002), + + 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, // Widget node 0x01 : + 0x01271c40, 0x01271d01, 0x01271ea6, 0x01271fb7, // Pin widget 0x12 - DMIC + 0x01371c00, 0x01371d00, 0x01371e00, 0x01371f40, // Pin widget 0x13 - DMIC + 0x01471c10, 0x01471d01, 0x01471e17, 0x01471f90, // Pin widget 0x14 - Front (Port-D) + 0x01671cf0, 0x01671d11, 0x01671e11, 0x01671f41, // Pin widget 0x16 - NPC + 0x01771cf0, 0x01771d11, 0x01771e11, 0x01771f41, // Pin widget 0x17 - I2S OUT + 0x01871cf0, 0x01871d11, 0x01871e11, 0x01871f41, // Pin widget 0x18 - I2S IN + 0x01971cf0, 0x01971d11, 0x01971e11, 0x01971f41, // Pin widget 0x19 - MIC2 (Port-F) + 0x01a71cf0, 0x01a71d11, 0x01a71e11, 0x01a71f41, // Pin widget 0x1A - NPC + 0x01b71c30, 0x01b71d90, 0x01b71ea1, 0x01b71f04, // Pin widget 0x1B - LINE2 (Port-E) + 0x01d71c2d, 0x01d71d19, 0x01d71e66, 0x01d71f40, // Pin widget 0x1D - BEEP-IN + 0x01e71cf0, 0x01e71d11, 0x01e71e11, 0x01e71f41, // Pin widget 0x1E - S/PDIF-OUT + 0x02171c20, 0x02171d10, 0x02171e21, 0x02171f04, // Pin widget 0x21 - HP1-OUT (Port-I) + 0x05c50011, 0x05c40003, 0x05c50011, 0x05c40003, // dis. Silence detect delay turn off + 0x0205003c, 0x0204f254, 0x0205003c, 0x0204f214, // Class-D power on reset + 0x02050045, 0x0204b009, 0x02050063, 0x02040020, // Set TRS + turn off MIC2 VREFO + // gating with HP-JD. + 0x0205004a, 0x020420b0, 0x02050009, 0x02043803, // Enable HP JD + Set JD2 to 1 port + // JD for WoV + 0x0205000b, 0x0204777a, 0x0205000b, 0x0204777a, // Set TRS + Set JD2 pull up. + 0x02050038, 0x02043909, 0x05c50000, 0x05c43482, // NID 0x20 set class-D to 2W@4ohm + // (+12dB gain) + Set sine + // tone gain(0x34) + 0x05350000, 0x0534002a, 0x05350000, 0x0534002a, // Disable EQ + set 100Hz 2nd High + // Pass filter + 0x0535001d, 0x05340800, 0x0535001e, 0x05340800, // Left Channel-1 + 0x05350005, 0x053403f6, 0x05350006, 0x0534854c, // Left Channel-2 + 0x05350007, 0x05341e09, 0x05350008, 0x05346472, // Left Channel-3 + 0x05350009, 0x053401fb, 0x0535000a, 0x05344836, // Left Channel-4 + 0x0535000b, 0x05341c00, 0x0535000c, 0x05340000, // Left Channel-5 + 0x0535000d, 0x05340200, 0x0535000e, 0x05340000, // Left Channel-6 + 0x05450000, 0x05440000, 0x0545001d, 0x05440800, // Right Channel-1 + 0x0545001e, 0x05440800, 0x05450005, 0x054403f6, // Right Channel-2 + 0x05450006, 0x0544854c, 0x05450007, 0x05441e09, // Right Channel-3 + 0x05450008, 0x05446472, 0x05450009, 0x054401fb, // Right Channel-4 + 0x0545000a, 0x05444836, 0x0545000b, 0x05441c00, // Right Channel-5 + 0x0545000c, 0x05440000, 0x0545000d, 0x05440200, // Right Channel-6 + 0x0545000e, 0x05440000, 0x05350000, 0x0534c02a, // Right Channel-7+ EQ Update & Enable + 0x05d50006, 0x05d44c50, 0x05d50002, 0x05d46004, // AGC-1 Disable + (Front Gain=0dB ) + 0x05d50003, 0x05d45e5e, 0x05d50001, 0x05d4d783, // AGC-2 (Back Boost Gain = -0.375dB, + // Limiter = -1.125dB) + 0x05d50009, 0x05d451ff, 0x05d50006, 0x05d44e50, // AGC-3 + AGC Enable + 0x02050010, 0x02040020, 0x02050040, 0x02048800, // EAPD set to verb-control. + 0x02050030, 0x02049000, 0x02050037, 0x0204fe15, // Class D silent detection Enable + // -84dB threshold + 0x05b50006, 0x05b40044, 0x05a50001, 0x05a4001f, // Set headphone gain and Set pin1 + // to GPIO2 +}; + +const u32 pc_beep_verbs[] = { +}; + +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/amd/mandolin/mainboard.c b/src/mainboard/amd/mandolin/mainboard.c new file mode 100644 index 0000000..2e66c65 --- /dev/null +++ b/src/mainboard/amd/mandolin/mainboard.c @@ -0,0 +1,339 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <device/device.h> +#include <acpi/acpi.h> +#include <amdblocks/amd_pci_util.h> +#include <FspsUpd.h> +#include <soc/cpu.h> +#include <soc/southbridge.h> +#include <soc/pci_devs.h> +#include <soc/platform_descriptors.h> +#include <soc/soc_util.h> +#include <types.h> +#include <commonlib/helpers.h> +#include <chip.h> +#include "gpio.h" + +/* TODO: recheck IRQ tables */ + +/* + * These arrays set up the FCH PCI_INTR registers 0xC00/0xC01. + * This table is responsible for physically routing the PIC and + * IOAPIC IRQs to the different PCI devices on the system. It + * is read and written via registers 0xC00/0xC01 as an + * Index/Data pair. These values are chipset and mainboard + * dependent and should be updated accordingly. + */ +static uint8_t fch_pic_routing[0x80]; +static uint8_t fch_apic_routing[0x80]; + +_Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), + "PIC and APIC FCH interrupt tables must be the same size"); + +/* + * This table doesn't actually perform any routing. It only populates the + * PCI_INTERRUPT_LINE register on the PCI device with the PIC value specified + * in fch_apic_routing. The linux kernel only looks at this field as a backup + * if ACPI routing fails to describe the PCI routing correctly. The linux kernel + * also uses the APIC by default, so the value coded into the registers will be + * wrong. + * + * This table is also confusing because PCI Interrupt routing happens at the + * device/slot level, not the function level. + */ +static const struct pirq_struct mainboard_pirq_data[] = { + { PCIE_GPP_0_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_1_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_2_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_3_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_4_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_5_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_6_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_A_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { PCIE_GPP_B_DEVFN, { PIRQ_A, PIRQ_B, PIRQ_C, PIRQ_D } }, + { SMBUS_DEVFN, { PIRQ_SMBUS, PIRQ_NC, PIRQ_NC, PIRQ_NC } }, +}; + +static const struct fch_irq_routing { + uint8_t intr_index; + uint8_t pic_irq_num; + uint8_t apic_irq_num; +} mandolin_fch[] = { + { PIRQ_A, 8, 16 }, + { PIRQ_B, 10, 17 }, + { PIRQ_C, 11, 18 }, + { PIRQ_D, 12, 19 }, + { PIRQ_SCI, 9, 9 }, + { PIRQ_SD, PIRQ_NC, 16 }, + { PIRQ_SDIO, PIRQ_NC, 16 }, + { PIRQ_SATA, PIRQ_NC, 19 }, + { PIRQ_EMMC, PIRQ_NC, 17 }, + { PIRQ_GPIO, 7, 7 }, + { PIRQ_I2C2, 6, 6 }, + { PIRQ_I2C3, 14, 14 }, + { PIRQ_UART0, 4, 4 }, + { PIRQ_UART1, 3, 3 }, + { PIRQ_UART2, 4, 4 }, + { PIRQ_UART3, 3, 3 }, + + /* The MISC registers are not interrupt numbers */ + { PIRQ_MISC, 0xfa, 0x00 }, + { PIRQ_MISC0, 0x91, 0x00 }, + { PIRQ_MISC1, 0x00, 0x00 }, + { PIRQ_MISC2, 0x00, 0x00 }, +}; + +static void init_tables(void) +{ + const struct fch_irq_routing *entry; + int i; + + memset(fch_pic_routing, PIRQ_NC, sizeof(fch_pic_routing)); + memset(fch_apic_routing, PIRQ_NC, sizeof(fch_apic_routing)); + + for (i = 0; i < ARRAY_SIZE(mandolin_fch); i++) { + entry = mandolin_fch + i; + fch_pic_routing[entry->intr_index] = entry->pic_irq_num; + fch_apic_routing[entry->intr_index] = entry->apic_irq_num; + } +} + +static void pirq_setup(void) +{ + init_tables(); + + pirq_data_ptr = mainboard_pirq_data; + pirq_data_size = ARRAY_SIZE(mainboard_pirq_data); + intr_data_ptr = fch_apic_routing; + picr_data_ptr = fch_pic_routing; +} + +static void mainboard_init(void *chip_info) +{ + struct soc_amd_picasso_config *cfg = config_of_soc(); + + if (!CONFIG(PICASSO_LPC_IOMUX)) + cfg->sd_emmc_config = SD_EMMC_EMMC_HS400; + + mainboard_program_gpios(); +} + +static const fsp_pcie_descriptor pco_pcie_descriptors[] = { + { /* MXM */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 8, + .end_lane = 15, + .device_number = 1, + .function_number = 1, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ6 + }, + { /* SSD */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 0, + .end_lane = 1, + .device_number = 1, + .function_number = 7, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ5 + }, + { /* WLAN */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 4, + .end_lane = 4, + .device_number = 1, + .function_number = 2, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ0 + }, + { /* LAN */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 5, + .end_lane = 5, + .device_number = 1, + .function_number = 3, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ1 + }, + { /* WWAN */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 2, + .end_lane = 2, + .device_number = 1, + .function_number = 4, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ2 + }, + { /* WIFI */ + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 3, + .end_lane = 3, + .gpio_group_id = 1, + .device_number = 1, + .function_number = 5, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ3 + }, + { /* SATA EXPRESS */ + .port_present = true, + .engine_type = SATA_ENGINE, + .start_lane = 6, + .end_lane = 7, + .gpio_group_id = 1, + .channel_type = SATA_CHANNEL_LONG, + } +}; + +static const fsp_pcie_descriptor dali_pcie_descriptors[] = { + { // MXM + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 8, + .end_lane = 11, + .device_number = 1, + .function_number = 1, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ6 + }, + { // SSD + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 0, + .end_lane = 1, + .device_number = 1, + .function_number = 7, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ5 + }, + { // WLAN + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 4, + .end_lane = 4, + .device_number = 1, + .function_number = 2, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ0 + }, + { // LAN + .port_present = true, + .engine_type = PCIE_ENGINE, + .start_lane = 5, + .end_lane = 5, + .device_number = 1, + .function_number = 3, + .link_aspm = ASPM_L1, + .link_aspm_L1_1 = true, + .link_aspm_L1_2 = true, + .turn_off_unused_lanes = true, + .clk_req = CLK_REQ1 + } +}; + +static const fsp_ddi_descriptor pco_ddi_descriptors[] = { + { // DDI0 - DP + .connector_type = DP, + .aux_index = AUX1, + .hdp_index = HDP1 + }, + { /* DDI1 - eDP */ + .connector_type = EDP, + .aux_index = AUX2, + .hdp_index = HDP2 + }, + { /* DDI2 - DP */ + .connector_type = DP, + .aux_index = AUX3, + .hdp_index = HDP3, + }, + { /* DDI3 - DP */ + .connector_type = DP, + .aux_index = AUX4, + .hdp_index = HDP4, + } +}; + +static const fsp_ddi_descriptor dali_ddi_descriptors[] = { + { // DDI0 - DP + .connector_type = DP, + .aux_index = AUX1, + .hdp_index = HDP1 + }, + { // DDI1 - eDP + .connector_type = EDP, + .aux_index = AUX2, + .hdp_index = HDP2 + }, + { // DDI2 - DP + .connector_type = DP, + .aux_index = AUX3, + .hdp_index = HDP3, + } +}; + +void mainboard_get_pcie_ddi_descriptors( + const fsp_pcie_descriptor **pcie_descs, size_t *pcie_num, + const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) +{ + /* Dali */ + if (soc_is_dali()) { + *pcie_descs = dali_pcie_descriptors; + *pcie_num = ARRAY_SIZE(dali_pcie_descriptors); + *ddi_descs = dali_ddi_descriptors; + *ddi_num = ARRAY_SIZE(dali_ddi_descriptors); + } + /* Picasso and default */ + else { + *pcie_descs = pco_pcie_descriptors; + *pcie_num = ARRAY_SIZE(pco_pcie_descriptors); + *ddi_descs = pco_ddi_descriptors; + *ddi_num = ARRAY_SIZE(pco_ddi_descriptors); + } +} + +static void mandolin_enable(struct device *dev) +{ + printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); + + /* Initialize the PIRQ data structures for consumption */ + pirq_setup(); +} + +struct chip_operations mainboard_ops = { + .init = mainboard_init, + .enable_dev = mandolin_enable, +}; diff --git a/src/mainboard/amd/mandolin/mandolin.fmd b/src/mainboard/amd/mandolin/mandolin.fmd new file mode 100644 index 0000000..c702ba9 --- /dev/null +++ b/src/mainboard/amd/mandolin/mandolin.fmd @@ -0,0 +1,8 @@ +FLASH@0xFF800000 0x800000 { + BIOS@0x0 { + EC@0x0 0x21000 + RW_MRC_CACHE@0x21000 0x10000 + FMAP 0x1000 + COREBOOT(CBFS) + } +} diff --git a/src/mainboard/amd/mandolin/romstage.c b/src/mainboard/amd/mandolin/romstage.c new file mode 100644 index 0000000..853b087 --- /dev/null +++ b/src/mainboard/amd/mandolin/romstage.c @@ -0,0 +1 @@ +/* SPDX-License-Identifier: GPL-2.0-only */
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 48:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/48/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/33772/48/src/mainboard/amd/mandolin... PS48, Line 3: MAINBOARD_HAS_SPEAKER looks like it is not used
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33772 )
Change subject: mb/amd/mandolin: Add Picasso CRB ......................................................................
Patch Set 48:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33772/48/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/33772/48/src/mainboard/amd/mandolin... PS48, Line 3: MAINBOARD_HAS_SPEAKER
looks like it is not used
used in src/soc/amd/common/acpi/lpc.asl which is indirectly included here