From nobody Mon Apr 6 10:42:04 2026 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F6154315F for ; Fri, 20 Mar 2026 00:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773965404; cv=none; b=Mbk8FsCaneTFUh/RIkMSUexaTtfnim9g7D70dfr2V7nP0btm5QAi5RapdXCF/ZD9WkM5P/YWqLzHB/ZFouQk3MeJEL1BKx4Fx2Sy0YRkr9UcCs49N2dCRFX/5EgqIUXVU8qtkILOwg44l8aXVyeAiVBvVOGLKR972td2JqeKlRI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773965404; c=relaxed/simple; bh=0Gwtc1Aw3N0kKl6UBYxX38wZYxqXLGfLSaCSDBMFI/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T+uLZ07U0ShdrmeYTrnw71i9iM6q/awvKlSvhleJbgDhozgDvpUrcPCZ6Eth0jBJLVV/8zBUpsTtG1gz5MjVdqdghYSeLeRWqjOlzKEbcbsKqW5Ya7S71+OMCSFYrxJeSqvuLoUuy3n1/F8I1qYUl7rPaqOl/2flulo2leRiKOE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AcY7hPIT; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AcY7hPIT" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-2b4520f6b32so2307048eec.0 for ; Thu, 19 Mar 2026 17:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773965402; x=1774570202; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4wfzgvzVMeg4WQczJDrBbctjHV7qEIQWsbnU0+vLey0=; b=AcY7hPIT6oHCWrGBq1eZ2qxY5H0f3XAMYvkj2nenJ9sAhQvOAQBXn0fLCNZqrHw+hR K1t/BpvoqJdlsUApZqd5Q/QGXkz+yayWbbUOKKYZ+ThOWDaDwJBbFUYdJzLKTJEvSkh2 nNrGwSu34oWdv98q7GSJuU3R/chp347q9rpTm6SaEGkzkMQSQsJ73sLwH2QPJTvMuZ1N SAmsrrd+afnQ8L/sHtJeaFjg3UHq8o+sswLBn3x8xi8qPK8iv5IM+6YhLC/hA59bHdQs MIr/ayBlGHyF1YZtqYZT0jrBrif+gokuZYXb6wrhsfRJmMOFcC7KCqNVCvzoER4mnYDa vDgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773965402; x=1774570202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4wfzgvzVMeg4WQczJDrBbctjHV7qEIQWsbnU0+vLey0=; b=PnNEPBweShmK0ZsXgrILgsihFWqUERAqfHfuEvUtB2OWd0tFFkAlJDjf4UJQNSS+B+ KddP4+0tzD80/5HVNULT32zvlxsrWTPXJjrxulFz3Kf09xzYnEUkQAam9YFJwrxnTqnd S8MVXfrB5WRRUzxTu4rksVPwmX+8UxiV65+9sKcYra07/KQbd5ogNBV5r7A0vrpiHxf4 D1UIesH9xFPSmjq6/njEqlHqF3yAtVAMnrT2GCz39/DO734J11izZw56HPMJGbr8aty0 K4QU5K8VeZUzBUfFTyhy1p3WJNaTHBfVNaCq7x+cWUgxM6cSxBOU4nK26SI2u5SAfroO n6IA== X-Gm-Message-State: AOJu0Yyea3+jQujHkk5sNaypAHEWxx/jac0BNVsDf029THUKlxu5dJj7 1uaZNHL0LTNKRzePEDyzUy+ITWclxZVoilM++NNE3K3cJZv0u9x/GyZN2TZe9ggzfis= X-Gm-Gg: ATEYQzwJ02ioAZa5GlG6Gf6ViLx0/zAyiUUP0MAemBvUraswCrUtf/BFTtIQgrjohMK SVI7BAeSCUlEQ/v/bCZrowaQ8TmOBMldXmE88vB5ERz65qfaTuqlnTxiRSUPji1fDJtFwgFSSlo I9CgQhQvKeR9tVyFq/hHsRnpNfDukc4jrQcro4DP/OmESfM1o6jd2CZtk7hOQsDOF9GiffjCozr RA1M2DvFzWMNuBcTRh4wd9xmbEVmdsOV6BiV30nOC3OfkYKWO8tAxJ41Tjc/2V+9eUvz5PsJi7o xOwUXBJAhNptsEJ7OfY+iac0O0q/vMpXc6H3LxhQ73nHb6TkSGQUHjaFtYyZrrxrCApQNeWafo3 iL1vj5JnuCpjfxXazdyFLQNmjxqWZrciOfEKq7imKnM9v59GvsvN51VZWngMxPPGx+ETV9ISj/c oHZu8CrHZh55JgzcfOId3xKA== X-Received: by 2002:a05:7300:7fa2:b0:2c0:c482:7ed with SMTP id 5a478bee46e88-2c109567b49mr625937eec.7.1773965402272; Thu, 19 Mar 2026 17:10:02 -0700 (PDT) Received: from TC-LAPTOP.lan ([209.76.64.37]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2c10b3253d0sm927960eec.29.2026.03.19.17.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 17:10:01 -0700 (PDT) From: Thierry Chatard To: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org, platform-driver-x86@vger.kernel.org, lee@kernel.org, djrscally@gmail.com, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, mchehab@kernel.org, sakari.ailus@linux.intel.com, jacopo.mondi@ideasonboard.com, nicholas@rothemail.net, Thierry Chatard Subject: [PATCH 3/5] platform/x86: int3472: tps68470: add board data for Dell Latitude 5285 Date: Thu, 19 Mar 2026 17:09:31 -0700 Message-ID: <20260320000937.9177-4-tchatard@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260320000937.9177-1-tchatard@gmail.com> References: <20260320000937.9177-1-tchatard@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D reset (active-low), GPIO4 =3D powerdown (acti= ve-low) INT3477 (OV8858): GPIO9 =3D s_resetn (active-low), GPIO7 =3D s_enable (ac= tive-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 --- .../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/dri= vers/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 =3D }, }; =20 +/* Settings for Dell Latitude 5285 2-in-1 */ + +static struct regulator_consumer_supply dell_5285_int3477_ana_consumer_sup= plies[] =3D { + REGULATOR_SUPPLY("avdd", "i2c-INT3477:00"), +}; + +static struct regulator_consumer_supply dell_5285_int3477_core_consumer_su= pplies[] =3D { + REGULATOR_SUPPLY("dvdd", "i2c-INT3477:00"), +}; + +static struct regulator_consumer_supply dell_5285_int3477_vio_consumer_sup= plies[] =3D { + REGULATOR_SUPPLY("dovdd", "i2c-INT3477:00"), +}; + +static struct regulator_consumer_supply dell_5285_int3479_vsio_consumer_su= pplies[] =3D { + 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_su= pplies[] =3D { + REGULATOR_SUPPLY("dvdd", "i2c-INT3479:00"), +}; + +static struct regulator_consumer_supply dell_5285_int3479_aux2_consumer_su= pplies[] =3D { + REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"), +}; + +static const struct regulator_init_data dell_5285_tps68470_core_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1200000, + .max_uV =3D 1200000, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3477_core_consumer_sup= plies), + .consumer_supplies =3D dell_5285_int3477_core_consumer_supplies, +}; + +static const struct regulator_init_data dell_5285_tps68470_ana_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 2815200, + .max_uV =3D 2815200, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3477_ana_consumer_supp= lies), + .consumer_supplies =3D dell_5285_int3477_ana_consumer_supplies, +}; + +static const struct regulator_init_data dell_5285_tps68470_vcm_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 2815200, + .max_uV =3D 2815200, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D 0, + .consumer_supplies =3D NULL, +}; + +static const struct regulator_init_data dell_5285_tps68470_vio_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 1800600, + .max_uV =3D 1800600, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3477_vio_consumer_supp= lies), + .consumer_supplies =3D dell_5285_int3477_vio_consumer_supplies, +}; + +static const struct regulator_init_data dell_5285_tps68470_vsio_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1800600, + .max_uV =3D 1800600, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + /* + * Keep S_I2C_CTL enabled from boot so OV8858 I2C daisy-chain + * is accessible before ov8858 driver probes. + */ + .always_on =3D 1, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3479_vsio_consumer_sup= plies), + .consumer_supplies =3D dell_5285_int3479_vsio_consumer_supplies, +}; + +static const struct regulator_init_data dell_5285_tps68470_aux1_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1213200, + .max_uV =3D 1213200, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3479_aux1_consumer_sup= plies), + .consumer_supplies =3D dell_5285_int3479_aux1_consumer_supplies, +}; + +static const struct regulator_init_data dell_5285_tps68470_aux2_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1800600, + .max_uV =3D 1800600, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(dell_5285_int3479_aux2_consumer_sup= plies), + .consumer_supplies =3D dell_5285_int3479_aux2_consumer_supplies, +}; + +static const struct tps68470_regulator_platform_data dell_5285_tps68470_pd= ata =3D { + .reg_init_data =3D { + [TPS68470_CORE] =3D &dell_5285_tps68470_core_reg_init_data, + [TPS68470_ANA] =3D &dell_5285_tps68470_ana_reg_init_data, + [TPS68470_VCM] =3D &dell_5285_tps68470_vcm_reg_init_data, + [TPS68470_VIO] =3D &dell_5285_tps68470_vio_reg_init_data, + [TPS68470_VSIO] =3D &dell_5285_tps68470_vsio_reg_init_data, + [TPS68470_AUX1] =3D &dell_5285_tps68470_aux1_reg_init_data, + [TPS68470_AUX2] =3D &dell_5285_tps68470_aux2_reg_init_data, + }, +}; + +static struct gpiod_lookup_table dell_5285_int3477_gpios =3D { + .dev_id =3D "i2c-INT3477:00", + .table =3D { + /* + * TPS68470 GPIO9 =3D s_resetn (secondary camera reset, active-low) + * TPS68470 GPIO7 =3D 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 =3D { + .dev_id =3D "i2c-INT3479:00", + .table =3D { + 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_d= ata =3D { + .dev_name =3D "i2c-INT3472:05", + .tps68470_regulator_pdata =3D &dell_5285_tps68470_pdata, + .n_gpiod_lookups =3D 2, + .tps68470_gpio_lookup_tables =3D { + &dell_5285_int3477_gpios, + &dell_5285_int3479_gpios, + }, +}; + static const struct dmi_system_id int3472_tps68470_board_data_table[] =3D { { .matches =3D { @@ -316,6 +472,13 @@ static const struct dmi_system_id int3472_tps68470_boa= rd_data_table[] =3D { }, .driver_data =3D (void *)&dell_7212_tps68470_board_data, }, + { + .matches =3D { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"), + }, + .driver_data =3D (void *)&dell_5285_tps68470_board_data, + }, { } }; =20 --=20 2.51.0