From patchwork Mon Dec 3 10:07:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709077 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 EC3F31923 for ; Mon, 3 Dec 2018 10:10:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D71D12AF34 for ; Mon, 3 Dec 2018 10:10:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB3932AF82; Mon, 3 Dec 2018 10:10:24 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6857D2AF34 for ; Mon, 3 Dec 2018 10:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aB0j6QEMbrA1fCRm3p097/Mmo8KSjUAadePdGg+UqlM=; b=dv29FNOhhytAxs g8TjWNq+4ovfyMVMqmePBRMN7XJn4DCdk7+XfXcZ/wbup4wnMZUlG/9umaJR0QNnNTrBsPyqIR+xn 8l1NBo4ZORiPz+y/PQ0PxpcMXHBK7esqLp8e+HYSp2c1CWkK8MuQgMGLTUpqrtwObbzIp2R8H0690 fUcrMqK0gw1brITZ8t8U7IK/GW2zdAZLVbUaJ0H+YzRjzRAsbm1LLUkDb8KMNQH8fPQy5U9M5UdhZ dZS4qFWFRK3nPuI2erWt2bl/8hhLOVJLbD10ykzi5x7kXYq9h7l5fvcf5lIKD4vtF44TPiChA8hhD IBytRCe9gYD/56VA7tbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTlBH-0005X3-JG; Mon, 03 Dec 2018 10:10:23 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTl9B-0001MQ-Nx for linux-arm-kernel@lists.infradead.org; Mon, 03 Dec 2018 10:08:22 +0000 Received: by mail-wr1-x42b.google.com with SMTP id v6so11422819wrr.12 for ; Mon, 03 Dec 2018 02:08:03 -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=8g+uoe2D0wbUmeVGWobhlMg09E9u+QyXMer1oiBcYAk=; b=AYMfQAZYz5o2/kkSAsIQmbtkGPKTB4spjIXNR78pptmK9KqHI1S0qOiAXe3PIPUt2V 6cdy3GA7OWSQ8rNjvPHvrBMflwbnR3cKp1YFBn2C/D2DDtwxo7vm6oF7QYLOMAWNHCjy jXdBOT9NDpQf2ZAocmFItxwTfI/uDxMHEApmA= 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=8g+uoe2D0wbUmeVGWobhlMg09E9u+QyXMer1oiBcYAk=; b=Fm8zXEm8A7/G0a5eIe9DLXE3cHnk0eT4xZzNF85ZR/bP9dVchtE8sjfCUptVHnM83T K6GOzqrTB9+TCNRXhWhiH0s1SqxBg2vy/zKh9LH/EthoTDwUJJQnlgz3mGZiuGkKdU7A ejne7L+DbYTZXHkw84QBXKoX92dBRXWL1EPUzmQt6BBsLWLj3uS0UuuW4Ros96iBKAc1 8YX1COyPOOKMQ6gX99P+fvFiJUibcAey80IEOGZ+7mbIyDcXXd2HxITCC4CXIbVPTs4a rwmK4HV6jbN1U+2gUUpKHV/WjFtcOqprEs1/meDrBUEUEVvm9FrlBaWDruz9pYlPjbfF ob8g== X-Gm-Message-State: AA+aEWbZgz4difGwHqwD2B+TWK62BZY4v2ExX0+3p9VTet8BZnXPena0 DF0HlhVER3Sfm05FBKZTHVAyTfxxzfU= X-Google-Smtp-Source: AFSGD/XXnRvxPu+v/q0zi96QmqEJxLzAnSJQrpfhNl1nyainR2UMa5onjVEXfYEj5+c4mOqkVdyVbA== X-Received: by 2002:adf:e846:: with SMTP id d6mr14057493wrn.72.1543831681810; Mon, 03 Dec 2018 02:08:01 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.08.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:08:01 -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 Subject: [PATCH 5/5] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Date: Mon, 3 Dec 2018 15:37:47 +0530 Message-Id: <20181203100747.16442-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181203_020814_423847_3247D44A X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Amarula A64-Relic board by default bound with OV5640 camera, so 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 vcc-csi supply - DLDO3 as AVDD supply - ALDO1 as DOVDD supply - ELDO3 as DVDD supply - PE14 gpio for reset pin - PE15 gpio for powerdown pin Signed-off-by: Jagan Teki --- .../allwinner/sun50i-a64-amarula-relic.dts | 54 +++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 ++ 2 files changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts index 6cb2b7f0c817..9ac6d773188b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -22,6 +22,41 @@ stdout-path = "serial0:115200n8"; }; + i2c-csi { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&pio 4 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + 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 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ + powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ + + 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 */ + }; + }; + }; + }; + wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc 1>; @@ -30,6 +65,25 @@ }; }; +&csi { + vcc-csi-supply = <®_dldo3>; + 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 */ + }; + }; +}; + &ehci0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index d32ff694ac5c..844bb44a78af 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -538,6 +538,11 @@ function = "csi0"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi0"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0";