mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 12:31:52 -04:00
platform: int3472: Add MSI prestige board data
Define regulators and gpio for ov5675 in MSI Prestige 14 AI EVO+ laptop. Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> [Sakari Ailus: Drop redundant initialisation to 0 and NULL.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
eac4a8e26d
commit
be653ae811
@@ -12,6 +12,7 @@
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/platform_data/tps68470.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include "tps68470.h"
|
||||
|
||||
@@ -232,6 +233,70 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
|
||||
},
|
||||
};
|
||||
|
||||
/* Settings for MSI Prestige 14 AI+ Evo C2VMG laptop. */
|
||||
static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
|
||||
REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
|
||||
REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
|
||||
REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
|
||||
};
|
||||
|
||||
static const struct regulator_init_data msi_p14_ai_evo_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(ovti5675_dvdd_consumer_supplies),
|
||||
.consumer_supplies = ovti5675_dvdd_consumer_supplies,
|
||||
};
|
||||
|
||||
static const struct regulator_init_data msi_p14_ai_evo_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(ovti5675_avdd_consumer_supplies),
|
||||
.consumer_supplies = ovti5675_avdd_consumer_supplies,
|
||||
};
|
||||
|
||||
static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
|
||||
.constraints = {
|
||||
.min_uV = 1800600,
|
||||
.max_uV = 1800600,
|
||||
.apply_uV = 1,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct regulator_init_data msi_p14_ai_evo_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(ovti5675_dovdd_consumer_supplies),
|
||||
.consumer_supplies = ovti5675_dovdd_consumer_supplies,
|
||||
};
|
||||
|
||||
static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
|
||||
.reg_init_data = {
|
||||
[TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
|
||||
[TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
|
||||
[TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
|
||||
[TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table surface_go_int347a_gpios = {
|
||||
.dev_id = "i2c-INT347A:00",
|
||||
.table = {
|
||||
@@ -258,6 +323,23 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
|
||||
.dev_id = "i2c-OVTI5675:00",
|
||||
.table = {
|
||||
GPIO_LOOKUP("tps68470-gpio", 9, "reset", GPIO_ACTIVE_LOW),
|
||||
{ }
|
||||
}
|
||||
};
|
||||
|
||||
static const struct property_entry msi_p14_ai_evo_gpio_props[] = {
|
||||
PROPERTY_ENTRY_BOOL("daisy-chain-enable"),
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct software_node msi_p14_ai_evo_tps68470_gpio_swnode = {
|
||||
.properties = msi_p14_ai_evo_gpio_props,
|
||||
};
|
||||
|
||||
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 +369,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
|
||||
},
|
||||
};
|
||||
|
||||
static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
|
||||
.dev_name = "i2c-INT3472:06",
|
||||
.tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
|
||||
.tps68470_gpio_swnode = &msi_p14_ai_evo_tps68470_gpio_swnode,
|
||||
.n_gpiod_lookups = 1,
|
||||
.tps68470_gpio_lookup_tables = {
|
||||
&msi_p14_ai_evo_ovti5675_gpios,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
|
||||
{
|
||||
.matches = {
|
||||
@@ -316,6 +408,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, "Micro-Star International Co., Ltd."),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
|
||||
},
|
||||
.driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user