Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1703740pxb; Fri, 10 Sep 2021 11:43:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbbLCUQKF5BfK/oBWyHjXZ0gnjMWImdITSf7BmXvYmKpMBh4eF3QR/hqP8Pe9/SbQOVAI1 X-Received: by 2002:a92:cbc2:: with SMTP id s2mr7173215ilq.228.1631299425432; Fri, 10 Sep 2021 11:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631299425; cv=none; d=google.com; s=arc-20160816; b=tquBCy64QlnZetPc69qRRgLx0UF0Bg9qOqrWkU5rRSBnW57Gfdc1kFhtzVdzAHKGsA Blvp2LTWJfyMGDSE71WcLTAWNEZCceSVWoigfhiQQot1kR37ZFux+hFQtfJIsnTfHLpn Y6wnoxDRkLFDG+vQ+Nr51BfyLOW+nso+UXW1DW7BVM5ssxOtlTIaFZBfW9YuVqQxHnli enejbJp++15Bs9iKL7Ge6KcQdTAWWVEY7YzN7XYT3UnvxEg6E6MvMnB75P8ou0pQBKM7 0KBAuhxWf4lWS4ivi5Of2XqeYrf8rRV+NxKLx+24LyTC56dBtMsnkhH8iua97XoBMOSx vUWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WsNlyGsYocfjNvW7Jx4DL3TkequuOvR5c0//dKCOj3s=; b=UajMW/H4BAgfLzIsiTzOsMB8AmRfDHKtCnQHiQA/Z4D1duSG3qFZYQzQnGTjGEBKj0 qwVB4xGAbc05o1HB32d5XYHsMjek4yzrRNy0avXkdxTAT9+tCSMz892Bu4hZqz4gNhqy 71ybrRqNIBOlqHml9Flj1rZy+1btpubq2wDLuevJM1DY11h37Iq1xLjAr55EWPFjONYl 0w5myPD8efpLOw6Tvvm+ZtiPJwcORIVCBXPRSOp7xeM+wt9UVhhzG3LeYNzAmUalOHiv qETqHn5P+JiKzaTpk/mVnZFmVSE8r4SGctjnONPeTFi9Ep7t00LBsVHtFtCJzmmW78D7 mcUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x22si5368133iow.31.2021.09.10.11.43.33; Fri, 10 Sep 2021 11:43:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbhIJSnu (ORCPT + 99 others); Fri, 10 Sep 2021 14:43:50 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:45817 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbhIJSne (ORCPT ); Fri, 10 Sep 2021 14:43:34 -0400 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id A4711240005; Fri, 10 Sep 2021 18:42:20 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Mauro Carvalho Chehab , Rob Herring , Maxime Ripard , Sakari Ailus , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Paul Kocialkowski , Greg Kroah-Hartman , Helen Koike , Laurent Pinchart , Thomas Petazzoni , Rob Herring Subject: [PATCH 05/22] dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port Date: Fri, 10 Sep 2021 20:41:30 +0200 Message-Id: <20210910184147.336618-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210910184147.336618-1-paul.kocialkowski@bootlin.com> References: <20210910184147.336618-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The A31 CSI controller supports two distinct input interfaces: parallel and an external MIPI CSI-2 bridge. The parallel interface is often connected to a set of hardware pins while the MIPI CSI-2 bridge is an internal FIFO-ish link. As a result, these two inputs are distinguished as two different ports. Note that only one of the two may be present on a controller instance. For example, the V3s has one controller dedicated to MIPI-CSI2 and one dedicated to parallel. Update the binding with an explicit ports node that holds two distinct port nodes: one for parallel input and one for MIPI CSI-2. This is backward-compatible with the single-port approach that was previously taken for representing the parallel interface port, which stays enumerated as fwnode port 0. Note that additional ports may be added in the future, especially to support feeding the CSI controller's output to the ISP. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Acked-by: Maxime Ripard --- .../media/allwinner,sun6i-a31-csi.yaml | 75 +++++++++++++++---- 1 file changed, 62 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml index 8b568072a069..f4a686b77a38 100644 --- a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml +++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml @@ -61,6 +61,49 @@ properties: additionalProperties: false + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + description: Parallel input port, connect to a parallel sensor + + properties: + reg: + const: 0 + + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + bus-width: + enum: [ 8, 10, 12, 16 ] + + pclk-sample: true + hsync-active: true + vsync-active: true + + required: + - bus-width + + additionalProperties: false + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + description: MIPI CSI-2 bridge input port + + properties: + reg: + const: 1 + + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + additionalProperties: false + required: - compatible - reg @@ -89,19 +132,25 @@ examples: "ram"; resets = <&ccu RST_BUS_CSI>; - port { - /* Parallel bus endpoint */ - csi1_ep: endpoint { - remote-endpoint = <&adv7611_ep>; - bus-width = <16>; - - /* - * If hsync-active/vsync-active are missing, - * embedded BT.656 sync is used. - */ - hsync-active = <0>; /* Active low */ - vsync-active = <0>; /* Active low */ - pclk-sample = <1>; /* Rising */ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + /* Parallel bus endpoint */ + csi1_ep: endpoint { + remote-endpoint = <&adv7611_ep>; + bus-width = <16>; + + /* + * If hsync-active/vsync-active are missing, + * embedded BT.656 sync is used. + */ + hsync-active = <0>; /* Active low */ + vsync-active = <0>; /* Active low */ + pclk-sample = <1>; /* Rising */ + }; }; }; }; -- 2.32.0