From patchwork Thu Jan 24 18:07: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: 10779821 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 697BA13B5 for ; Thu, 24 Jan 2019 18:08:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9B0325C3 for ; Thu, 24 Jan 2019 18:08:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CCBD32629; Thu, 24 Jan 2019 18:08:41 +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 0405D325C3 for ; Thu, 24 Jan 2019 18:08:40 +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=iJkVrAbakoBZGYa4GZGoYhzeVjlFTZAjchsV3RPdVfw=; b=qoB7aFZOk3r/o3 BTWiNbK7ylU229vZwkbmjNHaNhoS5PTw/nYnnM/Rlp42Vtt3S4K/rB6KFBn1tYMc/X/5Z1pzmRJsN Flej3iIG+AkjSYC3FHeJ6e5QCJyRFenm5WcUvr+DlHcu1eOBGh1KqstV1zSRB6n7qqLGgJV6xcE0S irqewcl89b/fjJfswW3sXlPXYJl9AYV+Nw+GR3zmI582WX6ZXF7rwujlU23NitFkIOOcI3mUd5xRE ctrFfMUJ2u4X/8LMWfvrU4nJGoCBef8TOhgS723FIkXyxoJHhv2Cr+iiIuVU0ooWAsuI7596tVj8P r75t7r8KTG0ThPo6XrGA==; 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 1gmjQb-00022z-0p; Thu, 24 Jan 2019 18:08:37 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmjQM-0001oE-Sl for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2019 18:08:26 +0000 Received: by mail-pl1-x643.google.com with SMTP id b5so3241982plr.4 for ; Thu, 24 Jan 2019 10:08:22 -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=wXbv4EStlt/WSU+EIZH0OlN5Zo9WGSHjVKnuaGSJ7JI=; b=RXlY0lhBeHHAfn1ZoEusdajsMhzMKtu8DlU+tEnR82ZIZCqeXz6LcVt1IHozsnbtKp afu/I4bhUGnXxfMDmRxvGmplqN8cQw6gBwXY3YE9GMDpdT11tVyftqCsYuE3CLzia+wK JGevvUAuOr8KTHXi/HWznqW37CXxuwGWLsdCE= 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=wXbv4EStlt/WSU+EIZH0OlN5Zo9WGSHjVKnuaGSJ7JI=; b=PpJascZcFin2t8NSoUpVpRa7dSoW+st9juaAc40rkxxSRQTUlepv1knUN0M8zsXIit MSQfJoMK2xsDtxnv3VosnKz7JQBXQfoQsNxuCZqEAoK8UPoLEbzbKbQAxdbFKzgTa+Bk pu4Wwr1VJQ2Q9CA7z/+P7GmEZyac47xAuOVRirz469BPuI9M//rCCTpnww3pUnAiVsxM 4PxFWA2owPHYXjjPC54teuMDWVr7ay8e0hbzWMb2ryxlv3itRkARoHdusRePOatOeg1d MkXHlSZiHfiW9rtyEkjDEJS9xiSjzywP7+RIedT9x2SX5M7YpPMGRBIBZDxwCw2vokAP uFeg== X-Gm-Message-State: AJcUukcvK1ZGAh+aMv13ymmiGt+gI99IrTLDBso82MFFzhgtCoCJYiLS c0Wn36sy+aSBW4xH+QtUhSewGw== X-Google-Smtp-Source: ALg8bN5bdO/M10wWvWnvl5qVQWRmF2XjjMq2zxObQuRH7GwYHUUTnLpTB1Sr481ExOEyNaw7/hrmqw== X-Received: by 2002:a17:902:654a:: with SMTP id d10mr7393226pln.324.1548353302040; Thu, 24 Jan 2019 10:08:22 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id k15sm36141551pfb.147.2019.01.24.10.08.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 10:08:21 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v7 1/5] dt-bindings: media: sun6i: Add A64 CSI compatible Date: Thu, 24 Jan 2019 23:37:32 +0530 Message-Id: <20190124180736.28408-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124180736.28408-1-jagan@amarulasolutions.com> References: <20190124180736.28408-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_100823_317008_7924D05F X-CRM114-Status: GOOD ( 12.19 ) 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, linux-sunxi@googlegroups.com, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 Allwinner A64 CSI is a single channel time-multiplexed BT.656 protocol interface. Add separate compatible string for A64 since it require explicit change in sun6i_csi driver to update default CSI_SCLK rate. Reviewed-by: Rob Herring Signed-off-by: Jagan Teki Acked-by: Maxime Ripard --- Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/sun6i-csi.txt b/Documentation/devicetree/bindings/media/sun6i-csi.txt index cc37cf7fd051..0dd540bb03db 100644 --- a/Documentation/devicetree/bindings/media/sun6i-csi.txt +++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt @@ -8,6 +8,7 @@ Required properties: * "allwinner,sun6i-a31-csi" * "allwinner,sun8i-h3-csi" * "allwinner,sun8i-v3s-csi" + * "allwinner,sun50i-a64-csi" - reg: base address and size of the memory-mapped region. - interrupts: interrupt associated to this IP - clocks: phandles to the clocks feeding the CSI From patchwork Thu Jan 24 18:07:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10779827 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 3837613BF for ; Thu, 24 Jan 2019 18:08:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28AAE295B7 for ; Thu, 24 Jan 2019 18:08:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ACA928737; Thu, 24 Jan 2019 18:08: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=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 A756830621 for ; Thu, 24 Jan 2019 18:08: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: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=MMt0OhqKOtRofYG/RLGcfKhQHpwjThwW6ffwpI80na4=; b=N7xZUojj7RXhmA EpJfyV9k+CqPVbW2y7R+FsAF+gTtDlnHQrmdB0OtQoFBUVWf7x/8dmam9C6QjOdBn3bFjcE8Auuay qWaclhrgJMMTfoF95ra+NkyvIjTPOfT4PzX4PHY8+mS9yS1f6raqzIpiAycMMxm0nOjxVUkZnysj1 VYlhC9ixUG0RczeKybzvgLdY9yazOpctoLzf2N98zOOLhN/fw99jUVQ8NWDGlG0wplQnDIrXnFveB cWTnYn0vwjm4Rrwe79g8WMuQ6M+uNuouB6GTrxmdydfwM3HtHfYgrXhktodbosu66dTj0gKdxZXsF S8775uF2oIiomZerXbaA==; 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 1gmjQp-0002GM-2H; Thu, 24 Jan 2019 18:08:51 +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 1gmjQS-0001uv-Pe for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2019 18:08:34 +0000 Received: by mail-pl1-x644.google.com with SMTP id w4so3257364plz.1 for ; Thu, 24 Jan 2019 10:08:28 -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=UF0ie0AFcUOJKnp5dQnoc9GbuzcXmNAC6ctNdvT/vFI=; b=NDnnVVg9N0w5j1eh1QJCTCPhT7lwbq9Ao11qqMbunE5BM5940dxN0lbptZCCdXzKU5 Z+Fkc6FcGLYcT/+cPt7sbICMX5UtfFR5j+Ie4Sdx+0YKgPE4+2fyzU8QTKl9ZDNFYbZZ wNgxqaNhvZdfWWIGu16fr+eEZkIyMttuBGx+w= 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=UF0ie0AFcUOJKnp5dQnoc9GbuzcXmNAC6ctNdvT/vFI=; b=d2QxT9lQwRBfcbh8y6rWLg3R3CGM1DnsL/0YTc4b+StuRNg+i6i1QAI+3RoQM5mwKL vr0A5U75I+b2BZVuC1FpxIahEWXGKyt6+MD56TLutRO/Nes5pLReEi3vMHODSAWpz4jY cNW6OnwFiQReG1fjgeqF0AerdCJskrFW2M8k1WiXl4Mu0H7uf5WTNu/MqJMKKOEOC0r7 26IGe8NF/dcHHrSJOKXrzimkHlBmb4RhwOfokNMTbxx4L1z69UQOxnFuQJNFH3aGPltO +DcGGF+LnHOlbD6FaBrRBeFnPwEYvB0wMvxKacE0JNNM0nfFYqIt1iUQcgQ8t4k8q6mF F7lA== X-Gm-Message-State: AJcUukdEJ/pQmEHStYMCuxtlNO8ZD3yJUZOMxXfx9PSL14RIpmxrvVUG HviZPisB/qHL6Pdtq9hFw/4sew== X-Google-Smtp-Source: ALg8bN6gvz0ooTP/Bgag/ZsaxzHTDVYxLlAJYp+VPyEO8INABlTb5oDJjjG601prTqUveq9BY1KhUA== X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr2332887plp.247.1548353308049; Thu, 24 Jan 2019 10:08:28 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id k15sm36141551pfb.147.2019.01.24.10.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 10:08:27 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v7 2/5] media: sun6i: Add A64 CSI block support Date: Thu, 24 Jan 2019 23:37:33 +0530 Message-Id: <20190124180736.28408-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124180736.28408-1-jagan@amarulasolutions.com> References: <20190124180736.28408-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_100829_534739_17E9C98E X-CRM114-Status: GOOD ( 15.88 ) 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, linux-sunxi@googlegroups.com, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 CSI block in Allwinner A64 has similar features as like in H3, but the default CSI_SCLK rate cannot work properly to drive the connected sensor interface. The tested mod cock rate is 300 MHz and BSP vfe media driver is also using the same rate. Unfortunately there is no valid information about clock rate in manual or any other sources except the BSP driver. so more faith on BSP code, because same has tested in mainline. So, add support for A64 CSI block by setting updated mod clock rate. Signed-off-by: Jagan Teki --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index ee882b66a5ea..cd2d33242c17 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -154,6 +155,7 @@ bool sun6i_csi_is_format_supported(struct sun6i_csi *csi, int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable) { struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); + struct device *dev = sdev->dev; struct regmap *regmap = sdev->regmap; int ret; @@ -161,15 +163,20 @@ int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable) regmap_update_bits(regmap, CSI_EN_REG, CSI_EN_CSI_EN, 0); clk_disable_unprepare(sdev->clk_ram); + if (of_device_is_compatible(dev->of_node, "allwinner,sun50i-a64-csi")) + clk_rate_exclusive_put(sdev->clk_mod); clk_disable_unprepare(sdev->clk_mod); reset_control_assert(sdev->rstc_bus); return 0; } + if (of_device_is_compatible(dev->of_node, "allwinner,sun50i-a64-csi")) + clk_set_rate_exclusive(sdev->clk_mod, 300000000); + ret = clk_prepare_enable(sdev->clk_mod); if (ret) { dev_err(sdev->dev, "Enable csi clk err %d\n", ret); - return ret; + goto clk_mod_put; } ret = clk_prepare_enable(sdev->clk_ram); @@ -192,6 +199,9 @@ int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable) clk_disable_unprepare(sdev->clk_ram); clk_mod_disable: clk_disable_unprepare(sdev->clk_mod); +clk_mod_put: + if (of_device_is_compatible(dev->of_node, "allwinner,sun50i-a64-csi")) + clk_rate_exclusive_put(sdev->clk_mod); return ret; } @@ -895,6 +905,7 @@ static const struct of_device_id sun6i_csi_of_match[] = { { .compatible = "allwinner,sun6i-a31-csi", }, { .compatible = "allwinner,sun8i-h3-csi", }, { .compatible = "allwinner,sun8i-v3s-csi", }, + { .compatible = "allwinner,sun50i-a64-csi", }, {}, }; MODULE_DEVICE_TABLE(of, sun6i_csi_of_match); From patchwork Thu Jan 24 18:07:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10779833 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 92E1613B5 for ; Thu, 24 Jan 2019 18:09:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D82F32794 for ; Thu, 24 Jan 2019 18:09:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 720793279A; Thu, 24 Jan 2019 18:09: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=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 1BDFB32794 for ; Thu, 24 Jan 2019 18:09: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=0ocEKRN0wPPfkLnCe2KQRw9FVXw9jmMOciu8q9+tAmQ=; b=tdUYdh4lI1NO4z p3sftN+8ztuWBpO2xxG/ME3sBPDLTHByFLF1SHM4BRfz770knPnIYnFmxYeekY7WYL00XtLQdVlZR gPBIFddGNqrfa5tLUNRnDNsBRUQ7hhsX+mJSx1TREUNVBhdZGgo8hy38cJieT48d5ukYCWCYspwV3 zizKh52Ht0qyquZBGb/2JsUP4RPt0boFrMdXwV/JPnoHtNa3p1RUsN9kASmqCyhaAVt68A1igInER p3DMb2aN2ce4D0BNmZwULm2v4ERLpneqnbrKV5Jlix96ghM+IETUVhlbJu4b8UPhWbOOES1+BqtdV lVKZqBkp8DP4CnG1mOGQ==; 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 1gmjRJ-0002cf-A9; Thu, 24 Jan 2019 18:09:21 +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 1gmjQY-00021H-GM for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2019 18:08:37 +0000 Received: by mail-pl1-x641.google.com with SMTP id z23so3256132plo.0 for ; Thu, 24 Jan 2019 10:08:34 -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=NEU2q7n4hfFLUiueQNI1eh+ct5ZyqUAqwbpoXVCvd3w=; b=DmmYfIN+j9ZEn9AycYhh+oQLaiMR+WzLL6ulCg8pbm+6zc5hWK3SnV745n8gpHX5yI aWXPeS9W76canA/iD6sWdIDGOidx4AoConbrLTc8kAA+Hzl+jPokuq1XeTTJqd7YQGri fwpq2odXSNDCmVn75UxdLTbuN3oliSA0ZYhYE= 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=NEU2q7n4hfFLUiueQNI1eh+ct5ZyqUAqwbpoXVCvd3w=; b=UGUcE9/1Y5dIgQanPe48WIBnzbZ93F8n6CkTgos+NliMg8Df1lTvKHs/TKymXZPDd1 Or08NM/EL6w0qe4a3YZKXkx5zSV1ANlpOFU4leaTMZo5zGWpxJfYbYbbs2eIbZH30ubw hzmQrkBKh+AN0mHeFlkANUOfR52vSmK66+ANu4rThFPr8CwJemMznydNx+lqkySD/ArF 8WuqIPwokTQkSupfdweOs6QmghqBqVUddJLbN2j9Zt7No7f1JQw1RSQBwLHpy9Z435i/ Bkr8IaT5iTd5O97le5PPEJvQh6Q0OjZpIRDQqsphSGPfplwfvXeZQ/DBrLRaPpE3yOQp 8LKg== X-Gm-Message-State: AJcUukeiJY9E9WHfgpMUPee1W4RfwqAG+LHxIH7QTtb7SkcQOrWByLgg zW8UT/DHx84GrnGKAo2zbFIH9g== X-Google-Smtp-Source: ALg8bN5m1LCpFgDwm/rki6V7Cb60EEp+UcVRffG3MI8h8p1Nqbwy+jaBiydaG6pEp2rSv+/zh5ZrEw== X-Received: by 2002:a17:902:e08b:: with SMTP id cb11mr7603740plb.263.1548353313969; Thu, 24 Jan 2019 10:08:33 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id k15sm36141551pfb.147.2019.01.24.10.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 10:08:33 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v7 3/5] arm64: dts: allwinner: a64: Add A64 CSI controller Date: Thu, 24 Jan 2019 23:37:34 +0530 Message-Id: <20190124180736.28408-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124180736.28408-1-jagan@amarulasolutions.com> References: <20190124180736.28408-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_100834_704497_4389A57E X-CRM114-Status: GOOD ( 12.12 ) 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, linux-sunxi@googlegroups.com, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 Add dts node details for Allwinner A64 CSI controller. A64 CSI has similar features as like in H3, but the CSI_SCLK need to update it to 300MHz than default clock rate. Signed-off-by: Jagan Teki Acked-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 839b2ae88583..62fdf850e9e5 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -558,6 +558,12 @@ interrupt-controller; #interrupt-cells = <3>; + csi_pins: csi-pins { + pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6", + "PE7", "PE8", "PE9", "PE10", "PE11"; + function = "csi"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; @@ -925,6 +931,20 @@ status = "disabled"; }; + csi: csi@1cb0000 { + compatible = "allwinner,sun50i-a64-csi"; + reg = <0x01cb0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI_SCLK>, + <&ccu CLK_DRAM_CSI>; + clock-names = "bus", "mod", "ram"; + resets = <&ccu RST_BUS_CSI>; + pinctrl-names = "default"; + pinctrl-0 = <&csi_pins>; + status = "disabled"; + }; + hdmi: hdmi@1ee0000 { compatible = "allwinner,sun50i-a64-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; From patchwork Thu Jan 24 18:07:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10779835 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 B2E0713B5 for ; Thu, 24 Jan 2019 18:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A58D63279A for ; Thu, 24 Jan 2019 18:09:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99E3F327A0; Thu, 24 Jan 2019 18:09:35 +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 400963279A for ; Thu, 24 Jan 2019 18:09:35 +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=uxmIcO2Zqvr+w9q2Cul4TFiYQ4o5+27jj++2z0/m9/c=; b=YtaT8EbVeZXfkD jsaoDPZWeItQd873RYNjCv7kO7mtcxu7NLYuiBmgFuZu5YSoDnL3bk3shRv+rdphjybQJAnkzBkLs 5lKl9ELSpLN6nE0n6hqj1881CN3EBbPKYJMcOMR3MDRw7qQxEzBUL3UycYCQtCcu41P4ImTzNxfhb dAv/jkrN1fJwamJW1SwbeWX+Vy1P4hhP0PfQYdmauGnFFoDtUZITGNC3lGER4ELDQ2EX1Fi/OneiE O4C1FP0ywQd/cAhiulQKlLcbwM/aZnM3Q755EY2JDPmcp9shrFNgalSPTBXFNX8HGp0K9EQlTQsfw lzH1/iwiRX/z3NwZpKDg==; 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 1gmjRU-0002lp-5L; Thu, 24 Jan 2019 18:09:32 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmjQd-00024x-R2 for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2019 18:08:44 +0000 Received: by mail-pf1-x444.google.com with SMTP id z9so3388474pfi.2 for ; Thu, 24 Jan 2019 10:08:39 -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=OOQ/q0ycl2Vhbvj/n8EVpYC4IVJK5DjscGBSfNzrl+U=; b=MBuene0c4uUHb8+Bp3wEZ/+UgAl0anWc87gdaXyJdhvM4FS9sjReofRVil356wMbpl FGat6d4s59SnIDRICsqYL5q5vXvAAbftKuj0X3zBOyfzBwcwp0KQonwmKcR5o+EaF8p4 dpv1LmS3LhFOt+SkdBFRY56ng6FSAQLripWP0= 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=OOQ/q0ycl2Vhbvj/n8EVpYC4IVJK5DjscGBSfNzrl+U=; b=YWhQjLvDxtMFeEXrksp1xWtqb+Me0JUc8ihtIe/TBkNUZVCXjp2t5FnEJzIEht6eYf 4v+sXSXkEtUZ4xXYXH/S5kv/JKUKg1AN6quBvBkrO4wgAbm+UUbokz+A2di0W+ZFHguq KN842lRtzfDRfU43WET27/QeXqYow1YKkLcxCzlJ3cLyXy7MeRIiNU8bb7VnmDAxZUf5 XvWn0wkaFQeSuMJoww9wG03XvuGIILCNaYMzcn/X+P52ceUtrIIFA3Tl1A2wHUTgwXrC fSRaj0u1YRsUBHcfyFoUiAB1ECI1QCpO6FLLQP8mrFmmty2PcBaZyFPJm97DNnFR6VXO UYJg== X-Gm-Message-State: AJcUukcIIv/lqFhE5kJIW44exCd3gSb+mLZ/FtHLLxpozLdyz/l+Vtc7 P0Q/JeV/OhngJxnaDqMCpHrQvA== X-Google-Smtp-Source: ALg8bN7CyOInddhg3QutLK5b0/l+R6UdRyH0k8FBbS2b83cE70Ch/dT/6+aBiIyPOJ3ccOjd2f/MqA== X-Received: by 2002:a62:32c4:: with SMTP id y187mr7758031pfy.195.1548353319192; Thu, 24 Jan 2019 10:08:39 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id k15sm36141551pfb.147.2019.01.24.10.08.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 10:08:38 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [PATCH v7 4/5] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Date: Thu, 24 Jan 2019 23:37:35 +0530 Message-Id: <20190124180736.28408-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124180736.28408-1-jagan@amarulasolutions.com> References: <20190124180736.28408-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_100840_410656_2227E7F8 X-CRM114-Status: GOOD ( 12.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, linux-sunxi@googlegroups.com, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 62fdf850e9e5..6e5a608f56f2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -564,6 +564,11 @@ function = "csi"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; From patchwork Thu Jan 24 18:07:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10779837 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 6A3A313BF for ; Thu, 24 Jan 2019 18:09:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C10C3279A for ; Thu, 24 Jan 2019 18:09:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FD57327A0; Thu, 24 Jan 2019 18:09:52 +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 DC7DA3279A for ; Thu, 24 Jan 2019 18:09:51 +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=aYkSDHwm50M0a1HXyYDZNkkQxVjUTfgUEVRy1cQ7zvU=; b=rRVIq5glwUceHm MNf8TRDz+9Uvoi/QdLCeRiWQun0S9j9fnSrwzVdSEKyZXHKsxxuGz01ANIJ/g5xckz+lPuuzLP/VK RjdYAPYv3YG/S1lOHudHp3byaQR01gIFloaNZ/eZPLEaGat9fMQc004SVq1qmTjdQHCSJgZv0KX7E 4DcLEWOUdEMoUzJYUNq7mT69JgBXXGynlex57cA/I7fZFWjMZLUewxttgXxATI8Ot74iEvcdzFKPa TxobBQi0hBKe2wZZoDyYVcMFyF0d+AnOLykv1Dw+VM7TzSKQ/mmkG+LJNczrOSD3wEOaUEETKndHs yvFmcXhLI0Ikmh/SD/oQ==; 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 1gmjRj-00031e-J1; Thu, 24 Jan 2019 18:09:47 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gmjQj-0002Ao-BK for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2019 18:08:54 +0000 Received: by mail-pg1-x541.google.com with SMTP id j10so3006071pga.1 for ; Thu, 24 Jan 2019 10:08:45 -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=4/D2cAWnRzrJOJe1TanX2r7wfgl9u+SIbHxZ8xAtowY=; b=Oj30xNCXACwjON7pD0Bgw7Au2iw7v1jMHRdbIy8hx7JhUUGjKhUIHiBQTlRwog6Z4C C1HAgPAPyVaU9BzW531tXzwC5Ti5lmsz47SYdloJMAFsTU+ecMUqXtTMQO81izpEjXYy cbUm/mbqwjj9KilvecdtOlCRc3RJ+N42M+j7w= 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=4/D2cAWnRzrJOJe1TanX2r7wfgl9u+SIbHxZ8xAtowY=; b=lkQwqj1gud9egokQMkkgr4eexI1HZEtYvq43AZguigsm7ILdQkt/P86ST1W+9tM/AI U/m1zNKkDJlh73CvcKBwyV/BlCrrtrWdYMZuziL+uVjdG+WrBTTfq6z5NPTuATb+Oe75 wFYBLP++GC/l6w4k598w0bJ4aKMnrlnZWchGkz6Q+DA/Vr6rvV/Bo7/0YvSaGi1ILj3R iBolziquREZu3Ldw6zjw1AGT6TnrwX0E1H6QbJK2fyYTVaIaZMZ/1Pzz0ynqWG1YSQo3 FpNu04ww9tcb+ZUpI0Z/ueyP1Od4Bvto0TS+iXKI3ZnKtSxM7d9sAi8lQ6t+LNh7wVOJ k/Ug== X-Gm-Message-State: AJcUukfCtjPABUaTVFaxCkFiiAvQSgFXc1xaVj5sy5bSSraPjFA6Jgi1 qoYOvMB4N/bDaVlXw65yUTtsnw== X-Google-Smtp-Source: ALg8bN6jX3zIxrphpAJdpuzJfSXAW87U5y3pOGjqqs4aZnsi2ozeVQfCI4IQpvET60uLq/1DQdj/fA== X-Received: by 2002:a63:2054:: with SMTP id r20mr6808062pgm.328.1548353324624; Thu, 24 Jan 2019 10:08:44 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id k15sm36141551pfb.147.2019.01.24.10.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 10:08:43 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland Subject: [DO NOT MERGE] [PATCH v7 5/5] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Thu, 24 Jan 2019 23:37:36 +0530 Message-Id: <20190124180736.28408-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124180736.28408-1-jagan@amarulasolutions.com> References: <20190124180736.28408-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190124_100845_883074_49D6EDB0 X-CRM114-Status: GOOD ( 13.33 ) 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, linux-sunxi@googlegroups.com, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 Bananapi M64 comes with an optional sensor based on the ov5640, 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 AVDD supply - ALDO1 as DOVDD supply - ELDO3 as DVDD supply - PE16 gpio for reset pin - PE17 gpio for powerdown pin Signed-off-by: Jagan Teki --- .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts index 9d0afd7d50ec..c99f66271287 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts @@ -60,6 +60,41 @@ stdout-path = "serial0:115200n8"; }; + i2c-csi { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* CSI0-SDA: PE13 */ + scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI0-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 = <®_dldo3>; + DOVDD-supply = <®_aldo1>; + DVDD-supply = <®_eldo3>; + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* CSI0-RST: PE16 */ + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* CSI0-PWDN: PE17 */ + + 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 */ + }; + }; + }; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -108,6 +143,24 @@ status = "okay"; }; +&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 */ + }; + }; +}; + &dai { status = "okay"; }; @@ -298,6 +351,12 @@ regulator-name = "vcc-wifi"; }; +®_dldo3 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "avdd-csi"; +}; + ®_dldo4 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; @@ -315,6 +374,12 @@ regulator-name = "cpvdd"; }; +®_eldo3 { + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "dvdd-csi"; +}; + ®_fldo1 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>;