Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3397909ybl; Sun, 15 Dec 2019 09:01:04 -0800 (PST) X-Google-Smtp-Source: APXvYqy9dWU2F2tzX4IrmeVigX078uFNWUZxmSc2Hl6tJCUP/LGytZ6qZEMqsVVOLwMfsbT3VK5d X-Received: by 2002:a05:6830:22e6:: with SMTP id t6mr28478525otc.244.1576429264678; Sun, 15 Dec 2019 09:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576429264; cv=none; d=google.com; s=arc-20160816; b=dbzxhIkJl/d645gB5owdxMingUTaWwEErNJcIu8EgZ/Q7F7S5kZWoUjCMSEK+ZgdnB sWas581KKLRBFsT3fgdqrFF10mgnQMVMmezNUywu2DxDb56+iXZHkp9PluW7aTKzfAXU 2ATWnouYrB/Saxml1nUsad6MjoMSEGB6gg5569GYdGX0j0Z//yGdLPf/qyF6vv5+nWab y+sKkcxAoTMIoQSjFEGnDOV0u/GOjzx5DWUV0zhNscxqFYE5Tn4+nVdwb5fxTV4HDOHq +0UhWJBGq8o1SgrFKEaG+tGB9sjdX/1tAHgbyQczD7xIhj2mJ12TfhmwT5+uXCflTWxE F+Qg== 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 :dkim-signature; bh=KCBvW8hmwzL1Zthi2M8EUERFNXQnZBMdIqWdGa1BxCw=; b=Yd4K9+SXEF1ttuBY7bPmtZf27ijfoAVjCHZ7MSYDqraFUnkHrvcDshZ8Hkwi4yTXul 8Qv4NV1dXMGdqMIgi4fY6f5YyHxFJm0TqY70/uRprg2KKtpY7GIEPljnRi16XpWO/Je3 dHro187JwR83V6nvOBDc+ymBYeSrBNlloPiZzseChmM4JXNYprt8PQE+oy4kDczNz8fY ZRPf7YJiTf+NOG2x5JRfOqBu6uOykUY+57dItP5slS7Z2Gbso9fnf8cq8wsb0nlOh7mR Iy0yPyMMIU6SlaFVdBejBm/7BIcJWSSRplxJZs6Nk/PzEXf3/vh8GAapLfk0tZvCavAW sKSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FBfdymPn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si8904596otg.90.2019.12.15.09.00.52; Sun, 15 Dec 2019 09:01:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FBfdymPn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726922AbfLOQ76 (ORCPT + 99 others); Sun, 15 Dec 2019 11:59:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:55262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbfLOQ7d (ORCPT ); Sun, 15 Dec 2019 11:59:33 -0500 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1ED7246AB; Sun, 15 Dec 2019 16:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576429172; bh=m5GPdarvxrtjsXfbUyU7e3PQz2NgpIQ560CvjxxvtEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FBfdymPna5qbjaty8485LW2z9uHzMwnu9A50cgCugkkgPnwnqZTuZLMAYFFazwb/I 6/9hHMyxaSzhVCW39FqIabcI7XDijrgIRkhsX4LeJbTTpbPg5besqa6/Z3usQkY3dt dmFnfm2RRY+ciO+eprRDIY71e2cqzuzS1e3gI9MM= Received: by wens.tw (Postfix, from userid 1000) id 97FC35FF78; Mon, 16 Dec 2019 00:59:26 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Mauro Carvalho Chehab , Sakari Ailus , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chen-Yu Tsai Subject: [PATCH 14/14] [DO NOT MERGE] ARM: dts: sun8i-r40: bananapi-m2-ultra: Enable OV5640 camera Date: Mon, 16 Dec 2019 00:59:24 +0800 Message-Id: <20191215165924.28314-15-wens@kernel.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191215165924.28314-1-wens@kernel.org> References: <20191215165924.28314-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai Bananapi offers a small OV5640 based camera module, attached via an FPC connector. Add the related regulator constraints, and hook everything up. Signed-off-by: Chen-Yu Tsai --- .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts index 42d62d1ba1dc..86183d40c7af 100644 --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts @@ -113,6 +113,24 @@ &ahci { status = "okay"; }; +&csi0 { + pinctrl-names = "default"; + pinctrl-0 = <&csi0_8bits_pins>; + status = "okay"; + + port { + /* Parallel bus endpoint */ + csi0_from_ov5640: endpoint { + remote-endpoint = <&ov5640_to_csi0>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &de { status = "okay"; }; @@ -164,6 +182,37 @@ axp22x: pmic@34 { #include "axp22x.dtsi" +&i2c4 { + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&csi0_mclk_pin>; + clocks = <&ccu CLK_CSI0_MCLK>; + clock-names = "xclk"; + + reset-gpios = <&pio 8 7 GPIO_ACTIVE_LOW>; /* PI7 */ + powerdown-gpios = <&pio 8 6 GPIO_ACTIVE_HIGH>; /* PI6 */ + AVDD-supply = <®_aldo1>; + DOVDD-supply = <®_eldo1>; + DVDD-supply = <®_eldo2>; + + port { + ov5640_to_csi0: endpoint { + remote-endpoint = <&csi0_from_ov5640>; + bus-width = <8>; + data-shift = <2>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; +}; + &mmc0 { vmmc-supply = <®_dcdc1>; bus-width = <4>; @@ -209,6 +258,12 @@ &pio { vcc-pg-supply = <®_dldo1>; }; +®_aldo1 { + regulator-name = "csi-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; + ®_aldo2 { regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; @@ -289,6 +344,18 @@ ®_dldo4 { regulator-name = "vdd2v5-sata"; }; +®_eldo1 { + regulator-name = "csi-iovcc"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; + +®_eldo2 { + regulator-name = "csi-dvdd"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; +}; + ®_eldo3 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; -- 2.24.0