mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
media: pci: mgb4: Add support for GMSL3 coaxial modules
Add support for GMSL3 modules with a coaxial interface, a variant of the already existing module with the id #4. The FW is the same as for all other GMSL3 modules. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
a20cf188ab
commit
f67adf545f
|
|
@ -21,8 +21,11 @@
|
|||
#define MGB4_IS_GMSL1(mgbdev) \
|
||||
(((mgbdev)->module_version >> 4) == 6)
|
||||
#define MGB4_IS_GMSL3(mgbdev) \
|
||||
((((mgbdev)->module_version >> 4) >= 2) && \
|
||||
(((mgbdev)->module_version >> 4) <= 4))
|
||||
(((((mgbdev)->module_version >> 4) >= 2) && \
|
||||
(((mgbdev)->module_version >> 4) <= 4)) || \
|
||||
(((mgbdev)->module_version >> 4) == 8))
|
||||
#define MGB4_IS_GMSL3C(mgbdev) \
|
||||
(((mgbdev)->module_version >> 4) == 8)
|
||||
#define MGB4_IS_FPDL3(mgbdev) \
|
||||
(((mgbdev)->module_version >> 4) == 1)
|
||||
#define MGB4_HAS_VOUT(mgbdev) \
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ static const struct i2c_board_info gmsl3_deser_info[] = {
|
|||
{I2C_BOARD_INFO("deserializer2", 0x2A)},
|
||||
};
|
||||
|
||||
static const struct i2c_board_info gmsl3c_deser_info[] = {
|
||||
{I2C_BOARD_INFO("deserializer1", 0x6A)},
|
||||
{I2C_BOARD_INFO("deserializer2", 0x6C)},
|
||||
};
|
||||
|
||||
static const struct i2c_board_info gmsl1_deser_info[] = {
|
||||
{I2C_BOARD_INFO("deserializer1", 0x2C)},
|
||||
{I2C_BOARD_INFO("deserializer2", 0x6C)},
|
||||
|
|
@ -67,6 +72,13 @@ static const struct mgb4_i2c_kv gmsl3_i2c[] = {
|
|||
{0x308, 0x01, 0x01}, {0x10, 0x20, 0x20}, {0x300, 0x40, 0x40}
|
||||
};
|
||||
|
||||
static const struct mgb4_i2c_kv gmsl3c_i2c[] = {
|
||||
{0x01, 0x03, 0x02}, {0x300, 0x0C, 0x08}, {0x03, 0xC0, 0x00},
|
||||
{0x1CE, 0x0E, 0x0E}, {0x11, 0x05, 0x05}, {0x05, 0xC0, 0x40},
|
||||
{0x307, 0x0F, 0x00}, {0xA0, 0x03, 0x00}, {0x3E0, 0x07, 0x00},
|
||||
{0x308, 0x01, 0x00}, {0x10, 0x20, 0x20}, {0x300, 0x40, 0x40}
|
||||
};
|
||||
|
||||
static const struct mgb4_i2c_kv gmsl1_i2c[] = {
|
||||
};
|
||||
|
||||
|
|
@ -812,10 +824,17 @@ static int deser_init(struct mgb4_vin_dev *vindev, int id)
|
|||
struct device *dev = &vindev->mgbdev->pdev->dev;
|
||||
|
||||
if (MGB4_IS_GMSL3(vindev->mgbdev)) {
|
||||
info = &gmsl3_deser_info[id];
|
||||
addr_size = 16;
|
||||
values = gmsl3_i2c;
|
||||
count = ARRAY_SIZE(gmsl3_i2c);
|
||||
if (MGB4_IS_GMSL3C(vindev->mgbdev)) {
|
||||
info = &gmsl3c_deser_info[id];
|
||||
addr_size = 16;
|
||||
values = gmsl3c_i2c;
|
||||
count = ARRAY_SIZE(gmsl3c_i2c);
|
||||
} else {
|
||||
info = &gmsl3_deser_info[id];
|
||||
addr_size = 16;
|
||||
values = gmsl3_i2c;
|
||||
count = ARRAY_SIZE(gmsl3_i2c);
|
||||
}
|
||||
} else if (MGB4_IS_FPDL3(vindev->mgbdev)) {
|
||||
info = &fpdl3_deser_info[id];
|
||||
addr_size = 8;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user