From patchwork Tue Dec 18 11:33:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 107 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 39E952E1136 for ; Tue, 18 Dec 2018 12:33:42 +0100 (CET) Received: by mail-wm1-f71.google.com with SMTP id a11sf728202wmh.2 for ; Tue, 18 Dec 2018 03:33:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1545132822; cv=pass; d=google.com; s=arc-20160816; b=XJcYfwHXG1BA/owcIc367lAU9JHMhfoF9lxE2fMIwSgl8PxUG9v8ZFnnmkSliI6EDh TRVr3d4a47LbjvsXc1iuSgPnjgxFdBVGcFS8+NOXo1/O+TKT3VJk+Nn+8v5wjDOkerq2 k3YF7vGlC6IH/FwGuyh0UpDRJ52xKNcoB29riNPI1iRrsvhP4GJVQqkOxFTNPrI1smYM JQVbUMfqpiaDmM9ijOApewZZfFwAXf3Ve/2APqIO6q4F5+efreIl0zxfP3b2i9/cmCR/ qJz1JyxK/znBS9MeB0tAbCgHkRBAukvcF7Bon3rw+r5RCOba8moRdCtIZXukZHNInmIj lSsg== 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=d1dVgzWS/PNo8m4rN6NmEfs/mNVybVMdpbAoesSZBLdnx4bpYeAxZPQNuUXTtX9H5D AMwa6j2gpq0XAwlBWGq1vHIfNV7FR18+g02CKUAJPvy+yJgMDxaGa1eepWqNQi3/IhW8 AHnfiFycx1/ZyD6os2yKn9sQ+E/JBPmHOStxdc8unMTSf6v5CXXAsojFcn6d0vBKIz7X Y9NTdwU46OnmTlmyXHM8S0APTY0Q1z1wXh2OCem3EKkOjS+EdLROwod4OvqpGU+A0wgJ zyFNifyWkkqI0JHSYfnZ6lNwcFRjEvmbNSHs1rfQK/eQ3PYmphze2jLLEHAhGLL+510q kCiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e5PoYekD; 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=f3kzXB2W4WVXqLxM/OOMImRhnuo4sal3Q5ZCpgT0iYGAZNjZ3QTSFvP3HXorn5vTG5 rPH0LPZkQoBpM/D1SEsfpZxRNmqgwS4F3Umh2nXO2Jz4uT7fIX/5wx8my1hn6ygjcbLj Vaqrw3m16DGMBbyxWyX+seJH5eXcXTXIHGSQE= 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=HM7rKwYl1xbGF3Yki8gUVOOwLFj0TR7GVESt1+Clo1KYiQjnesDutisKAPnQna+kDV 9P21RtmcbflWzBPjj5v5vuThcdpq5BzTfvSGiXmVCCA46L9MqCGVf0o9SkOXvoVNlFCu Z2TNnGa0bb+v20CIQf4YyjlUtKqB3mgh8U7B+xUt1KrLU87K52vVqEma+EyZ2kP9POwr T+hM3uF+OkYT9r9EV30jsdjC9VNxcCyVtmj40Plwheu5tEoYdcd3i0ixTxJUWcYN/57V wD0FfWndVR+F9jo532wxMkYkXtpzdTc6B9OxSJZZoHHBUfunQpmwl/Qcq/X0fARamcKx AXmQ== X-Gm-Message-State: AA+aEWYNRmE4Hnfm9p0/DglCs0mvQ0oUSXCotrMoCf7mAM9ytWtYHM76 9a/UgriHBbnYPt57iSNthEt6XBfx X-Google-Smtp-Source: AFSGD/XfE1xhY4Aj+SKJeB50Dd6+t8icnEYi6hjVeVLv0E6d3VfnOXra/dDtdLnFsHEYYTHYXDaFWA== X-Received: by 2002:a1c:dcc4:: with SMTP id t187mr312316wmg.9.1545132821908; Tue, 18 Dec 2018 03:33:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:b1c5:: with SMTP id a188ls248782wmf.5.gmail; Tue, 18 Dec 2018 03:33:41 -0800 (PST) X-Received: by 2002:a1c:864f:: with SMTP id i76mr2768322wmd.83.1545132821464; Tue, 18 Dec 2018 03:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545132821; cv=none; d=google.com; s=arc-20160816; b=od4+lXGz+6da5iNbSnQMJwbFOqby47hR7GrJkAoDgu1DjxsptoDYWuGn+i6rhmXf4n tvu65oBaP4458H6Squs9YhM4Rvr3W9ThCrbqLzJjqJHj8EKfPfZNojJTU2RKvs2CDY3c JoGrR0/sstqJLXMVdiOhk0dilTPHVhdfSrryC5OyJxcCl+f8pLfZHINBdq1kA4KmlpMY EJQBPPJ5QsmTQhU7b8LYWZDCV3Q55xxEzvW0PPxvss3seWSyQPn3rJYL8HWNF6gzkJ99 UwKUzaxS4q0IahOl8WHtQZWIeeuwi+5QX/S6NyZv3DaKG0TmWbl8Cheh5EWI1v6eSJSD Uotw== 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=UmUMr8n5K9wax0D42fOipjK49QW7z4lSIHBoV8XYopYjLfHlnIQxbT1CQ+NRC8tOtC X/69xkjP6TSw7MM/CiX95cneC6YEKdibKWEtgndIVGitDFAXRacp5KHvZfG+UMJUpHay 4porwEXnPI7pB7wrcBnBxbl5+hy3TqYBpv7Ehu7VGaPFNvXdu5OAkgXlK1MZDJQ17kAh 4vbpHshBvoKNeQGIfZ/iKJBcDY5BO6GCUkVDl/IV5VV3/CnJwZoIidmpk80gsdW7sfhf E6f64ogzkmO/G/EhOzRl3fypibO3pQFse2Q1dzqFSDG0MTsnk3bIMWo7wni5bowM2hcH NsfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e5PoYekD; 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 v23sor2333203wrd.4.2018.12.18.03.33.41 for (Google Transport Security); Tue, 18 Dec 2018 03:33:41 -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:adf:fd87:: with SMTP id d7mr13630773wrr.74.1545132821152; Tue, 18 Dec 2018 03:33:41 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:40 -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 v4 6/6] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Tue, 18 Dec 2018 17:03:20 +0530 Message-Id: <20181218113320.4856-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-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=e5PoYekD; 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>;