From patchwork Wed Jan 29 08:16:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Kuo X-Patchwork-Id: 11355643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D30551398 for ; Wed, 29 Jan 2020 08:17:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6D4A21734 for ; Wed, 29 Jan 2020 08:17:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="c4DqkSMX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726206AbgA2IRA (ORCPT ); Wed, 29 Jan 2020 03:17:00 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:40454 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726116AbgA2IRA (ORCPT ); Wed, 29 Jan 2020 03:17:00 -0500 X-UUID: f4fec480e5a94d5fb23b741580d1b59c-20200129 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=pAeCviEgp5SyhyDozmBEeXR8il9ypqHLYGqVz9VurIU=; b=c4DqkSMXTCTiAeRIoSD0X8bqQpDGceYRNDWUdKL0JRQZI9Iq9v2uSy+Xy080RlmGoOohYqMe8bdTmxdj33WdWrw2O/iTfR5nRKFaWIGyLWFwiLGp8mC/BvDAcsTM2rZXEvGKaCvunASKQ+0zslscVlWP2Helge4MMWS3lr76KUY=; X-UUID: f4fec480e5a94d5fb23b741580d1b59c-20200129 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 143140981; Wed, 29 Jan 2020 16:16:58 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 29 Jan 2020 16:16:56 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 29 Jan 2020 16:17:02 +0800 From: Louis Kuo To: , , , , , CC: , , , , , , , , , , , , , , Subject: [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Date: Wed, 29 Jan 2020 16:16:47 +0800 Message-ID: <20200129081650.8027-1-louis.kuo@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: 70D65C83CC9C06DA6BDFA9C6C27F4D408CC3BC8D2095CBD9243989F3B9DC9A682000:8 X-MTK: N Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. [ V5: use recommended coding style, revise DT binding documentation] media: platform: mtk-isp: Add Mediatek sensor interface driver dt-bindings: mt8183: Add sensor interface dt-bindings dts: arm64: mt8183: Add sensor interface nodes .../bindings/media/mediatek-seninf.txt | 66 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 + drivers/media/platform/Makefile | 1 + drivers/media/platform/mtk-isp/Kconfig | 17 + .../media/platform/mtk-isp/isp_50/Makefile | 3 + .../platform/mtk-isp/isp_50/seninf/Makefile | 6 + .../mtk-isp/isp_50/seninf/mtk_seninf.c | 1112 +++ .../mtk-isp/isp_50/seninf/mtk_seninf_def.h | 72 + .../mtk-isp/isp_50/seninf/mtk_seninf_reg.h | 7747 +++++++++++++++++ 9 files changed, 9036 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/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