Linux Media Controller development
 help / color / mirror / Atom feed
From: Sahan Nissanka <adee.sahan@gmail.com>
To: platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org
Cc: dan.scally@ideasonboard.com, sakari.ailus@linux.intel.com,
	hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
	mchehab@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] platform/x86: int3472: Add TPS68470 board data for Dell 7320 Detachable
Date: Sun,  9 Aug 2026 14:25:17 +1000	[thread overview]
Message-ID: <20260809042540.15849-2-adee.sahan@gmail.com> (raw)
In-Reply-To: <20260809042540.15849-1-adee.sahan@gmail.com>

The Dell Latitude 7320 Detachable has two MIPI cameras behind an Intel
IPU6, both powered by a TPS68470 PMIC. Without board data the PMIC
driver fails:

  int3472-tps68470 i2c-INT3472:07: error -ENODEV: No board-data found
  for this model

and because the sensors declare an ACPI _DEP on the control logic they
are never enumerated at all - no i2c client is created for either of
them, so nothing can bind them.

Add board data for the front sensor, which ACPI describes as OVTI5678.
The GPIO and rail assignments are the same as on the Dell 7212 and the
Dell 5290 2-in-1: reset on tps68470-gpio 3, powerdown on 4, and
VSIO/AUX1/AUX2 feeding avdd/dvdd/dovdd. This was confirmed on the
hardware - with these settings the sensor powers up and acknowledges on
i2c, and with the conventional ANA/CORE/VSIO mapping it does not. The
CLDB buffer read from this machine also carries C0W4=3, agreeing with
reset on GPIO 3.

The rails that have no consumers are wired as on the Dell 7212, so reuse
those regulator_init_data rather than duplicating them.

Note the control logic here enumerates as INT3472:07, not :05 as on the
other Dell models in this file. The board data lookup matches on DMI and
device name, so this has to be exact.

The rear OVTI8856 sensor shares this PMIC but its GPIO assignment is not
yet known, so it is left out for now.

Signed-off-by: Sahan Nissanka <adee.sahan@gmail.com>
---
 .../x86/intel/int3472/tps68470_board_data.c   | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
index 71357a0..f32a884 100644
--- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
@@ -232,6 +232,69 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
 	},
 };
 
+/* Settings for Dell Latitude 7320 Detachable */
+
+static struct regulator_consumer_supply ovti5678_vsio_consumer_supplies[] = {
+	REGULATOR_SUPPLY("avdd", "i2c-OVTI5678:00"),
+};
+
+static struct regulator_consumer_supply ovti5678_aux1_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dvdd", "i2c-OVTI5678:00"),
+};
+
+static struct regulator_consumer_supply ovti5678_aux2_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dovdd", "i2c-OVTI5678:00"),
+};
+
+static const struct regulator_init_data dell_7320_tps68470_vsio_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(ovti5678_vsio_consumer_supplies),
+	.consumer_supplies = ovti5678_vsio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_7320_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(ovti5678_aux1_consumer_supplies),
+	.consumer_supplies = ovti5678_aux1_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_7320_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(ovti5678_aux2_consumer_supplies),
+	.consumer_supplies = ovti5678_aux2_consumer_supplies,
+};
+
+/*
+ * The rails without consumers are wired the same way as on the Dell 7212, so
+ * reuse those init_data rather than duplicating them.
+ */
+static const struct tps68470_regulator_platform_data dell_7320_tps68470_pdata = {
+	.reg_init_data = {
+		[TPS68470_CORE] = &dell_7212_tps68470_core_reg_init_data,
+		[TPS68470_ANA]  = &dell_7212_tps68470_ana_reg_init_data,
+		[TPS68470_VCM]  = &dell_7212_tps68470_vcm_reg_init_data,
+		[TPS68470_VIO]  = &dell_7212_tps68470_vio_reg_init_data,
+		[TPS68470_VSIO] = &dell_7320_tps68470_vsio_reg_init_data,
+		[TPS68470_AUX1] = &dell_7320_tps68470_aux1_reg_init_data,
+		[TPS68470_AUX2] = &dell_7320_tps68470_aux2_reg_init_data,
+	},
+};
+
 static struct gpiod_lookup_table surface_go_int347a_gpios = {
 	.dev_id = "i2c-INT347A:00",
 	.table = {
@@ -258,6 +321,15 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
 	}
 };
 
+static struct gpiod_lookup_table dell_7320_ovti5678_gpios = {
+	.dev_id = "i2c-OVTI5678: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 surface_go_tps68470_board_data = {
 	.dev_name = "i2c-INT3472:05",
 	.tps68470_regulator_pdata = &surface_go_tps68470_pdata,
@@ -287,6 +359,19 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
 	},
 };
 
+/*
+ * The control logic on the Latitude 7320 Detachable enumerates as INT3472:07,
+ * not :05 as on the other Dell models here.
+ */
+static const struct int3472_tps68470_board_data dell_7320_tps68470_board_data = {
+	.dev_name = "i2c-INT3472:07",
+	.tps68470_regulator_pdata = &dell_7320_tps68470_pdata,
+	.n_gpiod_lookups = 1,
+	.tps68470_gpio_lookup_tables = {
+		&dell_7320_ovti5678_gpios,
+	},
+};
+
 static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
 	{
 		.matches = {
@@ -316,6 +401,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 7320 Detachable"),
+		},
+		.driver_data = (void *)&dell_7320_tps68470_board_data,
+	},
 	{ }
 };
 
-- 
2.53.0


  reply	other threads:[~2026-08-09  4:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09  4:25 [PATCH 0/3] Enable the front camera on the Dell Latitude 7320 Detachable Sahan Nissanka
2026-08-09  4:25 ` Sahan Nissanka [this message]
2026-08-10  8:32   ` [PATCH 1/3] platform/x86: int3472: Add TPS68470 board data for Dell " Sahan Nissanka
2026-08-09  4:25 ` [PATCH 2/3] media: i2c: ov5675: Add OVTI5678 ACPI id Sahan Nissanka
2026-08-10  8:09   ` Sakari Ailus
2026-08-10  9:24     ` Sahan Nissanka
2026-08-09  4:25 ` [PATCH 3/3] media: ipu-bridge: Add sensor configuration for OV5675 (OVTI5678) Sahan Nissanka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260809042540.15849-2-adee.sahan@gmail.com \
    --to=adee.sahan@gmail.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox