Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3746863imu; Tue, 18 Dec 2018 03:35:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/UKJfdWYWB/NNNdt4xG5FULd4ZVegKlZtdREgJTsv4KKGP/HRQ7pBRXpC3ZP4W7P413fs9m X-Received: by 2002:a63:4101:: with SMTP id o1mr15304525pga.447.1545132904025; Tue, 18 Dec 2018 03:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545132903; cv=none; d=google.com; s=arc-20160816; b=dMdq5wLgRRBmQSKy6cHU/zi3VchcgrN98L3ukE33lNsi7J0r3+/bXPi/6PXccsWkMT 1Pcu4ZmIotOarnKeobIPXaXugzX7GUkaRCGgi01GCEiaq/bT9yZ9y1KEuZ+OnEDmJRi2 ireWvDi3PIhqFBJOC3Yrxw372gaTcIl8PYVRBw0Fbe+7crcrFl76cuh1vNhrBXYEo4Zx pJDYiNB30Z4QYcds64jxz5KqTZwSJobFBbGkUplzYmQyCQ6oYuYW8GqZUN0DdzfMSiUe OEKnjJQr4AmpYsan/BKmA8HuJTtb88+HLBG2bjqttp62DiNC1TArF8hZvjpKIVqELqV7 rKZA== 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=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=Q2N9K0jbLSHsXcO1hqgAdtwHC83RftOVuwGric0coq3qu79LFWkfTFoVvs/qP6n3y5 4f468ZP4GBOQfn4rj0J1rQzpmFBpfFEZcttdCr2J85KOHfUzq8+nPqOimTM2NQzeHcRK 8ayhJORhYhW3QCLhgn2SFJHlUcOi77YkblpGwAUN46hL/v8ujEcm4UaVBP3ouEpDuMbw Kxi0+F+cz/90hTsdZPrcWlPaE/MjAxCPyMdW7bEwtqUYpFR5wlJGEwuQYHGWUAU2tK81 zdpCuftcO6OQ8acnQ5tbPOOWntuOH0oc95ZRAEYI9Q4s/KeaP+9HSWyEdsgSag9q6DNs quCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=e5PoYekD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si13376473pgk.169.2018.12.18.03.34.49; Tue, 18 Dec 2018 03:35:03 -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=@amarulasolutions.com header.s=google header.b=e5PoYekD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbeLRLdr (ORCPT + 99 others); Tue, 18 Dec 2018 06:33:47 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40472 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbeLRLdn (ORCPT ); Tue, 18 Dec 2018 06:33:43 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so15537368wrt.7 for ; Tue, 18 Dec 2018 03:33:41 -0800 (PST) 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; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=e5PoYekDuh3gtWmfvuu/mBRfx6rUcm37ltH0VzcHmjxHuffNZPYO0mRg5f3WGoAetR bmiR/I19WYXtYqZIhn9H5ilNTaR9Oi124OpunlX/kBNP37jn1iqMGOkhLxOVU2YNCwjb 5p+MlVa4udqoNfzQyEdWmoTQp54K+nWxSa06s= 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; bh=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=GGeko95BHkfaLMwIGaZZt3HDSYGme/9ZgLfDl6K4reDiQVpXM8VBBKYqHNJ9tbFmOZ R69YHO164bVZ4HkAQ9sicsGuK0bR4NUpaTxqkt7Brr/33X/Z26PEE6cesMyYBneCxYP4 sArBUHeRVuBdhB9aAHKuvj8/bypnPTSDW23ex9nPSDwvNIb47w+X2tRuCg+nxqAr26Et zSLPAaHk6RjPufj5Ny72g2ywUs3Uk66mzxu7Ah9DrE37t9LtmEC0YD07ZdZRoisL0Olv H5a+efEOFpuWsYQNveKTk1Pd4V+aNQ0tCwt5PF+XbTG+WLxIpJpbU39yMf7BC1D8Wfnu wizQ== X-Gm-Message-State: AA+aEWaXWl3kdW3Tz8thF2U7stSCSRutGovLVQ/t72La3Jb4VnRM+10i AW0j4zIW76w5osdYvaPMn+4xhA== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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>; -- 2.18.0.321.gffc6fa0e3