From patchwork Thu Dec 20 12:54:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 114 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 49C0D2E5528 for ; Thu, 20 Dec 2018 13:55:00 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id e17sf568351wrw.13 for ; Thu, 20 Dec 2018 04:55:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1545310500; cv=pass; d=google.com; s=arc-20160816; b=uAdkVvIFlimpZ9hnWmilCnO1LjN6N11JZ4gneDgBn3a8U2d16QwO/0LaW68kgxvy8i tMvnEWjpGPu9aiQ3QGmSAlOezuWHEZJtFGe11HwtbeIvVafMX8TqCEtvGa172T25GFbo KWZL1+vt9UyNyiUYUrMbMIGnQ4uZmlH9ORCZ4F9pCFJeD+vyE7mbIY70VT+sFdvbcRPu 0D1djudwekqO7OgAytElZSsDtrjYRWm7jhBNV/AZzz0kTacEjOQNocCF530UJr/8/bKi P5K55brxfTvuIZy4nVI1WetQco7Zw04ADAo3Bn4+RkTYuzUIpFPWmXILi07FYqISmRww xToQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=K3fNn/FXlx9jKItmd57XZAqxHarVmxQer8rTIXZFXWAiLsMssSVSbJalCLGbYcjZGQ U2wTzkkZqQ9U2LFmolVEszPCvRtERK8Lhv4sLFUuGZpmYv3gkKfL2lFQeor8rG4dYNrN suWYi3j0Q/v1kqTdCsOFh4ASsknpdnrQ4FCEGBHV3GW5SWrVZ70lV/W2SgT41JVxFT1T iBL6nwMWYGNSja45rUXn0PJ+dSxTOiMvHlIkNSd7zWwy9oyS7yAqJACxBfH7C1JkdK7m qLNYiAWNoWL5jOIjMw05RsFP8R8pSA+fX04BLUhpnR0m/DNDbNkzZWwqV9tMlBRrWL9y nmTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OqNkOUfz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=BdJeqZqP+lXIrQxVC9I2BQfr1aGuDdjBPrDhLgdARy9m5nvQ1YVsqCv5ablRrSa1dr 6Hg8twPuKnwsQ3CfDWYKzZmBfSA6yu3wggq3CW6Ih4smBltqdzcv2OZiI2Wne+aK5apY Sg5tT7NUGTnmMeHHPaZLWiL8uQIaTvtdZbXyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=rPCiVaCT13pk7uzofTmfiJZm10iMtGqzGicuJ2U7Ce3pgwrJRG9op1hhPOYoJbROAP HJG43E0fEElUctfgF6cK1usoCkEIa5vri2zG9l6STGAzSFe12aG4UCRjqbb3ENR/biPh xKCE/cwTlQ/SARefz5C+wJsncKFp5ldGMDBszEQ4zBTo90KbnhWmVXfAysZiopgRBBBy aKK/t48j0tCDhMhWaqaxqCqpR3j8bOVDDeD56MQOXVUG0sXr2ahcEqrQF9NDEDAyr/5H iK2vqF0tBM4LLk0omikrZTYOX1KAa2sF7QYMKSklQFyOSue6QZwp/g94cGTGVW0miH8Y VbGg== X-Gm-Message-State: AA+aEWaYDftqRrYWiY8DukbkqD9Px8sHCvsKl9S9nM4PNOPEYVr9OxYj fttSIVZCLA24JEO4CS5n2DMlLezF X-Google-Smtp-Source: AFSGD/XUUArRd+wXgH5suuXDYy6IA05RaIgarlpmavpe340BHk/nJqcLR6qOcB9MhFZOq0u/F0f7TQ== X-Received: by 2002:a1c:9cc2:: with SMTP id f185mr1080026wme.10.1545310499988; Thu, 20 Dec 2018 04:54:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:eac3:: with SMTP id o3ls5732270wrn.8.gmail; Thu, 20 Dec 2018 04:54:59 -0800 (PST) X-Received: by 2002:adf:ff09:: with SMTP id k9mr21497237wrr.97.1545310499491; Thu, 20 Dec 2018 04:54:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545310499; cv=none; d=google.com; s=arc-20160816; b=IJkZOu+OBvWwrE1dPeea23rFnl1UsMlYbiCV3gKS+EcRDsvUlgNhGfgSnSkeYXEXNM 1yEuJw3DtOGX0ETaUbGMVyfObHuPW0FhtuLdSWY5J/RKkLD+Sf+9gk61Qrll6DBORz2U SW5zUvWNk/PtvZzOtzu9TAjTCLjjtrFhbZ4OEkCgS0ffrgp4WmZSipTgvXPgqOw9+FvJ huq5bi599dtq0bpjtUBM/MCKslle3e9BxrXFuQiOImLbIz4enfQgC/o8+q1vrY/hzFJX wSwFBisjUloRrsR86/RnUZFjmdVhCZfJY1fCUF0pXCXwCDjLmn8apIBZI4mwGa6N16su Pepw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=GUD1Q2KQmNvoTkJEo/m1uDacMC++x6XGcrP5B5wT/UFIWO3bVphoTe8J561gbohEr1 yDPAPQgcqpOUwFajO6qE4AIEJDoEhsPK7YM6AD64t6a1UdFTsG3WcrW4FkV8CH59yOwd EuIbQTXu9zw1npiaMm66/etoFIflCIXZtEI43ED80wLSKyzcjJEpwWMAH1wmIKOqxvOM Upvuqx2j+1O05BM8F5tgGcjm6RED3yWtReREALfJW5mjTAuNHkwJpzPLj68Iy3Vn8S2W OMHcLZITIwF8QEWmAUE/nFgFgfmKG7kbv7OVCaLdAJyIIkaCdmlM3QVBpohjjnNac8tr 98dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OqNkOUfz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t13sor6275668wmt.4.2018.12.20.04.54.59 for (Google Transport Security); Thu, 20 Dec 2018 04:54:59 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:f605:: with SMTP id w5mr11781988wmc.116.1545310499216; Thu, 20 Dec 2018 04:54:59 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:58 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi , linux-amarula@amarulasolutions.com, Michael Trimarchi Cc: Jagan Teki Subject: [DO NOT MERGE] [PATCH v5 6/6] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Thu, 20 Dec 2018 18:24:38 +0530 Message-Id: <20181220125438.11700-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OqNkOUfz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Bananapi M64 comes with an optional sensor based on the ov5640, add support for it with below pin information. - PE13, PE12 via i2c-gpio bitbanging - CLK_CSI_MCLK as external clock - PE1 as external clock pin muxing - DLDO3 as AVDD supply - ALDO1 as DOVDD supply - ELDO3 as DVDD supply - PE16 gpio for reset pin - PE17 gpio for powerdown pin Signed-off-by: Jagan Teki --- .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index 83e30e0afe5b..c185ceec8c81 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -60,6 +60,41 @@ stdout-path = "serial0:115200n8"; }; + i2c-csi { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* CSI0-SDA: PE13 */ + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI0-SCK: PE12 */ + i2c-gpio,delay-us = <5>; + #address-cells = <1>; + #size-cells = <0>; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; + clocks = <&ccu CLK_CSI_MCLK>; + clock-names = "xclk"; + + AVDD-supply = <®_dldo3>; + DOVDD-supply = <®_aldo1>; + DVDD-supply = <®_eldo3>; + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* CSI0-RST: PE16 */ + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* CSI0-PWDN: PE17 */ + + port { + ov5640_ep: endpoint { + remote-endpoint = <&csi_ep>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -106,6 +141,24 @@ status = "okay"; }; +&csi { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + csi_ep: endpoint { + remote-endpoint = <&ov5640_ep>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &dai { status = "okay"; }; @@ -296,6 +349,12 @@ regulator-name = "vcc-wifi"; }; +®_dldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "avdd-csi"; +}; + ®_dldo4 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; @@ -313,6 +372,12 @@ regulator-name = "cpvdd"; }; +®_eldo3 { + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "dvdd-csi"; +}; + ®_fldo1 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>;