summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common-small
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-07-31 20:43:37 +0300
committerEd Tanous <ed.tanous@intel.com>2019-08-01 18:19:38 +0300
commitd0f63ef62c76c932a2003eaa42c0b250065ae06f (patch)
tree4c0e3cb32dc80f80460bdbf82ff6d401d4ff194f /meta-openbmc-mods/meta-common-small
parentb4f66bacb1b8e661d794fa7a189e2f66f5092e2e (diff)
downloadopenbmc-d0f63ef62c76c932a2003eaa42c0b250065ae06f.tar.xz
Update to internal 7-31-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common-small')
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch83
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch32
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend9
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend11
-rw-r--r--meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend7
5 files changed, 142 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch
new file mode 100644
index 000000000..cca6c838b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch
@@ -0,0 +1,83 @@
+From 2ad1d60c39a2a9a08bcd29188362efba4e92e546 Mon Sep 17 00:00:00 2001
+From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
+Date: Tue, 9 Apr 2019 16:18:07 -0700
+Subject: [PATCH] hw/arm/aspeed: Add an intel-ast2500 machine type
+
+Include the HW strap setting and some I2C temperature sensors.
+
+Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ hw/arm/aspeed.c | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
+index 465e65f323..80e8466aa9 100644
+--- a/hw/arm/aspeed.c
++++ b/hw/arm/aspeed.c
+@@ -60,6 +60,21 @@ struct AspeedBoardState {
+ SCU_HW_STRAP_MAC0_RGMII) & \
+ ~SCU_HW_STRAP_2ND_BOOT_WDT)
+
++/* intel ast2500 hardware value: 0xF3CCC286 */
++#define INTEL_AST2500_BMC_HW_STRAP1 (( \
++ AST2500_HW_STRAP1_DEFAULTS | \
++ SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE | \
++ SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE | \
++ SCU_AST2500_HW_STRAP_UART_DEBUG | \
++ SCU_AST2500_HW_STRAP_ESPI_ENABLE | \
++ SCU_AST2500_HW_STRAP_DDR4_ENABLE | \
++ SCU_HW_STRAP_GPIOE_PT_EN | \
++ SCU_AST2400_HW_STRAP_ACPI_DIS | \
++ SCU_HW_STRAP_CLK_48M_IN | \
++ SCU_HW_STRAP_VGA_CLASS_CODE | \
++ SCU_HW_STRAP_MAC1_RGMII) & \
++ ~SCU_HW_STRAP_2ND_BOOT_WDT)
++
+ /* Romulus hardware value: 0xF10AD206 */
+ #define ROMULUS_BMC_HW_STRAP1 ( \
+ AST2500_HW_STRAP1_DEFAULTS | \
+@@ -281,6 +296,24 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc)
+ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32);
+ }
+
++static void intel_ast2500_i2c_init(AspeedBoardState *bmc)
++{
++ AspeedSoCState *soc = &bmc->soc;
++ DeviceState *dev;
++
++ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 6), "tmp421", 0x4d);
++ object_property_set_int(OBJECT(dev), 50000, "temperature0", &error_abort);
++ /* The s2600wf expects a TMP75 but a TMP105 is compatible */
++ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 6), "tmp105", 0x48);
++ object_property_set_int(OBJECT(dev), 50000, "temperature", &error_abort);
++ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 6), "tmp105", 0x49);
++ object_property_set_int(OBJECT(dev), 50000, "temperature", &error_abort);
++ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 6), "tmp105", 0x4a);
++ object_property_set_int(OBJECT(dev), 50000, "temperature", &error_abort);
++ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 6), "tmp105", 0x4b);
++ object_property_set_int(OBJECT(dev), 50000, "temperature", &error_abort);
++}
++
+ static void romulus_bmc_i2c_init(AspeedBoardState *bmc)
+ {
+ AspeedSoCState *soc = &bmc->soc;
+@@ -390,6 +423,15 @@ static const AspeedBoardConfig aspeed_boards[] = {
+ .spi_model = "mx25l25635e",
+ .num_cs = 1,
+ .i2c_init = ast2500_evb_i2c_init,
++ }, {
++ .name = MACHINE_TYPE_NAME("intel-ast2500"),
++ .desc = "Intel AST2500 BMC (ARM1176)",
++ .soc_name = "ast2500-a1",
++ .hw_strap1 = INTEL_AST2500_BMC_HW_STRAP1,
++ .fmc_model = "n25q512a",
++ .spi_model = "n25q512a",
++ .num_cs = 1,
++ .i2c_init = intel_ast2500_i2c_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("romulus-bmc"),
+ .desc = "OpenPOWER Romulus BMC (ARM1176)",
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch
new file mode 100644
index 000000000..2f81895d0
--- /dev/null
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/files/0002-Turn-Off-FFWUPD-Jumper.patch
@@ -0,0 +1,32 @@
+From db99abbddc9fe958353e47fcd91c741bd7a93066 Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Wed, 19 Jun 2019 14:15:07 -0700
+Subject: [PATCH] Turn Off FFWUPD Jumper
+
+This disabled the jumper so we don't get stuck during
+boot.
+
+TODO: Do this the "right way", if there is one.
+
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ hw/gpio/aspeed_gpio.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
+index 12d8a49666..ca6f8dd0dd 100644
+--- a/hw/gpio/aspeed_gpio.c
++++ b/hw/gpio/aspeed_gpio.c
+@@ -29,6 +29,9 @@ static uint64_t aspeed_gpio_read(void *opaque, hwaddr addr,
+ val = s->regs[addr];
+ }
+
++ if (addr == 0x0){
++ val |= 1 << 0x18; // ffupd jumper
++ }
+ return val;
+ }
+
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend
new file mode 100644
index 000000000..4b4630d7c
--- /dev/null
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-native_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI = "git://github.com/openbmc/qemu.git \
+ file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \
+ file://0002-Turn-Off-FFWUPD-Jumper.patch"
+
+QEMU_TARGETS = "arm"
+
+S = "${WORKDIR}/git"
+SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc"
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend
new file mode 100644
index 000000000..fb0a749bb
--- /dev/null
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI = "git://github.com/openbmc/qemu.git \
+ file://powerpc_rom.bin \
+ file://run-ptest \
+ file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \
+ file://0002-Turn-Off-FFWUPD-Jumper.patch"
+
+QEMU_TARGETS = "arm"
+
+S = "${WORKDIR}/git"
+SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc"
diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend
new file mode 100644
index 000000000..b25c0f2e8
--- /dev/null
+++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI = "git://github.com/openbmc/qemu.git \
+ file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \
+ file://0002-Turn-Off-FFWUPD-Jumper.patch"
+
+S = "${WORKDIR}/git"
+SRCREV = "5dca85cb0b85ac309d131f9db1fb57af282d67cc"