Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1191306pxa; Fri, 28 Aug 2020 06:22:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn0Kt64n0U+6Z2oj4v3pOjISLGymywWi0CBQoHEIellL+lWPot0T3NO8/YB9SubQh4pQpi X-Received: by 2002:a17:906:a242:: with SMTP id bi2mr1788997ejb.122.1598620924854; Fri, 28 Aug 2020 06:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598620924; cv=none; d=google.com; s=arc-20160816; b=PvOVTqjUVr9fIrFtJA/yR1+eWSKFZtsIVqWGTqiNWpKMK9GOf1vMaPjXZ9AuQ80q4W 36h+DOItgOA7/i6aTISAnPNmNa8e0qRN7J5wztC5ZXKINviyX/ct1VVKPaziooHFcGGd j4LxLR+1lpgma7ksEtu75e9VieRmP5lAO4rZK7v/95Z0DiHaReg52Gh3FHYR38FsTOpv RpR6Vg1elt7fZzG2h3I4vzrZKI9qN9usomyv5Y1wcgyCdvYoXDnQGDgbe5YIuY+egCgQ i1C8mAYyZRyr2vWpPS5UFuoOrhIQ54J29au+dUtEcA29ExPpilwQ1S1/XqQCQW8uxT1I a4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vNgjHzsDGK5tvQa5wNCx/3SMFhX8Sw6uNcez4ZMumZ8=; b=RQQGXoeWAjC9XIOUKSM2dZT3FZfe1REIjuVAxPvinMMepqFQqyo6HLfLhyQkgh7HPH xSbMNfzdvsNpU0aEahadgxfmgSeK+ccUoDbZeadtov0EZsRRRJPTyZOY78nVfFrNt+19 AGUkH4dHuejLoeHZivCPm1VGYF28nEXPPP73su6DvjfeXmpue33SibencsNILMmBp0Co G3bEG9p9zDG8GGGdi5GV90E5AoB2AiszxYdV1Q25td0FMiDNs5d9TwyPnm453Ya0ROOA GFTEUtAAEkjLGcSwNgzFuAc+AesJ8aW20HmYsW33Wnf6fkFYRPzu5XHa9Ma+yorOFhkV pcSQ== 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 gz19si599466ejb.176.2020.08.28.06.21.42; Fri, 28 Aug 2020 06:22:04 -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 S1729551AbgH1NRx (ORCPT + 99 others); Fri, 28 Aug 2020 09:17:53 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58435 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729468AbgH1NLt (ORCPT ); Fri, 28 Aug 2020 09:11:49 -0400 X-Originating-IP: 90.89.180.255 Received: from lhopital-XPS-13-9360.home (lfbn-tou-1-1372-bdcst.w90-89.abo.wanadoo.fr [90.89.180.255]) (Authenticated sender: kevin.lhopital@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPA id 43DE9C001A; Fri, 28 Aug 2020 13:11:46 +0000 (UTC) From: =?UTF-8?q?K=C3=A9vin=20L=27h=C3=B4pital?= To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, mripard@kernel.org, wens@csie.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, paul.kocialkowski@bootlin.com, thomas.petazzoni@bootlin.com, =?UTF-8?q?K=C3=A9vin=20L=27h=C3=B4pital?= Subject: [PATCH v2 3/3] [NOT FOR MERGE] ARM: dts: sun8i: a83t: bananapi-m3: Enable OV8865 camera Date: Fri, 28 Aug 2020 15:11:34 +0200 Message-Id: <20200828131134.12113-4-kevin.lhopital@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200828131134.12113-1-kevin.lhopital@bootlin.com> References: <20200828131134.12113-1-kevin.lhopital@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Bananapi M3 supports a camera module which includes an OV8865 sensor connected via the parallel CSI interface and an OV8865 sensor connected via MIPI CSI-2. The I2C2 bus is shared by the two sensors as well as active-low reset signal but each sensor has it own shutdown line. The I2c address for the OV8865 is 0x36. The bus type is hardcoded to 4 due to the lack of available define usable in the device-tree. Signed-off-by: Kévin L'hôpital --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 89 ++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts index 9d34eabba121..b5cba707fb9e 100644 --- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts +++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts @@ -85,6 +85,38 @@ }; }; + reg_ov8865_avdd: ov8865-avdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + reg_ov8865_dovdd: ov8865-dovdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-dovdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + reg_ov8865_afvdd: ov8865-afvdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-afvdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + reg_ov8865_vdd2: ov8865-vdd2 { + compatible = "regulator-fixed"; + regulator-name = "ov8865-vdd2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <®_eldo1>; + }; + reg_usb1_vbus: reg-usb1-vbus { compatible = "regulator-fixed"; regulator-name = "usb1-vbus"; @@ -115,10 +147,54 @@ cpu-supply = <®_dcdc3>; }; +&csi { + status = "okay"; +}; + +&csi_in { + mipi_csi2_from_ov8865: endpoint { + remote-endpoint = <&ov8865_to_mipi_csi2>; + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + bus-type = <4>; + }; +}; + &de { status = "okay"; }; +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pe_pins>; + status = "okay"; + + ov8865: camera@36 { + compatible = "ovti,ov8865"; + reg = <0x36>; + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; + clocks = <&ccu CLK_CSI_MCLK>; + clock-names ="xclk"; + avdd-supply = <®_ov8865_avdd>; + dovdd-supply = <®_ov8865_dovdd>; + vdd2-supply = <®_ov8865_vdd2>; + afvdd-supply = <®_ov8865_afvdd>; + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_LOW>; /* PE17 */ + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ + rotation = <180>; + + port { + ov8865_to_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_from_ov8865>; + data-lanes = <1 2 3 4>; + clock-lanes = <0>; + bus-type = <4>; /* V4L2_FWNODE_BUS_TYPE_CSI2_DPHY */ + }; + }; + }; +}; + &ehci0 { /* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */ status = "okay"; @@ -327,11 +403,24 @@ regulator-name = "vcc-pd"; }; +®_dldo4 { + regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "avdd-csi"; +}; + ®_drivevbus { regulator-name = "usb0-vbus"; status = "okay"; }; +®_eldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "dvdd-csi-r"; +}; + ®_fldo1 { regulator-min-microvolt = <1080000>; regulator-max-microvolt = <1320000>; -- 2.17.1