From 77e97abf129c5028385dd72587eabab68db0d954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 28 May 2020 19:08:55 +0200 Subject: bcm27xx: update to latest patches from RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also removes random module and switches to new bcm2711 thermal driver. Boot tested on RPi 4B v1.1 4G. Signed-off-by: Álvaro Fernández Rojas --- ...-0654-media-i2c-imx219-Fix-power-sequence.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0654-media-i2c-imx219-Fix-power-sequence.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0654-media-i2c-imx219-Fix-power-sequence.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0654-media-i2c-imx219-Fix-power-sequence.patch b/target/linux/bcm27xx/patches-5.4/950-0654-media-i2c-imx219-Fix-power-sequence.patch new file mode 100644 index 0000000000..b85d917878 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0654-media-i2c-imx219-Fix-power-sequence.patch @@ -0,0 +1,55 @@ +From 0fec1c81707f5335d0b04b5e97d2ddd0b902377b Mon Sep 17 00:00:00 2001 +From: Lad Prabhakar +Date: Tue, 10 Mar 2020 14:17:07 +0100 +Subject: [PATCH] media: i2c: imx219: Fix power sequence + +Commit ca45448a56659c6df6e0436188e97f6cc65dea8a upstream. + +When supporting Rpi Camera v2 Module on the RZ/G2E, found the driver had +some issues with rcar mipi-csi driver. The sensor never entered into LP-11 +state. + +The powerup sequence in the datasheet[1] shows the sensor entering into +LP-11 in streaming mode, so to fix this issue transitions are performed +from "streaming -> standby" in the probe() after power up. + +With this commit the sensor is able to enter LP-11 mode during power up, +as expected by some CSI-2 controllers. + +[1] https://publiclab.org/system/images/photos/000/023/294/original/ +RASPBERRY_PI_CAMERA_V2_DATASHEET_IMX219PQH5_7.0.0_Datasheet_XXX.PDF + +Signed-off-by: Lad Prabhakar +Acked-by: Dave Stevenson +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/i2c/imx219.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/media/i2c/imx219.c ++++ b/drivers/media/i2c/imx219.c +@@ -1224,6 +1224,23 @@ static int imx219_probe(struct i2c_clien + /* Set default mode to max resolution */ + imx219->mode = &supported_modes[0]; + ++ /* sensor doesn't enter LP-11 state upon power up until and unless ++ * streaming is started, so upon power up switch the modes to: ++ * streaming -> standby ++ */ ++ ret = imx219_write_reg(imx219, IMX219_REG_MODE_SELECT, ++ IMX219_REG_VALUE_08BIT, IMX219_MODE_STREAMING); ++ if (ret < 0) ++ goto error_power_off; ++ usleep_range(100, 110); ++ ++ /* put sensor back to standby mode */ ++ ret = imx219_write_reg(imx219, IMX219_REG_MODE_SELECT, ++ IMX219_REG_VALUE_08BIT, IMX219_MODE_STANDBY); ++ if (ret < 0) ++ goto error_power_off; ++ usleep_range(100, 110); ++ + ret = imx219_init_controls(imx219); + if (ret) + goto error_power_off; -- cgit v1.2.3