diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2018-09-14 13:46:26 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-09-17 21:39:01 -0500 |
commit | 6a728afd121b5cfad75bd302831c7f8bd47ef269 (patch) | |
tree | 44a7a5f1ce9346e9b87ec10e83a1cc813c8cb4a3 /core/platform.c | |
parent | b6cc82cb39c4d891799f4d7a9f8e76fdf8a16125 (diff) | |
download | skiboot-6a728afd121b5cfad75bd302831c7f8bd47ef269.zip skiboot-6a728afd121b5cfad75bd302831c7f8bd47ef269.tar.gz skiboot-6a728afd121b5cfad75bd302831c7f8bd47ef269.tar.bz2 |
hw/npu2, platform: Restructure OpenCAPI i2c reset/presence pins
In platform_ocapi, we define i2c_{reset,presence}_odl{0,1} to specify the
appropriate reset/presence GPIO pins for devices connected to ODL0 and ODL1
respectively.
This is obviously wrong, because a device connected to brick 2 and a device
connected to brick 4 are going to be different devices connected to
different I2C pins, but rather conveniently we haven't had to deal with
systems that can use the full 4 bricks as yet. Now that we're adding
OpenCAPI support for Witherspoon, we should change this to specify pins
separately for all 4 bricks.
Replace i2c_{reset,presence}_odl{0,1} with
i2c_{reset,presence}_brick{2,3,4,5} and update the presence detection code,
device reset code, and existing platforms accordingly.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/platform.c')
-rw-r--r-- | core/platform.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/core/platform.c b/core/platform.c index 4b3eaa4..7985ce5 100644 --- a/core/platform.c +++ b/core/platform.c @@ -172,21 +172,25 @@ static int generic_start_preload_resource(enum resource_id id, uint32_t subid, /* These values will work for a ZZ booted using BML */ const struct platform_ocapi generic_ocapi = { - .i2c_engine = 1, - .i2c_port = 4, - .i2c_reset_addr = 0x20, - .i2c_reset_odl0 = (1 << 1), - .i2c_reset_odl1 = (1 << 6), - .i2c_presence_addr = 0x20, - .i2c_presence_odl0 = (1 << 2), /* bottom connector */ - .i2c_presence_odl1 = (1 << 7), /* top connector */ + .i2c_engine = 1, + .i2c_port = 4, + .i2c_reset_addr = 0x20, + .i2c_reset_brick2 = (1 << 1), + .i2c_reset_brick3 = (1 << 6), + .i2c_reset_brick4 = 0, /* unused */ + .i2c_reset_brick5 = 0, /* unused */ + .i2c_presence_addr = 0x20, + .i2c_presence_brick2 = (1 << 2), /* bottom connector */ + .i2c_presence_brick3 = (1 << 7), /* top connector */ + .i2c_presence_brick4 = 0, /* unused */ + .i2c_presence_brick5 = 0, /* unused */ /* * 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, + .force_presence = true, + .odl_phy_swap = true, }; static struct bmc_platform generic_bmc = { |