This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Some question about config new camera driver on TDA4

Part Number: TDA4VM

Hello,

Now I develop new camera driver on TDA4 custom board,I know it need create new camera code on imaging\sensor_drv\src

but about the code I have some questions.

typedef struct
{
char name[ISS_SENSORS_MAX_NAME];
/**< Name of the sensor */
uint16_t i2cInstId;                                    this means the deserializer connect on which TDA4 I2C bus?
/**< I2C Instance id for the sensor */
uint8_t i2cAddrSensor[ISS_SENSORS_MAX_CHANNEL];           this  value is 8,the max channel means on CSI bus max support 8 cameras or whole TDA4 max support 8 cameras?
/**< I2C Address of the sensor */
uint8_t i2cAddrSer[ISS_SENSORS_MAX_CHANNEL];
/**< I2C Address of the serializer */
IssSensor_Info sensorInfo;
/**< Sensor Information e.g. width, height, format etc.*/
uint32_t num_channels;
/**< Number of channels supported */
uint32_t dccId;                                                  how to get this ID?
/**< camera identifier */
} IssSensor_CreateParams;

typedef struct
{
uint8_t isMultiChannel;
/**< Flag for single/multi channel sensor config */
uint8_t numCSI2Lanes;
/**< num lanes for CSI*/
uint32_t inCsi2VirtualChanNum;
/**< CSI2 Virtual Channel Num, must be between 0 to 3 */
uint8_t isCmplxIoCfgValid;
/**< Is Complex IO config valid*/
IssCapture_CmplxIoLaneCfg complxIoLaneCfg[5];      if I used the CSI1 not CSI0 how to config?
/**< CSI2 lane and polarity config*/
uint32_t csi2PhyClk;
/**< Clock provided to CSI2 Phy by the SoC */
uint8_t sensorBroadcast;
/**< Enable/Disable sensor broadcast */
uint8_t enableFsin;
/**< Enable/Disable sensor Frame Sync Input (FSIN) */
uint8_t numCamerasStreaming;
/**< Number of cameras streaming simultaneously */
} IssSensorIntfParams;

And if I used CSI0 and CSI1 connect two deserializers ,every deserializer connect 4 cameras, how many camera driver file need create? the camera driver file for camera module or CSI channel?

Please give some guide

Thanks

  • One more question:

    If i need to control GPIO in camera driver,how to config the pinmux and GPIO?

  • Hi,

    I would suggest to refer to one of existing implementation of sensor like imx390 and do the same for new sensor. 

    Please find answers to your questions below,

    1, IssCapture_CmplxIoLaneCfg ignore this variable, it is not used

    2, dccid: this comes from the tuning tool dcc. Usually we use camera number like 390 for imx390. but it can be any number available/used in the dcc profile.

    3, uint8_t i2cAddrSensor[ISS_SENSORS_MAX_CHANNEL]: This is what is currently tested. TDA4x can support more than 8 cameras.

    4, uint16_t i2cInstId: Please refer to existing implementation for this variable. 

    5, Current imaging driver does not configure any GPIO and pinmux, if your sensor requires, you could add it in the sensor driver.

    Regards,

    Brijesh

  • Hi,

    Thanks for reply,more question

    for dccid,if I used have ISP camera,no need tunning,how to set this id?

    and Board_fpdU960GetI2CAddr() this function  realize can you show it,I can not find in SDK

    About the GPIO in driver to config I want to know detail,for example,if I want to use GPIO0_1 as out pull high,how to make code?

    could you give some sample code?

    how about the address mapping with the GPIO group and port?

  • Hi

    In this case, you could ignore dccid field. 

    The API Board_fpdU960GetI2CAddr is implemented in the PDK board module, you could find it in ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/board/src/devices/fpd/ds90ub960.c folder.

    Well GPIO is pretty straight forward module, you could directly write to few GPIO registers and set the pin level to high.

    The other way is to use PDK GPIO driver to enable pin. You could refer to LED blink example in ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c file.

    Regards,

    Brijesh