From patchwork Mon Dec 10 11:52:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 71 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id E4FEB2E540B for ; Mon, 10 Dec 2018 12:53:40 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id l1sf3420054wrn.3 for ; Mon, 10 Dec 2018 03:53:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544442820; cv=pass; d=google.com; s=arc-20160816; b=NK4sYk/P1/4SKbUL2aGGai0zvMbheICi7R69J/sbBgRVs7i1uyNipgl2oRwBqg1Ub6 6hHwvtUISRYOEDNuhCJLq3KmuuYg1XWYaBDx5HK9FhG8FCu/ZEjzLpNkR51fNNVhYxzs 0zb0q16RAONCp/YcTR5A4M5nO+qOfW8xAEingFx0jzjtIxFp5LDoCjKnybjetjcb01ZD MiIx2lKof04jhlL/7lP/4q0cECU68Ez8QJ5nHbD8hTuLg+fu4pHUaLg3nAi2U5pv/WUg pG8DOAXkFrZqUE9dOmeUVlLFUjIky7iityedjJvDEgaEJgOgfJAC3Ls6kJGKDnVbr29t Cn3w== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xKc4rpirIDSNGgBaxIhfJAOtD80I9o5vCC89+wiWkHs=; b=Mt0X6QPre0pYxT9Zcgk3gGw3xuDkmkoWLugbFpVPVLacy1w6SVnsKKiM6NZCfyhO/U u4Do0ZQxXOMo+gRH+IAfkKQ1V1lmfCWOAwy25qBex4Mw/embHH6DkaqDS7gQFAhu67MF Ukf7IimikPKLGyDlztVJU9tumTLAjW0J0fEy+B0ra3TJVjFJ5bUjtQxMT83wKY6Sgd1A xfOYxdqKfNnJIrulsTUjP65CPc1NibLWzz2c+WS3y/phQJx6GjmLZ16MUalRPbf9UOxN TxDj3/Yo26b8ELGLZc7tLM/Iw7ODPgMKlXHuX1/L8eJSF1574rmeM3MxPdbGIISXQFdo n6TA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=n0lVMIhf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 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:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=xKc4rpirIDSNGgBaxIhfJAOtD80I9o5vCC89+wiWkHs=; b=fsIQZVZZsxPxu3Egnou1zO9ptGswluYrcQFm1yS74iWmnIcGB88GMAjqoF9OwAodpg kWAdcqZe+Sb27F5QnlKVaj0ITsNrfmXlQn1MOjjMBb3rB16WJxIikVgUo+Ibq9OU1NLz 3rW9KHObT0GiRXxY+Eb8Mg8eBQZwjg3MX2+5Y= 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: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=xKc4rpirIDSNGgBaxIhfJAOtD80I9o5vCC89+wiWkHs=; b=AS+lE1fDxMf5L4kUcix44rhJkGbuhJMx+gGpq7jvrVqLxXBlQZmkzfuedoWp7sr+oi OObSTYUInezf6803V/QrQriIlQM2mMaAW+i27ot+uPoRYzPpsI6pYUnAprBl//7TVieM fQZ/cPZXGUEOIlqqyu4otyCI16AfjJp5OIYG3HOAwg7JCHz5PrFq9xJ4Wjout8m0UhJp me30B1LYOIJkOCAbBK5cpjw2Vpn84YDRp7jbDsM7MEaxBdDwAUXaek0hbWHA6KjTAPu6 tGtQu88j3EtfPSjXry26hVkRmOqXo+P/bEV1E5S9GHIwehd+5uuFh9aHToOLayJfsrx0 A0CQ== X-Gm-Message-State: AA+aEWa+2Wj0VzWRAKDRUfQ6E6Lod6pUxbo6CeHq6RdhTqCBRF5uKHyA zdOW8IXO54Wr2YtBB4XC2gya+Frj X-Google-Smtp-Source: AFSGD/XXCl6wnCfna1q4AGcFC0HiwvXg1Rw2e9CtmfKWmt0MAJPSh9ul1+WZow4A5HdLgcJ5lDTAAA== X-Received: by 2002:a1c:aa47:: with SMTP id t68mr1186158wme.6.1544442820598; Mon, 10 Dec 2018 03:53:40 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:c7cc:: with SMTP id x195ls1591191wmf.4.canary-gmail; Mon, 10 Dec 2018 03:53:40 -0800 (PST) X-Received: by 2002:a1c:709:: with SMTP id 9mr10301784wmh.39.1544442820210; Mon, 10 Dec 2018 03:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544442820; cv=none; d=google.com; s=arc-20160816; b=q71KqRwK2l02erwVmvuAxEOKZnrZvA2Lq8sfqcK+w8nrZDz4ATKPTSueYHSnXeBHc/ 5N0SGPdVVJ5dOErSHu93EP9toMqFGWOfNMD//GHqRtZAeYNbIlPcPAhfsC7rdEPgqNgF U2LG0HM7qY2MNDAbdx4Qqe5vNxYFOgRZxzEGHlFADTfe40IH7AVyQhOCxXHp+cU0qfGQ y5PfmKgGgAP5TtK/wBREUxY4hNOsjDZM5B9JQXmDqOmHDGvK51jQdZ+tnSbWKBmJMk/z U7Cz/byv5KJ8FMgYN26XIEOEdalVkCKx28HpXhURMJSHnbxaBv0PhvrPgomfEG/AO8rP u4UQ== 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=xKc4rpirIDSNGgBaxIhfJAOtD80I9o5vCC89+wiWkHs=; b=AFXfBIdLIexJe0kx7hSK4YyO6G5G/rVkHIKxAKKcj0I8SZNSS9e+8h6JvjlLYWh3Yp 8bEd+fRpC5nJevNW7p+b3N6Q1ao6VG6ZzG1pH1sHY+ZOXPhY7fPAnDDu+vTyU0cQXzZO s7jC1B+esz7AJDixcmHeDEfPtdkWcPGZpps+VOWK1Xzh9CLxtIEgC1omOgzhiLqHGUkZ o/Pz7qwgfCOeEvRnKWYXyCMspTX6m/gxpAnJgIRyvNlyYAb3PTs2+TSrrx89RgrDTP1d qZchmLKs3rJtQkevmeyrczsgJjRvQnS+t4f9idnKS+8rGfb4tnMj9ZLHSt+FrDrmO1e/ LXaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=n0lVMIhf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 140sor7508961wme.14.2018.12.10.03.53.40 for (Google Transport Security); Mon, 10 Dec 2018 03:53:40 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a1c:d912:: with SMTP id q18mr10093519wmg.122.1544442819830; Mon, 10 Dec 2018 03:53:39 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b16sm7869243wrm.41.2018.12.10.03.53.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 03:53:38 -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 v3 6/6] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Date: Mon, 10 Dec 2018 17:22:46 +0530 Message-Id: <20181210115246.8188-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210115246.8188-1-jagan@amarulasolutions.com> References: <20181210115246.8188-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=n0lVMIhf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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 6cb2b7f0c817..ea6286ce5de3 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"; };