From patchwork Fri Jan 18 16:31:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10771149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 691F613B5 for ; Fri, 18 Jan 2019 16:32:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 555702FBD1 for ; Fri, 18 Jan 2019 16:32:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5356C2FBE6; Fri, 18 Jan 2019 16:32:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF63E2FBF2 for ; Fri, 18 Jan 2019 16:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbfARQcg (ORCPT ); Fri, 18 Jan 2019 11:32:36 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44692 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbfARQcf (ORCPT ); Fri, 18 Jan 2019 11:32:35 -0500 Received: by mail-pl1-f195.google.com with SMTP id e11so6561804plt.11 for ; Fri, 18 Jan 2019 08:32:35 -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=keXb1I5xHNipIFO8YRYvl5Nyt0I+bizBTULJaWrA4rQm1UTphElVztLCeiyRPWnDZa gfmjgAbgCkzsmg9UeMmSyFfb5E19kz331Byl3LWtd9d7W83CzwOfnQJoSgiG+kzeFmI0 dOZCDgF+AqyC/+HvzloFyrp2j+F7q7Ec8NdoQ= 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=D7yRzjayip7gl/hMyI+MehKxp5ymAd7igSeCt0IEm66y79crjCsWftrBJwQXxJSnPv R0wjFkCZPG+2WirEQ1xH8rhEP9tTRP3i2XjJQRSRJcBiYtf3VrZjulHqlZohoF0HTSK6 0xhA7YUBRDXt1R9WZCkmg9ipZi6vGMLt4NvOqzejQ9EzeeM7L8AH+C0S0n976w26YgFM 4v0P6gh5zzMJjGvE6OqNblIxBkeIoUrdkYyXJI8VlFXoDoKCI7MTeI13/B576iyiFs3p gX+cZMlyeQ4oM1A501mmLc9Xc6Sfk02Yg0meqtqbaPlXFUIDR6cJ5Of2etnYIkGC2Nyp fM5A== X-Gm-Message-State: AJcUukcG7LAdLmIwBFtZmbirEyyTtL8XOkigPbyjCnLCmq+LZRX8N4l6 Cry0pUXW8Gj06y+sCF2qFrn6z3CpzFQ= X-Google-Smtp-Source: ALg8bN6fHwMOirgmCp/MatwdUw0W+yNrleJqgmFxCrB5I1IkCJEvbH9Fhfua8S0ST+/g3+MHqA9YEA== X-Received: by 2002:a17:902:4601:: with SMTP id o1mr19802483pld.243.1547829154895; Fri, 18 Jan 2019 08:32:34 -0800 (PST) Received: from jagan-XPS-13-9350.domain.name ([103.81.77.13]) by smtp.gmail.com with ESMTPSA id z13sm13967086pgf.84.2019.01.18.08.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 08:32:34 -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: [PATCH v6 6/6][DO NOT MERGE] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Fri, 18 Jan 2019 22:01:58 +0530 Message-Id: <20190118163158.21418-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190118163158.21418-1-jagan@amarulasolutions.com> References: <20190118163158.21418-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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>;