From patchwork Thu Jun 6 10:00:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Kuo X-Patchwork-Id: 10979137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60C1E6C5 for ; Thu, 6 Jun 2019 10:02:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E68228842 for ; Thu, 6 Jun 2019 10:02:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4220328864; Thu, 6 Jun 2019 10:02:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E502428842 for ; Thu, 6 Jun 2019 10:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MrGAEHjG6anJupMhNesyFSRO09QX7fvkA/BoaGf74Uo=; b=JYBJa4BNWRz19F 7tC543B3gG3NzJTmW8G57Er7of12o1Gyq1zwtS0vVCXCGe3Lo6CmKocszh+tBma+2WsHPyFX0Phj8 /44nb4QF1BjgJiqMJUYlIVfVVR3fkzr474dqdUZtDCDNH4KD0q55YavBwAYCm+gJFHst16WBwPLsw 3DKqUHLVUvh7QfAFJmk1e9MvT7m5p9AdR5CImsjlcy+WTTC8OSe3RU/sWn35TItH+ZLno6f+JqobA /DrnYvKXSaeEf2iAy+d2n8ny47V2DVOZAhtLKsFKE3Z+iygEet1iENS4rPD+ZoLRmNLt9ld976pJ4 lsSFTlzwBSPBZdarODtA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYpDh-00063e-Nv; Thu, 06 Jun 2019 10:02:05 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYpDK-0005Yp-BL; Thu, 06 Jun 2019 10:01:43 +0000 X-UUID: fa9dec22eb03496f8259c73019e8f46e-20190606 X-UUID: fa9dec22eb03496f8259c73019e8f46e-20190606 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1247845030; Thu, 06 Jun 2019 02:00:39 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 6 Jun 2019 03:00:38 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 6 Jun 2019 18:00:36 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 6 Jun 2019 18:00:36 +0800 From: Louis Kuo To: , , , , , Subject: [RFC PATCH V3 0/4] media: support Mediatek sensor interface driver Date: Thu, 6 Jun 2019 18:00:29 +0800 Message-ID: <1559815233-24796-1-git-send-email-louis.kuo@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190606_030142_480393_2B4F06A5 X-CRM114-Status: UNSURE ( 6.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com, holmes.chiou@mediatek.com, Jerry-ch.Chen@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, This is the RFC patch adding Sensor Inferface(seninf) driver on Mediatek mt8183 SoC, which will be used in camera features on CrOS application. It belongs to the first Mediatek's camera driver series based on V4L2 and media controller framework. I posted the main part of the seninf driver as RFC to discuss first and would like some review comments on the overall structure of the driver. The driver is implemented with V4L2 framework. 1. Register as a V4L2 sub-device. 2. Only one entity with sink pads linked to camera sensors for choosing desired camera sensor by setup link and with source pads linked to cam-io for routing different types of decoded packet datas to PASS1 driver to generate sensor image frame and meta-data. The overall file structure of the seninf driver is as following: * mtk_seninf.c: Implement software and HW control flow of seninf driver. * mtk_seninf_def.h: Define data structure and enumeration. * mtk_seninf_reg.h: Define HW register R/W macros and HW register names. [ V3: use recommended coding style, remove redundant code, change endpoint parsing method ] media: platform: mtk-isp: Add Mediatek sensor interface driver media: platform: Add Mediatek sensor interface driver KConfig dt-bindings: mt8183: Add sensor interface dt-bindings dts: arm64: mt8183: Add sensor interface nodes .../devicetree/bindings/media/mediatek-seninf.txt | 31 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 15 + drivers/media/platform/Makefile | 2 + drivers/media/platform/mtk-isp/Kconfig | 17 + drivers/media/platform/mtk-isp/Makefile | 3 + drivers/media/platform/mtk-isp/isp_50/Makefile | 5 + .../media/platform/mtk-isp/isp_50/seninf/Makefile | 6 + .../platform/mtk-isp/isp_50/seninf/mtk_seninf.c | 1330 ++++++++++++++++++++ .../mtk-isp/isp_50/seninf/mtk_seninf_def.h | 155 +++ .../mtk-isp/isp_50/seninf/mtk_seninf_reg.h | 965 ++++++++++++++ 10 files changed, 2529 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek-seninf.txt create mode 100644 drivers/media/platform/mtk-isp/Kconfig create mode 100644 drivers/media/platform/mtk-isp/Makefile create mode 100644 drivers/media/platform/mtk-isp/isp_50/Makefile create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/Makefile create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf.c create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf_def.h create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf_reg.h