From patchwork Fri Aug 28 13:11:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?S8OpdmluIEwnaMO0cGl0YWw=?= X-Patchwork-Id: 11742767 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 4DBC5913 for ; Fri, 28 Aug 2020 13:13:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 260ED20665 for ; Fri, 28 Aug 2020 13:13:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="T8AqK4Dq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 260ED20665 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=ACZG5r9BX91DXxUXVUz+WHYGPnMvalOnahaGF0Ehd4w=; b=T8AqK4DqyQfeivY3Fmi0/FYfG Q7p+x6ReKiTHuW/aeZ0ljo8hbsN1qKDdnnLReDjcXnFnBOrd3H17V3yGf3rciOU0EY0zPv2cNETv2 fuzKYoLYLpij1oG/8sst4kAjMJsASzaPseLXDvKco2FQbamOV4EmOm3UT8fLo6C+24HjNr47ZUs6c TfTDtfSuVWd02AUws73pgrKYa9tKRo6Nj9dBfSLwff/UvDXfmqxWy8PvVOiGcrfVwUEr9giBcpOVW OeiviOsHz5uKpYCp0omMi962ZnRd5vJQHVLxhg65CRT2RCx6IzWaiXW0rOYRaYpJfLXqqPR/8XJwg F70jsTVlg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBeAl-0002t0-Ae; Fri, 28 Aug 2020 13:12:03 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBeAW-0002ok-2g for linux-arm-kernel@lists.infradead.org; Fri, 28 Aug 2020 13:11:50 +0000 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?b?S8OpdmluIEwnaMO0cGl0YWw=?= To: linux-media@vger.kernel.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200828_091148_364825_6DF6BB50 X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.198 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.198 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, =?utf-8?b?S8OpdmluIEwn?= =?utf-8?b?aMO0cGl0YWw=?= , linux-kernel@vger.kernel.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, robh+dt@kernel.org, thomas.petazzoni@bootlin.com, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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>;