* [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
2026-04-13 9:48 ` Hans de Goede
2026-03-24 21:41 ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
To: linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
Thierry Chatard
The Dell Latitude 5285 2-in-1 has a BIOS bug where the ACPI GEXP device
and the I2C4 controller (INT3446) both claim the same MMIO region via the
shared SB04 variable. This causes intel_lpss_acpi to fail binding to I2C4
with -EBUSY, preventing the front camera (OV5670) sensor from being
registered.
Add a DMI quirk that selects IGNORE_RESOURCE_CONFLICTS for INT3446 on this
machine, matching the existing pattern used by other LPSS quirks.
Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
drivers/mfd/intel-lpss-acpi.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 63406026d..7d0964848 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -13,6 +13,8 @@
#include <linux/ioport.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
+#include <linux/acpi.h>
+#include <linux/dmi.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
@@ -52,6 +54,15 @@ static const struct intel_lpss_platform_info spt_i2c_info = {
.swnode = &spt_i2c_node,
};
+/* Same as spt_i2c_info but with QUIRK_IGNORE_RESOURCE_CONFLICTS for Dell 5285
+ * where ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources.
+ */
+static const struct intel_lpss_platform_info spt_i2c_info_ignore_conflicts = {
+ .clk_rate = 120000000,
+ .swnode = &spt_i2c_node,
+ .quirks = QUIRK_IGNORE_RESOURCE_CONFLICTS,
+};
+
static const struct property_entry uart_properties[] = {
PROPERTY_ENTRY_U32("reg-io-width", 4),
PROPERTY_ENTRY_U32("reg-shift", 2),
@@ -172,6 +183,16 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
};
MODULE_DEVICE_TABLE(acpi, intel_lpss_acpi_ids);
+static const struct dmi_system_id dell5285_lpss_dmi[] = {
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+ },
+ },
+ { }
+};
+
static int intel_lpss_acpi_probe(struct platform_device *pdev)
{
const struct intel_lpss_platform_info *data;
@@ -182,6 +203,17 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
if (!data)
return -ENODEV;
+ /* Apply IGNORE_RESOURCE_CONFLICTS for I2C4 on Dell Latitude 5285.
+ * The ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources
+ * due to a BIOS bug where both use the same SB04 variable.
+ */
+ if (data == &spt_i2c_info &&
+ acpi_dev_hid_uid_match(ACPI_COMPANION(&pdev->dev), "INT3446", NULL) &&
+ dmi_check_system(dell5285_lpss_dmi)) {
+ dev_info(&pdev->dev, "Dell 5285: applying IGNORE_RESOURCE_CONFLICTS for I2C4\n");
+ data = &spt_i2c_info_ignore_conflicts;
+ }
+
info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285
2026-03-24 21:41 ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
@ 2026-04-13 9:48 ` Hans de Goede
0 siblings, 0 replies; 16+ messages in thread
From: Hans de Goede @ 2026-04-13 9:48 UTC (permalink / raw)
To: Thierry Chatard, linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, ilpo.jarvinen,
mchehab, sakari.ailus, jacopo.mondi, nicholas
Hi,
On 24-Mar-26 10:41 PM, Thierry Chatard wrote:
> The Dell Latitude 5285 2-in-1 has a BIOS bug where the ACPI GEXP device
> and the I2C4 controller (INT3446) both claim the same MMIO region via the
> shared SB04 variable. This causes intel_lpss_acpi to fail binding to I2C4
> with -EBUSY, preventing the front camera (OV5670) sensor from being
> registered.
>
> Add a DMI quirk that selects IGNORE_RESOURCE_CONFLICTS for INT3446 on this
> machine, matching the existing pattern used by other LPSS quirks.
>
> Signed-off-by: Thierry Chatard <tchatard@gmail.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/mfd/intel-lpss-acpi.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
> index 63406026d..7d0964848 100644
> --- a/drivers/mfd/intel-lpss-acpi.c
> +++ b/drivers/mfd/intel-lpss-acpi.c
> @@ -13,6 +13,8 @@
> #include <linux/ioport.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> +#include <linux/acpi.h>
> +#include <linux/dmi.h>
> #include <linux/pm.h>
> #include <linux/pm_runtime.h>
> #include <linux/platform_device.h>
> @@ -52,6 +54,15 @@ static const struct intel_lpss_platform_info spt_i2c_info = {
> .swnode = &spt_i2c_node,
> };
>
> +/* Same as spt_i2c_info but with QUIRK_IGNORE_RESOURCE_CONFLICTS for Dell 5285
> + * where ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources.
> + */
> +static const struct intel_lpss_platform_info spt_i2c_info_ignore_conflicts = {
> + .clk_rate = 120000000,
> + .swnode = &spt_i2c_node,
> + .quirks = QUIRK_IGNORE_RESOURCE_CONFLICTS,
> +};
> +
> static const struct property_entry uart_properties[] = {
> PROPERTY_ENTRY_U32("reg-io-width", 4),
> PROPERTY_ENTRY_U32("reg-shift", 2),
> @@ -172,6 +183,16 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
> };
> MODULE_DEVICE_TABLE(acpi, intel_lpss_acpi_ids);
>
> +static const struct dmi_system_id dell5285_lpss_dmi[] = {
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
> + },
> + },
> + { }
> +};
> +
> static int intel_lpss_acpi_probe(struct platform_device *pdev)
> {
> const struct intel_lpss_platform_info *data;
> @@ -182,6 +203,17 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
> if (!data)
> return -ENODEV;
>
> + /* Apply IGNORE_RESOURCE_CONFLICTS for I2C4 on Dell Latitude 5285.
> + * The ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources
> + * due to a BIOS bug where both use the same SB04 variable.
> + */
> + if (data == &spt_i2c_info &&
> + acpi_dev_hid_uid_match(ACPI_COMPANION(&pdev->dev), "INT3446", NULL) &&
> + dmi_check_system(dell5285_lpss_dmi)) {
> + dev_info(&pdev->dev, "Dell 5285: applying IGNORE_RESOURCE_CONFLICTS for I2C4\n");
> + data = &spt_i2c_info_ignore_conflicts;
> + }
> +
> info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
> if (!info)
> return -ENOMEM;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
2026-04-13 11:02 ` Hans de Goede
2026-03-24 21:41 ` [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data " Thierry Chatard
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
To: linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
Thierry Chatard, kernel test robot
The Dell Latitude 5285 BIOS leaves the GNVS fields C0TP, L0CL, and L1CL
at zero at boot. The TPS68470 clock driver reads L0CL and L1CL to select
the output frequency; with both fields zero the clock outputs are disabled,
and neither camera sensor can communicate over I2C.
Additionally, when C0TP=0 the ACPI _DEP method on INT3479 returns PCI0 as
its dependency instead of CLP0 (the INT3472 device), causing ipu_bridge to
never create the i2c-INT3479:00 client for the front camera.
Add a DMI-gated fixup that runs at TPS68470 probe time and writes 0x02
(19.2 MHz) into C0TP, L0CL, and L1CL.
The GNVS physical address is discovered at run time by scanning the raw
AML of the DSDT (and any SSDTs) for the GNVS SystemMemory OperationRegion
definition (opcode sequence 0x5B 0x80 "GNVS" 0x00). The parsed address is
then mapped with acpi_os_map_memory(), which is safe because ACPI NVS
memory is reserved by the firmware and already mapped by the OS. No
hard-coded physical addresses are used.
Field byte offsets within the GNVS region (verified against DSDT
disassembly on this platform, region size 0x0725 bytes):
C0TP: 0x43A L0CL: 0x4F7 L1CL: 0x549
Signed-off-by: Thierry Chatard <tchatard@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603211747.Z6xudmNd-lkp@intel.com/
---
drivers/platform/x86/intel/int3472/tps68470.c | 201 ++++++++++++++++++
1 file changed, 201 insertions(+)
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
index a496075c0..c9686426f 100644
--- a/drivers/platform/x86/intel/int3472/tps68470.c
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
@@ -2,8 +2,10 @@
/* Author: Dan Scally <djrscally@gmail.com> */
#include <linux/acpi.h>
+#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
+#include <linux/unaligned.h>
#include <linux/mfd/core.h>
#include <linux/mfd/tps68470.h>
#include <linux/platform_device.h>
@@ -140,6 +142,203 @@ skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data
return n_consumers;
}
+/* Dell Latitude 5285 GNVS fix
+ *
+ * The BIOS leaves GNVS fields C0TP, L0CL and L1CL at zero after POST.
+ * With C0TP=0 the ACPI _DEP on INT3479 resolves to PCI0 instead of CLP0
+ * (INT3472), so ipu_bridge never creates i2c-INT3479:00 (OV5670 front cam).
+ * With L0CL=L1CL=0 the TPS68470 clock driver disables all clock outputs,
+ * making both sensors unreachable over I2C.
+ *
+ * Fix: at TPS68470 probe time, locate the GNVS SystemMemory OperationRegion
+ * by scanning the DSDT/SSDTs for its AML definition, map the region, and
+ * write 0x02 (19.2 MHz) into C0TP, L0CL and L1CL.
+ *
+ * Field byte offsets (verified from DSDT disassembly, GNVS size 0x0725):
+ * C0TP: 0x43A L0CL: 0x4F7 L1CL: 0x549
+ */
+#define DELL5285_C0TP_OFF 0x43A
+#define DELL5285_L0CL_OFF 0x4F7
+#define DELL5285_L1CL_OFF 0x549
+/* Minimum GNVS region size: last field (L1CL) is 1 byte at 0x549 */
+#define DELL5285_GNVS_MIN_SIZE (DELL5285_L1CL_OFF + 1)
+
+/* AML integer opcodes (ACPI 6.4, section 20.2.3) */
+#define AML_ZERO_OP 0x00
+#define AML_ONE_OP 0x01
+#define AML_BYTE_PREFIX 0x0A
+#define AML_WORD_PREFIX 0x0B
+#define AML_DWORD_PREFIX 0x0C
+#define AML_QWORD_PREFIX 0x0E
+
+/**
+ * aml_parse_int - Parse one AML integer opcode at @p.
+ * @p: Pointer to the current position in the AML byte stream.
+ * @end: One past the last valid byte of the AML buffer.
+ * @val: Output: the parsed integer value.
+ *
+ * Returns the number of bytes consumed, or 0 on failure.
+ */
+static int aml_parse_int(const u8 *p, const u8 *end, u64 *val)
+{
+ if (p >= end)
+ return 0;
+ switch (*p) {
+ case AML_ZERO_OP:
+ *val = 0;
+ return 1;
+ case AML_ONE_OP:
+ *val = 1;
+ return 1;
+ case AML_BYTE_PREFIX:
+ if (p + 2 > end)
+ return 0;
+ *val = p[1];
+ return 2;
+ case AML_WORD_PREFIX:
+ if (p + 3 > end)
+ return 0;
+ *val = get_unaligned_le16(p + 1);
+ return 3;
+ case AML_DWORD_PREFIX:
+ if (p + 5 > end)
+ return 0;
+ *val = get_unaligned_le32(p + 1);
+ return 5;
+ case AML_QWORD_PREFIX:
+ if (p + 9 > end)
+ return 0;
+ *val = get_unaligned_le64(p + 1);
+ return 9;
+ }
+ return 0;
+}
+
+/**
+ * dell5285_gnvs_from_table - Scan one ACPI table for the GNVS OperationRegion.
+ * @tbl: ACPI table header; the AML body is scanned for the GNVS signature.
+ * @addr: Output: physical base address of the GNVS region.
+ * @size: Output: byte length of the GNVS region.
+ *
+ * Searches the AML body of @tbl for the byte sequence:
+ * ExtOp(0x5B) OpRegionOp(0x80) NameSeg("GNVS") RegionSpace(SystemMemory=0x00)
+ * followed by two AML integers (region address and length).
+ *
+ * Returns true and fills @addr / @size if found and plausible.
+ */
+static bool dell5285_gnvs_from_table(const struct acpi_table_header *tbl,
+ phys_addr_t *addr, u32 *size)
+{
+ /* AML: ExtOp OpRegionOp NameSeg("GNVS") SystemMemory */
+ static const u8 sig[] = { 0x5B, 0x80, 'G', 'N', 'V', 'S', 0x00 };
+ const u8 *aml = (const u8 *)tbl + sizeof(*tbl);
+ const u8 *end = (const u8 *)tbl + tbl->length;
+ const u8 *p;
+
+ for (p = aml; p + sizeof(sig) < end; p++) {
+ u64 region_addr, region_size;
+ int consumed;
+
+ if (memcmp(p, sig, sizeof(sig)) != 0)
+ continue;
+
+ p += sizeof(sig);
+ consumed = aml_parse_int(p, end, ®ion_addr);
+ if (!consumed || !region_addr)
+ continue;
+
+ p += consumed;
+ consumed = aml_parse_int(p, end, ®ion_size);
+ if (!consumed || region_size < DELL5285_GNVS_MIN_SIZE)
+ continue;
+
+ *addr = (phys_addr_t)region_addr;
+ *size = (u32)region_size;
+ return true;
+ }
+ return false;
+}
+
+/**
+ * dell5285_gnvs_find - Locate the GNVS OperationRegion by scanning DSDT and SSDTs.
+ * @addr: Output: physical base address of the GNVS region.
+ * @size: Output: byte length of the GNVS region.
+ *
+ * Returns true if the GNVS region was found in any ACPI table.
+ */
+static bool dell5285_gnvs_find(phys_addr_t *addr, u32 *size)
+{
+ struct acpi_table_header *tbl;
+ u32 i;
+
+ /* DSDT */
+ if (ACPI_SUCCESS(acpi_get_table(ACPI_SIG_DSDT, 1, &tbl))) {
+ bool found = dell5285_gnvs_from_table(tbl, addr, size);
+
+ acpi_put_table(tbl);
+ if (found)
+ return true;
+ }
+
+ /* SSDTs (instance numbers start at 1, stop at first failure) */
+ for (i = 1; i <= 32; i++) {
+ bool found;
+
+ if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_SSDT, i, &tbl)))
+ break;
+ found = dell5285_gnvs_from_table(tbl, addr, size);
+ acpi_put_table(tbl);
+ if (found)
+ return true;
+ }
+
+ return false;
+}
+
+static const struct dmi_system_id dell5285_gnvs_dmi[] = {
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+ },
+ },
+ { }
+};
+
+static void dell5285_gnvs_fix(void)
+{
+ phys_addr_t gnvs_addr;
+ u32 gnvs_size;
+ void *gnvs;
+
+ if (!dmi_check_system(dell5285_gnvs_dmi))
+ return;
+
+ if (!dell5285_gnvs_find(&gnvs_addr, &gnvs_size)) {
+ pr_err("int3472-tps68470: Dell 5285: GNVS OperationRegion not found in DSDT/SSDTs\n");
+ return;
+ }
+
+ gnvs = acpi_os_map_memory(gnvs_addr, gnvs_size);
+ if (!gnvs) {
+ pr_err("int3472-tps68470: Dell 5285: failed to map GNVS at %pa\n",
+ &gnvs_addr);
+ return;
+ }
+
+ pr_info("int3472-tps68470: Dell 5285 GNVS fix at %pa: C0TP=0x%02x L0CL=0x%02x L1CL=0x%02x -> 0x02\n",
+ &gnvs_addr,
+ *(u8 *)(gnvs + DELL5285_C0TP_OFF),
+ *(u8 *)(gnvs + DELL5285_L0CL_OFF),
+ *(u8 *)(gnvs + DELL5285_L1CL_OFF));
+
+ *(u8 *)(gnvs + DELL5285_C0TP_OFF) = 0x02;
+ *(u8 *)(gnvs + DELL5285_L0CL_OFF) = 0x02;
+ *(u8 *)(gnvs + DELL5285_L1CL_OFF) = 0x02;
+
+ acpi_os_unmap_memory(gnvs, gnvs_size);
+}
+
static int skl_int3472_tps68470_probe(struct i2c_client *client)
{
struct acpi_device *adev = ACPI_COMPANION(&client->dev);
@@ -155,6 +354,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
if (!adev)
return -ENODEV;
+ dell5285_gnvs_fix();
+
n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata);
if (n_consumers < 0)
return n_consumers;
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
2026-03-24 21:41 ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
@ 2026-04-13 11:02 ` Hans de Goede
0 siblings, 0 replies; 16+ messages in thread
From: Hans de Goede @ 2026-04-13 11:02 UTC (permalink / raw)
To: Thierry Chatard, linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, ilpo.jarvinen,
mchehab, sakari.ailus, jacopo.mondi, nicholas, kernel test robot
Hi,
On 24-Mar-26 10:41 PM, Thierry Chatard wrote:
> The Dell Latitude 5285 BIOS leaves the GNVS fields C0TP, L0CL, and L1CL
> at zero at boot. The TPS68470 clock driver reads L0CL and L1CL to select
> the output frequency; with both fields zero the clock outputs are disabled,
> and neither camera sensor can communicate over I2C.
>
> Additionally, when C0TP=0 the ACPI _DEP method on INT3479 returns PCI0 as
> its dependency instead of CLP0 (the INT3472 device), causing ipu_bridge to
> never create the i2c-INT3479:00 client for the front camera.
>
> Add a DMI-gated fixup that runs at TPS68470 probe time and writes 0x02
> (19.2 MHz) into C0TP, L0CL, and L1CL.
>
> The GNVS physical address is discovered at run time by scanning the raw
> AML of the DSDT (and any SSDTs) for the GNVS SystemMemory OperationRegion
> definition (opcode sequence 0x5B 0x80 "GNVS" 0x00). The parsed address is
> then mapped with acpi_os_map_memory(), which is safe because ACPI NVS
> memory is reserved by the firmware and already mapped by the OS. No
> hard-coded physical addresses are used.
>
> Field byte offsets within the GNVS region (verified against DSDT
> disassembly on this platform, region size 0x0725 bytes):
> C0TP: 0x43A L0CL: 0x4F7 L1CL: 0x549
>
> Signed-off-by: Thierry Chatard <tchatard@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202603211747.Z6xudmNd-lkp@intel.com/
I'm sorry but the ACPI table / GNVS poking going on here really is not
acceptable. I can see you've done your best to make this safe, but this is
still something which I think we should not do. Writing to GNVS is troublesome
because the old values there might have already been used for
The first thing to try here is make sure you have the latest BIOS and then select
"load setup defaults" or something similar and then "save settings". These sort
of GVNS problems often come from the layout of GVNS having changed with a BIOS
update, but the BIOS not automatically re-applying the new default settings
(which include many hidden settings) to its saved settings.
This may also change the I2C4 controller from being in ACPI enumeration mode
to being in PCI enumeration mode as one would expect of this generation of
"laptop".
If loading + saving the BIOS default settings does not help then for the
tps68470 clk problem I would suggest to just add clk data to struct
int3472_tps68470_board_data and if the clk data is set use that instead of
the values from ACPI.
Which would leave the when C0TP=0 the ACPI _DEP method on INT3479 returns PCI0
problem. Can you describe that in a bit more detail? You write:
> returns PCI0 as
> its dependency instead of CLP0 (the INT3472 device), causing ipu_bridge to
> never create the i2c-INT3479:00 client for the front camera.
but it is not ipu-bridge which is creating the i2c-INT3479:00 client, that
is done by the APCI + I2C core code, when all _DEP dependencies are marked
as available.
I guess a problem with the wrong _DEP being returned is mostly a problem
for the int3472 code which uses the _DEP relation to find out which sensor
to add regulator lookups, etc. to. But we could do a DMI quirk to simply
lookup the sensor firmware-node by its ACPI path on this 2-in-1 model ?
Also can you share an acpidump of the tables for this device please ?
Regards,
Hans
> ---
> drivers/platform/x86/intel/int3472/tps68470.c | 201 ++++++++++++++++++
> 1 file changed, 201 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index a496075c0..c9686426f 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -2,8 +2,10 @@
> /* Author: Dan Scally <djrscally@gmail.com> */
>
> #include <linux/acpi.h>
> +#include <linux/dmi.h>
> #include <linux/i2c.h>
> #include <linux/kernel.h>
> +#include <linux/unaligned.h>
> #include <linux/mfd/core.h>
> #include <linux/mfd/tps68470.h>
> #include <linux/platform_device.h>
> @@ -140,6 +142,203 @@ skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data
> return n_consumers;
> }
>
> +/* Dell Latitude 5285 GNVS fix
> + *
> + * The BIOS leaves GNVS fields C0TP, L0CL and L1CL at zero after POST.
> + * With C0TP=0 the ACPI _DEP on INT3479 resolves to PCI0 instead of CLP0
> + * (INT3472), so ipu_bridge never creates i2c-INT3479:00 (OV5670 front cam).
> + * With L0CL=L1CL=0 the TPS68470 clock driver disables all clock outputs,
> + * making both sensors unreachable over I2C.
> + *
> + * Fix: at TPS68470 probe time, locate the GNVS SystemMemory OperationRegion
> + * by scanning the DSDT/SSDTs for its AML definition, map the region, and
> + * write 0x02 (19.2 MHz) into C0TP, L0CL and L1CL.
> + *
> + * Field byte offsets (verified from DSDT disassembly, GNVS size 0x0725):
> + * C0TP: 0x43A L0CL: 0x4F7 L1CL: 0x549
> + */
> +#define DELL5285_C0TP_OFF 0x43A
> +#define DELL5285_L0CL_OFF 0x4F7
> +#define DELL5285_L1CL_OFF 0x549
> +/* Minimum GNVS region size: last field (L1CL) is 1 byte at 0x549 */
> +#define DELL5285_GNVS_MIN_SIZE (DELL5285_L1CL_OFF + 1)
> +
> +/* AML integer opcodes (ACPI 6.4, section 20.2.3) */
> +#define AML_ZERO_OP 0x00
> +#define AML_ONE_OP 0x01
> +#define AML_BYTE_PREFIX 0x0A
> +#define AML_WORD_PREFIX 0x0B
> +#define AML_DWORD_PREFIX 0x0C
> +#define AML_QWORD_PREFIX 0x0E
> +
> +/**
> + * aml_parse_int - Parse one AML integer opcode at @p.
> + * @p: Pointer to the current position in the AML byte stream.
> + * @end: One past the last valid byte of the AML buffer.
> + * @val: Output: the parsed integer value.
> + *
> + * Returns the number of bytes consumed, or 0 on failure.
> + */
> +static int aml_parse_int(const u8 *p, const u8 *end, u64 *val)
> +{
> + if (p >= end)
> + return 0;
> + switch (*p) {
> + case AML_ZERO_OP:
> + *val = 0;
> + return 1;
> + case AML_ONE_OP:
> + *val = 1;
> + return 1;
> + case AML_BYTE_PREFIX:
> + if (p + 2 > end)
> + return 0;
> + *val = p[1];
> + return 2;
> + case AML_WORD_PREFIX:
> + if (p + 3 > end)
> + return 0;
> + *val = get_unaligned_le16(p + 1);
> + return 3;
> + case AML_DWORD_PREFIX:
> + if (p + 5 > end)
> + return 0;
> + *val = get_unaligned_le32(p + 1);
> + return 5;
> + case AML_QWORD_PREFIX:
> + if (p + 9 > end)
> + return 0;
> + *val = get_unaligned_le64(p + 1);
> + return 9;
> + }
> + return 0;
> +}
> +
> +/**
> + * dell5285_gnvs_from_table - Scan one ACPI table for the GNVS OperationRegion.
> + * @tbl: ACPI table header; the AML body is scanned for the GNVS signature.
> + * @addr: Output: physical base address of the GNVS region.
> + * @size: Output: byte length of the GNVS region.
> + *
> + * Searches the AML body of @tbl for the byte sequence:
> + * ExtOp(0x5B) OpRegionOp(0x80) NameSeg("GNVS") RegionSpace(SystemMemory=0x00)
> + * followed by two AML integers (region address and length).
> + *
> + * Returns true and fills @addr / @size if found and plausible.
> + */
> +static bool dell5285_gnvs_from_table(const struct acpi_table_header *tbl,
> + phys_addr_t *addr, u32 *size)
> +{
> + /* AML: ExtOp OpRegionOp NameSeg("GNVS") SystemMemory */
> + static const u8 sig[] = { 0x5B, 0x80, 'G', 'N', 'V', 'S', 0x00 };
> + const u8 *aml = (const u8 *)tbl + sizeof(*tbl);
> + const u8 *end = (const u8 *)tbl + tbl->length;
> + const u8 *p;
> +
> + for (p = aml; p + sizeof(sig) < end; p++) {
> + u64 region_addr, region_size;
> + int consumed;
> +
> + if (memcmp(p, sig, sizeof(sig)) != 0)
> + continue;
> +
> + p += sizeof(sig);
> + consumed = aml_parse_int(p, end, ®ion_addr);
> + if (!consumed || !region_addr)
> + continue;
> +
> + p += consumed;
> + consumed = aml_parse_int(p, end, ®ion_size);
> + if (!consumed || region_size < DELL5285_GNVS_MIN_SIZE)
> + continue;
> +
> + *addr = (phys_addr_t)region_addr;
> + *size = (u32)region_size;
> + return true;
> + }
> + return false;
> +}
> +
> +/**
> + * dell5285_gnvs_find - Locate the GNVS OperationRegion by scanning DSDT and SSDTs.
> + * @addr: Output: physical base address of the GNVS region.
> + * @size: Output: byte length of the GNVS region.
> + *
> + * Returns true if the GNVS region was found in any ACPI table.
> + */
> +static bool dell5285_gnvs_find(phys_addr_t *addr, u32 *size)
> +{
> + struct acpi_table_header *tbl;
> + u32 i;
> +
> + /* DSDT */
> + if (ACPI_SUCCESS(acpi_get_table(ACPI_SIG_DSDT, 1, &tbl))) {
> + bool found = dell5285_gnvs_from_table(tbl, addr, size);
> +
> + acpi_put_table(tbl);
> + if (found)
> + return true;
> + }
> +
> + /* SSDTs (instance numbers start at 1, stop at first failure) */
> + for (i = 1; i <= 32; i++) {
> + bool found;
> +
> + if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_SSDT, i, &tbl)))
> + break;
> + found = dell5285_gnvs_from_table(tbl, addr, size);
> + acpi_put_table(tbl);
> + if (found)
> + return true;
> + }
> +
> + return false;
> +}
> +
> +static const struct dmi_system_id dell5285_gnvs_dmi[] = {
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
> + },
> + },
> + { }
> +};
> +
> +static void dell5285_gnvs_fix(void)
> +{
> + phys_addr_t gnvs_addr;
> + u32 gnvs_size;
> + void *gnvs;
> +
> + if (!dmi_check_system(dell5285_gnvs_dmi))
> + return;
> +
> + if (!dell5285_gnvs_find(&gnvs_addr, &gnvs_size)) {
> + pr_err("int3472-tps68470: Dell 5285: GNVS OperationRegion not found in DSDT/SSDTs\n");
> + return;
> + }
> +
> + gnvs = acpi_os_map_memory(gnvs_addr, gnvs_size);
> + if (!gnvs) {
> + pr_err("int3472-tps68470: Dell 5285: failed to map GNVS at %pa\n",
> + &gnvs_addr);
> + return;
> + }
> +
> + pr_info("int3472-tps68470: Dell 5285 GNVS fix at %pa: C0TP=0x%02x L0CL=0x%02x L1CL=0x%02x -> 0x02\n",
> + &gnvs_addr,
> + *(u8 *)(gnvs + DELL5285_C0TP_OFF),
> + *(u8 *)(gnvs + DELL5285_L0CL_OFF),
> + *(u8 *)(gnvs + DELL5285_L1CL_OFF));
> +
> + *(u8 *)(gnvs + DELL5285_C0TP_OFF) = 0x02;
> + *(u8 *)(gnvs + DELL5285_L0CL_OFF) = 0x02;
> + *(u8 *)(gnvs + DELL5285_L1CL_OFF) = 0x02;
> +
> + acpi_os_unmap_memory(gnvs, gnvs_size);
> +}
> +
> static int skl_int3472_tps68470_probe(struct i2c_client *client)
> {
> struct acpi_device *adev = ACPI_COMPANION(&client->dev);
> @@ -155,6 +354,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
> if (!adev)
> return -ENODEV;
>
> + dell5285_gnvs_fix();
> +
> n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata);
> if (n_consumers < 0)
> return n_consumers;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
` (2 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
To: linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
Thierry Chatard
The Dell Latitude 5285 2-in-1 has two cameras connected through a TPS68470
PMIC/clock/GPIO hub:
Front: OV5670 (ACPI INT3479) on I2C4
Back: OV8858 (ACPI INT3477) on I2C2, daisy-chained behind TPS68470
S_I2C port (controlled by reg 0x43 S_I2C_CTL)
GPIO mapping (TPS68470):
INT3479 (OV5670): GPIO3 = reset, GPIO4 = powerdown (both active-low)
INT3477 (OV8858): GPIO9 = s_resetn, GPIO7 = s_enable (both active-low)
GPIO9 and GPIO7 are the TPS68470 secondary-port GPIOs (SGPO reg 0x22
bits 2 and 0), not regular GPDO outputs.
Regulator mapping:
CORE -> dvdd / INT3477
ANA -> avdd / INT3477
VIO -> dovdd / INT3477
VSIO -> avdd / INT3479 and vsio / INT3477 (always_on: keeps S_I2C_CTL
non-zero from boot so OV8858 is reachable on I2C2 at any time)
AUX1 -> dvdd / INT3479
AUX2 -> dovdd / INT3479
Marking VSIO always_on ensures the TPS68470 S_I2C passthrough is active
from the moment the PMIC driver probes, eliminating a timing dependency
between TPS68470 and ov8858 probe ordering.
Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
.../x86/intel/int3472/tps68470_board_data.c | 163 ++++++++++++++++++
1 file changed, 163 insertions(+)
diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
index 71357a036..a5b469dcb 100644
--- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
@@ -287,6 +287,162 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
},
};
+/* Settings for Dell Latitude 5285 2-in-1 */
+
+static struct regulator_consumer_supply dell_5285_int3477_ana_consumer_supplies[] = {
+ REGULATOR_SUPPLY("avdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_core_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dvdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_vio_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dovdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_vsio_consumer_supplies[] = {
+ REGULATOR_SUPPLY("avdd", "i2c-INT3479:00"),
+ /* S_I2C_CTL: must be enabled for OV8858 I2C daisy-chain access */
+ REGULATOR_SUPPLY("vsio", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux1_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dvdd", "i2c-INT3479:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux2_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"),
+};
+
+static const struct regulator_init_data dell_5285_tps68470_core_reg_init_data = {
+ .constraints = {
+ .min_uV = 1200000,
+ .max_uV = 1200000,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_core_consumer_supplies),
+ .consumer_supplies = dell_5285_int3477_core_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_ana_reg_init_data = {
+ .constraints = {
+ .min_uV = 2815200,
+ .max_uV = 2815200,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_ana_consumer_supplies),
+ .consumer_supplies = dell_5285_int3477_ana_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vcm_reg_init_data = {
+ .constraints = {
+ .min_uV = 2815200,
+ .max_uV = 2815200,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = 0,
+ .consumer_supplies = NULL,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vio_reg_init_data = {
+ .constraints = {
+ .min_uV = 1800600,
+ .max_uV = 1800600,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_vio_consumer_supplies),
+ .consumer_supplies = dell_5285_int3477_vio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vsio_reg_init_data = {
+ .constraints = {
+ .min_uV = 1800600,
+ .max_uV = 1800600,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ /*
+ * Keep S_I2C_CTL enabled from boot so OV8858 I2C daisy-chain
+ * is accessible before ov8858 driver probes.
+ */
+ .always_on = 1,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_vsio_consumer_supplies),
+ .consumer_supplies = dell_5285_int3479_vsio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux1_reg_init_data = {
+ .constraints = {
+ .min_uV = 1213200,
+ .max_uV = 1213200,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux1_consumer_supplies),
+ .consumer_supplies = dell_5285_int3479_aux1_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux2_reg_init_data = {
+ .constraints = {
+ .min_uV = 1800600,
+ .max_uV = 1800600,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux2_consumer_supplies),
+ .consumer_supplies = dell_5285_int3479_aux2_consumer_supplies,
+};
+
+static const struct tps68470_regulator_platform_data dell_5285_tps68470_pdata = {
+ .reg_init_data = {
+ [TPS68470_CORE] = &dell_5285_tps68470_core_reg_init_data,
+ [TPS68470_ANA] = &dell_5285_tps68470_ana_reg_init_data,
+ [TPS68470_VCM] = &dell_5285_tps68470_vcm_reg_init_data,
+ [TPS68470_VIO] = &dell_5285_tps68470_vio_reg_init_data,
+ [TPS68470_VSIO] = &dell_5285_tps68470_vsio_reg_init_data,
+ [TPS68470_AUX1] = &dell_5285_tps68470_aux1_reg_init_data,
+ [TPS68470_AUX2] = &dell_5285_tps68470_aux2_reg_init_data,
+ },
+};
+
+static struct gpiod_lookup_table dell_5285_int3477_gpios = {
+ .dev_id = "i2c-INT3477:00",
+ .table = {
+ /*
+ * TPS68470 GPIO9 = s_resetn (secondary camera reset, active-low)
+ * TPS68470 GPIO7 = s_enable (secondary camera enable/powerdown)
+ * These logic outputs are specifically designed for secondary
+ * camera control on the TPS68470. Matches Surface Go pattern.
+ */
+ GPIO_LOOKUP("tps68470-gpio", 9, "reset", GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP("tps68470-gpio", 7, "powerdown", GPIO_ACTIVE_LOW),
+ { }
+ }
+};
+
+static struct gpiod_lookup_table dell_5285_int3479_gpios = {
+ .dev_id = "i2c-INT3479:00",
+ .table = {
+ GPIO_LOOKUP("tps68470-gpio", 3, "reset", GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP("tps68470-gpio", 4, "powerdown", GPIO_ACTIVE_LOW),
+ { }
+ }
+};
+
+static const struct int3472_tps68470_board_data dell_5285_tps68470_board_data = {
+ .dev_name = "i2c-INT3472:05",
+ .tps68470_regulator_pdata = &dell_5285_tps68470_pdata,
+ .n_gpiod_lookups = 2,
+ .tps68470_gpio_lookup_tables = {
+ &dell_5285_int3477_gpios,
+ &dell_5285_int3479_gpios,
+ },
+};
+
static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
{
.matches = {
@@ -316,6 +472,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
},
.driver_data = (void *)&dell_7212_tps68470_board_data,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+ },
+ .driver_data = (void *)&dell_5285_tps68470_board_data,
+ },
{ }
};
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
` (2 preceding siblings ...)
2026-03-24 21:41 ` [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data " Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
2026-04-13 9:45 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Hans de Goede
5 siblings, 0 replies; 16+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
To: linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
Thierry Chatard
The Omnivision OV8858 is used as the rear camera in several Intel
IPU3-based devices (e.g. Dell Latitude 5285 2-in-1). Its ACPI HID is
INT3477. Add a sensor configuration entry with a link frequency of
360 MHz to allow ipu_bridge to create the firmware node for this sensor.
Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
drivers/media/pci/intel/ipu-bridge.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index fc6608e33..f51749d0f 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -63,6 +63,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
IPU_SENSOR_CONFIG("INT33F0", 1, 384000000),
/* Omnivision OV2740 */
IPU_SENSOR_CONFIG("INT3474", 1, 180000000),
+ /* Omnivision OV8858 */
+ IPU_SENSOR_CONFIG("INT3477", 1, 360000000),
/* Omnivision OV5670 */
IPU_SENSOR_CONFIG("INT3479", 1, 422400000),
/* Omnivision OV8865 */
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
` (3 preceding siblings ...)
2026-03-24 21:41 ` [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
2026-04-13 9:45 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Hans de Goede
5 siblings, 0 replies; 16+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
To: linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
Thierry Chatard
The Omnivision OV8858 appears in ACPI firmware under the HID INT3477 on
Intel IPU3-based platforms such as the Dell Latitude 5285 2-in-1. Add
INT3477 to the ACPI match table so the driver binds when instantiated by
ipu_bridge.
On the Dell Latitude 5285 the OV8858 is powered through a TPS68470 PMIC.
The TPS68470 VSIO regulator controls the S_I2C_CTL register (0x43) which
enables I2C passthrough to the sensor. The board data for this machine
maps VSIO to the supply name "vsio" for INT3477. Add "vsio" to
ov8858_supply_names[] so the driver requests this regulator at probe time.
The existing supply array had a duplicate "dvdd" entry; replace it with
the new "vsio" entry and reorder to: avdd, dvdd, dovdd, vsio.
Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
drivers/media/i2c/ov8858.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 3f45f7fab..5bfea237b 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -79,8 +79,9 @@
static const char * const ov8858_supply_names[] = {
"avdd", /* Analog power */
- "dovdd", /* Digital I/O power */
"dvdd", /* Digital core power */
+ "dovdd", /* Digital I/O power */
+ "vsio", /* Secondary I2C / S_I2C_CTL enable */
};
struct regval {
@@ -1981,11 +1982,18 @@ static const struct of_device_id ov8858_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ov8858_of_match);
+static const struct acpi_device_id ov8858_acpi_ids[] = {
+ { "INT3477" },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(acpi, ov8858_acpi_ids);
+
static struct i2c_driver ov8858_i2c_driver = {
.driver = {
.name = "ov8858",
.pm = &ov8858_pm_ops,
.of_match_table = ov8858_of_match,
+ .acpi_match_table = ACPI_PTR(ov8858_acpi_ids),
},
.probe = ov8858_probe,
.remove = ov8858_remove,
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
` (4 preceding siblings ...)
2026-03-24 21:41 ` [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
@ 2026-04-13 9:45 ` Hans de Goede
5 siblings, 0 replies; 16+ messages in thread
From: Hans de Goede @ 2026-04-13 9:45 UTC (permalink / raw)
To: Thierry Chatard, linux-kernel
Cc: linux-media, platform-driver-x86, lee, djrscally, ilpo.jarvinen,
mchehab, sakari.ailus, jacopo.mondi, nicholas
Hi Thierry,
Thank you for your work on this.
On 24-Mar-26 10:41 PM, Thierry Chatard wrote:
> Changes in v2:
> - patch 2: split trailing statements in aml_parse_int() onto separate
> lines (checkpatch); add kernel-doc @param descriptions to
> aml_parse_int(), dell5285_gnvs_from_table(), and dell5285_gnvs_find()
> (kernel test robot); add Reported-by/Closes tags
> - patch 3: wrap long lines in commit message (checkpatch)
>
> The Dell Latitude 5285 2-in-1 has two cameras (OV5670 front, OV8858
> rear) connected through a TPS68470 PMIC/clock/GPIO hub. All five patches
> are required for a working system; each is self-contained and
> bisect-safe.
>
> Hardware topology
> -----------------
> Front camera: OV5670 (ACPI INT3479), I2C4 / INT3446
> Rear camera: OV8858 (ACPI INT3477), I2C2 / i2c_designware.3
> PMIC: TPS68470 (ACPI INT3472:05), addr 0x4D, on I2C2
> ISP: Intel IPU3 (ipu3_cio2 + ipu3-imgu)
>
> The OV8858 is daisy-chained behind the TPS68470 S_I2C passthrough port.
> The TPS68470 VSIO regulator controls S_I2C_CTL (reg 0x43); marking it
> always_on keeps the passthrough active from boot so OV8858 is reachable
> on I2C2 at probe time.
> > Four problems must be fixed in combination:
Hmm, it is unfortunate that this 2-in-1 requires the first 2 workarounds,
especially the second workaround.
Patches 3-5 look fine at a quick glance.
> patch 1/5 - intel_lpss: The BIOS claims the same MMIO region for both
> GEXP and INT3446 (I2C4). Without this quirk the kernel rejects INT3446
> as a resource conflict and the front camera's I2C bus never comes up.
This one is a bit unfortunate but this is a known issue on similar
(Microsoft Surface Go series) devices with an IPU3 camera like here,
with a pre-existing quirk mechanism to deal with this, so I guess this is
acceptable.
> patch 2/5 - GNVS fixup: With I2C4 available, ipu_bridge still does not
> create the front camera client because _DEP on INT3479 returns the
> root PCI bus instead of the INT3472 handle. Root cause: BIOS leaves
> GNVS fields C0TP, L0CL, L1CL at zero. Fix: scan DSDT/SSDTs for the
> GNVS OperationRegion at TPS68470 probe time and write 0x02 (19.2 MHz)
> into all three fields before ipu_bridge evaluates _DEP.
This one really is nasty. I'll reply in detail to the patch itself.
Regards,
Hans
> patch 3/5 - TPS68470 board data: No board data existed for this machine,
> so no PMIC regulators or GPIOs were configured for either sensor.
>
> patch 4/5 - ipu-bridge: INT3477 (OV8858) was unknown to ipu_bridge, so
> it was skipped at CSI-2 enumeration.
>
> patch 5/5 - ov8858 driver: No ACPI match for INT3477, and the driver did
> not request the vsio supply needed by the S_I2C passthrough.
>
> Tested on Dell Latitude 5285 2-in-1, Ubuntu 25.10, kernel 6.17.0-19.
> Both cameras appear in libcamera and are usable in applications.
> Note: the IPU3 IMGU can only run one pipeline at a time, so front and
> rear camera use is mutually exclusive.
>
> Thierry Chatard (5):
> platform/x86: intel_lpss: add resource conflict quirk for Dell
> Latitude 5285
> platform/x86: int3472: tps68470: fix GNVS clock fields for Dell
> Latitude 5285
> platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
> media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
> media: ov8858: add ACPI device ID INT3477 and vsio power supply
>
> drivers/mfd/intel-lpss-acpi.c | 32 +++
> drivers/media/i2c/ov8858.c | 10 +-
> drivers/media/pci/intel/ipu-bridge.c | 2 ++
> drivers/platform/x86/intel/int3472/tps68470.c | 201 ++++++++++++++++++
> .../x86/intel/int3472/tps68470_board_data.c | 163 ++++++++++++++
> 5 files changed, 407 insertions(+), 1 deletion(-)
>
> base-commit: 6de23f81a4be5ee86a4df4fde0ca0c7bf67aecd1
> --
> 2.51.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread