aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/media
diff options
context:
space:
mode:
authorWentong Wu <wentong.wu@intel.com>2023-08-03 07:38:14 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-14 20:27:55 +0200
commitc66821f381aed2c7c754d6ac8920a8665a3a01f7 (patch)
tree4b4b8d10ffb3a4f06f20dd506b9987cce4071db5 /include/media
parentmedia: pci: intel: ivsc: Add ACE submodule (diff)
downloadwireguard-linux-c66821f381aed2c7c754d6ac8920a8665a3a01f7.tar.xz
wireguard-linux-c66821f381aed2c7c754d6ac8920a8665a3a01f7.zip
media: pci: intel: Add IVSC support for IPU bridge driver
Previously on ACPI platforms, sensors that are intended to be connected to an IPU device for use with the ipu3-cio2 driver lacking the necessary connection information in firmware. IPU bridge driver is to connect sensors to IPU device via software nodes. Currently IVSC located between IPU device and sensors is available in existing commercial platforms from multiple OEMs. But the connection information between them in firmware is also not enough to build V4L2 connection graph. This patch parses the connection properties from the SSDB buffer in DSDT and build the connection using software nodes. IVSC driver is based on MEI framework (previously known as HECI), it has two MEI clients, MEI CSI and MEI ACE. Both clients are used to communicate messages with IVSC firmware. Linux abstracts MEI client as a device, whose bus type is MEI. And the device is addressed by a GUID/UUID which is part of the device name of MEI client. After figured out MEI CSI via the UUID composed device name, this patch setup the connection between MEI CSI and IPU, and the connection between MEI CSI and sensor via software nodes. Signed-off-by: Wentong Wu <wentong.wu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ipu-bridge.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h
index ceda2a801948..bdc654a45521 100644
--- a/include/media/ipu-bridge.h
+++ b/include/media/ipu-bridge.h
@@ -53,7 +53,12 @@ enum ipu_sensor_swnodes {
SWNODE_SENSOR_ENDPOINT,
SWNODE_IPU_PORT,
SWNODE_IPU_ENDPOINT,
- /* Must be last because it is optional / maybe empty */
+ /* below are optional / maybe empty */
+ SWNODE_IVSC_HID,
+ SWNODE_IVSC_SENSOR_PORT,
+ SWNODE_IVSC_SENSOR_ENDPOINT,
+ SWNODE_IVSC_IPU_PORT,
+ SWNODE_IVSC_IPU_ENDPOINT,
SWNODE_VCM,
SWNODE_COUNT
};
@@ -100,6 +105,8 @@ struct ipu_property_names {
struct ipu_node_names {
char port[7];
+ char ivsc_sensor_port[7];
+ char ivsc_ipu_port[7];
char endpoint[11];
char remote_port[7];
char vcm[16];
@@ -116,6 +123,10 @@ struct ipu_sensor {
char name[ACPI_ID_LEN + 4];
struct acpi_device *adev;
+ struct device *csi_dev;
+ struct acpi_device *ivsc_adev;
+ char ivsc_name[ACPI_ID_LEN + 4];
+
/* SWNODE_COUNT + 1 for terminating NULL */
const struct software_node *group[SWNODE_COUNT + 1];
struct software_node swnodes[SWNODE_COUNT];
@@ -132,9 +143,15 @@ struct ipu_sensor {
struct property_entry ep_properties[5];
struct property_entry dev_properties[5];
struct property_entry ipu_properties[3];
+ struct property_entry ivsc_properties[1];
+ struct property_entry ivsc_sensor_ep_properties[4];
+ struct property_entry ivsc_ipu_ep_properties[4];
+
struct software_node_ref_args local_ref[1];
struct software_node_ref_args remote_ref[1];
struct software_node_ref_args vcm_ref[1];
+ struct software_node_ref_args ivsc_sensor_ref[1];
+ struct software_node_ref_args ivsc_ipu_ref[1];
};
typedef int (*ipu_parse_sensor_fwnode_t)(struct acpi_device *adev,