Skip to content

Commit

Permalink
TWL PV release on kernel 6.12 (#308)
Browse files Browse the repository at this point in the history
* Intel IMX390&TI960 enabled on MTL, iot kernel 6.11-rc3

Signed-off-by: zouxiaoh <[email protected]>

* TWL PV release on kernel 6.12

Signed-off-by: zouxiaoh <[email protected]>

---------

Signed-off-by: zouxiaoh <[email protected]>
  • Loading branch information
zouxiaoh authored Dec 6, 2024
1 parent 059b840 commit dc6f462
Show file tree
Hide file tree
Showing 15 changed files with 13,074 additions and 0 deletions.

Large diffs are not rendered by default.

8,433 changes: 8,433 additions & 0 deletions kernel_patches/patch_6.12_mainline/0001-media-pci-intel-psys-driver.patch

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
From 732579bc9711cc86227bc5de5bbd61949d99dced Mon Sep 17 00:00:00 2001
From: linya14x <[email protected]>
Date: Tue, 25 Jun 2024 11:34:04 +0800
Subject: [PATCH] INT3472: Support LT6911UXE

Signed-off-by: linya14x <[email protected]>
Signed-off-by: zouxiaoh <[email protected]>
---
drivers/platform/x86/intel/int3472/common.h | 2 ++
drivers/platform/x86/intel/int3472/discrete.c | 18 ++++++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
index 145dec66df64..1d667e1187d2 100644
--- a/drivers/platform/x86/intel/int3472/common.h
+++ b/drivers/platform/x86/intel/int3472/common.h
@@ -22,6 +22,8 @@
#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
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 07b302e09340..94095fdc09e5 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -148,6 +148,14 @@ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polar
*func = "power-enable";
*polarity = GPIO_ACTIVE_HIGH;
break;
+ case INT3472_GPIO_TYPE_READY_STAT:
+ *func = "readystat";
+ *polarity = GPIO_LOOKUP_FLAGS_DEFAULT;
+ break;
+ case INT3472_GPIO_TYPE_HDMI_DETECT:
+ *func = "hdmidetect";
+ *polarity = GPIO_LOOKUP_FLAGS_DEFAULT;
+ break;
default:
*func = "unknown";
*polarity = GPIO_ACTIVE_HIGH;
@@ -239,9 +247,15 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
switch (type) {
case INT3472_GPIO_TYPE_RESET:
case INT3472_GPIO_TYPE_POWERDOWN:
+ case INT3472_GPIO_TYPE_READY_STAT:
+ case INT3472_GPIO_TYPE_HDMI_DETECT:
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, func, polarity);
- if (ret)
+ if (ret) {
err_msg = "Failed to map GPIO pin to sensor\n";
+ dev_warn(int3472->dev,
+ "Failed to map GPIO pin to sensor, type %02x, func %s, polarity %u\n",
+ type, func, polarity);
+ }

break;
case INT3472_GPIO_TYPE_CLK_ENABLE:
@@ -345,7 +359,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.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From f6643528b1f3b64012d39d84916f4f5098b05aa4 Mon Sep 17 00:00:00 2001
From: Dongcheng Yan <[email protected]>
Date: Tue, 30 Jul 2024 11:03:10 +0800
Subject: [PATCH] upstream: Use module parameter to set isys freq

Signed-off-by: Hongju Wang <[email protected]>
Signed-off-by: Dongcheng Yan <[email protected]>
Signed-off-by: zouxiaoh <[email protected]>
---
drivers/media/pci/intel/ipu6/ipu6.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index bbd646378ab3..f6d42a432d9f 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -33,6 +33,10 @@
#include "ipu6-platform-isys-csi2-reg.h"
#include "ipu6-platform-regs.h"

+static unsigned int isys_freq_override;
+module_param(isys_freq_override, uint, 0660);
+MODULE_PARM_DESC(isys_freq_override, "Override ISYS freq(mhz)");
+
#define IPU6_PCI_BAR 0

struct ipu6_cell_program {
@@ -387,6 +391,14 @@ ipu6_isys_init(struct pci_dev *pdev, struct device *parent,
pdata->base = base;
pdata->ipdata = ipdata;

+ /* Override the isys freq */
+ if (isys_freq_override >= BUTTRESS_MIN_FORCE_IS_FREQ &&
+ isys_freq_override <= BUTTRESS_MAX_FORCE_IS_FREQ) {
+ ctrl->ratio = isys_freq_override / BUTTRESS_IS_FREQ_STEP;
+ dev_dbg(&pdev->dev, "Override the isys freq:%u(mhz)\n",
+ isys_freq_override);
+ }
+
isys_adev = ipu6_bus_initialize_device(pdev, parent, pdata, ctrl,
IPU6_ISYS_NAME);
if (IS_ERR(isys_adev)) {
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From adf7cdb02005e1d0875396679b2e1fb5663d1b31 Mon Sep 17 00:00:00 2001
From: Dongcheng Yan <[email protected]>
Date: Tue, 30 Jul 2024 16:50:07 +0800
Subject: [PATCH] upstream: Use module parameter to set psys freq

Signed-off-by: Dongcheng Yan <[email protected]>
Signed-off-by: zouxiaoh <[email protected]>
---
drivers/media/pci/intel/ipu6/ipu6.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index f6d42a432d9f..4bb270d9fe2a 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -37,6 +37,10 @@ static unsigned int isys_freq_override;
module_param(isys_freq_override, uint, 0660);
MODULE_PARM_DESC(isys_freq_override, "Override ISYS freq(mhz)");

+static unsigned int psys_freq_override;
+module_param(psys_freq_override, uint, 0660);
+MODULE_PARM_DESC(psys_freq_override, "Override PSYS freq(mhz)");
+
#define IPU6_PCI_BAR 0

struct ipu6_cell_program {
@@ -445,6 +449,15 @@ ipu6_psys_init(struct pci_dev *pdev, struct device *parent,
pdata->base = base;
pdata->ipdata = ipdata;

+ /* Override the isys freq */
+ if (psys_freq_override >= BUTTRESS_MIN_FORCE_PS_FREQ &&
+ psys_freq_override <= BUTTRESS_MAX_FORCE_PS_FREQ) {
+ ctrl->ratio = psys_freq_override / BUTTRESS_PS_FREQ_STEP;
+ ctrl->qos_floor = psys_freq_override;
+ dev_dbg(&pdev->dev, "Override the psys freq:%u(mhz)\n",
+ psys_freq_override);
+ }
+
psys_adev = ipu6_bus_initialize_device(pdev, parent, pdata, ctrl,
IPU6_PSYS_NAME);
if (IS_ERR(psys_adev)) {
--
2.34.1

Loading

0 comments on commit dc6f462

Please sign in to comment.