Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1704572pxb; Fri, 10 Sep 2021 11:45:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLQxi7gyUoeJeupTbzJPem2WNwUEFshQhbsila96/7+nx0PQQSdQXeaq/SCHQhyNfqJf37 X-Received: by 2002:a05:6638:2150:: with SMTP id z16mr5520169jaj.146.1631299508092; Fri, 10 Sep 2021 11:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631299508; cv=none; d=google.com; s=arc-20160816; b=zjpWHEQYt2+zErhFIQZ34LSUs7V6Epv9JTFeLvcy8xeSfFWLsaMqqYtolQKQSCmSaZ Zx2pGHf0EGhPucxbH/PJ30gpyJceXUUm2IxqFdndNxz7XO7FLDv28vDwLtei8mIqNSc0 9770LyX8M7c6jdLMBOaZ3gr1TuR6GCSYHnXLsg965CdpZSCegEPVvc6PpfBDItI4//aI wPpoM6mRmYo0CHY2bEujMfxr+M259Kasj8wEuREhk5YwDoXI5Zy8s1pDft0DHYdjLNyq 2SnyzWrmoksguD3Nz+L3Z56Cc5Q6wpNflAQiy0BHJQTR3fdq4vE8Hw/YuE0lR+c62U9J QusA== 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=jwrCTvb1Pb8Q375U6miBXPkOCYhGiqtW9zWJ35+WBFE=; b=Y+FUfREm008Vyvgu1puOTqaUZpjGr0SFr78zNwdu2cfeMG5XB3TRHOK9VwnOoSc/9Z wsD1LHersCbZEWiGXuuzyr7zBUL/U52o2Q8YBuRvDKzpApUc11/mLP9GONsZKEoGMkeR vgWEGE8U13or0QY3X1w2POjgRNqCM/pAmkFCZWmBCnov39U18od9u7sggCrCP00adTwS rZdYItTTYj7yGT+21qV0IadvYCccCXrWFu81G2BOCIbPCXUvnyf5WfG/dzzsSMWm8vuN 72QBikjoRDuTCD/aM2/nmYzFsFnxyiEwGii8NVaci/DWqdcj9X84s8ob4S2dvUj280CW XrBg== 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 f5si6449411ils.120.2021.09.10.11.44.57; Fri, 10 Sep 2021 11:45:08 -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 S233398AbhIJSoH (ORCPT + 99 others); Fri, 10 Sep 2021 14:44:07 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:46671 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232588AbhIJSnl (ORCPT ); Fri, 10 Sep 2021 14:43:41 -0400 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 6C89A240008; Fri, 10 Sep 2021 18:42:27 +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 Subject: [PATCH 09/22] ARM: dts: sun8i: v3s: Add nodes for MIPI CSI-2 support Date: Fri, 10 Sep 2021 20:41:34 +0200 Message-Id: <20210910184147.336618-10-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 MIPI CSI-2 is supported on the V3s with an A31-based MIPI CSI-2 bridge controller. The controller uses a separate D-PHY, which is the same that is otherwise used for MIPI DSI, but used in Rx mode. On the V3s, the CSI0 controller is dedicated to MIPI CSI-2 as it does not have access to any parallel interface pins. Add all the necessary nodes (CSI0, MIPI CSI-2 bridge and D-PHY) to support the MIPI CSI-2 interface. Note that a fwnode graph link is created between CSI0 and MIPI CSI-2 even when no sensor is connected. This will result in a probe failure for the controller as long as no sensor is connected but this is fine since no other interface is available. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-v3s.dtsi | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index a77b63362a1d..ec7fa6459547 100644 --- a/arch/arm/boot/dts/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi @@ -612,6 +612,34 @@ spi0: spi@1c68000 { #size-cells = <0>; }; + csi0: camera@1cb0000 { + compatible = "allwinner,sun8i-v3s-csi"; + reg = <0x01cb0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI1_SCLK>, + <&ccu CLK_DRAM_CSI>; + clock-names = "bus", "mod", "ram"; + resets = <&ccu RST_BUS_CSI>; + status = "disabled"; + + assigned-clocks = <&ccu CLK_CSI1_SCLK>; + assigned-clock-parents = <&ccu CLK_PLL_ISP>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + csi0_in_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_out_csi0>; + }; + }; + }; + }; + csi1: camera@1cb4000 { compatible = "allwinner,sun8i-v3s-csi"; reg = <0x01cb4000 0x3000>; @@ -637,5 +665,49 @@ gic: interrupt-controller@1c81000 { #interrupt-cells = <3>; interrupts = ; }; + + mipi_csi2: csi@1cb1000 { + compatible = "allwinner,sun8i-v3s-mipi-csi2", + "allwinner,sun6i-a31-mipi-csi2"; + reg = <0x01cb1000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI1_SCLK>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_CSI>; + status = "disabled"; + + phys = <&dphy>; + phy-names = "dphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + mipi_csi2_in: port@0 { + reg = <0>; + }; + + mipi_csi2_out: port@1 { + reg = <1>; + + mipi_csi2_out_csi0: endpoint { + remote-endpoint = <&csi0_in_mipi_csi2>; + }; + }; + }; + }; + + dphy: d-phy@1cb2000 { + compatible = "allwinner,sun6i-a31-mipi-dphy"; + reg = <0x01cb2000 0x1000>; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_MIPI_CSI>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_CSI>; + allwinner,direction = "rx"; + status = "disabled"; + #phy-cells = <0>; + }; }; }; -- 2.32.0