From patchwork Tue Dec 18 11:33:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735463 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 9753E6C5 for ; Tue, 18 Dec 2018 11:33:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 885202A587 for ; Tue, 18 Dec 2018 11:33:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C5B22A5B7; Tue, 18 Dec 2018 11:33: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30C7D2A587 for ; Tue, 18 Dec 2018 11:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726505AbeLRLde (ORCPT ); Tue, 18 Dec 2018 06:33:34 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36648 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbeLRLdc (ORCPT ); Tue, 18 Dec 2018 06:33:32 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so2138184wmc.1 for ; Tue, 18 Dec 2018 03:33:31 -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=ZapPYlIqc/7JT1Q5imj9U3QTNGIiDsJ7a7DsWZJZ2Hcs2cB0R9eOq48HVil4QgptVd GDSlCZq2QLY9GaLyYMIYLAH6EOsHeVL39GGofN0eMRIkgNyl9nljxtCVN2Lv/8zZxJPo O86zYTeOSy2b8t8xwJqKC8CqGJNYYaN3MOfNY= 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=IGQ0T0hTprVJNCK57B/BTAa8bYK4XDnprUZT1WsGThji8LO4sgSdEeyen6wUbqmTkr 2BeBkEU0ZYk92cgnGK9DDLLzGyisdD5MPPbvs4LRA/LJe9+Dj6s0DO9bV6sly7ymJLcO 3HHwD4U3J+xI+YarutJ+QN5n7F6EAqIRWlNuQ/lQjoKIUts8fmmDxXUT72eCf7JOQ5xx JvivXjVg7KNWsf1ugJCCBa3mc4KWf92N0s3sBD106GGDu8UNC53yrVAmD3yLRB/z3czU o0zTBcBjpvOq+Xk9TiHAOFFm6vWIm4YVpeJo11UyW7bzOXi9l00K2dx+xjHux+YMxgL9 zwLA== X-Gm-Message-State: AA+aEWaTMRARuOORobFOgn6T89qEFYZyrptDPt4oiWFFeHggIH2IaWrh sSar8+9Oy5Yg1YtlYzuCYdC6Zg== X-Google-Smtp-Source: AFSGD/V960KbP/mONPmXo6st8C0XoANFq//7R1NVc6rplJSC1QiHOSdr1kValqvOGzInBsDaA+2YjQ== X-Received: by 2002:a1c:dc86:: with SMTP id t128mr3032897wmg.42.1545132810930; Tue, 18 Dec 2018 03:33:30 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:30 -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 v4 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Date: Tue, 18 Dec 2018 17:03:15 +0530 Message-Id: <20181218113320.4856-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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 --- 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 Tue Dec 18 11:33:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735477 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 668026C5 for ; Tue, 18 Dec 2018 11:34:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56EC72A5D2 for ; Tue, 18 Dec 2018 11:34:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B3392A5E0; Tue, 18 Dec 2018 11:34:12 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01F3E2A5D2 for ; Tue, 18 Dec 2018 11:34:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbeLRLeL (ORCPT ); Tue, 18 Dec 2018 06:34:11 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37650 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbeLRLde (ORCPT ); Tue, 18 Dec 2018 06:33:34 -0500 Received: by mail-wr1-f68.google.com with SMTP id s12so15112301wrt.4 for ; Tue, 18 Dec 2018 03:33:33 -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=tp2qTP6b0v5Vb54Ya9denLrSJ0P23sY7OEhQ5x0BuQw=; b=Dyp9G4/ekeYXIOjOjpiWgVd9vebimJb9fRIf1Xc3jcoJabiZtusXwthfSgo4oTLy+u X/LwvbVkkRx7XUDOUKqkbUANBdGpW00sWSJNIbT51PuJrYH/FHbgWIffTh815hutWXnt dtdOmBUs/595yPrQbizgIqEF5OeH7PeoYHPDc= 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=tp2qTP6b0v5Vb54Ya9denLrSJ0P23sY7OEhQ5x0BuQw=; b=SE392i+4C5dyyFS91W3nXbERhDVYR+EGJXnfGPS2aBnaeDb6toBcuzYSVjBHoGb164 dHmLxuTj5ZHmyOkPl/52hUXWLzRolyFTdchfgR4Q/JCUl3x0a995pex64bE1eG9evgcR RYl/GoThCQI1/DKgko+12Vv/7D8sEhmqZ/i0kKbENxwv3VjibUVdVyZfo8t47w5Bk748 rgw3wUGIfehsWc3wBAEO0ehl5N22SH7ISeIA0ICmKa6UFKq53nEFQ/T4hYjm/0UqX+BH 34mo6vm/jUXkfj3ZlH4gmg0/GKIRMK3NuR4GZaWcuaTfXMXZh0g1kbG0gjTT6ipOk6VZ PkCA== X-Gm-Message-State: AA+aEWY4HhreUQb3yv7omAjUOktOPtqMgdMq7sWjPSUl2e3kpS+nKhh7 2BvBS8kOgWuqJ9IO3OzTfccGSw== X-Google-Smtp-Source: AFSGD/UBnj2Lpi4jkn0o6yWcZcSfQE5ucR9VFQkE9SDOdqSMiaik7KRdoJ3yAEltcutn/NWo0vNsTw== X-Received: by 2002:adf:e149:: with SMTP id f9mr15577466wri.42.1545132812924; Tue, 18 Dec 2018 03:33:32 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:32 -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 v4 2/6] media: sun6i: Add A64 compatible support Date: Tue, 18 Dec 2018 17:03:16 +0530 Message-Id: <20181218113320.4856-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add compatible string for Allwinner A64 CSI. A64 CSI has similar features as like in H3, but the CSI_SCLK need to update it to 300MHz than default clock rate. A64 BSP is also operating same rate as default csi clock. Signed-off-by: Jagan Teki --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index ee882b66a5ea..9ff61896e4bb 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -895,6 +895,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 Tue Dec 18 11:33:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735475 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 D4BDE6C2 for ; Tue, 18 Dec 2018 11:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C488B26255 for ; Tue, 18 Dec 2018 11:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8E52271FD; Tue, 18 Dec 2018 11:34:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E1A226255 for ; Tue, 18 Dec 2018 11:34:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726671AbeLRLdh (ORCPT ); Tue, 18 Dec 2018 06:33:37 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38664 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726649AbeLRLdh (ORCPT ); Tue, 18 Dec 2018 06:33:37 -0500 Received: by mail-wm1-f66.google.com with SMTP id m22so2421694wml.3 for ; Tue, 18 Dec 2018 03:33:35 -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=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=m/xol0WelzUvjOb1T7gtvzM4mgci6M70ZC8FZEHkbXqT8lEvWkJHMDQ9GOpcb19fLE pHJ0uhmcSgSRUac7uioa0q3x2H1FlaNGLGxjFPBlDveAupR+YQkGrckjLrEPfPPy2QPP xUpoBfmp8Zefpkr5jcXvQ2OD1/fv0s7LMGvZM= 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=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=GOcyoFR4yqhkB9O75Nf0Qt6jRkjNenjkZE8P7gWkgmEtpwoON5WtH/DVpvAmAZJ4om 1FRwgqvHV2ULEfbkS3+nGDz/FnhPeuaQP7EIkUsA2RmLq715vqmFIkBjKDffaheWKU6+ u1b2RUz1XDDD7Zy8EHe+SAXNz9KVixcZgtxJIbYR5CTj6uo5oVMYRxjIszj88XZ2YMDZ tpxLyGh462GQf7nIRjxH8D637IHukEuJGi1ysLrdFs4UmKfaalIviyybixlhl36i8lKe uAk3QL5KFUHdw8ida9u3HAUFZvUQIxbLSv4TU1vFLd9fxUVg4HoQwYRZ9iOIU7LmaP1Q HGZQ== X-Gm-Message-State: AA+aEWb3ZJoXVBCw3SzrtH2XKUhn9cgqimxGWhP4NhsOTfEBOiYqdblM IGthxj5Au1VEfT7fH7PzK91aFg== X-Google-Smtp-Source: AFSGD/VOWlFuoZVOKeDauoI8dplqjyg7Myu1NWvkW4rp7yL8UmE9dMhqeOQS6ejn/ZLTwjoTsx/0wg== X-Received: by 2002:a1c:1286:: with SMTP id 128mr3000248wms.70.1545132815033; Tue, 18 Dec 2018 03:33:35 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:34 -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 v4 3/6] media: sun6i: Update default CSI_SCLK for A64 Date: Tue, 18 Dec 2018 17:03:17 +0530 Message-Id: <20181218113320.4856-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Unfortunately A64 CSI cannot work with default CSI_SCLK rate. A64 BSP is using 300MHz clock rate as default csi clock, so sun6i_csi require explicit change to update CSI_SCLK rate to 300MHZ for A64 SoC's. So, set the clk_mod to 300MHz only for A64. Signed-off-by: Jagan Teki --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 9ff61896e4bb..91470edf7581 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev, return PTR_ERR(sdev->clk_mod); } + /* A64 require 300MHz mod clock to operate properly */ + if (of_device_is_compatible(pdev->dev.of_node, + "allwinner,sun50i-a64-csi")) + clk_set_rate_exclusive(sdev->clk_mod, 300000000); + sdev->clk_ram = devm_clk_get(&pdev->dev, "ram"); if (IS_ERR(sdev->clk_ram)) { dev_err(&pdev->dev, "Unable to acquire dram-csi clock\n"); From patchwork Tue Dec 18 11:33:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735471 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 7EA346C5 for ; Tue, 18 Dec 2018 11:34:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 693A726255 for ; Tue, 18 Dec 2018 11:34:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DA2E27F3E; Tue, 18 Dec 2018 11:34:03 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C6D426255 for ; Tue, 18 Dec 2018 11:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726701AbeLRLdj (ORCPT ); Tue, 18 Dec 2018 06:33:39 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36180 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726682AbeLRLdj (ORCPT ); Tue, 18 Dec 2018 06:33:39 -0500 Received: by mail-wr1-f65.google.com with SMTP id u4so14566228wrp.3 for ; Tue, 18 Dec 2018 03:33:37 -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=i+sX38c9cSRrT/+P6z3U+yEFrwV+FCNRU4fj085KJck=; b=Daz3Z2CbrjYCumy+Eqh2CqsYQUlio7x77xnlCkFvlQzhYqTeyM5/3diED7Sk84EP0R Xv6wbnedSLBYVpo5/1MiA9XcBIh9tr/Sp/HORQlo4QlctfBPGFbbQkTXYXmrJ5pIC/C5 /aS5XQrPFGWi5VfipfDT2KaGaaZamoZLW763A= 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=i+sX38c9cSRrT/+P6z3U+yEFrwV+FCNRU4fj085KJck=; b=Snpy12Z8m7TX2kuKrEPK/lMalrpnhUiY/ATtuHjtB8K7hN7OMyrfO2S1d3garC6Mup a0AhOeAOmJuCz4JzO8hyinfsHaSD0y6Z7AQRLqw7/Hk3XhtPedHFGQa/u4cNbN0a+wWa 5Txo9z2wKIcKOawspiaOQrEeIId7Bvt1qVr0CJNEzqZtYGxVCgU3nhkcGJrc0gYamZhW k812viDecla0xlHoApd94IBNdehauFz/q2zcXheW33rhgV3vDnxue5tYaK33pyiVZNIN biaKI8kaZx8UKa6JQc+OaBEK6zbxp2lz9fn5I+Oy6UotsCdgHF5qlV+D9bF6/Nll5HqX w4Zw== X-Gm-Message-State: AA+aEWbDNM9Up57s4vJlfOkA1PnVcZmSYCGdLhxkXPDIzb1pQZggh42S lT6nsTvm+08IXj98k9rSHBRUXg== X-Google-Smtp-Source: AFSGD/WspVm6YDUKba0CozH4fVWLussP009ueuQyQktjSzku+Avc02vHsbBhCh6VwWlyWLmZc/DMNw== X-Received: by 2002:adf:bc87:: with SMTP id g7mr13685629wrh.250.1545132817098; Tue, 18 Dec 2018 03:33:37 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:36 -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 v4 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller Date: Tue, 18 Dec 2018 17:03:18 +0530 Message-Id: <20181218113320.4856-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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 --- 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 384c417cb7a2..89a0deb3fe6a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -532,6 +532,12 @@ interrupt-controller; #interrupt-cells = <3>; + csi_pins: csi-pins { + pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6", + "PE7", "PE8", "PE9", "PE10", "PE11"; + function = "csi0"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; @@ -899,6 +905,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 Tue Dec 18 11:33:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735469 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 BF6C46C5 for ; Tue, 18 Dec 2018 11:34:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE92926255 for ; Tue, 18 Dec 2018 11:34:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2E21271FD; Tue, 18 Dec 2018 11:34:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5753226255 for ; Tue, 18 Dec 2018 11:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726558AbeLRLdz (ORCPT ); Tue, 18 Dec 2018 06:33:55 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40470 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbeLRLdk (ORCPT ); Tue, 18 Dec 2018 06:33:40 -0500 Received: by mail-wr1-f67.google.com with SMTP id p4so15537264wrt.7 for ; Tue, 18 Dec 2018 03:33: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=/BsYwI4MGKscqtd4fapjUVq4zzWRiadQNZwYTiXxWLI=; b=evk9MkE8TyA07Y2trxHkB5MkphTIMNp7fzPU4KmNVofgoTzvU3M6guf5J/r3ghOabb bsbrydn+HyYESB6VICMLQOXRivjDdpFwHRkLWWSuaVUZl0m5z56JzMHmow/MuxQkH17h ZFSuwAMoLVUvWCB1Zm0PFfMB9KbDHReDge3fI= 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=/BsYwI4MGKscqtd4fapjUVq4zzWRiadQNZwYTiXxWLI=; b=U8al4Q/tkIyX50OtsezMOwk0c8UbgvS5vCmfT0SeUvUaWDOBcQf9peT0aK0dWqSRlm /+NW1i4U/TJBTYo9U4BxV7nLP8jmlKnWwyZSY6JPhmwDyW21sw+x7zg8div6RhV1duyO dt7svMeq/L4/ppG4q+KXY1p1LK8Td+yqOSJ182xPQ7yP0eT8JTOju938RVjXiycIop6w kIl6D5QkGEM3WWdUGpmawwtAtkq9F9D06mO8NtrBtu24WjJzQCdGfLIsyqBThHPlzzzV ENA7FmjrNZDN8yxm1hooH6BXOMBw9n/QZk5XjgdEyaozQXn9pdFkcGftmslnWV97/KVx hMfg== X-Gm-Message-State: AA+aEWY5+E6w5ceCBCTp2LB29gbXIFSNER/OWYaCgKEY7BsCzsha5EfX hx0rsDVU3na48Ty03CV2NneQPTxHzYA= X-Google-Smtp-Source: AFSGD/Xpr+LydSmIzvpDYcxk6/tMQOBwwJZfFJoJaAHL0hsGw79+s0AA6+qZPMSEgv16qrky3X9W3w== X-Received: by 2002:adf:f703:: with SMTP id r3mr14050740wrp.93.1545132819036; Tue, 18 Dec 2018 03:33:39 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33: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 v4 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Date: Tue, 18 Dec 2018 17:03:19 +0530 Message-Id: <20181218113320.4856-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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 89a0deb3fe6a..dd5740bc3fc9 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -538,6 +538,11 @@ function = "csi0"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi0"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; From patchwork Tue Dec 18 11:33:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10735467 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 F176C6C2 for ; Tue, 18 Dec 2018 11:33:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDFEB26255 for ; Tue, 18 Dec 2018 11:33:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF975271FD; Tue, 18 Dec 2018 11:33:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B92DE26255 for ; Tue, 18 Dec 2018 11:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbeLRLdw (ORCPT ); Tue, 18 Dec 2018 06:33:52 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35158 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbeLRLdm (ORCPT ); Tue, 18 Dec 2018 06:33:42 -0500 Received: by mail-wr1-f67.google.com with SMTP id 96so15556529wrb.2 for ; Tue, 18 Dec 2018 03:33:41 -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=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=e5PoYekDuh3gtWmfvuu/mBRfx6rUcm37ltH0VzcHmjxHuffNZPYO0mRg5f3WGoAetR bmiR/I19WYXtYqZIhn9H5ilNTaR9Oi124OpunlX/kBNP37jn1iqMGOkhLxOVU2YNCwjb 5p+MlVa4udqoNfzQyEdWmoTQp54K+nWxSa06s= 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=jEijnCjicnGILwhFrMB461TXW1hBMByoFGuErMag6m8=; b=MW8yIp6uNbiBtknT7NrI3zJlDbBRaCbeoXCIn5Wm5klWraAyFIqBYeDUEQP5S9688G QYypxOhgXumBK1yqYXdbkBu1AhI/YYFNDQY4vHjgcTkwuTaAeHbOjcuyLKivGFtq23CW LZj5S/9JYfFkrilMc+Ttu95reO9ihfnTcMzBNxilLQHDQFjMvHIvFx5ZZ2pcPwr5Ge3V fJdfjyQd3aAc2InN5uMzYoyTRovHZDOTwv/kfDGmGASR3WLWR1IkR1qk0vj369I1zyIb uLnADObpJ2LFFV9e6pjxaX9iEpIfWqxIAlBHhd9zsEJQf+7DWfIWoTWfc7r9Bm4O4WEl V6AQ== X-Gm-Message-State: AA+aEWbtW52lK5ipPK1p2bymOJZRJ1oTsFEeWJwFzgwxw2Iy+W4gSuxZ qLAguQxHL+vtCKvw6nhdbcMZCA== X-Google-Smtp-Source: AFSGD/UOcmr+ClbaB65PaIY78yiVxQvhezKWnBM5T1E8Egpns3yGi92ep2v/PIOcpw8QWFwRc/Do2Q== X-Received: by 2002:adf:fd87:: with SMTP id d7mr13630773wrr.74.1545132821152; Tue, 18 Dec 2018 03:33:41 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:40 -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: [DO NOT MERGE] [PATCH v4 6/6] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Tue, 18 Dec 2018 17:03:20 +0530 Message-Id: <20181218113320.4856-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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 83e30e0afe5b..c185ceec8c81 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"; @@ -106,6 +141,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"; }; @@ -296,6 +349,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>; @@ -313,6 +372,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>;