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 --- ...mx219-Add-support-for-RAW8-bit-bayer-form.patch | 319 +++++++++++++++++++++ 1 file changed, 319 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0655-media-i2c-imx219-Add-support-for-RAW8-bit-bayer-form.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0655-media-i2c-imx219-Add-support-for-RAW8-bit-bayer-form.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0655-media-i2c-imx219-Add-support-for-RAW8-bit-bayer-form.patch b/target/linux/bcm27xx/patches-5.4/950-0655-media-i2c-imx219-Add-support-for-RAW8-bit-bayer-form.patch new file mode 100644 index 0000000000..552516bd67 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0655-media-i2c-imx219-Add-support-for-RAW8-bit-bayer-form.patch @@ -0,0 +1,319 @@ +From 1f00b84d993e1f8de17ef936e00f4264266cb5d1 Mon Sep 17 00:00:00 2001 +From: Lad Prabhakar +Date: Tue, 10 Mar 2020 14:17:08 +0100 +Subject: [PATCH] media: i2c: imx219: Add support for RAW8 bit bayer + format + +Commit 22da1d56e982151e0bdfafe9de6fe94098a51356 upstream. + +IMX219 sensor is capable for RAW8/RAW10 modes. This commit adds support +for RAW8 bayer format. + +Signed-off-by: Lad Prabhakar +Signed-off-by: Dave Stevenson +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/i2c/imx219.c | 148 +++++++++++++++++++++++++++++-------- + 1 file changed, 116 insertions(+), 32 deletions(-) + +--- a/drivers/media/i2c/imx219.c ++++ b/drivers/media/i2c/imx219.c +@@ -168,15 +168,12 @@ static const struct imx219_reg mode_3280 + {0x0171, 0x01}, + {0x0174, 0x00}, + {0x0175, 0x00}, +- {0x018c, 0x0a}, +- {0x018d, 0x0a}, + {0x0301, 0x05}, + {0x0303, 0x01}, + {0x0304, 0x03}, + {0x0305, 0x03}, + {0x0306, 0x00}, + {0x0307, 0x39}, +- {0x0309, 0x0a}, + {0x030b, 0x01}, + {0x030c, 0x00}, + {0x030d, 0x72}, +@@ -230,15 +227,12 @@ static const struct imx219_reg mode_1920 + {0x0171, 0x01}, + {0x0174, 0x00}, + {0x0175, 0x00}, +- {0x018c, 0x0a}, +- {0x018d, 0x0a}, + {0x0301, 0x05}, + {0x0303, 0x01}, + {0x0304, 0x03}, + {0x0305, 0x03}, + {0x0306, 0x00}, + {0x0307, 0x39}, +- {0x0309, 0x0a}, + {0x030b, 0x01}, + {0x030c, 0x00}, + {0x030d, 0x72}, +@@ -290,15 +284,12 @@ static const struct imx219_reg mode_1640 + {0x0171, 0x01}, + {0x0174, 0x01}, + {0x0175, 0x01}, +- {0x018c, 0x0a}, +- {0x018d, 0x0a}, + {0x0301, 0x05}, + {0x0303, 0x01}, + {0x0304, 0x03}, + {0x0305, 0x03}, + {0x0306, 0x00}, + {0x0307, 0x39}, +- {0x0309, 0x0a}, + {0x030b, 0x01}, + {0x030c, 0x00}, + {0x030d, 0x72}, +@@ -322,6 +313,18 @@ static const struct imx219_reg mode_1640 + {0x0163, 0x78}, + }; + ++static const struct imx219_reg raw8_framefmt_regs[] = { ++ {0x018c, 0x08}, ++ {0x018d, 0x08}, ++ {0x0309, 0x08}, ++}; ++ ++static const struct imx219_reg raw10_framefmt_regs[] = { ++ {0x018c, 0x0a}, ++ {0x018d, 0x0a}, ++ {0x0309, 0x0a}, ++}; ++ + static const char * const imx219_test_pattern_menu[] = { + "Disabled", + "Color Bars", +@@ -349,6 +352,27 @@ static const char * const imx219_supply_ + #define IMX219_NUM_SUPPLIES ARRAY_SIZE(imx219_supply_name) + + /* ++ * The supported formats. ++ * This table MUST contain 4 entries per format, to cover the various flip ++ * combinations in the order ++ * - no flip ++ * - h flip ++ * - v flip ++ * - h&v flips ++ */ ++static const u32 codes[] = { ++ MEDIA_BUS_FMT_SRGGB10_1X10, ++ MEDIA_BUS_FMT_SGRBG10_1X10, ++ MEDIA_BUS_FMT_SGBRG10_1X10, ++ MEDIA_BUS_FMT_SBGGR10_1X10, ++ ++ MEDIA_BUS_FMT_SRGGB8_1X8, ++ MEDIA_BUS_FMT_SGRBG8_1X8, ++ MEDIA_BUS_FMT_SGBRG8_1X8, ++ MEDIA_BUS_FMT_SBGGR8_1X8, ++}; ++ ++/* + * Initialisation delay between XCLR low->high and the moment when the sensor + * can start capture (i.e. can leave software stanby) must be not less than: + * t4 + max(t5, t6 +