summaryrefslogtreecommitdiff
path: root/src/mainboard/lippert/spacerunner-lx/mainboard.c
diff options
context:
space:
mode:
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>2008-10-30 19:34:44 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-10-30 19:34:44 +0000
commitedc7ef2b76f8d49d1eeae9a111bdcae3f288d6f9 (patch)
tree69780eff6101472f344423bf470e6949fd9d0b47 /src/mainboard/lippert/spacerunner-lx/mainboard.c
parent6a4bf9886ac9990206ac64fd09890bca433d9bd8 (diff)
downloadcoreboot-edc7ef2b76f8d49d1eeae9a111bdcae3f288d6f9.tar.xz
Add support for the LiPPERT Cool SpaceRunner-LX embedded PC board:
- PC/104+ form factor - AMD Geode-LX CPU/northbridge - AMD CS5536 southbridge - ITE IT8712F Super I/O Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3710 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lippert/spacerunner-lx/mainboard.c')
-rw-r--r--src/mainboard/lippert/spacerunner-lx/mainboard.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/mainboard/lippert/spacerunner-lx/mainboard.c b/src/mainboard/lippert/spacerunner-lx/mainboard.c
new file mode 100644
index 0000000000..010f561516
--- /dev/null
+++ b/src/mainboard/lippert/spacerunner-lx/mainboard.c
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008 LiPPERT Embedded Computers GmbH
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <arch/io.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include "chip.h"
+
+static const u16 ec_init_table[] = { /* hi=data, lo=index */
+ 0x1900, /* Enable monitoring */
+ 0x3050, /* VIN4,5 enabled */
+ 0x0351, /* TMPIN1,2 diode mode, TMPIN3 off */
+ 0x805C, /* Unlock zero adjust */
+ 0x7056, 0x3C57, /* Zero adjust TMPIN1,2 */
+ 0x005C, /* Lock zero adjust */
+ 0xD014 /* Also set FAN_CTL polarity to Active High */
+};
+
+static void init(struct device *dev)
+{
+ struct mainboard_lippert_spacerunner_lx_config *mb = dev->chip_info;
+ unsigned int gpio_base, i;
+ printk_debug("LiPPERT SpaceRunner-LX ENTER %s\n", __FUNCTION__);
+
+ /* Init CS5536 GPIOs */
+ gpio_base = pci_read_config32(dev_find_device(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_CS5536_ISA, 0), PCI_BASE_ADDRESS_1) - 1;
+
+ outl(0x00000040, gpio_base + 0x00); // GPIO6 value 1 - LAN_PD#
+ outl(0x00000040, gpio_base + 0x04); // GPIO6 output 1 - LAN_PD#
+ outl(0x04000000, gpio_base + 0x18); // GPIO10 pull up 0 - THRM_ALRM#
+ outl(0x00000400, gpio_base + 0x34); // GPIO10 in aux1 1 - THRM_ALRM#
+ outl(0x00000400, gpio_base + 0x20); // GPIO10 input 1 - THRM_ALRM#
+ outl(0x00000800, gpio_base + 0x94); // GPIO27 out aux2 1 - 32kHz
+ outl(0x00000800, gpio_base + 0x84); // GPIO27 output 1 - 32kHz
+ outl(0x08000000, gpio_base + 0x98); // GPIO27 pull up 0 - 32kHz
+
+ /* Init Environment Controller. */
+ for (i = 0; i < ARRAY_SIZE(ec_init_table); i++) {
+ u16 val = ec_init_table[i];
+ outb((u8)val, 0x0295);
+ outb(val >> 8, 0x0296);
+ }
+
+ outb(mb->sio_gp1x_config, 0x1220); /* Simple-I/O GP17-10 */
+ printk_debug("LiPPERT SpaceRunner-LX EXIT %s\n", __FUNCTION__);
+}
+
+static void enable_dev(struct device *dev)
+{
+ dev->ops->init = init;
+}
+
+struct chip_operations mainboard_lippert_spacerunner_lx_ops = {
+ CHIP_NAME("LiPPERT SpaceRunner-LX Mainboard")
+ .enable_dev = enable_dev,
+};