diff options
Diffstat (limited to 'meta-openbmc-mods/meta-ast2600')
6 files changed, 265 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch new file mode 100644 index 000000000..372d69e26 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch @@ -0,0 +1,51 @@ +From a9f5d0357701c817106cd158d377ef645309ccc2 Mon Sep 17 00:00:00 2001 +From: gokulsanker <gokul.sanker.v.g@intel.com> +Date: Wed, 8 Dec 2021 01:44:19 +0530 +Subject: [PATCH] If FFUJ is enabled serial console must be disabled + +FFUJ mode user is not allowed to enter uboot command +line interface. Serial console is disabled by creating +an indefinite sleep if FFUJ is enabled, same +functionality is used in whitely platforms + +Tested: +Serial console is disabled in FFUJ mode + +Signed-off-by: gokulsanker <gokul.sanker.v.g@intel.com> +--- + common/autoboot.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/common/autoboot.c b/common/autoboot.c +index 8a99780423..21e59feea7 100644 +--- a/common/autoboot.c ++++ b/common/autoboot.c +@@ -19,6 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; + + #define MAX_DELAY_STOP_STR 32 + ++#define WAIT_STATE_TIMEOUT 10000 + #ifndef DEBUG_BOOTKEYS + #define DEBUG_BOOTKEYS 0 + #endif +@@ -271,9 +272,14 @@ static int abortboot(int bootdelay) + { + int abort = 0; + +- abort = gpio_abort(); +- if (abort) +- goto exit; ++ if (gpio_abort()) ++ { ++ printf("#### BMC is in disabled state(FFU Jumper is asserted), " ++ "So BMC serial console disabled. ####\n"); ++ while (1) { ++ mdelay(WAIT_STATE_TIMEOUT); ++ } ++ } + + if (bootdelay >= 0) + abort = __abortboot(bootdelay); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend index 1e20585bc..fdc83fce1 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend @@ -41,6 +41,7 @@ SRC_URI:append:intel-ast2600 = " \ file://0034-Implement-the-IPMI-commands-in-FFUJ-mode-in-u-boot.patch \ file://0036-Disable-BMC-MMIO-Decode-on-VGA-SCU-register-bit.patch \ file://0037-Enable-I2C-clock-stretching-and-multi-master-support.patch \ + file://0038-Disabling-serial-console-if-FFUJ-is-enabled.patch \ " # CVE-2020-10648 vulnerability fix diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0005-Add-sample-i3c-slave-driver.patch b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0005-Add-sample-i3c-slave-driver.patch new file mode 100644 index 000000000..8f548c2e5 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/0005-Add-sample-i3c-slave-driver.patch @@ -0,0 +1,150 @@ +From 4987202965423fafd5c704d4e68a51a4167a4414 Mon Sep 17 00:00:00 2001 +From: Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com> +Date: Thu, 30 Sep 2021 16:28:26 +0200 +Subject: [PATCH] Add sample i3c slave driver + +The aim of the driver is to debug various i3c solutions implemented +for DesignWare master I3C driver. +The driver is bound to the I3C device that corresponds to I3C slave +emulated by Prodigy with manufacturer ID 0xAC and part ID 0x55AA. +It is enough to fill the I3C_DEVICE macro with the corresponding data +to adjust the driver with another I3C slave device + +Signed-off-by: Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com> +--- + drivers/i3c/Kconfig | 2 + + drivers/i3c/Makefile | 1 + + drivers/i3c/sample/Kconfig | 7 +++ + drivers/i3c/sample/Makefile | 2 + + drivers/i3c/sample/dw-i3c-sample.c | 75 ++++++++++++++++++++++++++++++ + 5 files changed, 87 insertions(+) + create mode 100644 drivers/i3c/sample/Kconfig + create mode 100644 drivers/i3c/sample/Makefile + create mode 100644 drivers/i3c/sample/dw-i3c-sample.c + +diff --git a/drivers/i3c/Kconfig b/drivers/i3c/Kconfig +index 01642768ab5f..202b0d091631 100644 +--- a/drivers/i3c/Kconfig ++++ b/drivers/i3c/Kconfig +@@ -36,4 +36,6 @@ config I3CDEV + and hence SUBJECT TO CHANGE WITHOUT NOTICE while it stabilizes. + + source "drivers/i3c/master/Kconfig" ++ ++source "drivers/i3c/sample/Kconfig" + endif # I3C +diff --git a/drivers/i3c/Makefile b/drivers/i3c/Makefile +index 606d422841b2..8048a9a793c6 100644 +--- a/drivers/i3c/Makefile ++++ b/drivers/i3c/Makefile +@@ -3,3 +3,4 @@ i3c-y := device.o master.o + obj-$(CONFIG_I3C) += i3c.o + obj-$(CONFIG_I3CDEV) += i3cdev.o + obj-$(CONFIG_I3C) += master/ ++obj-$(CONFIG_I3C) += sample/ +diff --git a/drivers/i3c/sample/Kconfig b/drivers/i3c/sample/Kconfig +new file mode 100644 +index 000000000000..6376c9891795 +--- /dev/null ++++ b/drivers/i3c/sample/Kconfig +@@ -0,0 +1,7 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++config DW_I3C_SAMPLE ++ tristate "Synopsys DesignWare I3C sample driver" ++ depends on I3C ++help ++ Say yes here to enable the driver for DesignWare ++ I3C Sample driver. +diff --git a/drivers/i3c/sample/Makefile b/drivers/i3c/sample/Makefile +new file mode 100644 +index 000000000000..c73bb34fce0e +--- /dev/null ++++ b/drivers/i3c/sample/Makefile +@@ -0,0 +1,2 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++obj-$(CONFIG_DW_I3C_SAMPLE) += dw-i3c-sample.o +\ No newline at end of file +diff --git a/drivers/i3c/sample/dw-i3c-sample.c b/drivers/i3c/sample/dw-i3c-sample.c +new file mode 100644 +index 000000000000..1993b9fdb32b +--- /dev/null ++++ b/drivers/i3c/sample/dw-i3c-sample.c +@@ -0,0 +1,75 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* Copyright (C) 2021 Intel Corporation.*/ ++ ++#include <linux/i3c/device.h> ++#include <linux/module.h> ++ ++#define IBI_QUEUE_STATUS_IBI_ID(x) (((x) & GENMASK(15, 8)) >> 8) ++#define IBI_QUEUE_IBI_ADDR(x) (IBI_QUEUE_STATUS_IBI_ID(x) >> 1) ++#define IBI_QUEUE_STATUS_DATA_LEN(x) ((x) & GENMASK(7, 0)) ++ ++static void ibi_handler(struct i3c_device *dev, ++ const struct i3c_ibi_payload *payload) ++{ ++ unsigned int i = 0; ++ u32 ibi_status; ++ u8 addr; ++ const u8 *buf; ++ ++ dev_info(i3cdev_to_dev(dev), "%s:%d\n", __func__, __LINE__); ++ if (payload) { ++ ibi_status = *((u32 *)payload->data); ++ addr = IBI_QUEUE_IBI_ADDR(ibi_status); ++ dev_info(i3cdev_to_dev(dev), "%s, dynamic address = 0x%02x\n", ++ __func__, addr); ++ /* We need to read only IBI Paylod data - so shift for IBI_QUEUE_STATUS ++ * length which is 32 bits ++ */ ++ buf = payload->data + sizeof(u32); ++ for (i = 0; i < IBI_QUEUE_STATUS_DATA_LEN(ibi_status); i++) ++ dev_info(i3cdev_to_dev(dev), "%s payload[%d] = 0x%02x\n", ++ __func__, i, *(buf + sizeof(u8) * i)); ++ } ++} ++ ++static int dw_i3c_sample_probe(struct i3c_device *i3cdev) ++{ ++ int ret; ++ struct i3c_ibi_setup ibireq = { ++ .handler = ibi_handler, ++ .max_payload_len = 2, ++ .num_slots = 10, ++ }; ++ ++ ret = i3c_device_request_ibi(i3cdev, &ibireq); ++ if (ret) ++ return ret; ++ ret = i3c_device_enable_ibi(i3cdev); ++ if (ret) ++ i3c_device_free_ibi(i3cdev); ++ ++ return ret; ++} ++ ++static void dw_i3c_sample_remove(struct i3c_device *i3cdev) ++{ ++ i3c_device_disable_ibi(i3cdev); ++ i3c_device_free_ibi(i3cdev); ++} ++ ++static const struct i3c_device_id dw_i3c_sample_ids[] = { ++ I3C_DEVICE(0x2AC /*manufid*/, 0x55AA /*partid*/, NULL /*driver-data*/), ++ { /* sentinel */ }, ++}; ++ ++static struct i3c_driver dw_i3c_sample = { ++ .driver.name = "dw-i3c-sample", ++ .id_table = dw_i3c_sample_ids, ++ .probe = dw_i3c_sample_probe, ++ .remove = dw_i3c_sample_remove, ++}; ++ ++module_i3c_driver(dw_i3c_sample); ++MODULE_AUTHOR("Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com>"); ++MODULE_DESCRIPTION("DesignWare I3C sample driver"); ++MODULE_LICENSE("GPL"); +-- +2.25.1 + diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend index df3901d77..94d22381f 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -7,4 +7,5 @@ SRC_URI += " \ file://0002-serial-8250-Fix-RX-DMA-time-out-property.patch \ file://0003-serial-8250_aspeed-Make-port-type-fixed.patch \ file://0004-Add-a-workaround-to-cover-UART-interrupt-bug-in-AST2.patch \ + file://0005-Add-sample-i3c-slave-driver.patch \ " diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch new file mode 100644 index 000000000..458f234b6 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch @@ -0,0 +1,59 @@ +From 9923811a2880ad4a8289af666b63adfd1807b5bd Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +Date: Mon, 22 Nov 2021 22:12:00 +0000 +Subject: [PATCH] ADCSensor: Fix for P3V3 sensor + +Issue: As part of adapting to upstream ADC driver change for all the +platforms of AST2600, ADC scale factor settings in board configurations +is adjusted. +Patch: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/47086 +Due to this change set sensor threshold is not updating for critical +threshold value of P3V3 sensor. + +Fix: Updating pre sensor scaling of "maxVoltageReading" to 2.5 can fix +this issue. + +Tested: +Verified using IPMI set sensor threshold command for P3V3 sensor and for +other sensors as well. +Before fix: +//Get sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x27 0x83 +Response: 1b d6 d0 00 f8 ff 00 +//Set sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x26 0x83 0x10 0x00 0x00 0x00 0x00 0xfd 0x00 +Response: //Success +Command : ipmitool raw 0x04 0x27 0x83 +Response: 1b d8 d1 00 f9 ff 00 + +After fix: +//Get sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x27 0x81 +Response: 1b b2 ad 00 ce d4 00 +//Set sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x26 0x81 0x10 0x00 0x00 0x00 0x00 0xfd 0x00 +Response: //Success +Command : ipmitool raw 0x04 0x27 0x81 +Response: 1b b2 ad 00 ce fd 00 + +Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +--- + src/ADCSensor.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp +index 9758168..2f3c66f 100644 +--- a/src/ADCSensor.cpp ++++ b/src/ADCSensor.cpp +@@ -37,7 +37,7 @@ + static constexpr unsigned int sensorScaleFactor = 1000; + + static constexpr double roundFactor = 10000; // 3 decimal places +-static constexpr double maxVoltageReading = 1.8; // pre sensor scaling ++static constexpr double maxVoltageReading = 2.5; // pre sensor scaling + static constexpr double minVoltageReading = 0; + + ADCSensor::ADCSensor(const std::string& path, +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors_%.bbappend new file mode 100644 index 000000000..7f412bfa4 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-ADCSensor-Fix-for-P3V3-sensor.patch" |