From patchwork Tue Apr 16 09:27:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stu Hsieh X-Patchwork-Id: 10902273 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 AF41E1823 for ; Tue, 16 Apr 2019 09:27:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9151A284C0 for ; Tue, 16 Apr 2019 09:27:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 852D7288DA; Tue, 16 Apr 2019 09:27:56 +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=ham 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 C9D05284C0 for ; Tue, 16 Apr 2019 09:27:55 +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:References:In-Reply-To: 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: List-Owner; bh=C30nY9IuHhwhvVDt2lCPMsSJNTuD4X8pCFJtD2V/g6Y=; b=N0mv8R2uBgXGwe S07hzgMhx41jpQ326nLfkUKwBooxH/wyrkez2ibT2XRfetbSJ5lnTSN+omvqcccfUj0PSdVZncSrK Xvo0EAlt5QiwItmG0AU287Edvf4pVDve4oBhZP/J8fz0E/Y5oSCcOeI2QYZY1M2rLPKADayIMfFsQ ZBAMKBOR8iRR5v/hmIcl5efw3PwJ7S2DABFGDJMQqAeMXxS8x1FyTRqHT6Sd9+0VMobBmNSFQChnQ 2kmBrEBbxAH8dkbtH2w1wXk6erkHSzU5ry3WImLduaXbpbNOBziXWxIE8yDxIeayvInbCqXZ8N0hJ GtDSFbaOwdJq3yvHXbQQ==; 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 1hGKNf-0000xp-Ff; Tue, 16 Apr 2019 09:27:55 +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 1hGKNd-0000vQ-E8; Tue, 16 Apr 2019 09:27:54 +0000 X-UUID: 4d4a8b1e480342b4a60db060359ee4ef-20190416 X-UUID: 4d4a8b1e480342b4a60db060359ee4ef-20190416 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1466555550; Tue, 16 Apr 2019 01:27:50 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Apr 2019 02:27:48 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Apr 2019 17:27:46 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 16 Apr 2019 17:27:46 +0800 From: Stu Hsieh To: Mauro Carvalho Chehab , Rob Herring , CK Hu Subject: [PATCH v2 01/15] dt-bindings: media: Add binding for MT2712 MIPI-CSI2 Date: Tue, 16 Apr 2019 17:27:29 +0800 Message-ID: <1555406863-18069-2-git-send-email-stu.hsieh@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1555406863-18069-1-git-send-email-stu.hsieh@mediatek.com> References: <1555406863-18069-1-git-send-email-stu.hsieh@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_022753_480664_D9798835 X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Stu Hsieh , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add MIPI-CSI2 dt-binding for Mediatek MT2712 SoC Signed-off-by: Stu Hsieh --- .../bindings/media/mediatek-mipicsi-camsv.txt | 53 ++++++++++++++++++ .../media/mediatek-mipicsi-common.txt | 19 +++++++ .../bindings/media/mediatek-mipicsi.txt | 54 +++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek-mipicsi-camsv.txt create mode 100644 Documentation/devicetree/bindings/media/mediatek-mipicsi-common.txt create mode 100644 Documentation/devicetree/bindings/media/mediatek-mipicsi.txt diff --git a/Documentation/devicetree/bindings/media/mediatek-mipicsi-camsv.txt b/Documentation/devicetree/bindings/media/mediatek-mipicsi-camsv.txt new file mode 100644 index 000000000000..5f34974f12ac --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek-mipicsi-camsv.txt @@ -0,0 +1,53 @@ +* Mediatek MIPI-CSI2 receiver camsv + +Mediatek MIPI-CSI2 receiver camsv transfer data to DRAM in Mediatek SoCs + +Required properties: +- reg : physical base address of the mipicsi receiver registers and length of + memory mapped region. +- clocks: device clocks, see + Documentation/devicetree/bindings/clock/clock-bindings.txt for details. +- interrupts : interrupt number to the interrupt controller. + +Example: + seninf1_mux_camsv0: seninf_mux_camsv@15002100 { + reg = <0 0x15002120 0 0x40>, + <0 0x15004000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV_EN>; + interrupts = ; + }; + + seninf2_mux_camsv1: seninf_mux_camsv@15002500 { + reg = <0 0x15002520 0 0x40>, + <0 0x15005000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV_EN>; + interrupts = ; + }; + + seninf3_mux_camsv2: seninf_mux_camsv@15002900 { + reg = <0 0x15002920 0 0x40>, + <0 0x15006000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV1_EN>; + interrupts = ; + }; + + seninf4_mux_camsv3: seninf_mux_camsv@15002D00 { + reg = <0 0x15002D20 0 0x40>, + <0 0x15007000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV1_EN>; + interrupts = ; + }; + + seninf5_mux_camsv4: seninf_mux_camsv@15003100 { + reg = <0 0x15003120 0 0x40>, + <0 0x15008000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV2_EN>; + interrupts = ; + }; + + seninf6_mux_camsv5: seninf_mux_camsv@15003500 { + reg = <0 0x15003520 0 0x40>, + <0 0x15009000 0 0x1000>; + clocks = <&imgsys CLK_IMG_CAM_SV2_EN>; + interrupts = ; + }; diff --git a/Documentation/devicetree/bindings/media/mediatek-mipicsi-common.txt b/Documentation/devicetree/bindings/media/mediatek-mipicsi-common.txt new file mode 100644 index 000000000000..a67c744b75f0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek-mipicsi-common.txt @@ -0,0 +1,19 @@ +* Mediatek MIPI-CSI2 receiver common + +Mediatek MIPI-CSI2 receiver is the MIPI Signal capture hardware present in Mediatek SoCs + +Required properties: +- compatible: should be "mediatek,mt2712-mipicsi-common" +- reg : physical base address of the mipicsi receiver registers and length of + memory mapped region. +- clocks: device clocks, see + Documentation/devicetree/bindings/clock/clock-bindings.txt for details. + + +Example: + mipicsi: mipicsi@15002000 { + compatible = "mediatek,mt2712-mipicsi-common", "syscon"; + reg = <0 0x15002000 0 0x10>; + clocks = <&imgsys CLK_IMG_SENINF_CAM_EN>, + <&imgsys CLK_IMG_SENINF_SCAM_EN>; + }; diff --git a/Documentation/devicetree/bindings/media/mediatek-mipicsi.txt b/Documentation/devicetree/bindings/media/mediatek-mipicsi.txt new file mode 100644 index 000000000000..24741ed62b25 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek-mipicsi.txt @@ -0,0 +1,54 @@ +* Mediatek MIPI-CSI2 receiver + +Mediatek MIPI-CSI2 receiver is the MIPI Signal capture hardware present in Mediatek SoCs + +Required properties: +- compatible: should be "mediatek,mt2712-mipicsi" +- reg : physical base address of the mipicsi receiver registers and length of + memory mapped region. +- power-domains: a phandle to the power domain, see + Documentation/devicetree/bindings/power/power_domain.txt for details. +- mediatek,larb: must contain the local arbiters in the current Socs, see + Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt + for details. +- iommus: should point to the respective IOMMU block with master port as + argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt + for details. +- mediatek,seninf_mux_camsv: seninf_mux_camsv the data go through of the mipicsi port +- mediatek,mipicsiid: the id of the mipicsi port +- mediatek,mipicsi: the common component of the two mipicsi port + +Example: + mipicsi0: mipicsi@10217000 { + compatible = "mediatek,mt2712-mipicsi"; + mediatek,mipicsi = <&mipicsi>; + iommus = <&iommu0 M4U_PORT_CAM_DMA0>, + <&iommu0 M4U_PORT_CAM_DMA1>; + mediatek,larb = <&larb2>; + power-domains = <&scpsys MT2712_POWER_DOMAIN_ISP>; + + mediatek,seninf_mux_camsv = <&seninf1_mux_camsv0 + &seninf2_mux_camsv1 + &seninf3_mux_camsv2 + &seninf4_mux_camsv3>; + reg = <0 0x10217000 0 0x60>, + <0 0x15002100 0 0x4>, + <0 0x15002300 0 0x100>; + mediatek,mipicsiid = <0>; + status="disabled"; + }; + + mipicsi1: mipicsi@10218000 { + compatible = "mediatek,mt2712-mipicsi"; + mediatek,mipicsi = <&mipicsi>; + iommus = <&iommu0 M4U_PORT_CAM_DMA2>; + mediatek,larb = <&larb2>; + power-domains = <&scpsys MT2712_POWER_DOMAIN_ISP>; + mediatek,seninf_mux_camsv = <&seninf5_mux_camsv4 + &seninf6_mux_camsv5>; + reg = <0 0x10218000 0 0x60>, + <0 0x15002500 0 0x4>, + <0 0x15002700 0 0x100>; + mediatek,mipicsiid = <1>; + status="disabled"; + }; \ No newline at end of file