From patchwork Wed Nov 14 14:59:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10682739 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 577E213B5 for ; Wed, 14 Nov 2018 15:00:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AC632B99A for ; Wed, 14 Nov 2018 15:00:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48E4D2B99D; Wed, 14 Nov 2018 15:00:54 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham 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 C076F2B9A9 for ; Wed, 14 Nov 2018 15:00:53 +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=osBPA8FbdWhLFH7YLcy6A1cG47wdqC+DUvPsvG0XtP0=; b=q1epzhYyH7CRig h8+FsdpSqJW0gYb3qPs7aVF7AW+1UOP7y06odsyCcrW7xv8MwlPDPMAlS+EbOVZpvEjtwmNVyoRf5 DhKv9+MpFck7cNDnrWtSM+MMObSqptcHmaJpjq7rXuH+KDopDQKeAsX2OZS4bzSaaaGCKVPhCYdeb T3619pfFPUH+u8vClgjTYSo6kj/XekUq9njOjWXTNXepAF4pUPgSFVHo27SrcEQME6nXMWZi7Lpl8 plUlMaj8XhNWwBjAQ2N78hvmTkPB6gcKoA6Tsn8Shl2mLm+5iE/UY3AZ/rqStr48nyQ1r2bS9EqoD Gpx68lQ9Vd479EAKNJ1g==; 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 1gMwev-0007sH-JH; Wed, 14 Nov 2018 15:00:49 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMwdy-0005h9-VB for linux-arm-kernel@bombadil.infradead.org; Wed, 14 Nov 2018 14:59:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9gKi4rYqMRceoMmdCVqtDfo7GuVyzCBBnx5lvnjIA+o=; b=VXAEz1XZUOK3+6ytYF2vrE6t/a 7PyZ3xM7f7xReHjuSrMB1jLBVg68I9DppjMsFXnd1R+sJKe9TRzr6SSUmc0xHvX4H9zCyGXUKeNAl wncV20sKvJ5sCPgTNAyXugAm2CXZW3bPBZEGxCUcR1tIpWULkAfTfLDFuEfIFom6QmVL4QfY3lK1H 6bZpKY4s7mabfFQr3Iey4LqghOE71u/WsS+YI0OJw0in0oiku4WsTgnJH7EsIVcaSRfzvzpzUdDka XurVWSEkqF7fHJYYlmziH+vijLRUkssJxL0E4hEKiElR5SRD2Ua8+sF6wadvxPHaM6aoyQ28wo8DV 72+2QQCw==; Received: from mail.bootlin.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMwdv-0007p5-Se for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2018 14:59:49 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 8931D20D8A; Wed, 14 Nov 2018 15:59:37 +0100 (CET) Received: from localhost (aaubervilliers-681-1-30-49.w90-88.abo.wanadoo.fr [90.88.15.49]) by mail.bootlin.com (Postfix) with ESMTPSA id 5E65F20379; Wed, 14 Nov 2018 15:59:37 +0100 (CET) From: Maxime Ripard To: Yong Deng Subject: [PATCH v2 4/4] [DO NOT MERGE] ARM: dts: sun8i: Add CAM500B camera module to the Nano Pi M1+ Date: Wed, 14 Nov 2018 15:59:34 +0100 Message-Id: <20181114145934.26855-5-maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181114145934.26855-1-maxime.ripard@bootlin.com> References: <20181114145934.26855-1-maxime.ripard@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181114_095948_193436_124B85D1 X-CRM114-Status: GOOD ( 10.86 ) 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: Mylene Josserand , Thomas Petazzoni , Maxime Ripard , Chen-Yu Tsai , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , 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 From: Mylène Josserand The Nano Pi M1+ comes with an optional sensor based on the ov5640 from Omnivision. Enable the support for it in the DT. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts index 06010a9afba0..2ac62d109285 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts @@ -52,6 +52,37 @@ ethernet1 = &sdio_wifi; }; + cam_xclk: cam-xclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "cam-xclk"; + }; + + reg_cam_avdd: cam-avdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_vcc3v3>; + }; + + reg_cam_dovdd: cam-dovdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-dovdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <®_vcc3v3>; + }; + + reg_cam_dvdd: cam-dvdd { + compatible = "regulator-fixed"; + regulator-name = "cam500b-dvdd"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + vin-supply = <®_vcc3v3>; + }; + reg_gmac_3v3: gmac-3v3 { compatible = "regulator-fixed"; regulator-name = "gmac-3v3"; @@ -69,6 +100,26 @@ }; }; +&csi { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + /* Parallel bus endpoint */ + csi_from_ov5640: endpoint { + remote-endpoint = <&ov5640_to_csi>; + bus-width = <8>; + data-shift = <2>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &ehci1 { status = "okay"; }; @@ -94,6 +145,40 @@ }; }; +&i2c2 { + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&cam_xclk>; + clock-names = "xclk"; + + reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; + powerdown-gpios = <&pio 4 15 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>; + data-shift = <2>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; + +}; + +&i2c2_pins { + bias-pull-up; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&ir_pins_a>;