From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Daniel Scally <dan.scally@ideasonboard.com>
Cc: linux-media@vger.kernel.org, platform-driver-x86@vger.kernel.org,
anders.ruke@gmail.com, sakari.ailus@linux.intel.com,
Hans de Goede <hdegoede@redhat.com>,
hverkuil-cisco@xs4all.nl
Subject: Re: [PATCH 2/3] platform/x86: int3472: Add board data for Dell 7212
Date: Wed, 16 Oct 2024 14:58:25 +0300 (EEST) [thread overview]
Message-ID: <fcb92c2d-f422-ef97-721e-f59b5e026474@linux.intel.com> (raw)
In-Reply-To: <20241015211958.1465909-3-dan.scally@ideasonboard.com>
On Tue, 15 Oct 2024, Daniel Scally wrote:
> The Dell 7212 Rugged Extreme Tablet pairs an OV5670 sensor with the
> Intel IPU3 ISP. The sensor is powered by a TPS68470 PMIC, and so we
> need some board data to describe how to configure the GPIOs and
> regulators to run the sensor.
>
> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
> ---
> .../x86/intel/int3472/tps68470_board_data.c | 128 ++++++++++++++++++
> 1 file changed, 128 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> index 322237e056f3..d28053733bd2 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> @@ -129,6 +129,109 @@ static const struct tps68470_regulator_platform_data surface_go_tps68470_pdata =
> },
> };
>
> +/* Settings for Dell 7212 Tablet */
> +
> +static struct regulator_consumer_supply int3479_vsio_consumer_supplies[] = {
> + REGULATOR_SUPPLY("avdd", "i2c-INT3479:00"),
> +};
> +
> +static struct regulator_consumer_supply int3479_aux1_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dvdd", "i2c-INT3479:00"),
> +};
> +
> +static struct regulator_consumer_supply int3479_aux2_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"),
> +};
> +
> +static const struct regulator_init_data dell_7212_tps68470_core_reg_init_data = {
> + .constraints = {
> + .min_uV = 1200000,
> + .max_uV = 1200000,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = 0,
> + .consumer_supplies = NULL
Add comma to any non-terminator entry.
> +};
> +
> +static const struct regulator_init_data dell_7212_tps68470_ana_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_7212_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
> +};
This looks exactly identical to dell_7212_tps68470_ana_reg_init_data.
> +static const struct regulator_init_data dell_7212_tps68470_vio_reg_init_data = {
> + .constraints = {
> + .min_uV = 1800600,
> + .max_uV = 1800600,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = 0,
> + .consumer_supplies = NULL,
> +};
> +
> +static const struct regulator_init_data dell_7212_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(int3479_vsio_consumer_supplies),
> + .consumer_supplies = int3479_vsio_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data dell_7212_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(int3479_aux1_consumer_supplies),
> + .consumer_supplies = int3479_aux1_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data dell_7212_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(int3479_aux2_consumer_supplies),
> + .consumer_supplies = int3479_aux2_consumer_supplies,
> +};
> +
> +static const struct tps68470_regulator_platform_data dell_7212_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,
Inconsistent spaces.
--
i.
> + [TPS68470_VSIO] = &dell_7212_tps68470_vsio_reg_init_data,
> + [TPS68470_AUX1] = &dell_7212_tps68470_aux1_reg_init_data,
> + [TPS68470_AUX2] = &dell_7212_tps68470_aux2_reg_init_data,
> + },
> +};
> +
> static struct gpiod_lookup_table surface_go_int347a_gpios = {
> .dev_id = "i2c-INT347A:00",
> .table = {
> @@ -146,6 +249,15 @@ static struct gpiod_lookup_table surface_go_int347e_gpios = {
> }
> };
>
> +static struct gpiod_lookup_table dell_7212_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 surface_go_tps68470_board_data = {
> .dev_name = "i2c-INT3472:05",
> .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
> @@ -166,6 +278,15 @@ static const struct int3472_tps68470_board_data surface_go3_tps68470_board_data
> },
> };
>
> +static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data = {
> + .dev_name = "i2c-INT3472:05",
> + .tps68470_regulator_pdata = &dell_7212_tps68470_pdata,
> + .n_gpiod_lookups = 1,
> + .tps68470_gpio_lookup_tables = {
> + &dell_7212_int3479_gpios,
> + },
> +};
> +
> static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> {
> .matches = {
> @@ -188,6 +309,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> },
> .driver_data = (void *)&surface_go3_tps68470_board_data,
> },
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 7212 Rugged Extreme Tablet"),
> + },
> + .driver_data = (void *)&dell_7212_tps68470_board_data,
> + },
> { }
> };
>
>
next prev parent reply other threads:[~2024-10-16 11:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 21:19 [PATCH 0/3] Support OV5670 on IPU3 devices Daniel Scally
2024-10-15 21:19 ` [PATCH 1/3] media: i2c: Defer ov5670_probe() if endpoint not found Daniel Scally
2024-10-15 21:19 ` [PATCH 2/3] platform/x86: int3472: Add board data for Dell 7212 Daniel Scally
2024-10-16 11:58 ` Ilpo Järvinen [this message]
2024-10-16 12:24 ` Dan Scally
2024-10-16 12:27 ` Ilpo Järvinen
2024-10-15 21:19 ` [PATCH 3/3] media: ipu-bridge: Add _HID for OV5670 Daniel Scally
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=fcb92c2d-f422-ef97-721e-f59b5e026474@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=anders.ruke@gmail.com \
--cc=dan.scally@ideasonboard.com \
--cc=hdegoede@redhat.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.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