From patchwork Fri Sep 1 15:57:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 13372707 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 DFBE6CA0FE4 for ; Fri, 1 Sep 2023 15:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241731AbjIAP6k (ORCPT ); Fri, 1 Sep 2023 11:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232647AbjIAP6j (ORCPT ); Fri, 1 Sep 2023 11:58:39 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F5410E4; Fri, 1 Sep 2023 08:58:36 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 381C4Ebq019017; Fri, 1 Sep 2023 17:58:06 +0200 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=BVHuoMa sF+WSdttZrMwRWfQ4tkRRA/0CBtn5J1CEh80=; b=pcUNgEpGGNJf2ml1dAZEOsv JeNUgoQV3CqPJuTO64j9WhpTHgbmQTWBwFUVGDOU6sCULzVDsHEb9yKuKaavrrKQ JkTOJQEJhZ9HzA6f4Kj/8/G88TiqrdPW8DyzrqBFtIKafApMZnRSC498MA/aZIqs 8HOkuhz9Hh5hf2gc8tZwKm1j3/6gxXymZfkG/q9aR/EwwTKs2uJf5gXARMZHQ2ap MNibgrR0YjAgp7VZtDiP5wBNVr+gt77zRQq++Rhuzy0HMRAG/rnbWseFmcfsZTmC /XwpJQlOg1rxF1NoUrD0z/qTGdNSun0btf6wRfPtSyitbLvi/UyCnEJ6eBut88A= = 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 3sq89cbj5d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Sep 2023 17:58:06 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 422A6100056; Fri, 1 Sep 2023 17:58:04 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 37F19228A34; Fri, 1 Sep 2023 17:58:04 +0200 (CEST) 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.21; Fri, 1 Sep 2023 17:58:04 +0200 From: Alain Volmat To: Hugues Fruchet , Alain Volmat , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Russell King , Philipp Zabel CC: Sakari Ailus , Dan Scally , , , , , Subject: [PATCH v3 0/5] Add support for DCMIPP camera interface of STMicroelectronics STM32 SoC series Date: Fri, 1 Sep 2023 17:57:19 +0200 Message-ID: <20230901155732.252436-1-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-01_13,2023-08-31_01,2023-05-22_02 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patchset introduces support for Digital Camera Memory Interface Pixel Processor (DCMIPP) of STMicroelectronics STM32 SoC series. This initial support implements a single capture pipe allowing RGB565, YUV, Y, RAW8 and JPEG capture with frame skipping, prescaling and cropping. DCMIPP is exposed through 3 subdevices: - dcmipp_dump_parallel: parallel interface handling - dcmipp_dump_postproc: frame skipping, prescaling and cropping control - dcmipp_dump_capture: video device capture node v3: - Have same To & Cc in all patches emails of the serie so that everybody has coherent view of the serie - bindings: correct wording, clock-names & label removal - driver: replace of_graph call with fwnode_graph - driver: use defined bus-type when calling v4l2_fwnode_endpoint_parse - driver: remove clock name - dtsi: remove clock-names property v2: - removal of pclk-max-frequency from yaml example dts - codying-style fixes - correction in enum functions (format, mbus, frame_size ...) handling - drop of v4l2_pipeline_pm_ calls, and specific open/close handler of vdev - video dev s_stream handling updated to call s_stream of remote subdev instead of loop until sensor subdev - code update following media_pipeline & v4l2_async_ api changes since v1 - removal of IP reset call upon error - removal of link_validate handlers - addition of V4L2_CAP_IO_MC device_caps - removal of the frame skip control for the time being, will be added back in another commit once control method will be agreed - change byteproc entity type to MEDIA_ENT_F_PROC_VIDEO_SCALER - various fixes from Dan & Sakari remarks Alain Volmat (2): dt-bindings: media: add bindings for stm32 dcmipp media: MAINTAINERS: add entry for STM32 DCMIPP driver Hugues Fruchet (3): media: stm32-dcmipp: STM32 DCMIPP camera interface driver ARM: dts: stm32: add dcmipp support to stm32mp135 ARM: multi_v7_defconfig: enable STM32 DCMIPP media support .../bindings/media/st,stm32-dcmipp.yaml | 89 ++ MAINTAINERS | 9 + arch/arm/boot/dts/st/stm32mp135.dtsi | 8 + arch/arm/configs/multi_v7_defconfig | 1 + drivers/media/platform/st/stm32/Kconfig | 15 + drivers/media/platform/st/stm32/Makefile | 1 + .../platform/st/stm32/stm32-dcmipp/Makefile | 5 + .../st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 1040 +++++++++++++++++ .../st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 692 +++++++++++ .../st/stm32/stm32-dcmipp/dcmipp-common.c | 105 ++ .../st/stm32/stm32-dcmipp/dcmipp-common.h | 227 ++++ .../st/stm32/stm32-dcmipp/dcmipp-core.c | 675 +++++++++++ .../st/stm32/stm32-dcmipp/dcmipp-parallel.c | 523 +++++++++ 13 files changed, 3390 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/st,stm32-dcmipp.yaml create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/Makefile create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c create mode 100644 drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-parallel.c