|
13 | 13 | #include <linux/gpio/consumer.h>
|
14 | 14 | #include <linux/i2c.h>
|
15 | 15 | #include <linux/module.h>
|
| 16 | +#include <linux/moduleparam.h> |
16 | 17 | #include <linux/of.h>
|
17 | 18 | #include <linux/pm_runtime.h>
|
18 | 19 | #include <linux/regmap.h>
|
|
41 | 42 | #define IMX290_WINMODE_720P (1 << 4)
|
42 | 43 | #define IMX290_WINMODE_CROP (4 << 4)
|
43 | 44 | #define IMX290_FR_FDG_SEL CCI_REG8(0x3009)
|
| 45 | +#define IMX290_FDG_HCG BIT(4) |
| 46 | +#define IMX290_FRSEL_60FPS BIT(0) |
| 47 | +#define IMX290_FDG_LCG 0 |
44 | 48 | #define IMX290_BLKLEVEL CCI_REG16_LE(0x300a)
|
45 | 49 | #define IMX290_GAIN CCI_REG8(0x3014)
|
46 | 50 | #define IMX290_VMAX CCI_REG24_LE(0x3018)
|
|
162 | 166 |
|
163 | 167 | #define IMX290_NUM_SUPPLIES 3
|
164 | 168 |
|
| 169 | +static bool hcg_mode; |
| 170 | +module_param(hcg_mode, bool, 0664); |
| 171 | +MODULE_PARM_DESC(hcg_mode, "Enable HCG mode"); |
| 172 | + |
165 | 173 | enum imx290_colour_variant {
|
166 | 174 | IMX290_VARIANT_COLOUR,
|
167 | 175 | IMX290_VARIANT_MONO,
|
@@ -697,7 +705,8 @@ static int imx290_set_data_lanes(struct imx290 *imx290)
|
697 | 705 | &ret);
|
698 | 706 | cci_write(imx290->regmap, IMX290_CSI_LANE_MODE, imx290->nlanes - 1,
|
699 | 707 | &ret);
|
700 |
| - cci_write(imx290->regmap, IMX290_FR_FDG_SEL, 0x01, &ret); |
| 708 | + cci_write(imx290->regmap, IMX290_FR_FDG_SEL, IMX290_FRSEL_60FPS | |
| 709 | + (hcg_mode ? IMX290_FDG_HCG : IMX290_FDG_LCG), &ret); |
701 | 710 |
|
702 | 711 | return ret;
|
703 | 712 | }
|
|
0 commit comments