summaryrefslogtreecommitdiffstats
path: root/platforms/astbmc/zaius.c
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-09-14 13:46:26 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-09-17 21:39:01 -0500
commit6a728afd121b5cfad75bd302831c7f8bd47ef269 (patch)
tree44a7a5f1ce9346e9b87ec10e83a1cc813c8cb4a3 /platforms/astbmc/zaius.c
parentb6cc82cb39c4d891799f4d7a9f8e76fdf8a16125 (diff)
downloadblackbird-skiboot-6a728afd121b5cfad75bd302831c7f8bd47ef269.tar.gz
blackbird-skiboot-6a728afd121b5cfad75bd302831c7f8bd47ef269.zip
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 'platforms/astbmc/zaius.c')
-rw-r--r--platforms/astbmc/zaius.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c
index 4d93e61b..0ee6dd06 100644
--- a/platforms/astbmc/zaius.c
+++ b/platforms/astbmc/zaius.c
@@ -77,15 +77,19 @@ static void zaius_get_slot_info(struct phb *phb, struct pci_device *pd)
}
const struct platform_ocapi zaius_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 */
- .odl_phy_swap = true,
+ .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 */
+ .odl_phy_swap = true,
};
ST_PLUGGABLE(pe0_slot, "PE0");
OpenPOWER on IntegriCloud