Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Martin Tůma and committed by
Hans Verkuil
f67adf54 a20cf188

+28 -6
+5 -2
drivers/media/pci/mgb4/mgb4_core.h
··· 21 21 #define MGB4_IS_GMSL1(mgbdev) \ 22 22 (((mgbdev)->module_version >> 4) == 6) 23 23 #define MGB4_IS_GMSL3(mgbdev) \ 24 - ((((mgbdev)->module_version >> 4) >= 2) && \ 25 - (((mgbdev)->module_version >> 4) <= 4)) 24 + (((((mgbdev)->module_version >> 4) >= 2) && \ 25 + (((mgbdev)->module_version >> 4) <= 4)) || \ 26 + (((mgbdev)->module_version >> 4) == 8)) 27 + #define MGB4_IS_GMSL3C(mgbdev) \ 28 + (((mgbdev)->module_version >> 4) == 8) 26 29 #define MGB4_IS_FPDL3(mgbdev) \ 27 30 (((mgbdev)->module_version >> 4) == 1) 28 31 #define MGB4_HAS_VOUT(mgbdev) \
+23 -4
drivers/media/pci/mgb4/mgb4_vin.c
··· 50 50 {I2C_BOARD_INFO("deserializer2", 0x2A)}, 51 51 }; 52 52 53 + static const struct i2c_board_info gmsl3c_deser_info[] = { 54 + {I2C_BOARD_INFO("deserializer1", 0x6A)}, 55 + {I2C_BOARD_INFO("deserializer2", 0x6C)}, 56 + }; 57 + 53 58 static const struct i2c_board_info gmsl1_deser_info[] = { 54 59 {I2C_BOARD_INFO("deserializer1", 0x2C)}, 55 60 {I2C_BOARD_INFO("deserializer2", 0x6C)}, ··· 70 65 {0x1CE, 0x0E, 0x0E}, {0x11, 0x05, 0x00}, {0x05, 0xC0, 0x40}, 71 66 {0x307, 0x0F, 0x00}, {0xA0, 0x03, 0x00}, {0x3E0, 0x07, 0x07}, 72 67 {0x308, 0x01, 0x01}, {0x10, 0x20, 0x20}, {0x300, 0x40, 0x40} 68 + }; 69 + 70 + static const struct mgb4_i2c_kv gmsl3c_i2c[] = { 71 + {0x01, 0x03, 0x02}, {0x300, 0x0C, 0x08}, {0x03, 0xC0, 0x00}, 72 + {0x1CE, 0x0E, 0x0E}, {0x11, 0x05, 0x05}, {0x05, 0xC0, 0x40}, 73 + {0x307, 0x0F, 0x00}, {0xA0, 0x03, 0x00}, {0x3E0, 0x07, 0x00}, 74 + {0x308, 0x01, 0x00}, {0x10, 0x20, 0x20}, {0x300, 0x40, 0x40} 73 75 }; 74 76 75 77 static const struct mgb4_i2c_kv gmsl1_i2c[] = { ··· 824 812 struct device *dev = &vindev->mgbdev->pdev->dev; 825 813 826 814 if (MGB4_IS_GMSL3(vindev->mgbdev)) { 827 - info = &gmsl3_deser_info[id]; 828 - addr_size = 16; 829 - values = gmsl3_i2c; 830 - count = ARRAY_SIZE(gmsl3_i2c); 815 + if (MGB4_IS_GMSL3C(vindev->mgbdev)) { 816 + info = &gmsl3c_deser_info[id]; 817 + addr_size = 16; 818 + values = gmsl3c_i2c; 819 + count = ARRAY_SIZE(gmsl3c_i2c); 820 + } else { 821 + info = &gmsl3_deser_info[id]; 822 + addr_size = 16; 823 + values = gmsl3_i2c; 824 + count = ARRAY_SIZE(gmsl3_i2c); 825 + } 831 826 } else if (MGB4_IS_FPDL3(vindev->mgbdev)) { 832 827 info = &fpdl3_deser_info[id]; 833 828 addr_size = 8;