From patchwork Thu May 12 07:40:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Mugnier X-Patchwork-Id: 572442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60A11C433F5 for ; Thu, 12 May 2022 07:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241283AbiELHmH (ORCPT ); Thu, 12 May 2022 03:42:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234048AbiELHmF (ORCPT ); Thu, 12 May 2022 03:42:05 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 779C61957BA for ; Thu, 12 May 2022 00:42:04 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24C4NC31007268; Thu, 12 May 2022 09:41:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=V0RCXxUOU5lBmkDwLkBgc3A+UiLWdWdOm3CZTXT9WZo=; b=mbFCTJu7BxIy4DhYqdIsSZO/F6UWrlyM5ghi6sVNCJMGZCtm2sBG7p4STXFL8/xJzVX/ 0NQ7ACX64oy9dUnFBC8Ogj9vtvs0XEPR4ts2KdbBC8AHK5Zp9le5SCwpLw9EpWsStcqJ P60uENBU8yCp8zrFR2MH3j+SEwnqmTDnklla8baM1lXpY8t5ve5D6uR7CH0lUMytXYVW AqetMWAD6a8jijRwIxZS02GSyKItQAKl1OczOddgf3FNBc033KT1YkVmNqFqgsyH5/Jo QqoNy2WREy4r3ilPYKkIY7UzaMj36LtpM2pBZ1rD3dBiRJrDAK5miVegENISpyn/Sxsp 9g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3fwdw9g4ge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 09:41:54 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 656BD100034; Thu, 12 May 2022 09:41:54 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5FD3E214D2B; Thu, 12 May 2022 09:41:54 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 12 May 2022 09:41:54 +0200 From: Benjamin Mugnier To: CC: , , , , , , , Benjamin Mugnier Subject: [PATCH v3 1/5] media: v4l: Add 1X16 16-bit greyscale media bus code definition Date: Thu, 12 May 2022 09:40:33 +0200 Message-ID: <20220512074037.3829926-2-benjamin.mugnier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> References: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-11_07,2022-05-12_01,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This extends the greyscale media bus family originally from MEDIA_BUS_FMT_Y8_1X8 up to MEDIA_BUS_FMT_Y14_1X14 by adding MEDIA_BUS_FMT_Y16_1X16, and behaves the same way with 16 bits. Add its documentation in subdev-formats.rst Signed-off-by: Benjamin Mugnier --- .../media/v4l/subdev-formats.rst | 37 +++++++++++++++++++ include/uapi/linux/media-bus-format.h | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index 0cbc045d5df6..b8bb16c70d62 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -7387,6 +7387,43 @@ The following table list existing packed 36bit wide YUV formats. - v\ :sub:`2` - v\ :sub:`1` - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-Y16-1X16: + + - MEDIA_BUS_FMT_Y16_1X16 + - 0x202e + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`15` + - y\ :sub:`14` + - y\ :sub:`13` + - y\ :sub:`12` + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` .. raw:: latex diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 0dfc11ee243a..0b436759d94d 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -65,7 +65,7 @@ #define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 #define MEDIA_BUS_FMT_RGB161616_1X48 0x101a -/* YUV (including grey) - next is 0x202e */ +/* YUV (including grey) - next is 0x202f */ #define MEDIA_BUS_FMT_Y8_1X8 0x2001 #define MEDIA_BUS_FMT_UV8_1X8 0x2015 #define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 @@ -111,6 +111,7 @@ #define MEDIA_BUS_FMT_YUV12_1X36 0x2029 #define MEDIA_BUS_FMT_YUV16_1X48 0x202a #define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b +#define MEDIA_BUS_FMT_Y16_1X16 0x202e /* Bayer - next is 0x3021 */ #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 From patchwork Thu May 12 07:40:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Mugnier X-Patchwork-Id: 572440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B97AC433EF for ; Thu, 12 May 2022 07:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351122AbiELHnD (ORCPT ); Thu, 12 May 2022 03:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351119AbiELHnB (ORCPT ); Thu, 12 May 2022 03:43:01 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 690181A15D7 for ; Thu, 12 May 2022 00:43:00 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24C1bPNh016797; Thu, 12 May 2022 09:42:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=Dk4jB0qOiGtssuTmZb1vAWn4iphmwptwfFSFrB7k0a4=; b=H6JU/BnKFEYNqnpM4UvO0jTZOuVSwxK2a8/7HElVDI4Q7yzpfrTXEvGt2jg+eWkRhSkG nB6pKA6JPoJCznTJ94ki6pTf7nqNYI1pr+h3Tp9nY8fy4r0pev+hLgwd8xvq9cZgdUHD 6GtRdPkWywvqOb3WqiyDR3lM4NZ+cg7Z60VRS2ljkFzntmlpOpUcm9s984I7Oe4O4FQi bLvZNnJC3CtIo4eccQUXDAciKiiojmTUIQkXMH5CBgK3GnMAr6t4ZjJWmBVZsRCVqpaP HiR/nV+91xkuWk4hGc+JnZ9At+Zzw+3Ihe/7KZPzOtsHX6/gIwaXpM9HWG5l23Ephh/v kw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3g083hyy6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 09:42:55 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id ACB6010003A; Thu, 12 May 2022 09:42:14 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A60C721683D; Thu, 12 May 2022 09:42:14 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 12 May 2022 09:42:14 +0200 From: Benjamin Mugnier To: CC: , , , , , , , Benjamin Mugnier Subject: [PATCH v3 3/5] media: uapi: Add ST VGXY61 header file Date: Thu, 12 May 2022 09:40:35 +0200 Message-ID: <20220512074037.3829926-4-benjamin.mugnier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> References: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-11_07,2022-05-12_01,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Define an HDR control in it, and adds its documentation in st-vgxy61.rst file. Signed-off-by: Benjamin Mugnier --- .../userspace-api/media/drivers/st-vgxy61.rst | 23 +++++++++++++++++++ include/uapi/linux/st-vgxy61.h | 15 ++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Documentation/userspace-api/media/drivers/st-vgxy61.rst create mode 100644 include/uapi/linux/st-vgxy61.h diff --git a/Documentation/userspace-api/media/drivers/st-vgxy61.rst b/Documentation/userspace-api/media/drivers/st-vgxy61.rst new file mode 100644 index 000000000000..7a11adbb558f --- /dev/null +++ b/Documentation/userspace-api/media/drivers/st-vgxy61.rst @@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 + +ST VGXY61 camera sensor driver +============================== + +The ST VGXY61 driver implements the following driver-specific controls: + +``V4L2_CID_STVGXY61_HDR`` +------------------------------- + Change the sensor HDR mode. A HDR picture is obtained by merging two captures of the same scene + using two different exposure periods. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 1 4 + + * - HDR linearize + - The merger outputs a long exposure capture as long as it is not saturated. + * - HDR substraction + - This involves subtracting the short exposure frame from the long exposure frame. + * - "no HDR" + - This mode is used for standard dynamic range (SDR) exposures. diff --git a/include/uapi/linux/st-vgxy61.h b/include/uapi/linux/st-vgxy61.h new file mode 100644 index 000000000000..fbabe2cb64ac --- /dev/null +++ b/include/uapi/linux/st-vgxy61.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2022 STMicroelectronics SA + * + */ + +#ifndef __UAPI_STVGXY61_H_ +#define __UAPI_STVGXY61_H_ + +#include + +/* Control HDR mode */ +#define V4L2_CID_STVGXY61_HDR (V4L2_CID_USER_STVGXY61_BASE + 0) + +#endif /* __UAPI_STVGXY61_H_ */ From patchwork Thu May 12 07:40:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Mugnier X-Patchwork-Id: 572441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DAC7C433F5 for ; Thu, 12 May 2022 07:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351110AbiELHmi (ORCPT ); Thu, 12 May 2022 03:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351108AbiELHmg (ORCPT ); Thu, 12 May 2022 03:42:36 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421461A15D4 for ; Thu, 12 May 2022 00:42:34 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24C2ikl2028998; Thu, 12 May 2022 09:42:30 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=LhOFa8BIpRYyJ0slEBq/ckdYIiACZ4xz7MC5KcVFan8=; b=70Ou8jOQaGYWZZe/60ZSNn1E1I+F4FxGteEPCLGYz2ImojNpyvdkTO7FYVcFlJEJcMSv ITrI7Tb5/m0t63rPe2mCyWlaq7e367c+wlL7F3iOyPSIaKY7hFdTLUTtNMQPo2ya/sac v99MbRiqvudou0GBGu6kBDkucLqcuKUaXA7cKDo50TW1tUwYmk0sOqeY1IpqwpcKFPQk G8y8PIdn5/DSDk9nsXW1OPYTNhybW2dMNZfNsn5CNeay2ANXRs/dk3hRRn4I2EOPYOSK VrhgroDbf1Bj/1KBbovI+4saQ8gw8hAG888XhLcToT+7QWmn+jLtfo2tLB5kb5wH35m1 3w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3fwdw9g4ke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 09:42:29 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 722C110002A; Thu, 12 May 2022 09:42:29 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6A0E8216840; Thu, 12 May 2022 09:42:29 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 12 May 2022 09:42:29 +0200 From: Benjamin Mugnier To: CC: , , , , , , , Benjamin Mugnier Subject: [PATCH v3 4/5] media: dt-bindings: media: i2c: Add ST VGXY61 camera sensor binding Date: Thu, 12 May 2022 09:40:36 +0200 Message-ID: <20220512074037.3829926-5-benjamin.mugnier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> References: <20220512074037.3829926-1-benjamin.mugnier@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-11_07,2022-05-12_01,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add device tree binding for the ST VGXY61 camera sensor, and update MAINTAINERS file. Signed-off-by: Benjamin Mugnier --- .../bindings/media/i2c/st,st-vgxy61.yaml | 117 ++++++++++++++++++ MAINTAINERS | 9 ++ 2 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml b/Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml new file mode 100644 index 000000000000..4bc9a945b001 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2022 STMicroelectronics SA. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/st,st-vgxy61.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics VGxy61 HDR Global Shutter Sensor Family Device Tree Bindings + +maintainers: + - Benjamin Mugnier + - Sylvain Petinot + +description: |- + STMicroelectronics VGxy61 family has a CSI-2 output port. CSI-2 output is a + quad lanes 800Mbps per lane. + Supported formats are RAW8, RAW10, RAW12, RAW14 and RAW16. + Following part number are supported + - VG5661 and VG6661 are 1.6 Mpx (1464 x 1104) monochrome and color sensors. + Maximum frame rate is 75 fps. + - VG5761 and VG6761 are 2.3 Mpx (1944 x 1204) monochrome and color sensors. + Maximum frame rate is 60 fps. + +properties: + compatible: + const: st,st-vgxy61 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + VCORE-supply: + description: + Sensor digital core supply. Must be 1.2 volts. + + VDDIO-supply: + description: + Sensor digital IO supply. Must be 1.8 volts. + + VANA-supply: + description: + Sensor analog supply. Must be 2.8 volts. + + reset-gpios: + description: + Reference to the GPIO connected to the reset pin, if any. + This is an active low signal to the vgxy61. + + st,strobe-gpios-polarity: + description: + Invert polarity of strobe GPIOs. + type: boolean + + st,slave-mode: + description: + If the sensor operates in slave mode + type: boolean + + port: + $ref: /schemas/graph.yaml#/$defs/port-base + additionalProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + description: + CSI lanes to use + items: + - const: 1 + - const: 2 + - const: 3 + - const: 4 + + remote-endpoint: true + + required: + - data-lanes + +required: + - compatible + - clocks + - VCORE-supply + - VDDIO-supply + - VANA-supply + - port + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + vgxy61: csi2tx@10 { + compatible = "st,st-vgxy61"; + reg = <0x10>; + clocks = <&clk_ext_camera>; + VCORE-supply = <&v1v2>; + VDDIO-supply = <&v1v8>; + VANA-supply = <&v2v8>; + reset-gpios = <&mfxgpio 18 GPIO_ACTIVE_LOW>; + port { + ep0: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_csi2_out>; + }; + }; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index 40fa1955ca3f..f46f26863388 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18662,6 +18662,15 @@ S: Maintained F: Documentation/hwmon/stpddc60.rst F: drivers/hwmon/pmbus/stpddc60.c +ST VGXY61 DRIVER +M: Benjamin Mugnier +M: Sylvain Petinot +L: linux-media@vger.kernel.org +S: Maintained +T: git git://linuxtv.org/media_tree.git +F: Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.txt +F: drivers/media/i2c/st-vgxy61.c + ST VL53L0X ToF RANGER(I2C) IIO DRIVER M: Song Qiang L: linux-iio@vger.kernel.org