From patchwork Thu Dec 20 12:54:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738857 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 B2D24746 for ; Thu, 20 Dec 2018 12:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2428287A7 for ; Thu, 20 Dec 2018 12:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95B9C28824; Thu, 20 Dec 2018 12:55:37 +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 4E970287A7 for ; Thu, 20 Dec 2018 12:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732639AbeLTMzb (ORCPT ); Thu, 20 Dec 2018 07:55:31 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53276 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728966AbeLTMyw (ORCPT ); Thu, 20 Dec 2018 07:54:52 -0500 Received: by mail-wm1-f66.google.com with SMTP id d15so1912978wmb.3 for ; Thu, 20 Dec 2018 04:54:50 -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=ijpQewihuTYkryQcGkcJM6bC77RlvFBJu2BOUrCOX7wpmLZtlxWifNYRR0lUzzU0ja KOQQVbn4G4RUt/HDMWlzZE4CHNvoYLVU1UEKBwkESj8O7wDrTmPDbEWF40S6leMErK1C 4t/vpBTxsZdwZy4VYe/++247zoVSvvDpJGzsA= 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=EO2eW2fBBByuxRrJFmjOY5WdGr7qQ2e/7zFVTUmt3wm9jmCzpoY+nj7ivbSUMeUUWF G/6wtYuUMEF4zUUtTV97iHKVnaamkES6i6YFGxa9RVCAORp3OmgvyBAikB/vRZpKAY0r 4cDwLx8iUqQ+r5bkFwuI+gxxxwVwX9/wKmi1iGnnFYxnvIwMW8LOTB4qBMy0nqCu7MaZ bbD4rs+s/+93QW9CeHnjSu0QHrhGE4CYlqHXKHGBy1hCItO9O7azvgIfR0LaHNOapt2H BMzWfblp78icoDDRmOkTbUFZFD0IJAoBpQXAbtsqxxFzo9QXVSCM5DgUshW9qINwtczg krIA== X-Gm-Message-State: AA+aEWamEuAhSb53+MSFzKgRMZMf5WIuPjqDRGFYWyIo95Ek2pb0iPD+ npU5WKh2n2Z+URYy4mlx/5gCWQ== X-Google-Smtp-Source: AFSGD/W72Nq2p29nd5Y0/GilNYZEEzruQXAnlDDDKbMN8MsvknsXNocedBbaGuyVhWtp/8Q5+Eby5g== X-Received: by 2002:a1c:ad43:: with SMTP id w64mr11012559wme.32.1545310490011; Thu, 20 Dec 2018 04:54:50 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:49 -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 v5 1/6] dt-bindings: media: sun6i: Add A64 CSI compatible Date: Thu, 20 Dec 2018 18:24:33 +0530 Message-Id: <20181220125438.11700-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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 Thu Dec 20 12:54:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738853 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 CA76E13BF for ; Thu, 20 Dec 2018 12:55:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B85B6287A7 for ; Thu, 20 Dec 2018 12:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABC3E28824; Thu, 20 Dec 2018 12:55:30 +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 50194287A7 for ; Thu, 20 Dec 2018 12:55:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732654AbeLTMz2 (ORCPT ); Thu, 20 Dec 2018 07:55:28 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52455 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732639AbeLTMyy (ORCPT ); Thu, 20 Dec 2018 07:54:54 -0500 Received: by mail-wm1-f66.google.com with SMTP id m1so1919402wml.2 for ; Thu, 20 Dec 2018 04:54:52 -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=LrNl3IwBPVoOT7eCSWC64ChhCwwVumPx0DUceWWWdPc=; b=FhO6jXCTAOkYqprrUH7Dbw58ayINikQoRYAxUyV1kYB2NuYTVOokYSscoYmga9gjzL moqAL8CcrMrwkGTO8yZQyHL8JjJb4656N8ZALHqjRWbGpwnmRugK1npX3MtP0dqlYSbe ObVVNsaWJOGtpIJmBtKZzTDWDMlz1aYcq4+Kc= 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=LrNl3IwBPVoOT7eCSWC64ChhCwwVumPx0DUceWWWdPc=; b=bkSF5RB8GJbMFMAKAY/BCktvWPfe3Acy66sZKgvgcCdKJ0J+oMcQahs+uJG4NgGPNH pxeb9te7mMfUsV2YVukh1rgEtndU2rAus2pUW/4IMm8Nsf2iMUZgXOXNbnqGzfVewhxr nqgId0dmskJh2qedd5PLM47gKTpZi/kgI7eR0H8SjqL/CrRa4uC3vqAzXKmOhtT9YcSs jb+Id36ZZauQtPuWg3/msSeBHvblCEiKzrhXyr5PHBKGsm9/oghWgeAEM3ACOBakSCgP rOY/7KosjdWIwtjePAkNegXx5vejFRxL/E6MogogVtUd0rSgoDktBWYuNonBHrzcv3rW fdkQ== X-Gm-Message-State: AA+aEWZDqypEh1nwiQhyn1Gjz4X8bofT9CjTWfnhZuOw7kUIgdtXxXcg rfQ0NQ65DnfrO/wu/t+OPnFO0g== X-Google-Smtp-Source: AFSGD/UKw87i2Wm0RwmCPvyi3Kk9owBhff+Eq719ylOELjW2fIA4dcWzoEAsE1KXasnORldqPwfsBg== X-Received: by 2002:a1c:d988:: with SMTP id q130mr11902264wmg.41.1545310491536; Thu, 20 Dec 2018 04:54:51 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:50 -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 v5 2/6] media: sun6i: Add mod_rate quirk Date: Thu, 20 Dec 2018 18:24:34 +0530 Message-Id: <20181220125438.11700-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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 default CSI_SCLK rate cannot work properly to drive the connected sensor interface, particularly on few Allwinner SoC's like A64. So, add mod_rate quirk via driver data so-that the respective SoC's which require to alter the default mod clock rate can assign the operating clock rate. Signed-off-by: Jagan Teki --- .../platform/sunxi/sun6i-csi/sun6i_csi.c | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index ee882b66a5ea..fe002beae09c 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 @@ -28,8 +29,13 @@ #define MODULE_NAME "sun6i-csi" +struct sun6i_csi_variant { + unsigned long mod_rate; +}; + struct sun6i_csi_dev { struct sun6i_csi csi; + const struct sun6i_csi_variant *variant; struct device *dev; struct regmap *regmap; @@ -822,33 +828,43 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev, return PTR_ERR(sdev->clk_mod); } + if (sdev->variant->mod_rate) + clk_set_rate_exclusive(sdev->clk_mod, sdev->variant->mod_rate); + 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"); - return PTR_ERR(sdev->clk_ram); + ret = PTR_ERR(sdev->clk_ram); + goto err_unprotect_clk; } sdev->rstc_bus = devm_reset_control_get_shared(&pdev->dev, NULL); if (IS_ERR(sdev->rstc_bus)) { dev_err(&pdev->dev, "Cannot get reset controller\n"); return PTR_ERR(sdev->rstc_bus); + goto err_unprotect_clk; } irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "No csi IRQ specified\n"); ret = -ENXIO; - return ret; + goto err_unprotect_clk; } ret = devm_request_irq(&pdev->dev, irq, sun6i_csi_isr, 0, MODULE_NAME, sdev); if (ret) { dev_err(&pdev->dev, "Cannot request csi IRQ\n"); - return ret; + goto err_unprotect_clk; } return 0; + +err_unprotect_clk: + if (sdev->variant->mod_rate) + clk_rate_exclusive_put(sdev->clk_mod); + return ret; } /* @@ -871,6 +887,7 @@ static int sun6i_csi_probe(struct platform_device *pdev) sdev->dev = &pdev->dev; /* The DMA bus has the memory mapped at 0 */ sdev->dev->dma_pfn_offset = PHYS_OFFSET >> PAGE_SHIFT; + sdev->variant = of_device_get_match_data(sdev->dev); ret = sun6i_csi_resource_request(sdev, pdev); if (ret) @@ -887,14 +904,19 @@ static int sun6i_csi_remove(struct platform_device *pdev) struct sun6i_csi_dev *sdev = platform_get_drvdata(pdev); sun6i_csi_v4l2_cleanup(&sdev->csi); + if (sdev->variant->mod_rate) + clk_rate_exclusive_put(sdev->clk_mod); return 0; } +static const struct sun6i_csi_variant sun6i_a31_csi = { +}; + 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,sun6i-a31-csi", .data = &sun6i_a31_csi, }, + { .compatible = "allwinner,sun8i-h3-csi", .data = &sun6i_a31_csi, }, + { .compatible = "allwinner,sun8i-v3s-csi", .data = &sun6i_a31_csi, }, {}, }; MODULE_DEVICE_TABLE(of, sun6i_csi_of_match); From patchwork Thu Dec 20 12:54:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738847 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 6684B13BF for ; Thu, 20 Dec 2018 12:55:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56317287A7 for ; Thu, 20 Dec 2018 12:55:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A04628824; Thu, 20 Dec 2018 12:55:16 +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 DD543287A7 for ; Thu, 20 Dec 2018 12:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732712AbeLTMzB (ORCPT ); Thu, 20 Dec 2018 07:55:01 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36831 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732651AbeLTMyz (ORCPT ); Thu, 20 Dec 2018 07:54:55 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so2061844wmc.1 for ; Thu, 20 Dec 2018 04:54:53 -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=XK1+ImY4LqT3mqPXOgRcotLaegAmI6oUTAhBqe9t1Sw=; b=guAKJy0OL6nXtpHu5GU/d99DuxpR0mmuIZemRdWaOszAnuyybtR/sssbywfDKRrNrf DqL8yOLBev+gKWvFdn94peWiE144jfkW0jdSegShXzl3vVX8Veitr4Aov8ON1Mna/ZKG ltr8NR+r0nrJ12xaj2GAHmF2tKLYzb0BjWWpk= 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=XK1+ImY4LqT3mqPXOgRcotLaegAmI6oUTAhBqe9t1Sw=; b=c1zbF7tnyAQAQE3P4cFzFcDHr4EKOK/v2/v4JYPa8HyoxB5Mh3LBm8hqtoSFpQ8C0f KN6JJi6JefW+NgAWGxzgVQIHGecveEuMYsCSnMDiORSdN7wiem5ws/ihncJIoCiZ/N+G aSnLClmpoSdNlCAZY5vM6fzEV2YKOVh+yVN+P5aN3nvOy7uTESSoyh49n6eQcA+8hN89 S5cT2+bUko+4qB9Yb6W0L0D6geNtg9oZqTIbL6t2+fTnQWJvhsVSxU5umwYg9LVGTx7V UUgSP5M618730UJMTWyjijQ6M7OgjoC8CWYZMmpFRFceZv7I32OuVXKNQni9J2A8y/CK jDag== X-Gm-Message-State: AA+aEWa7KobrKiaZ2ce5BwKsqXUijQqGHuWOkaNgmqDzN4dDlKPoOC9B pc2BA/ZoBXbA7teqXxMF51dOpw== X-Google-Smtp-Source: AFSGD/VaVhsdOJ+GQeoQ3YRRzS8H1oCRVWa/ZckdcR5C+R9heqHrTZBUjY6lcOQvr2R2zurM9FcrHw== X-Received: by 2002:a1c:a895:: with SMTP id r143mr10839869wme.95.1545310493002; Thu, 20 Dec 2018 04:54:53 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:52 -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 v5 3/6] media: sun6i: Add A64 CSI block support Date: Thu, 20 Dec 2018 18:24:35 +0530 Message-Id: <20181220125438.11700-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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 CSI block in Allwinner A64 has similar features as like in H3, but default mod clock rate in BSP along with latest mainline testing require to operate it at 300MHz. So, add A64 CSI compatibe along with mod_rate quirk. 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 fe002beae09c..48919aabefdb 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -913,10 +913,15 @@ static int sun6i_csi_remove(struct platform_device *pdev) static const struct sun6i_csi_variant sun6i_a31_csi = { }; +static const struct sun6i_csi_variant sun50i_a64_csi = { + .mod_rate = 300000000, +}; + static const struct of_device_id sun6i_csi_of_match[] = { { .compatible = "allwinner,sun6i-a31-csi", .data = &sun6i_a31_csi, }, { .compatible = "allwinner,sun8i-h3-csi", .data = &sun6i_a31_csi, }, { .compatible = "allwinner,sun8i-v3s-csi", .data = &sun6i_a31_csi, }, + { .compatible = "allwinner,sun50i-a64-csi", .data = &sun50i_a64_csi, }, {}, }; MODULE_DEVICE_TABLE(of, sun6i_csi_of_match); From patchwork Thu Dec 20 12:54:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738849 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 3F35C13BF for ; Thu, 20 Dec 2018 12:55:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F4A4287A7 for ; Thu, 20 Dec 2018 12:55:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 233FE28824; Thu, 20 Dec 2018 12:55:18 +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 D2EF9287A7 for ; Thu, 20 Dec 2018 12:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732783AbeLTMzQ (ORCPT ); Thu, 20 Dec 2018 07:55:16 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39255 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732694AbeLTMy6 (ORCPT ); Thu, 20 Dec 2018 07:54:58 -0500 Received: by mail-wm1-f65.google.com with SMTP id f81so2047420wmd.4 for ; Thu, 20 Dec 2018 04:54:56 -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=KuwjOwszek352TtFJBBl/n/MzUH512/y0qTe+7lojuswGP/Lv1jUTJ+XBHt+h1OjXC Tkidz7Ho42OTctg0z04xNW5UbNEPscNSxUV65OjfFECCb3QGy3mQM5wO+4DPkeYcvjZ4 MqjQ9TS0onrxr8FvALPrJ5IwcnL33MRBhTXk8= 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=b/ABZlniazuBMuydK9c7C1tKTnlbEY4e6wrZ4nHAZ1uWgdLspjeuy3Eo0c2ma9Tsr4 cF4WDpmUBQRUvRleRlomYa793nzhR918pDSbIglxRrSDezHaR5Cx7OKtwvg4UvU/ypGV 9nlCGdT4MQqudu4Lmuh1ExgQk1gblv0QcmMwIuEhDCNbOJ2y06IGuk1lZSS59Kb3iBh8 AK3fpcixipfpbFNQZK67xCHb/ORs3b4Y17Rkrg+ldT1Piv7foCPPfgjw0AZ/rD8PEEq9 xVC9PtqkvrK8EngMWQvGwrUvRqHc3Cd8mW59v7ThlKQUzu0MNe8HDXkQO50AbvdHJBeT CmPw== X-Gm-Message-State: AA+aEWb6uezMVhxSmhQKSr4QtMYw9IMraYCvyuncNNv0F/l39A7ByRtZ gL2HSmjWJyPUHB2wJPcvoGiC4w== X-Google-Smtp-Source: AFSGD/UrUUuEeGEqMJRANi0h2sU7UVGWvEG7qvhB+ZIFZAHUbiColEvrk/bJTB3CDLaWfH2J6q5zYw== X-Received: by 2002:a1c:864f:: with SMTP id i76mr11106358wmd.83.1545310496157; Thu, 20 Dec 2018 04:54:56 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:55 -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 v5 4/6] arm64: dts: allwinner: a64: Add A64 CSI controller Date: Thu, 20 Dec 2018 18:24:36 +0530 Message-Id: <20181220125438.11700-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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 Thu Dec 20 12:54:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738845 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 E7A8217E1 for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7B91287A7 for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C89622881A; Thu, 20 Dec 2018 12:55:13 +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 876E92882A for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732718AbeLTMzB (ORCPT ); Thu, 20 Dec 2018 07:55:01 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38155 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732704AbeLTMy7 (ORCPT ); Thu, 20 Dec 2018 07:54:59 -0500 Received: by mail-wm1-f67.google.com with SMTP id m22so2066899wml.3 for ; Thu, 20 Dec 2018 04:54:58 -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=BQmZ72bR81ebRCVcxLtWVeYzKIe97gNe16bqUHQEdvrxZ9jQdgduSgzMhZnrpzNDvC 4nLZ7zhSYguQz8KRJjM4qqfx1LBA7ljnIM+D1n9VSLPC5sOrwo92UiUC4iP9URlDtr+a cGKHO0/0xrOVFvYvrjVG1ONqrdH53rHjgH79I= 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=b5mCxCZsG6cMe03ctrYAICO92oSfVRrkqGynPEhyKbg7Q/ZMESeiW/ZJ9zY41dxH8h A7JAaViTxE6JoOxWf6pAu8JVk8Kzmv7slNFG2LRpBxWIPFc8kvGrjuoJumkFXsIxFNP0 S3tBZWz3YHriEPcssiVVOvYlwL8qvH5IAHO8YUK1uSCQBy3/EN0LkDk7ak5UvjZbdR5X 2qi25LNDGENC1Hez8i6uhZmc84nY9619r4NC75J1jbGrrub3UYyiKCXyjYoC9DUi+/AV bscWVNZlqd3p7lEVfRqrPB1OuzpPz40IHdYRZ4HZhKi6KX9BNqWV2Oe+A5MPkCDbe3CC RpJw== X-Gm-Message-State: AA+aEWb6OAdNcCfUnbPsiXDhNOk/R43r6/Gu8n7vmVI6Pp4LWt0/hhPW C9fpN18WPG4vlYDqGGVyQUZ4HA== X-Google-Smtp-Source: AFSGD/VGbWVzN9KaZCPi1PGk/1YnRjWa3GPXr7KSh29e1qnj/L28l6uVj7KIQwJJENtIrgWqp97lNg== X-Received: by 2002:a1c:a8d2:: with SMTP id r201mr10180319wme.81.1545310497657; Thu, 20 Dec 2018 04:54:57 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:57 -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 v5 5/6] arm64: dts: allwinner: a64: Add pinmux setting for CSI MCLK on PE1 Date: Thu, 20 Dec 2018 18:24:37 +0530 Message-Id: <20181220125438.11700-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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 Thu Dec 20 12:54:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10738843 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 900CC746 for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C18A287A7 for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B6C028824; Thu, 20 Dec 2018 12:55:13 +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 12B75287A7 for ; Thu, 20 Dec 2018 12:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732708AbeLTMzG (ORCPT ); Thu, 20 Dec 2018 07:55:06 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52467 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732706AbeLTMzB (ORCPT ); Thu, 20 Dec 2018 07:55:01 -0500 Received: by mail-wm1-f67.google.com with SMTP id m1so1919764wml.2 for ; Thu, 20 Dec 2018 04:54:59 -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=OqNkOUfzqgjoQyhejdqh03U9bW5LPxP6cJgHr8DrmmDR6co5LEA1lPNy06CWMa5diC 8HFpmRY/RdxzXB41ICCzKewZhWTyPZrlnYwzNq3wj0342ilCj8mNWFcfeCt97FRX7ZaB rLKfqk5A+199/9SAS+ba0Eomgryl7+N+vUa7w= 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=HXMdist4A2Wvpb55wylSIjz1+1o0IKs01aQ8+t5NgXSPutb7HJOvphZ3WGhJWcoFHW yUMbgtpBGj9BZetoDE/286qgqoGf4Hbl886zsSLEmGG3ITJWf0mjgm6j8lrqSNJ5Mkt3 tGJNM26oni52q6nWAr1OAp599AJrHh2R3iyX24rFSV5/wXFfGKOavEReSRx2opas2mCh c1CwFGiXdhQFYe1EIPEKtJ7+aZuD0RQV6RGb5fZk1DQPJcEoawp22vSajP9lpDwUL0lI GCT+yx6IRWK+AO1+2EhhXOzzqaY8tVtRkSz4XoWCPAANaPZ/CQEcOgp3re3vO93j8MAB CokQ== X-Gm-Message-State: AA+aEWZO/ArWuPgCTp4Uk/7MNzOtARPfAokY2mBaQjo5OZ50FKmck2Cr c1XEkX/cZXitN3RosjXavZq55Q== X-Google-Smtp-Source: AFSGD/UN81KQhKo/d71SW3eqyGyxaLk4UeGQ4qmnRgXdU/jlhJ76DFWvMXnCrFCWNWD5YY4JE/ppJQ== X-Received: by 2002:a1c:f605:: with SMTP id w5mr11781988wmc.116.1545310499216; Thu, 20 Dec 2018 04:54:59 -0800 (PST) Received: from localhost.localdomain (ip-163-240.sn-213-198.clouditalia.com. [213.198.163.240]) by smtp.gmail.com with ESMTPSA id o4sm8732756wrq.66.2018.12.20.04.54.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:54:58 -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 v5 6/6] arm64: dts: allwinner: bananapi-m64: Add HDF5640 camera module Date: Thu, 20 Dec 2018 18:24:38 +0530 Message-Id: <20181220125438.11700-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181220125438.11700-1-jagan@amarulasolutions.com> References: <20181220125438.11700-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>;