aboutsummaryrefslogtreecommitdiff
path: root/core/platform.c
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>2018-05-23 19:25:41 +0200
committerStewart Smith <stewart@linux.ibm.com>2018-06-01 02:07:26 -0500
commitb5c863a86427db83cdb398f227e82745dbe255d0 (patch)
tree23ab249af5867ddfa77ac2ac82f15dca24fda3ad /core/platform.c
parent67bdd1668e6a033eb5520105946ebb651f3adff2 (diff)
downloadskiboot-b5c863a86427db83cdb398f227e82745dbe255d0.zip
skiboot-b5c863a86427db83cdb398f227e82745dbe255d0.tar.gz
skiboot-b5c863a86427db83cdb398f227e82745dbe255d0.tar.bz2
npu2-opencapi: Use presence detection
Presence detection is not part of the opencapi specification. So each platform may choose to implement it the way it wants. All current platforms implement it through an i2c device where we can query a pin to know if a device is connected or not. ZZ and Zaius have a similar design and even use the same i2c information and pin numbers. However, presence detection on older ZZ planar (older than v4) doesn't work, so we don't activate it for now, until our lab systems are upgraded and it's better tested. Presence detection on witherspoon is still being worked on. It's shaping up to be quite different, so we may have to revisit the topic in a later patch. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/platform.c')
-rw-r--r--core/platform.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/platform.c b/core/platform.c
index f09ea3c..92b118b 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -175,7 +175,16 @@ const struct platform_ocapi generic_ocapi = {
.i2c_offset = { 0x3, 0x1, 0x1 },
.i2c_odl0_data = { 0xFD, 0xFD, 0xFF },
.i2c_odl1_data = { 0xBF, 0xBF, 0xFF },
- .odl_phy_swap = true,
+ .i2c_presence_addr = 0x20,
+ .i2c_presence_odl0 = (1 << 2), /* bottom connector */
+ .i2c_presence_odl1 = (1 << 7), /* top connector */
+ /*
+ * The ZZs we typically use for BML/generic platform tend to
+ * have old planars and presence detection is broken there, so
+ * force presence.
+ */
+ .force_presence = true,
+ .odl_phy_swap = true,
};
static struct bmc_platform generic_bmc = {