From patchwork Thu Apr 18 08:38:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10906641 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 A9A39922 for ; Thu, 18 Apr 2019 08:38:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E9432811E for ; Thu, 18 Apr 2019 08:38:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 824AC28899; Thu, 18 Apr 2019 08:38:31 +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 27D9F28852 for ; Thu, 18 Apr 2019 08:38:30 +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=u6r6Gx4nGEfdIUJtHdxpzn554OMKxOjMT4UyKRleRUM=; b=lvEYJWMg4PxXhI 5y/++eeRvI1YT2Kn7CG0GnPIBpJiCpotpENusGEQLRdO+nWZVFZ1eyzbOtL2NwTrLENlL114lXnDJ L8YpA3klwUjUND/+llxxuMPmRIn+75wnjYh00GEyJCC+tmsgh6UwRs8IbP9yCH6eQI9b2xiuLTB8O KbFrpvOUGgJH/zmWxeWAu6eBuw+PnGa5IBDaYbkjap44qxnjWQ32E/d6QPxsZS8QlLAMg4ru4I9q5 3MHvmqIRIv6EOHif/xjPaj0c91/x8CEqaSffIHRo07pOEFEFKfoJRc9s7Ji2+Bbbey9rfPOk2USaC Y/+00QfbcLoOlPxHomyg==; 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 1hH2Ys-0003e8-Hz; Thu, 18 Apr 2019 08:38:26 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH2Yp-0003di-E3 for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 08:38:24 +0000 Received: by mail-pl1-x644.google.com with SMTP id a96so833537pla.6 for ; Thu, 18 Apr 2019 01:38:22 -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=bVH6oZEWqWRwSE0/zky4AIHwuUMb+EYBfI1m7D47hvA=; b=d+kP4iGnPPsJH195CFKmLzM/4aHciSX+va5RvQIVQVtXjqO++AB09jw33FL1P6C1d7 QvPHwGkGLQC3l571Bij0IfETek07nkzlBPn8nUyn1TTJFIZ77H925APPNFEy77dY1muG WoONfCG3bkLhFBJZNRKpJd+Dj17jfcSCnu4gQ= 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=bVH6oZEWqWRwSE0/zky4AIHwuUMb+EYBfI1m7D47hvA=; b=M6VOqRnOEojNh2G++Q4gpNYdN9LZ3MhdCtGBByzULobtmd5rbsGpTZlncfMu11gTSw f+ndmovTxqi0onO7RtkbWcdZ63iEyCTGaKQ8KcY4gsVdkNBk3AxQ1YbwGbYL9LRpgqDU Fv3z9JmpnfaWsLGX0F1N+gSPp5mskpQxc5Mrxdm81Le6bcnT97pd5rgTRrLGRPtZHwoq tL4eYB8fqitSew+V69LiGpxDnyQaT26Qn6MQ/p/8z2w4JyCNXxRQY8DXstvZC3lwkpdT jpVThyP29Q80B93fR9cSoLp+UNEweVC6snP0dLIPdp9tUIY0YpZ1lw2w5eXmi2nKvVjR R5bQ== X-Gm-Message-State: APjAAAWWGBu7otK6mTFY+4B6muHwOpvhs46teziuiqq6OVKeiNB+qrYw d4eDoGNhinnK7ONsksX4xE6irw== X-Google-Smtp-Source: APXvYqxrA8AME7NKdzH/AFx+LJOTNrvdS7kT+oO5o/hApSLzlsh7JT2vIk+7hbp0s1EQqTigyEzXHg== X-Received: by 2002:a17:902:b58e:: with SMTP id a14mr64799527pls.44.1555576702113; Thu, 18 Apr 2019 01:38:22 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id o81sm2075917pfa.156.2019.04.18.01.38.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 01:38:21 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH 1/2] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Date: Thu, 18 Apr 2019 14:08:12 +0530 Message-Id: <20190418083813.11776-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_013823_469011_9FCB7928 X-CRM114-Status: GOOD ( 11.40 ) 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 --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 6f27eb082429..6f4e00ec9c68 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -597,6 +597,11 @@ function = "csi"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi"; + }; + i2c0_pins: i2c0-pins { pins = "PH0", "PH1"; function = "i2c0"; From patchwork Thu Apr 18 08:38:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10906643 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 E8C7D14DB for ; Thu, 18 Apr 2019 08:38:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE1582811E for ; Thu, 18 Apr 2019 08:38:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1A9928852; Thu, 18 Apr 2019 08:38:38 +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 657FD2811E for ; Thu, 18 Apr 2019 08:38:38 +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=8GjzNBS5cCkVUqg8/UdUNnyPc/G4Bu1AY4RJV0qN+eU=; b=GXkmLnGazDPKYk ik+VxX+sQapaDIolJQYL3/+IgK3TSgZUS9708Bo5sV8/6SVOuJdlYvFH1unRNNgNw9GCHyju9IkxV Wz3Zn1bPaEeyWJyNkpiO9oxbrs7OEGjoFZKuP48M/hWwM8a1kv51rEhmFF+tlKJLRm3TxTV3OSqz1 pv3Ik9K9TTCsp7tZLhp3pxjw03fnuyQRqLnTgc+h9NYA87s/WqxiDiSiM+TXbO8MUEwAI7AxNip/9 I9KTXKFvHeK+MP7xezJcxhHMxKaUjv0crHDyedizz4V1QEt7ThA9grnoPyUgKW3E6yq1VsrEbXKO9 PceGWsu+6wusWvdVbQxA==; 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 1hH2Z2-0003qZ-TH; Thu, 18 Apr 2019 08:38:36 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH2Ys-0003e7-BX for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 08:38:29 +0000 Received: by mail-pg1-x543.google.com with SMTP id y3so851092pgk.12 for ; Thu, 18 Apr 2019 01:38:26 -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=2J/G+YDKHjKA1qZqXV86pFjVgW4CG2JHv9U1E6Kr4M0=; b=dYp4PJHFMRhFBebveYpeCkeKD0eK41MQ+C3YRUmi2sNi6wvWxgOe98/Pfme5KfDy8E RuUS/LawrPQ5mJAiDY7MWp3tA7zaxYGuYLpH/0ieumBHQh+F47gKmxkr2DsfA+xVr8+/ 1py7tPoQ2sOP+tFEtf/hysxGJ3R2+1+4waQ90= 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=2J/G+YDKHjKA1qZqXV86pFjVgW4CG2JHv9U1E6Kr4M0=; b=b2xqMj+ZldLzHKIsrfmOPg5Kwm9R0g2DZy6RbqY0zbKHO0587XCs35GIc7QVn+p1zg 3LPhJ++mmlpHTE24og038dSCrPA72/g4oqcEOFtr2cDcg3rvXyngFhcoyxmnocA37lym U5PO9QbEd4Q2pG/m6u+Dcsu4l6ncBFcb/wUZ/lY1dwl7ySPL2SOwq2DWlWbH8FumtpxS bwwWHfoZqQrTOKYs1lDMDy4X24XqTM8kOxAM5Smwr420e1hJKqon+/iUt0k7dU6M+Ln1 CKqpUaNuQVqZim2SBHTGIAELo+om89nP8j5leLzVP/c2gPAOYzA+N/BB6GjPPVbCzYXs RIAQ== X-Gm-Message-State: APjAAAVufQFejjEsBUIlF0zuiC8DJFcVuz4wwqDarKSzrkfa6X7+bjVv mCAEAjcAGpD/ftl5SqyjyUO6WQ== X-Google-Smtp-Source: APXvYqxLl5V7JjefPrMtRmYWVdlUNTFgdCy3NBRjDuiu2oYoLWBgewKgjk1fj86ZTdglY6PO/s90rw== X-Received: by 2002:a62:62c3:: with SMTP id w186mr62368274pfb.73.1555576705545; Thu, 18 Apr 2019 01:38:25 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id o81sm2075917pfa.156.2019.04.18.01.38.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 01:38:24 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH 2/2] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Date: Thu, 18 Apr 2019 14:08:13 +0530 Message-Id: <20190418083813.11776-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190418083813.11776-1-jagan@amarulasolutions.com> References: <20190418083813.11776-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_013826_527886_9FFDDA55 X-CRM114-Status: GOOD ( 13.11 ) 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 --- .../allwinner/sun50i-a64-amarula-relic.dts | 53 +++++++++++++++++++ 1 file changed, 53 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 3819ce396073..56c76b712e3b 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>; /* CSI-SDA: PE13 */ + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI-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 = <®_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,24 @@ }; }; +&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 */ + }; + }; +}; + &ehci0 { status = "okay"; };