diff --git a/patch_5.15_lts/0001-int3472-Add-LT6911UXC-support-to-INT3472-driver.patch b/patch_5.15_lts/0001-int3472-Add-LT6911UXC-support-to-INT3472-driver.patch new file mode 100644 index 000000000000..badbf00773b4 --- /dev/null +++ b/patch_5.15_lts/0001-int3472-Add-LT6911UXC-support-to-INT3472-driver.patch @@ -0,0 +1,105 @@ +From ec60164a73a3b4eecf16f9bb2caf36fc5c30b8b4 Mon Sep 17 00:00:00 2001 +From: Ng Khai Wen +Date: Wed, 11 Jan 2023 15:27:18 +0800 +Subject: [PATCH 1/3] int3472: Add LT6911UXC support to INT3472 driver + +Signed-off-by: Ng Khai Wen +Signed-off-by: zouxiaoh +--- + drivers/platform/x86/intel/int3472/common.h | 5 +++- + drivers/platform/x86/intel/int3472/discrete.c | 24 +++++++++++++++++-- + 2 files changed, 26 insertions(+), 3 deletions(-) + +diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h +index d14944ee8586..61938a2fc909 100644 +--- a/drivers/platform/x86/intel/int3472/common.h ++++ b/drivers/platform/x86/intel/int3472/common.h +@@ -21,9 +21,11 @@ + #define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b + #define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c + #define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d ++#define INT3472_GPIO_TYPE_READY_STAT 0x13 ++#define INT3472_GPIO_TYPE_HDMI_DETECT 0x14 + + #define INT3472_PDEV_MAX_NAME_LEN 23 +-#define INT3472_MAX_SENSOR_GPIOS 3 ++#define INT3472_MAX_SENSOR_GPIOS 4 + + #define GPIO_REGULATOR_NAME_LENGTH 21 + #define GPIO_REGULATOR_SUPPLY_NAME_LENGTH 9 +@@ -73,6 +75,7 @@ struct int3472_sensor_config { + const char *sensor_module_name; + struct regulator_consumer_supply supply_map; + const struct int3472_gpio_function_remap *function_maps; ++ const bool independent_clk_gpios; + }; + + struct int3472_discrete_device { +diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c +index 401fa8f223d6..bafc3e5dbd3e 100644 +--- a/drivers/platform/x86/intel/int3472/discrete.c ++++ b/drivers/platform/x86/intel/int3472/discrete.c +@@ -62,6 +62,8 @@ static const struct int3472_sensor_config int3472_sensor_configs[] = { + { "GEFF150023R", REGULATOR_SUPPLY("avdd", NULL), NULL }, + /* Surface Go 1&2 - OV5693, Front */ + { "YHCU", REGULATOR_SUPPLY("avdd", NULL), NULL }, ++ /* Lontium Display Bridge */ ++ { "LT6911UXC", { 0 }, NULL, true }, + }; + + static const struct int3472_sensor_config * +@@ -230,6 +232,8 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, + const char *err_msg; + int ret; + u8 type; ++ u8 active_value; ++ u32 polarity = GPIO_LOOKUP_FLAGS_DEFAULT; + + if (!acpi_gpio_get_io_resource(ares, &agpio)) + return 1; +@@ -251,17 +255,21 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, + + type = obj->integer.value & 0xff; + ++ active_value = obj->integer.value >> 24; ++ if (!active_value) ++ polarity = GPIO_ACTIVE_LOW; ++ + switch (type) { + case INT3472_GPIO_TYPE_RESET: + ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "reset", +- GPIO_ACTIVE_LOW); ++ polarity); + if (ret) + err_msg = "Failed to map reset pin to sensor\n"; + + break; + case INT3472_GPIO_TYPE_POWERDOWN: + ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "powerdown", +- GPIO_ACTIVE_LOW); ++ polarity); + if (ret) + err_msg = "Failed to map powerdown pin to sensor\n"; + +@@ -279,6 +287,18 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, + err_msg = "Failed to map regulator to sensor\n"; + + break; ++ case INT3472_GPIO_TYPE_READY_STAT: ++ ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "readystat", ++ polarity); ++ if (ret) ++ err_msg = "Failed to map hdmi_detect to sensor\n"; ++ break; ++ case INT3472_GPIO_TYPE_HDMI_DETECT: ++ ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, "hdmidetect", ++ polarity); ++ if (ret) ++ err_msg = "Failed to map hdmi_detect to sensor\n"; ++ break; + default: + dev_warn(int3472->dev, + "GPIO type 0x%02x unknown; the sensor may not work\n", +-- +2.17.1 + diff --git a/patch_5.15_lts/0002-platform-x86-intel-Support-lt6911uxc-by-INT3472.patch b/patch_5.15_lts/0002-platform-x86-intel-Support-lt6911uxc-by-INT3472.patch new file mode 100644 index 000000000000..f058da45cdc6 --- /dev/null +++ b/patch_5.15_lts/0002-platform-x86-intel-Support-lt6911uxc-by-INT3472.patch @@ -0,0 +1,38 @@ +From 1cfba870d393409b6ed9eeb245de847081dec3a7 Mon Sep 17 00:00:00 2001 +From: zouxiaoh +Date: Tue, 23 Aug 2022 13:33:47 +0800 +Subject: [PATCH 2/3] platform: x86: intel: Support lt6911uxc by INT3472 + +Change Description: +Message for Open Source: +Support lt6911uxc by INT3472. + +Message for Internal: +Support lt6911uxc by INT3472. + +Test Platform: +RPL-P RVP + +Signed-off-by: zouxiaoh +Signed-off-by: khaiwenn +Signed-off-by: Sun Jia +--- + drivers/platform/x86/intel/int3472/discrete.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c +index bafc3e5dbd3e..3f320a1bfcd3 100644 +--- a/drivers/platform/x86/intel/int3472/discrete.c ++++ b/drivers/platform/x86/intel/int3472/discrete.c +@@ -371,7 +371,7 @@ static int skl_int3472_discrete_probe(struct platform_device *pdev) + return ret; + } + +- if (cldb.control_logic_type != 1) { ++ if (cldb.control_logic_type != 1 && cldb.control_logic_type != 5) { + dev_err(&pdev->dev, "Unsupported control logic type %u\n", + cldb.control_logic_type); + return -EINVAL; +-- +2.17.1 + diff --git a/patch_5.15_lts/0003-media-v4l2-Support-line-based-metadata-capture.patch b/patch_5.15_lts/0003-media-v4l2-Support-line-based-metadata-capture.patch new file mode 100644 index 000000000000..5727ddd765bd --- /dev/null +++ b/patch_5.15_lts/0003-media-v4l2-Support-line-based-metadata-capture.patch @@ -0,0 +1,46 @@ +From a21922f7ad1acd008e15b0ff570178ca6a372ae5 Mon Sep 17 00:00:00 2001 +From: Hongju Wang +Date: Wed, 19 Apr 2023 15:35:29 +0800 +Subject: [PATCH 3/3] media: v4l2:Support line-based metadata capture + +Signed-off-by: Hongju Wang +Signed-off-by: zouxiaoh +--- + include/uapi/linux/videodev2.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h +index 61c5011dfc13..41e9a7e69efa 100644 +--- a/include/uapi/linux/videodev2.h ++++ b/include/uapi/linux/videodev2.h +@@ -801,6 +801,7 @@ struct v4l2_fmtdesc { + #define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080 + #define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC + #define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100 ++#define V4L2_FMT_FLAG_META_LINE_BASED 0x0200 + + /* Frame Size and frame rate enumeration */ + /* +@@ -2311,10 +2312,19 @@ struct v4l2_sdr_format { + * struct v4l2_meta_format - metadata format definition + * @dataformat: little endian four character code (fourcc) + * @buffersize: maximum size in bytes required for data ++ * @width: number of bytes of data per line (valid for line based ++ * formats only, see format documentation) ++ * @height: number of lines of data per buffer (valid for line based ++ * formats only) ++ * @bytesperline: offset between the beginnings of two adjacent lines in ++ * bytes (valid for line based formats only) + */ + struct v4l2_meta_format { + __u32 dataformat; + __u32 buffersize; ++ __u32 width; ++ __u32 height; ++ __u32 bytesperline; + } __attribute__ ((packed)); + + /** +-- +2.17.1 +