summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJulien Jayat <julien.jayat@nxp.com>2020-08-11 14:09:32 +0200
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-04-27 10:42:06 +0000
commit422e20fe909b5e938747777d75ebada7a6e6dd79 (patch)
tree6f17e3eab98bb5ab6c2e8ff3796a127308a52555 /include/drm
parentfbff4c5cf8d7ae017cb89344d3c02ab2c201d3a4 (diff)
MLK-24491: drm: bridge: cdns: Add support of i2c-over-aux
Port the i2c over aux feature from 4.19.35 to the 5.4.x kernel. Add the the i2c read/write functions. The i2c features in the FW have been introduced in version 1.0.62. Signed-off-by: Julien Jayat <julien.jayat@nxp.com> Signed-off-by: Oliver Brown <oliver.brown@nxp.com> (cherry picked from commit b6181a1aea9ade244efb2ca001e14adb5cbe23eb) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'include/drm')
-rwxr-xr-xinclude/drm/bridge/cdns-mhdp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h
index 6bfd82a3d9a2..86314543fbca 100755
--- a/include/drm/bridge/cdns-mhdp.h
+++ b/include/drm/bridge/cdns-mhdp.h
@@ -376,6 +376,11 @@
#define DPTX_FORCE_LANES 0x10
#define DPTX_HPD_STATE 0x11
#define DPTX_ADJUST_LT 0x12
+#define DPTX_I2C_READ 0x15
+#define DPTX_I2C_WRITE 0x16
+#define DPTX_GET_LAST_I2C_STATUS 0x17
+
+
/* HDMI TX opcode */
#define HDMI_TX_READ 0x00
@@ -734,6 +739,12 @@ u32 cdns_mhdp_get_event(struct cdns_mhdp_device *mhdp);
int cdns_mhdp_dpcd_write(struct cdns_mhdp_device *mhdp, u32 addr, u8 value);
int cdns_mhdp_dpcd_read(struct cdns_mhdp_device *mhdp,
u32 addr, u8 *data, u16 len);
+
+int cdns_mhdp_get_last_i2c_status(struct cdns_mhdp_device *mhdp, u8 *resp);
+int cdns_mhdp_i2c_write(struct cdns_mhdp_device *mhdp, u8 addr,
+ u8 *value, u8 mot, u16 len, u16 *respLength);
+int cdns_mhdp_i2c_read(struct cdns_mhdp_device *mhdp, u8 addr, u8 *data,
+ u16 len, u8 mot, u16 *respLength);
int cdns_mhdp_get_edid_block(void *mhdp, u8 *edid,
unsigned int block, size_t length);
int cdns_mhdp_train_link(struct cdns_mhdp_device *mhdp);