aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristophe Lombard <clombard@linux.vnet.ibm.com>2021-10-14 17:56:52 +0200
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-10-19 12:26:01 +0530
commitfaea2419754c0a455b6cf32a5fa58c72fa75083b (patch)
tree38b93fdbabb1799da7b369bb454a86e16af5b46e /include
parent768f67e686e5691a6d6d956f625ce455d3b48fb5 (diff)
downloadskiboot-faea2419754c0a455b6cf32a5fa58c72fa75083b.zip
skiboot-faea2419754c0a455b6cf32a5fa58c72fa75083b.tar.gz
skiboot-faea2419754c0a455b6cf32a5fa58c72fa75083b.tar.bz2
rainier: detect pau devices
Update the platform_ocapi structure to store Rainier platform-specific values for detecting and resetting OpenCAPI devices via the module I2C (PCA9553) The unique number I2C bus ID associated to each OpenCapi device is get from the I2C port and engine. (De)Assert a reset and detect an OpenCapi device is available through the I2C bus id and address. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/pau.h3
-rw-r--r--include/platform.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/include/pau.h b/include/pau.h
index 2a26a65..e946e0f 100644
--- a/include/pau.h
+++ b/include/pau.h
@@ -24,6 +24,9 @@ struct pau_dev {
uint32_t index;
struct dt_node *dn;
+ /* Associated I2C information */
+ uint8_t i2c_bus_id;
+
/* Associated PHY information */
uint32_t pau_unit; /* 0,3,4,5,6,7 */
uint32_t odl_index;
diff --git a/include/platform.h b/include/platform.h
index 6fafddb..db0c086 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -69,6 +69,11 @@ struct platform_ocapi {
uint8_t i2c_presence_brick5; /* I2C pin to read for presence on brick 5 */
bool odl_phy_swap; /* Swap ODL1 to use brick 2 rather than
* brick 1 lanes */
+ uint8_t i2c_dev_addr; /* I2C device address */
+ uint8_t i2c_intreset_pin; /* I2C pin to write to reset */
+ uint8_t i2c_predetect_pin; /* I2C pin to read for presence */
+ int64_t (*i2c_assert_reset)(uint8_t i2c_bus_id);
+ int64_t (*i2c_deassert_reset)(uint8_t i2c_bus_id);
const char *(*ocapi_slot_label)(uint32_t chip_id, uint32_t brick_index);
const struct ocapi_phy_setup *phy_setup;
};