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: 229 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8012C40B04 for ; Thu, 18 Apr 2019 10:38:27 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id e14sf697636pgg.12 for ; Thu, 18 Apr 2019 01:38:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1555576706; cv=pass; d=google.com; s=arc-20160816; b=A+vqeN/n3ZuKj3rnMb7Hia84QLvDzuGhsXWk89o8Jp5UjNuMwYXw++NTZxDqXJ5R1f NJpxeV6Iq25b/icqlPbPo7mMU+1wR422JX7tW1y54MH6ND85H60jPKox5L8jJ7c4O9qz 939qKWO1moJJ6+iTSHma56iJigBwaxT7lw2zDlYHGdHAP8gvXdYYTPpDKc8ieDZgW9A9 pr8qvEimTOXd0Ky0A69lGxvUKFjAfZ+aPgYAr3cCVhLB7CFDVyvHCL0j5Dv21MfVyuUJ jyAEUo4qZ93PdbxAFAO/ICg9wPREK82n9jeOZMGRr8oxVINs8jf93ks3cnfI/0h8vJmK aH6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hwyaFRDCn57BsuZG8enPdnOOhBplr4YEkEnQ2B+v7aE=; b=kyO20h3d3PR5TjbCFmFYcPSqdwaykkKa9wLwPRmphgweT6tpo2dbbMZH9PqcVLHunt 5uCh0hGam7gJ1NLZ1hPGH3A/MkTWuvVB5/LcV5oU7wi0jhitf7Bgd2lw91FOXUqAPTPU tEGkNU9YSwY+EKTeSURlIqs+E8fdPwJYX9uNIm0fNlqHM8JKvGPQ7bAX0961IOhH9OeC tbTqfTeTb6iyAoisrGvEMAvvegk+ylXW9szf0j88wgqRM/juHEaplPXbFDoSXNbtIUr6 InmK9fbMJGWTEGStLN9Pkm78n1DJjKTpsWEBQokxyeno2ejXjZ9U/yGrRnunjxPxbu2/ pJwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dYp4PJHF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=hwyaFRDCn57BsuZG8enPdnOOhBplr4YEkEnQ2B+v7aE=; b=FoevQeBwx97b5grqq1qTS8NFCXUkYMzQgydVOIwk4qZrPzca9BUdl779Xv8moGrX4o pOqCVdkKju7JfMQjP+c4XYIw0n1xVgkP3xr4owg1otAPGNkbcAfMfc82Q9tX44ToE/mm WrDEWAGviAgJHFtdR7CxpOcHKIhhZVmRr5OEg= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=hwyaFRDCn57BsuZG8enPdnOOhBplr4YEkEnQ2B+v7aE=; b=JXGD9hnZFi4T6tzT1Yn22Q8GQGs+HSM3aeuTGpiwoWZQHpgqELLudnvSU2DCfZLSqt kZHGL1j2iCKU0S2b5IJV3hg2+i+q8IsVk3Q+vIzcNb1xPtc9qByDMbtW9F3D31/2LL+X 154wEr8Oj3IYqiVWjpPpC4gYnVv0ridQp910OIuS10LNUnunnaV8qJ/UAAMaet3cQ8WN uzvTxnTCQCiCRUGTSKzGYGoH7vSjbeDyv8XlTmZA2IznS3LHJlpA8ThUyrBvx77PB9lN PzYs9Q6gfYJDr/5lGn6Cl+BVgYw+TJe+Z9qDxBPq+kcE5fMYgb2hbVV/6uKeePy5GZjI wEtQ== X-Gm-Message-State: APjAAAVyx6SRwlaA6ONxPKLDmiEhYIx1dKQqOoYXHg1VZWNuSzeUCdHY f0Qa+W6hir9HdPGYobsjEVS2F6CX X-Google-Smtp-Source: APXvYqzuBZEDX+ikmYlItSypYTKBMcEvpsoZDmy5mFQK4Eyyhx647xYBLnMzbYQSkrquVB5XKTcZDg== X-Received: by 2002:a17:902:4381:: with SMTP id j1mr29984551pld.173.1555576706301; Thu, 18 Apr 2019 01:38:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:d605:: with SMTP id q5ls439405pgg.6.gmail; Thu, 18 Apr 2019 01:38:25 -0700 (PDT) X-Received: by 2002:a65:6645:: with SMTP id z5mr62936905pgv.251.1555576705866; Thu, 18 Apr 2019 01:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555576705; cv=none; d=google.com; s=arc-20160816; b=lc3R8jn51BQzZyfiCf6deRV+kxnTSA9rJm8/1UhpmhtW63QpZylGFI3LK/wG3+K0iT XGqO6N4Ntbys+lSJgLvbgLr7rTgaIzhJ5N8Bne+jyaMywmz/J2uufGIMks6iMq6nBkSq iiiU8J0xmBO2hO7/QuCE1E8JIYSvvuYw0ijAs4bS6992A4qCh2w3xJVO5nEhomQy+3+w THX3xB2St1km3m4hAS0wItrdZRG7egsOm9lnygT1aCvxAH5LHzU/IRID0KDCDwYRWQM0 KzB8komYbE5uZ8CXxdeygT9dgAm+F5yB2VjbvsRmX+YklEoNT+7H8anjsNz/GkvCJ1ed OKDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=2J/G+YDKHjKA1qZqXV86pFjVgW4CG2JHv9U1E6Kr4M0=; b=YpQkxPpdY9IXFnZ9G/NEArIgGkav21Dfm6hc7jxC1HIEW5tMvdX2Hz+PCo4z+Q4eoh aQLulwBcp6nFBghfT7t1GJjQamXXqPtqLi1rVXTLXmAmm08dOANdRag1cK8lOgmT493S LlF0zESLGWryXg0GBPdQEOLClruUeaZ4+EsGcMnpiMqdJcXd1fuO9d3WPnejonFoO+6l xbqaJQVu8fvVrc3HxJlWB/CLpwx6tnI00NxNqaL558ZUJVT0gj8j4KGrjtifP0rpluG8 NTMFn6AcKEcDRDvRVHUDx4fkfJ7LnCMLqb+bVb+ZTnSzm7BQG2XcoikvQMRpD/W/lmDK yb4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dYp4PJHF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c14sor1443275pfc.71.2019.04.18.01.38.25 for (Google Transport Security); Thu, 18 Apr 2019 01:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Michael Trimarchi , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dYp4PJHF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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"; };