From patchwork Thu Mar 14 21:17:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10853693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 733B013B5 for ; Thu, 14 Mar 2019 21:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BED428DA3 for ; Thu, 14 Mar 2019 21:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D27B28D97; Thu, 14 Mar 2019 21:19:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9AB028D07 for ; Thu, 14 Mar 2019 21:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=QTk9V8arfFmcSriBVRrToytYe1cds17+Q0yvVTkelDw=; b=uYYxbcJr4IOHB/ ZYhwEo/+xjYh8fp/W/agdqYSCHE6oKIR71dwhVsxjT5K6xha0YE/aDXUTaJpQ1lfrsSBBcvQd/sIU lX55vOntENGHnyQdh/Z3T5TV4gZ5jW5AEB7m/gKsjcQZkxW3Cur9SInMRAJJCPVFRBJUFhmHSK03C yxLGLWIFY4eluUVhvUjwSLaufEfAf5G747JaWiOKSSq2gWVO63517QlwS0lN5Ewp1t7VZvdlXuL/f r769xi/B460MmePKgPKCxFh8GoTggVsQSm1B/53uG7npavjxLMdfvbOuWBfnYvD/TtdMvWxz3umPO Yg4AQBz9IuPUlXHQDwZg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4Xkz-000630-8y; Thu, 14 Mar 2019 21:19:17 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4Xjt-0004gI-4I for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2019 21:18:18 +0000 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 96BCE240003; Thu, 14 Mar 2019 21:18:01 +0000 (UTC) From: Maxime Ripard To: Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v3 5/5] DO NOT MERGE: ARM: dts: bananapi: Add Camera support Date: Thu, 14 Mar 2019 22:17:49 +0100 Message-Id: <4a9d087583fbc95188cc23cca1475d66dcd3f5b3.1552598161.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_141810_019336_99E349C3 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Maxime Ripard , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Laurent Pinchart , Thomas Petazzoni , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 91 +++++++++++++++++++++++++- 1 file changed, 91 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts index 81bc85d398c1..33f1b40ee3f2 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts @@ -54,6 +54,9 @@ compatible = "lemaker,bananapi", "allwinner,sun7i-a20"; aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; serial0 = &uart0; serial1 = &uart3; serial2 = &uart7; @@ -63,6 +66,41 @@ stdout-path = "serial0:115200n8"; }; + reg_cam: cam { + compatible = "regulator-fixed"; + regulator-name = "cam"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <®_vcc5v0>; + gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + reg_cam_avdd: cam-avdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_cam>; + }; + + reg_cam_dovdd: cam-dovdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-dovdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <®_cam>; + }; + + reg_cam_dvdd: cam-dvdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-dvdd"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + vin-supply = <®_cam>; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -116,6 +154,23 @@ >; }; +&csi0 { + pinctrl-names = "default"; + pinctrl-0 = <&csi0_pins_a>; + status = "okay"; + + port { + csi_from_ov5640: endpoint { + remote-endpoint = <&ov5640_to_csi>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &de { status = "okay"; }; @@ -161,6 +216,36 @@ }; }; +&i2c1 { + status = "okay"; + + camera: camera@21 { + compatible = "ovti,ov5640"; + reg = <0x21>; + clocks = <&ccu CLK_CSI0>; + clock-names = "xclk"; + assigned-clocks = <&ccu CLK_CSI0>; + assigned-clock-rates = <24000000>; + + reset-gpios = <&pio 7 14 GPIO_ACTIVE_LOW>; + powerdown-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; + AVDD-supply = <®_cam_avdd>; + DOVDD-supply = <®_cam_dovdd>; + DVDD-supply = <®_cam_dvdd>; + + port { + ov5640_to_csi: endpoint { + remote-endpoint = <&csi_from_ov5640>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; +}; + &i2c2 { status = "okay"; }; @@ -247,6 +332,12 @@ "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "", "", "", "", "", "", "", "", ""; + csi0_pins_a: csi_pins_a@0 { + pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", + "PE6", "PE7", "PE8", "PE9", "PE10", "PE11"; + function = "csi0"; + }; + usb0_id_detect_pin: usb0-id-detect-pin { pins = "PH4"; function = "gpio_in";