From patchwork Wed Jul 8 10:40:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Kuo X-Patchwork-Id: 11651321 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 8ED226C1 for ; Wed, 8 Jul 2020 10:40:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E84620853 for ; Wed, 8 Jul 2020 10:40:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="BdBGLj6v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728556AbgGHKkh (ORCPT ); Wed, 8 Jul 2020 06:40:37 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:56995 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728239AbgGHKkh (ORCPT ); Wed, 8 Jul 2020 06:40:37 -0400 X-UUID: 9b8b7da4bd684f7399d4ac05f38e6c13-20200708 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:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=C1rVBmtcn80UNbJ7oS203MwTgWEo53DfAO2x/ts3HiE=; b=BdBGLj6vKsjbNPY8zz99k/9uxAu+/q2rahHO5WfpzWy6RjlM6+OeblHttPkdaTio8SUl3NZJl5yTsSc9VLdQLAbFuR+SFV7Ay0czfyqUvY1t5Gw70tO1JNxYoPUmyYn44pxgmcIFj60+2U/0vnW6UD96bdp0W1d6ZG/x7/4qSqs=; X-UUID: 9b8b7da4bd684f7399d4ac05f38e6c13-20200708 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 546704618; Wed, 08 Jul 2020 18:40:29 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 18:40:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 8 Jul 2020 18:40:26 +0800 From: Louis Kuo To: , , , , , CC: , , , , , , , , , , , , , Subject: [RFC PATCH V7 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings Date: Wed, 8 Jul 2020 18:40:22 +0800 Message-ID: <20200708104023.3225-3-louis.kuo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200708104023.3225-1-louis.kuo@mediatek.com> References: <20200708104023.3225-1-louis.kuo@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch adds the DT binding documentation for the sensor interface module in Mediatek SoCs. Signed-off-by: Louis Kuo --- .../bindings/media/mediatek-seninf.yaml | 223 ++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek-seninf.yaml -- 2.18.0 diff --git a/Documentation/devicetree/bindings/media/mediatek-seninf.yaml b/Documentation/devicetree/bindings/media/mediatek-seninf.yaml new file mode 100644 index 000000000000..917b393acc0c --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek-seninf.yaml @@ -0,0 +1,223 @@ +# SPDX-License-Identifier: (GPL-2.0+ OR MIT) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek-seninf.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Sensor Interface (CSI) Device Tree Bindings + +maintainers: + - Louis Kuo + +description: | + Seninf MIPI-CSI2 host driver is a HW camera interface controller. It support + a widely adopted, simple, high-speed protocol primarily intended for + point-to-point image and video transmission between cameras and host devices. + +properties: + compatible: + const: mediatek,mt8183-seninf + + reg: + minItems: 1 + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + clocks: + items: + - description: Seninf camsys clock + - description: Seninf top mux clock + + clock-names: + items: + - const: cam_seninf + - const: top_mux_seninf + + phys: + items: + - description: Seninf mipi dphy + + phy-names: + items: + - const: seninf + + # See ./video-interfaces.txt for details + ports: + type: object + additionalProperties: false + + properties: + port@0: + type: object + description: connection point for sensor at port 0 + additionalProperties: false + + properties: + reg: + const: 0 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + remote-endpoint: true + + port@1: + type: object + description: connection point for sensor at port 1 + additionalProperties: false + + properties: + reg: + const: 1 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + remote-endpoint: true + + port@4: + type: object + description: connection point for camsys + additionalProperties: false + + properties: + reg: + const: 4 + + patternProperties: + endpoint: + type: object + additionalProperties: false + + properties: + remote-endpoint: true + + required: + - port@0 + - port@1 + - port@4 + +required: + - compatible + - interrupts + - clocks + - clock-names + - power-domains + - ports + +additionalProperties: false + +examples: + - | + + #include + #include + #include + #include + + parent { + #address-cells = <2>; + #size-cells = <2>; + + seninf: seninf@1a040000 { + compatible = "mediatek,mt8183-seninf"; + reg = <0 0x1a040000 0 0x8000>; + interrupts = ; + power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>; + clocks = <&camsys CLK_CAM_SENINF>, + <&topckgen CLK_TOP_MUX_SENINF>; + clock-names = "cam_seninf", "top_mux_seninf"; + phys = <&mipi_dphy 0>; + phy-names = "seninf"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + mipi_in_bcam: endpoint { + data-lanes = <0 1 3 4>; + remote-endpoint = <&bcam_out>; + }; + }; + + port@1 { + reg = <1>; + mipi_in_fcam: endpoint { + data-lanes = <1>; + remote-endpoint = <&fcam_out>; + }; + }; + + port@4 { + reg = <4>; + seninf_camisp_endpoint: endpoint { + remote-endpoint = <&camisp_endpoint>; + }; + }; + }; + }; + + mipi_dphy: mipi_dphy@11c80000 { + compatible = "mediatek,mt8183-mipi_dphy"; + reg = <0 0x11C80000 0 0x6000>; + #phy-cells = <1>; + }; + + i2c2: i2c@11009000 { + reg = <0 0x11009000 0 0x1000>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + wcam: camera@36 { + compatible = "ovti,ov5695"; + reg = <0x36>; + + port { + bcam_out: endpoint { + remote-endpoint = <&mipi_in_bcam>; + data-lanes = <0 1 3 4>; + }; + }; + }; + }; + + i2c4: i2c@11008000 { + reg = <0 0x11008000 0 0x1000>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + ucam: camera@3c { + compatible = "ovti,ov2685"; + reg = <0x3c>; + + port { + fcam_out: endpoint { + remote-endpoint = <&mipi_in_fcam>; + data-lanes = <1>; + }; + }; + }; + }; + }; \ No newline at end of file