aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Chu <joy_chu@wistron.com>2019-11-19 10:17:31 +0800
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-12-05 15:19:05 +0530
commit1ac0e1f6dd114b2170c37e599bcf938e2e5b6a4f (patch)
tree45a8b28516013e96e7fd11118c40655bc0fcbe89
parent29fcd8c266d585c66dda6dd5b989e7e4c3d6344a (diff)
downloadskiboot-1ac0e1f6dd114b2170c37e599bcf938e2e5b6a4f.zip
skiboot-1ac0e1f6dd114b2170c37e599bcf938e2e5b6a4f.tar.gz
skiboot-1ac0e1f6dd114b2170c37e599bcf938e2e5b6a4f.tar.bz2
platform/mihawk: Add system VPD EEPROM to I2C bus
[ Upstream commit 52952aca9d6148e7ae3c3725ae43d48e27b61357 ] Add VPD EEPROM type fix for planar VPD update. Signed-off-by: Joy Chu <joy_chu@wistron.com> [oliver: commit subject] Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--platforms/astbmc/mihawk.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/platforms/astbmc/mihawk.c b/platforms/astbmc/mihawk.c
index 32a902d..0491887 100644
--- a/platforms/astbmc/mihawk.c
+++ b/platforms/astbmc/mihawk.c
@@ -229,6 +229,24 @@ static void mihawk_create_ocapi_i2c_bus(void)
}
}
+/*
+ * HACK: Hostboot doesn't export the correct data for the system VPD EEPROM
+ * for this system. So we need to work around it here.
+ */
+static void vpd_dt_fixup(void)
+{
+ struct dt_node *n = dt_find_by_path(dt_root,
+ "/xscom@603fc00000000/i2cm@a2000/i2c-bus@0/eeprom@50");
+
+ if (n) {
+ dt_check_del_prop(n, "compatible");
+ dt_add_property_string(n, "compatible", "atmel,24c512");
+
+ dt_check_del_prop(n, "label");
+ dt_add_property_string(n, "label", "system-vpd");
+ }
+}
+
static bool mihawk_probe(void)
{
if (!dt_node_is_compatible(dt_root, "ibm,mihawk") &&
@@ -241,6 +259,8 @@ static bool mihawk_probe(void)
/* Setup UART for use by OPAL (Linux hvc) */
uart_set_console_policy(UART_CONSOLE_OPAL);
+ vpd_dt_fixup();
+
mihawk_create_npu();
mihawk_create_ocapi_i2c_bus();