Skip to content

drivers: media: cfe: Add non-continuous CSI-2 clock mode #6705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions drivers/media/i2c/imx500.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#define IMX500_IMAGE_ONLY_FALSE 0x00
#define IMX500_IMAGE_ONLY_TRUE 0x01

#define IMX500_REG_SENSOR_TEMP_CTRL CCI_REG8(0x0138)

#define IMX500_REG_ORIENTATION CCI_REG8(0x101)

#define IMX500_XCLK_FREQ 24000000
Expand Down Expand Up @@ -2505,6 +2507,14 @@ static int imx500_start_streaming(struct imx500 *imx500)
if (ret < 0)
return ret;

/*
* Disable the temperature sensor here - must be done else loading any
* firmware fails...
*
* Re-enable before stream-on below.
*/
cci_write(imx500->regmap, IMX500_REG_SENSOR_TEMP_CTRL, 0, &ret);

ret = cci_write(imx500->regmap, IMX500_REG_IMAGE_ONLY_MODE,
imx500->fw_network ? IMX500_IMAGE_ONLY_FALSE :
IMX500_IMAGE_ONLY_TRUE,
Expand Down Expand Up @@ -2599,6 +2609,9 @@ static int imx500_start_streaming(struct imx500 *imx500)
/* Disable any sensor startup frame drops. This must be written here! */
cci_write(imx500->regmap, CCI_REG8(0xD405), 0, &ret);

/* Re-enable the temperature sensor. */
cci_write(imx500->regmap, IMX500_REG_SENSOR_TEMP_CTRL, 1, &ret);

/* set stream on register */
cci_write(imx500->regmap, IMX500_REG_MODE_SELECT, IMX500_MODE_STREAMING,
&ret);
Expand Down
Loading