From patchwork Thu Apr 18 13:52:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10907419 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 3E31A13B5 for ; Thu, 18 Apr 2019 13:52:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B10A28D49 for ; Thu, 18 Apr 2019 13:52:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C5D328D48; Thu, 18 Apr 2019 13:52:53 +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=ham 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 B467228D3F for ; Thu, 18 Apr 2019 13:52:52 +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: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:In-Reply-To:References: List-Owner; bh=Rcu/SZtDPM915NT27S+dBIh+haY4aUlP1RHutF9Hb2s=; b=sgtae2pux6LI7N dWY4XBW6Q/6DO79Z/nzxwEDKeV/IcJlbLi/SGfiAY1847fwz9JKpJyMdWA/D26xRSgW6AJGnlm5LT Z06GKETy+RlKAyRU/1/Y3bplR4TL9Kx/vJOMhxZwO7En/HRWzSkrPLChDHHU3ZQiisdggmxvS/+wb Ooy12SFE6UU1AswGNX7BPq59BvQHSkmjq0S0YNfFAc0ZcM3wPPCalmHAdG4FuF4ciAtccfl3UlEjs v3n8A7SOUBze4QEwv1ze/jYDTGsQOosKmEV5kzUC+y6cakQK6JXRk2hMHVwln3DJ56oPbqNHnBGtj LA6e5vpiZMJNyttj0x0A==; 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 1hH7T6-0005cG-AM; Thu, 18 Apr 2019 13:52:48 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH7T2-0005bK-1s for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 13:52:46 +0000 Received: by mail-pf1-x441.google.com with SMTP id t21so1159103pfh.2 for ; Thu, 18 Apr 2019 06:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=f6u0NsaHuXkBa0FvVxI82I2fZsIMvs/TpAdd6MlVacQ=; b=rTy9XcjPrpwDwKG+V36EeMbFaV4xL3/EDThtXHBG7qfPOojsQBlpaYv1y68XelzPNg 9q5X9J5E+lp3SwcBpvGTfVxXjdYOMf8xbFwlaAL0U206m6UluHX28Ud7TbgqvjtwGmJI HPN8FbBotEVjzTk3fvef39qG2hKWCiz2+5cBw= 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:mime-version :content-transfer-encoding; bh=f6u0NsaHuXkBa0FvVxI82I2fZsIMvs/TpAdd6MlVacQ=; b=A0/i4pj0pxtquF0GmPv1FjkQ4c+slF8CHzNIhC+ulUHRvMF3An3t/XPLZUxbtbSBb/ C0Q8ZU5A7WwY3qjTuuuRKye0rN+fIPYIfcRpeX4MxXw8Olr8+qXoidMOy4nA7+Ofla1n KFyn4acXCTo7QbDGHIJVQOgH4AlUGnLh1GPD78aEzy7E6EDbaJi6sESEJ9Z2/axtztTf XEO05wJLzlBZ7LO6Qs8Lmrgu0u7q6sfc8fvSmv0bb9TEP6ZsrL/TeKXPyjuFyAMPZ/sE T5crO86+xGtOJy1gpc/0rbGaM9WPlyTqPfgXyiGa3ozav+ZtUV6pA5dTBdcbDaxsHpgY lkuQ== X-Gm-Message-State: APjAAAUPmRLGWhZxwQ8o1iuwl8c4BuF3fGySUGEl1vUFQn1J8nZi8Rk5 9rq1IPEVkgJQU4ek1WRZ9i+52A== X-Google-Smtp-Source: APXvYqzltQp54VEaBgATxKz1OzJZ9mn1NuEw8wRg0+pRH/RIBirGYOn1UhLKi3kdhlAcV6VtGYulpg== X-Received: by 2002:a65:410c:: with SMTP id w12mr3735801pgp.268.1555595563362; Thu, 18 Apr 2019 06:52:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id c5sm2357861pgh.5.2019.04.18.06.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 06:52:42 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v2 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Date: Thu, 18 Apr 2019 19:22:31 +0530 Message-Id: <20190418135232.9368-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_065244_089422_66140690 X-CRM114-Status: GOOD ( 11.35 ) 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org 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 Some camera modules have the SoC feeding a master clock to the sensor instead of having a standalone crystal. This clock signal is generated from the clock control unit and output from the CSI MCLK function of pin PE1. Add a pinmux setting for it for camera sensors to reference. Signed-off-by: Jagan Teki --- Changes for v2: - add /omit-if-no-ref/ - add pin name as csi-mclk-pin instead of csi-mclk arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 728f70018c51..8c5b521e6389 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -595,6 +595,12 @@ function = "csi"; }; + /omit-if-no-ref/ + csi_mclk_pin: csi-mclk-pin { + pins = "PE1"; + function = "csi"; + }; + i2c0_pins: i2c0-pins { pins = "PH0", "PH1"; function = "i2c0"; From patchwork Thu Apr 18 13:52:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10907421 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 CE12213B5 for ; Thu, 18 Apr 2019 13:53:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF2A528AC4 for ; Thu, 18 Apr 2019 13:53:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD7CC28D31; Thu, 18 Apr 2019 13:53:04 +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=ham 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 D2EE728AE3 for ; Thu, 18 Apr 2019 13:53:02 +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=du5jWgudoz8eQ0bO5GONVVScK0b0yKt+D/ydOEzJlc0=; b=tWgFax+4BorGGE FqO/xX5rPKhJKfYh1TOOOe1u3V4yyHzuWqUcglgrmfO3ZXmtcrwZzHz0wwwX1Fhf9+wqo6D5IlTDb +Pgsxu/wB0CBkZwhHtdVoPwHSpHjqXNbzri3o7U0RlVNmtGnrKOPOxLLc1SNA+DhJ1mR7EZkga4i9 R7RkLpy9ejW8jwvCqa6W7WN1aqQZ/BZLLBKh0TWmOEtO6QAg+c0pHPMFrWj5n3ZcLkkcocW68GZYg e9iNN9/ETFnPKs71jwrNJDFHKH0R2QPjfPYi2JgXuw0xJ+GQqn+L8cd/vHejCYTG6JaCrpNBJNBBN 8HRYLZKeRrQvWILe5bkA==; 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 1hH7TJ-0005r3-Dt; Thu, 18 Apr 2019 13:53:01 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH7T6-0005cW-In for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 13:52:51 +0000 Received: by mail-pl1-x641.google.com with SMTP id a96so1214604pla.6 for ; Thu, 18 Apr 2019 06:52:48 -0700 (PDT) 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=usMx7S8Zw6gUlsfBkvTuHsgMXBMVM7qEmvo3v4uBHU8=; b=YXL7gweDXtyBn6HCEMv5zezevn3zKx1r9RxsCN+kGRWRZ/BCciT0yab8Su19+d5hAm efPab9f5PtMz1K1brSqSOSaOOUlBsEOOmgnmyhNLoQGO4wNXPfx2jspLbxarjLMBm19Q 3jkzIalz1N8t85FkiZSdGaEUwQyqtIRmnj0SU= 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=usMx7S8Zw6gUlsfBkvTuHsgMXBMVM7qEmvo3v4uBHU8=; b=XrU+ZFYH6FRJWiwp2eAwznWrRLNTiVLXXiSiWT/dgdR5MEJnTsAejDxR3f5Ns9VOh8 qboRdQcHzRdYzvE7wkjY08A9EgAajZixltCvcoQ8O32nUvqCH4AVtM/R+0/LOwaPm0HM pPhBY4Uk7zg5zw5Y4mYdv311oTgCmCkt1JehEJXWzYJgGMCwhItp3Le7j1x8i4TqX8W4 yMAJTbnnK5RyZOUZfMRIec36QNRdk1+w9X+dZR/oaV9mlyykVQ5QnfgF+Oqz6VYEcihi w7wa47d01rjjO4r1vfd3W1jC7EIpoThbRp7hmf59v6ASy21hA+dHseQQIFdkbID/2lfe oYQw== X-Gm-Message-State: APjAAAUE6C81eEpy9QWFKUC88SpH0arAK657W+3WidE1kqQGP3jFcauW dJeV2wrKmV3hIWMGHnl5iiOQ3Q== X-Google-Smtp-Source: APXvYqyGJ82XUBGXpACu4ZVxlsUvxlhcMlAGp9G3WbMyBK9fkNeI3B4zt44VTr7vl8Ei51IdBuHCVw== X-Received: by 2002:a17:902:784d:: with SMTP id e13mr96739166pln.152.1555595567749; Thu, 18 Apr 2019 06:52:47 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id c5sm2357861pgh.5.2019.04.18.06.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 06:52:47 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v2 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Date: Thu, 18 Apr 2019 19:22:32 +0530 Message-Id: <20190418135232.9368-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190418135232.9368-1-jagan@amarulasolutions.com> References: <20190418135232.9368-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_065248_875719_0D3F693C X-CRM114-Status: GOOD ( 13.15 ) 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org 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 - ALDO1 as AVDD supply - DLDO3 as DOVDD supply - ELDO3 as DVDD supply - PE14 gpio for reset pin - PE15 gpio for powerdown pin Signed-off-by: Jagan Teki --- Changes for v2: - use node name as i2c instead of i2c-csi - drop i2c gpio pin documentation - drop unneeded address, size properties .../allwinner/sun50i-a64-amarula-relic.dts | 50 +++++++++++++++++++ 1 file changed, 50 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 bd31a4385bc1..7bb1d93f5e65 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 { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; + 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 = <®_aldo1>; + DOVDD-supply = <®_dldo3>; + 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,21 @@ }; }; +&csi { + status = "okay"; + + port { + 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"; };