From nobody Thu Apr 2 15:41:49 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78B6827A45C; Fri, 27 Mar 2026 18:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774635990; cv=none; b=sZ1Gl/wif3XUnnCntXoa4/1C37uD/lvQnlbrqTpuEYoBfeFMCzEOeenLTMyk6zYslZa/+1qCtavxEyggUBuFPEskg9ATnSl+rhnKLezZW2yaE8Ta3Ec11keGluq+OZxG9VyVjDLhBWnLfiNaML5blqUczYdg6oosPNEp6MZqhhY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774635990; c=relaxed/simple; bh=GgicZ8U4RndZ78Un1Mkb90pkgpyXW/4ySWH8xaBkaTA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JNu+8GUj/jwhZavui6cM80eRJjwzuBIIozbWUe+plbMWn3tloYdfRjHrs0az5TeIFz1apDdOs1s0w6dGxMX0oBKh+02SzEdu0VP07FqPr8PhKXCX3LK2kBo9aB6VesImf8NNljlmm7ciZg19NCputoTIDxCZmAu6jpGXr8ZN91Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h5wGJWxw; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h5wGJWxw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774635982; x=1806171982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GgicZ8U4RndZ78Un1Mkb90pkgpyXW/4ySWH8xaBkaTA=; b=h5wGJWxwGIG0VmtWEuxb12Xq7+dV4F1BT3j94+vEJFSowps5il7xwegK T3B8W9ZQjkJouCwT1E7qmpocfIKZsQfIWeGzmo0CLHRwcYkGndVXBbMAu aHAvPFwEOT2QjEsj2qDj3Vi2dPjYupWfheHkwpS5PXMTHS1VswSl/rlDv LKSZ2AA5jBkumo8CT8AU2EOFkpkXgRZvH8yA34/xIiMGWzcXIq9I7up0y JYJRhKl0ZWgiyvb6WotXF5eMTC8YXFh3pgVdSCtrJZaaZNJE0/Syg5S8Y 7uieqFrMBIWIq03kUaSxhbrAikw7+KE5eZHP6o8cF45ZAClr26p9A1UE1 Q==; X-CSE-ConnectionGUID: PN2FCWhmTLGHAC5bIkuhmg== X-CSE-MsgGUID: bVtRPYT+QsCief6gfej1uw== X-IronPort-AV: E=McAfee;i="6800,10657,11742"; a="74746444" X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="74746444" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2026 11:26:17 -0700 X-CSE-ConnectionGUID: 0lEmxBctT9K68ZSjrXq6dA== X-CSE-MsgGUID: hmTOU4JATLO4YHjdimNijQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="218773018" Received: from intel-nuc8i7beh.iind.intel.com ([10.223.163.35]) by fmviesa009.fm.intel.com with ESMTP; 27 Mar 2026 11:26:15 -0700 From: Arun T To: arun.t@intel.com, johannes.goede@oss.qualcomm.com Cc: sakari.ailus@linux.intel.com, arec.kao@intel.com, ilpo.jarvinen@linux.intel.com, dan.scally@ideasonboard.com, platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, mehdi.djait@intel.com Subject: [PATCH v6 1/2] platform/x86: int3472: Add TPS68470 board data for Intel nvl Date: Fri, 27 Mar 2026 23:49:57 +0530 Message-ID: <20260327181959.3528753-2-arun.t@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260327181959.3528753-1-arun.t@intel.com> References: <20260327181959.3528753-1-arun.t@intel.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 Intel NVL platform uses IPU8 is powered by a TPS68470 PMIC,requiring bo= ard data to configure the GPIOs and regulators for proper camera sensor operati= on. Signed-off-by: Arun T Reviewed-by: Daniel Scally Reviewed-by: Hans de Goede --- .../x86/intel/int3472/tps68470_board_data.c | 121 ++++++++++++++++++ 1 file changed, 121 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 71357a036292..f0309fd1e515 100644 --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c @@ -143,6 +143,20 @@ static struct regulator_consumer_supply int3479_aux2_c= onsumer_supplies[] =3D { REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"), }; =20 +/* Settings for Intel NVL platform */ + +static struct regulator_consumer_supply ovti13b1_core_consumer_supplies[] = =3D { + REGULATOR_SUPPLY("dvdd", "i2c-OVTI13B1:01"), +}; + +static struct regulator_consumer_supply ovti13b1_ana_consumer_supplies[] = =3D { + REGULATOR_SUPPLY("avdd", "i2c-OVTI13B1:01"), +}; + +static struct regulator_consumer_supply ovti13b1_vsio_consumer_supplies[] = =3D { + REGULATOR_SUPPLY("dovdd", "i2c-OVTI13B1:01"), +}; + static const struct regulator_init_data dell_7212_tps68470_core_reg_init_d= ata =3D { .constraints =3D { .min_uV =3D 1200000, @@ -220,6 +234,77 @@ static const struct regulator_init_data dell_7212_tps6= 8470_aux2_reg_init_data =3D .consumer_supplies =3D int3479_aux2_consumer_supplies, }; =20 +static const struct regulator_init_data intel_nvl_tps68470_core_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1200000, + .max_uV =3D 1200000, + .apply_uV =3D true, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(ovti13b1_core_consumer_supplies), + .consumer_supplies =3D ovti13b1_core_consumer_supplies, +}; + +static const struct regulator_init_data intel_nvl_tps68470_ana_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 2815200, + .max_uV =3D 2815200, + .apply_uV =3D true, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(ovti13b1_ana_consumer_supplies), + .consumer_supplies =3D ovti13b1_ana_consumer_supplies, +}; + +static const struct regulator_init_data intel_nvl_tps68470_vcm_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 2815200, + .max_uV =3D 2815200, + .apply_uV =3D true, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + +}; + +/* Ensure the always-on VIO regulator has the same voltage as VSIO */ +static const struct regulator_init_data intel_nvl_tps68470_vio_reg_init_da= ta =3D { + .constraints =3D { + .min_uV =3D 1800600, + .max_uV =3D 1800600, + .apply_uV =3D true, + .always_on =3D true, + }, +}; + +static const struct regulator_init_data intel_nvl_tps68470_vsio_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 1800600, + .max_uV =3D 1800600, + .apply_uV =3D true, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies =3D ARRAY_SIZE(ovti13b1_vsio_consumer_supplies), + .consumer_supplies =3D ovti13b1_vsio_consumer_supplies, +}; + +static const struct regulator_init_data intel_nvl_tps68470_aux1_reg_init_d= ata =3D { + .constraints =3D { + .min_uV =3D 2815200, + .max_uV =3D 2815200, + .apply_uV =3D 1, + .valid_ops_mask =3D REGULATOR_CHANGE_STATUS, + }, +}; + +static const struct regulator_init_data intel_nvl_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, + }, +}; + static const struct tps68470_regulator_platform_data dell_7212_tps68470_pd= ata =3D { .reg_init_data =3D { [TPS68470_CORE] =3D &dell_7212_tps68470_core_reg_init_data, @@ -232,6 +317,18 @@ static const struct tps68470_regulator_platform_data d= ell_7212_tps68470_pdata =3D }, }; =20 +static const struct tps68470_regulator_platform_data intel_nvl_tps68470_pd= ata =3D { + .reg_init_data =3D { + [TPS68470_CORE] =3D &intel_nvl_tps68470_core_reg_init_data, + [TPS68470_ANA] =3D &intel_nvl_tps68470_ana_reg_init_data, + [TPS68470_VCM] =3D &intel_nvl_tps68470_vcm_reg_init_data, + [TPS68470_VIO] =3D &intel_nvl_tps68470_vio_reg_init_data, + [TPS68470_VSIO] =3D &intel_nvl_tps68470_vsio_reg_init_data, + [TPS68470_AUX1] =3D &intel_nvl_tps68470_aux1_reg_init_data, + [TPS68470_AUX2] =3D &intel_nvl_tps68470_aux2_reg_init_data, + }, +}; + static struct gpiod_lookup_table surface_go_int347a_gpios =3D { .dev_id =3D "i2c-INT347A:00", .table =3D { @@ -258,6 +355,14 @@ static struct gpiod_lookup_table dell_7212_int3479_gpi= os =3D { } }; =20 +static struct gpiod_lookup_table intel_nvl_ovti13b1_gpios =3D { + .dev_id =3D "i2c-OVTI13B1:01", + .table =3D { + GPIO_LOOKUP("tps68470-gpio", 9, "reset", GPIO_ACTIVE_LOW), + { } + } +}; + static const struct int3472_tps68470_board_data surface_go_tps68470_board_= data =3D { .dev_name =3D "i2c-INT3472:05", .tps68470_regulator_pdata =3D &surface_go_tps68470_pdata, @@ -287,6 +392,15 @@ static const struct int3472_tps68470_board_data dell_7= 212_tps68470_board_data =3D }, }; =20 +static const struct int3472_tps68470_board_data intel_nvl_tps68470_board_d= ata =3D { + .dev_name =3D "i2c-INT3472:04", + .tps68470_regulator_pdata =3D &intel_nvl_tps68470_pdata, + .n_gpiod_lookups =3D 1, + .tps68470_gpio_lookup_tables =3D { + &intel_nvl_ovti13b1_gpios, + }, +}; + static const struct dmi_system_id int3472_tps68470_board_data_table[] =3D { { .matches =3D { @@ -316,6 +430,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, "Intel Corporation"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Nova Lake Client Platform"), + }, + .driver_data =3D (void *)&intel_nvl_tps68470_board_data, + }, { } }; =20 --=20 2.43.0 From nobody Thu Apr 2 15:41:50 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38EFF25A2B5; Fri, 27 Mar 2026 18:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774635993; cv=none; b=YjcJdrKcXM7wLyjTJH4/kygdxNKhCu07Dd+o2L8aCI27+LFJkR0nRM7cNK1230gJeP5IMm7F/ARYy+p0yXWPngQVNdhpikHvxr5cEfWfIgsLEqJvaSabadqwku2lsHtxNJvNSmo7LlsYrQAhr0h6Ln6noKEdOPMBHUqsQhVExAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774635993; c=relaxed/simple; bh=HH0PDa/9kZC42ciSwNTwgQKd8odFAAx6WCKu62EBRlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mAXNktJfOaUvH2Q4pxRXrzLFfadxJf92RppD6WeL6E4oKuc2H9SP0WiQyADgyjUT7wfg60e9sW74icmWcOln3YKJsW5AsZrv7stZBA5u8EicZMKng6JirVj+lp+pWteCGOvGW12ekpK5TXy5YI4d3D128U0+DQ/CKGJ6zRaLSuQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Cqv0s8Z9; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Cqv0s8Z9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774635988; x=1806171988; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HH0PDa/9kZC42ciSwNTwgQKd8odFAAx6WCKu62EBRlc=; b=Cqv0s8Z9jaaTp2Eu7oHyRYPyCTMNvITh3ZZc6gRuaiH9RSnWX/inITp9 EiQ+c54umqeuZNcBHsUgb+8hNmZgzkXYy6p2WX0+7nY93ZXlitFp2if1Z JKIcDE1E9LTdHBtAKbIy5jqbkVPlxVmo/e+1+w5qsTAkKS8ZObF5Wrqd1 cUPpME/V/2NNod+BLEnlda0+oiAO8LXgY1O7PbcfOx1Eedc4WgB/oowQ2 1kBj05Jun2y/aNPY08KoeRAG+TlerC8UcH1v1+WdwROQEDWIRrisCgyi/ RzB+oMJ5Hd6cct9uc/2XG8EIuCLgyk6n49SAJXPuX4RE96G2v0QGN5r85 w==; X-CSE-ConnectionGUID: ihl5lSzCSIGhTid3myJWGA== X-CSE-MsgGUID: 0i/SoXNlQiisdUpQpHtJTg== X-IronPort-AV: E=McAfee;i="6800,10657,11742"; a="74746450" X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="74746450" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2026 11:26:22 -0700 X-CSE-ConnectionGUID: jpdvIlqFQYGQLXFkTxTXAA== X-CSE-MsgGUID: nShSEwIlRwijnBJLjmSY8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,144,1770624000"; d="scan'208";a="218773035" Received: from intel-nuc8i7beh.iind.intel.com ([10.223.163.35]) by fmviesa009.fm.intel.com with ESMTP; 27 Mar 2026 11:26:19 -0700 From: Arun T To: arun.t@intel.com, johannes.goede@oss.qualcomm.com Cc: sakari.ailus@linux.intel.com, arec.kao@intel.com, ilpo.jarvinen@linux.intel.com, dan.scally@ideasonboard.com, platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, mehdi.djait@intel.com Subject: [PATCH v6 2/2] media: ov13b10: Support multiple regulators Date: Fri, 27 Mar 2026 23:49:58 +0530 Message-ID: <20260327181959.3528753-3-arun.t@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260327181959.3528753-1-arun.t@intel.com> References: <20260327181959.3528753-1-arun.t@intel.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 OV13B10 sensor driver currently handles a single regulator called avdd, however the sensor can be supplied by up to three regulators. Update the driver to handle all of them together using the regulator bulk API. Signed-off-by: Arun T Reviewed-by: Daniel Scally Reviewed-by: Hans de Goede --- drivers/media/i2c/ov13b10.c | 47 ++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 5421874732bc..b0d34141a13a 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -699,6 +700,12 @@ static const struct ov13b10_mode supported_2_lanes_mod= es[] =3D { }, }; =20 +static const char * const ov13b10_supply_names[] =3D { + "dovdd", /* Digital I/O power */ + "avdd", /* Analog power */ + "dvdd", /* Digital core power */ +}; + struct ov13b10 { struct device *dev; =20 @@ -708,7 +715,7 @@ struct ov13b10 { struct v4l2_ctrl_handler ctrl_handler; =20 struct clk *img_clk; - struct regulator *avdd; + struct regulator_bulk_data supplies[ARRAY_SIZE(ov13b10_supply_names)]; struct gpio_desc *reset; =20 /* V4L2 Controls */ @@ -1194,9 +1201,8 @@ static int ov13b10_power_off(struct device *dev) struct ov13b10 *ov13b10 =3D to_ov13b10(sd); =20 gpiod_set_value_cansleep(ov13b10->reset, 1); - - if (ov13b10->avdd) - regulator_disable(ov13b10->avdd); + regulator_bulk_disable(ARRAY_SIZE(ov13b10_supply_names), + ov13b10->supplies); =20 clk_disable_unprepare(ov13b10->img_clk); =20 @@ -1214,14 +1220,12 @@ static int ov13b10_power_on(struct device *dev) dev_err(dev, "failed to enable imaging clock: %d", ret); return ret; } - - if (ov13b10->avdd) { - ret =3D regulator_enable(ov13b10->avdd); - if (ret < 0) { - dev_err(dev, "failed to enable avdd: %d", ret); - clk_disable_unprepare(ov13b10->img_clk); - return ret; - } + ret =3D regulator_bulk_enable(ARRAY_SIZE(ov13b10_supply_names), + ov13b10->supplies); + if (ret < 0) { + dev_err(dev, "failed to enable regulators\n"); + clk_disable_unprepare(ov13b10->img_clk); + return ret; } =20 gpiod_set_value_cansleep(ov13b10->reset, 0); @@ -1475,7 +1479,8 @@ static int ov13b10_get_pm_resources(struct ov13b10 *o= v13b) unsigned long freq; int ret; =20 - ov13b->reset =3D devm_gpiod_get_optional(ov13b->dev, "reset", GPIOD_OUT_L= OW); + ov13b->reset =3D devm_gpiod_get_optional(ov13b->dev, "reset", + GPIOD_OUT_LOW); if (IS_ERR(ov13b->reset)) return dev_err_probe(ov13b->dev, PTR_ERR(ov13b->reset), "failed to get reset gpio\n"); @@ -1491,15 +1496,15 @@ static int ov13b10_get_pm_resources(struct ov13b10 = *ov13b) "external clock %lu is not supported\n", freq); =20 - ov13b->avdd =3D devm_regulator_get_optional(ov13b->dev, "avdd"); - if (IS_ERR(ov13b->avdd)) { - ret =3D PTR_ERR(ov13b->avdd); - ov13b->avdd =3D NULL; - if (ret !=3D -ENODEV) - return dev_err_probe(ov13b->dev, ret, - "failed to get avdd regulator\n"); - } + for (unsigned int i =3D 0; i < ARRAY_SIZE(ov13b10_supply_names); i++) + ov13b->supplies[i].supply =3D ov13b10_supply_names[i]; =20 + ret =3D devm_regulator_bulk_get(ov13b->dev, + ARRAY_SIZE(ov13b10_supply_names), + ov13b->supplies); + if (ret) + return dev_err_probe(ov13b->dev, ret, + "failed to get regulators\n"); return 0; } =20 --=20 2.43.0