Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp920330rdf; Tue, 21 Nov 2023 23:52:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IG03ljlfD/0CnnoU29F9YsknyZMa+iD0Lb7k14oSE16jTg/9LHD6AwwZh1OtVpEFel3kS7O X-Received: by 2002:a05:6808:170c:b0:3b8:3830:a709 with SMTP id bc12-20020a056808170c00b003b83830a709mr1981751oib.7.1700639571641; Tue, 21 Nov 2023 23:52:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700639571; cv=none; d=google.com; s=arc-20160816; b=hbiZYJz+SgFQkGsSKgsxyBh1ckahG6jdwJSnm6zjvza2/aX1aAMJy06Bx13t0MDU7k UxZbIgxPmZhCU+Wt4IfBuXqRJW5Rk0yvHvtC6F4v+q7IUfzeYxe81ca2rLm9IanrUM8V GZVCtlPi7RNjx2+Qwe6dp9jEqUiKOrWrAHwI9o6dKptS6Be+WGx6aXEozZlHLi86WKmt lc86pHgxx6HhoB0cddLIyY6jEC3eQ3lpPXICt8ajPPPBfJNQJwiMt7Gpp6C+sZoCG0oQ yoloCsU7qnsVFRjVOFxyANieZOm74xAMFCroNG2+tcDcXtNTzsa4xUf2yIWzGbI4MoaE XiAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fPjoVWKAOHk+Zx85zrTcGB3/yrl3T4i+z4waWY9BkaY=; fh=Pb8DpFgoKsz54I61UfyLZtAjsKicXHvQoZzr48XvpO8=; b=lb9QgFO+pbbfj4TcE2kNd2jFFhfkvKwJ/tb3LButgc8J/isuZ11saGI7CKrXlMYV7L oFpnrvBFI5ydtS+24CYHb+YnXlzoKwgq7IU6gQcbFeFeVxAv82SAltUcxvsUXW71Rd6U FodQCSICEUnrFr7aUbciP8Q0s+eWNSTo8OXQ3Ljc/rCx1gW4UwftlCznlz26OV+fsxGC Xfdnx51Wy3eLTAwgI+PlgVTRfW4r876pgFY3SYT2+gFcKfhDGhR0e2X+oQbM/89aFWve 7JFs2/vjyeBUvNDRfUWmFxmnhEydFqOSLe3WnkUqyUcVkzBTPzc38xDF7jmszDk2KuIm xOew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=TrsM7SfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f2-20020a63dc42000000b005c1ce3c961bsi11729940pgj.745.2023.11.21.23.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 23:52:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=TrsM7SfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 80E2E8031AF3; Tue, 21 Nov 2023 23:52:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbjKVHwn (ORCPT + 99 others); Wed, 22 Nov 2023 02:52:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjKVHwl (ORCPT ); Wed, 22 Nov 2023 02:52:41 -0500 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C56210E; Tue, 21 Nov 2023 23:52:34 -0800 (PST) Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3AM7eWqH015195; Wed, 22 Nov 2023 08:52:23 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=fPjoVWK AOHk+Zx85zrTcGB3/yrl3T4i+z4waWY9BkaY=; b=TrsM7SfFoMO0rFWCIBrD63K jtBb3YpN0SSqZ/F+4iCghP43GF2K0xmuMsoWrLOkLRbXbFRnFceWVIXaWC04REXw HDb/iHn7cRS+AGyqvdQeX7qsxBFy4b+q30rtTv/H1evej2EIQNOkSw7OJLGCYpcm QtkZPZABNJhI8RRuKtq80nrG7PxIq0I9rj+UW7taTUtcFvCPtf5deLEE3IfT0Tft ZJCMd8wsTAB1zcGCSggtNJHoGTKNskQjU8Q02uMpWKUfOvgmOkdjqE5MPVuW3zno ziJb6GhnEqQwethHVyT7nntKpc1JNDO6E9+iypmIdLb+KUxcK+tB77AdNcdUagg= = 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 3uf7q5hpbc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 08:52:23 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4B30810002A; Wed, 22 Nov 2023 08:52:22 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 426E62128AF; Wed, 22 Nov 2023 08:52:22 +0100 (CET) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 22 Nov 2023 08:52:22 +0100 From: Alain Volmat To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Sakari Ailus , Jacopo Mondi , Kieran Bingham , Pavel Machek , Alain Volmat , Rob Herring , , , Subject: [PATCH v5 0/3] media: i2c: gc2145: GC2145 sensor support Date: Wed, 22 Nov 2023 08:51:46 +0100 Message-ID: <20231122075154.789431-1-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-22_06,2023-11-21_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 23:52:43 -0800 (PST) This serie adds support for the GalaxyCore GC2145 sensor. Initialization is based on scripts provided by GalaxyCore, allowing 3 fixed configurations supported for the time being. Minimum controls have been added in order to allow it to be successfully used with libcamera and dcmipp driver (under review) on STM32MP13 platform. The sensor also supports Bayer formats which will be added later on. v5: - serie rebased on top of master branch of tree sailus/media_tree.git in order to use v4l2_subdev_state_* functions v4: - bindings: add link-frequencies & correct description - driver: add link-frequency ctrl and fix pixelrate and check for link-frequency dt properties - driver: correct wording / email / add datasheet link v3: - fix copyright year - add more gc2145_ func or variable prefixes - removal of colorspace within struct gc2145_format - use 1X16 formats since driver is supporting CSI-2 interface only - use msleep instead of usleep_range - add pm_runtime_ last_busy & autosuspend handling - only start streaming AFTER applying ctrls - correct RGB565 format to generate _LE instead of _BE - perform pm_runtime configuration prior to v4l2_async_register_subdev_sensor - remove frame_interval handling and expose HBLANK/VBLANK ctrls instead v2: - split vendor-prefixes update into a separate commit - correction into dt-bindings (description, const i2c address, lowcase of supplies, node naming - correct KConfig (avoid VIDEO_V4L2_SUBDEV_API, V4L2_FWNODE and add V4L2_CCI_I2C) - usage of v4l2-cci framework for accessing to device registers - correction in power-on / power-off sequences and update usleep_range delay - detail MIPI configuration and stop register access to stop streaming - removal of SYSTEM_SLEEP_PM_OPS (and streaming variable) - various small fixes, typo, oneline functions - removal of useless HBLANK control considereing that RAW isn't supported for the time being - removal of RAW parts - usage of dev_err_probe Alain Volmat (3): dt-bindings: vendor-prefixes: Add prefix for GalaxyCore Inc. dt-bindings: media: i2c: add galaxycore,gc2145 dt-bindings media: i2c: gc2145: Galaxy Core GC2145 sensor support .../bindings/media/i2c/galaxycore,gc2145.yaml | 113 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 8 + drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/gc2145.c | 1446 +++++++++++++++++ 6 files changed, 1580 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/galaxycore,gc2145.yaml create mode 100644 drivers/media/i2c/gc2145.c -- 2.25.1