Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21257710ybl; Mon, 6 Jan 2020 00:43:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwLvwFzWfUGdot8JX/1eoXj0bz1aNcQ2pGnBd09SLYlEfNy/BATbXpJZfypK0stnW9X1QcJ X-Received: by 2002:a05:6830:18e3:: with SMTP id d3mr110298144otf.190.1578300229041; Mon, 06 Jan 2020 00:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578300229; cv=none; d=google.com; s=arc-20160816; b=aF/arv3fqVeViyI89ekAFhpKg+NxDILrtsXC5ULmYm2MGWVfsNB/z/jbMbTL9pkT8i kBfITTQDt+dFpSCbrg0QAMAiKV87t31/QnFPArPREKbaLZvfiNpEMwBxFPV0czYAZVAm E1dtr9Lmly5bzvXd29fpDHnobEocB/9MCW3qLfzoS3YtRKu9mMj7tBylW0hAjv8Rc8Wz p4Z6pxvKC2eEtDqINQ1r3nWoqhZCjCwEGonxGzO0+Xhi5eQZVF4xUpk+MVNoEQHbSTrg ZJY/tU5oH8vd7adRa9CY226zzNB2aIyj3MQdHI/ZOimc5YJGisAZxbM++7kdo55wqe35 euVQ== 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=0KpPzxXrUinU2JATqKafi2Fj96RAuJK8E8WR7YwC0R8=; b=NONLEY1WYKqJWO/dBsKrtJ1ttnNfuutwYSagZ4UC2BsIaTN+tHy6FuN5v0OSJ/LthI ypF0LHNn51OwxUp6gk0JUjDswQ9gFPMDPDsIO321GhFGjOn6Co1DDMO3Me9/Tfhp/U5Z TrjrkRqRqqBnAg2BxswmFZYVi6cISuAtE3dMb+4aMGHGoGizwNWeyXEEI9+fpPg/4Ak7 wdKDcGBL6J41zzWg9AxadqLZY0qWVmnqlmrrEfdOhXvnZ8y2ph9iBajph7HeNoX5OjS9 e0+lfs/v7qNEGCnxVKO65ieBaGsxYis70jVDf7ZFFyPjJwcZcSGDLlD7Smxzxwz7ZKZf ZhiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="unTNw/nH"; 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 g26si35372661otj.32.2020.01.06.00.43.36; Mon, 06 Jan 2020 00:43:49 -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="unTNw/nH"; 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 S1726620AbgAFImu (ORCPT + 99 others); Mon, 6 Jan 2020 03:42:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:40320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgAFImq (ORCPT ); Mon, 6 Jan 2020 03:42:46 -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 6381B2467C; Mon, 6 Jan 2020 08:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300165; bh=0EIGPjYZo6FBtZUEJQgirKj6xdjoxrfaE3eT2iKS86s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=unTNw/nHTKzY1uXQZVSWdfnLxW9lfD7nao0e3WVvhzeaa2N4VgILukEnQwHayt+PX zD/ZWIdj9j0IDldXXusntoeJxgHzAgLPoFoMdMQMRqZMus1eDGTr7MFBZpjdZZRN3g fnjF2/nNcPxDeqdtX1sdwfm7m7K+bGZKKX+9mymk= Received: by wens.tw (Postfix, from userid 1000) id 73CB35FD7D; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/7] [DO NOT MERGE] ARM: dts: sun8i-r40: bananapi-m2-ultra: Enable OV5640 camera Date: Mon, 6 Jan 2020 16:42:40 +0800 Message-Id: <20200106084240.1076-8-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-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.1