From patchwork Mon Jul 22 13:45:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11052461 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 AFA92746 for ; Mon, 22 Jul 2019 13:49:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A1CF284F1 for ; Mon, 22 Jul 2019 13:49:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C84F286AA; Mon, 22 Jul 2019 13:49: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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 19906285B7 for ; Mon, 22 Jul 2019 13:49: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=h39wHsFv9g+FpWIowMhO3bb1NMoDor6u8Oe3CHb/B6U=; b=iY0 Ilh10DVYZCSNaurnBALk7cXH8+zkVSNLdNiNPqoZZH7CWP0SgY8DEXXTrDwMFB42OOuWy+ug/6pST kmHvZ7amAqg06aowK6PBlaiyhZPQ3JPLHcVovdkerH5ZbGBts/V/m67sqq8k77zMo5L0g1rVcjT0K fV11ZjzqUZjQgXjBaVyOeV8AY9WgjpkiS6/ZYLH/77ba9E8BFGgHuTiwt2o0+3SySLDIvOFYgytet ZE79RdbAcoHkSthjuiQ/2tKsLB8RFcmUprznuQT7EezOx4NkGwK160gflR0pjC+KbgndzOwjFFl94 +X83ge+jFwvyKc8K5Mkp3OK9sexAXsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpYgo-00061i-S0; Mon, 22 Jul 2019 13:49:19 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpYdU-0003QO-G6 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 13:45:53 +0000 Received: by mail-qt1-x842.google.com with SMTP id z4so38578090qtc.3 for ; Mon, 22 Jul 2019 06:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=X1MaQvCq7gYi922e7BpFn5osLNhpu9SvVjpekPA8xss=; b=fer/rkn0WmaQ9IJGi9KLu/yafo5+aH0ohYfHOUu4yyNcmJbGE0+U++FPX6DVb6AlGP /HzkUuy6s+qcZUXFT0U2Zd8y7HOkqUmf7WnT+zF6HXZhINWkVNUjpihbGmz01nEJB2wH J2EV7Uv9oWZzqJPC1jxJyDzVUU3Bb5CcoHnoZQFsvjRWNtIMSkR8Fn2eqdshVlFdTHl/ jPqp1yA36YDB/1Dlq3/1PB9KHRVXMxYPtUFTW7xugnJrfXdMJd0MMa4GZKdvBge0K07b MzfWBZZsyNCUZIB65DAtHgDJRxQWoUIVZNrrDU3IdwogEddt/xPFJzpfadl5oO0nNGe1 9ZgA== 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; bh=X1MaQvCq7gYi922e7BpFn5osLNhpu9SvVjpekPA8xss=; b=MD0qlLliP0FZegqLMtYzGER7bbLz1XfB0RH6FQq+dxdRyrnoTJPG0xfWryh5IqNqjc YWGBtrn7vPpyrJSQ+Hv+F14UItAXUEOrb0y56CUwNdIRjBZqGMrF4TPvmiun6G3eRDkt RKt5SSPX2IxJvkc5J3On6WeijT4lkcfdXx6GSpqQdqJWv3Rkbb2EjGqoMlj0EdMRZV40 80eC7oot52IjGpuff/O4j1lB/Oh7iOrzLf96kGttLFjhtL16Gvj9/UfEOsH8bl2s5Lkk L5yElywMjiTaaJSAEQj55D6vMgu6yGotgfqtNAkzJ6kRlcO8Eoh3UdlxlnIwb/THK2c+ MRVA== X-Gm-Message-State: APjAAAV18ze6nRwSodO2bN1GD0XVFU9YF8q134FaKdG/tvTnO7wjsb2U FoOsg2k7+FxzZR1t/+BWXHA= X-Google-Smtp-Source: APXvYqyW+sD8UZ8U1D5asxL39xq/uw3nQy1cWTD7xMUEAHRv5jS4FRRku9N3OLLb6SRe2e+iOYhvlw== X-Received: by 2002:a0c:b999:: with SMTP id v25mr51527720qvf.36.1563803151325; Mon, 22 Jul 2019 06:45:51 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id v75sm20062268qka.38.2019.07.22.06.45.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jul 2019 06:45:50 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2 1/2] ARM: dts: imx6qdl-wandboard: Add OV5645 camera support Date: Mon, 22 Jul 2019 10:45:45 -0300 Message-Id: <20190722134546.15094-1-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_064552_595216_D5132046 X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , ezequiel@collabora.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 From: Ezequiel Garcia imx6qdl-wandboard can be connected to a OV5645 camera via MIPI CSI port. Add support for it. PAD_GPIO_6 has been originally used for the Ethernet FEC ERR006687 workaround, but it needs to be used to provide the camera sensor clock, so adjust it accordingly. Signed-off-by: Ezequiel Garcia Signed-off-by: Fabio Estevam --- Changes since v1: - Remove unrelated change in Makefile arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 73 ++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi index 50d9a989e06a..2cfb4112a467 100644 --- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi +++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi @@ -33,6 +33,30 @@ spdif-out; }; + reg_1p5v: regulator-1p5v { + compatible = "regulator-fixed"; + regulator-name = "1P5V"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + reg_2p8v: regulator-2p8v { + compatible = "regulator-fixed"; + regulator-name = "2P8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + }; + reg_2p5v: regulator-2p5v { compatible = "regulator-fixed"; regulator-name = "2P5V"; @@ -94,6 +118,29 @@ VDDIO-supply = <®_3p3v>; lrclk-strength = <3>; }; + + camera@3c { + compatible = "ovti,ov5645"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5645>; + reg = <0x3c>; + clocks = <&clks IMX6QDL_CLK_CKO2>; + clock-names = "xclk"; + clock-frequency = <24000000>; + vdddo-supply = <®_1p8v>; + vdda-supply = <®_2p8v>; + vddd-supply = <®_1p5v>; + enable-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; + + port { + ov5645_to_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; }; &iomuxc { @@ -128,7 +175,6 @@ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030 MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 - MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1 >; }; @@ -152,6 +198,14 @@ >; }; + pinctrl_ov5645: ov5645grp { + fsl,pins = < + MX6QDL_PAD_GPIO_3__CCM_CLKO2 0x000b0 + MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x1b0b0 + MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x1b0b0 + >; + }; + pinctrl_spdif: spdifgrp { fsl,pins = < MX6QDL_PAD_ENET_RXD0__SPDIF_OUT 0x1b0b0 @@ -226,12 +280,23 @@ pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; - interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, - <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; - fsl,err006687-workaround-present; status = "okay"; }; +&mipi_csi { + status = "okay"; + + port@0 { + reg = <0>; + + mipi_csi2_in: endpoint { + remote-endpoint = <&ov5645_to_mipi_csi2>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; +}; + &spdif { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_spdif>; From patchwork Mon Jul 22 13:45:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11052463 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 0EBD4746 for ; Mon, 22 Jul 2019 13:49:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0A6320223 for ; Mon, 22 Jul 2019 13:49:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E53DA28595; Mon, 22 Jul 2019 13:49:42 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 A162E20501 for ; Mon, 22 Jul 2019 13:49:42 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=2OT+B9OR4gFYx/U8xG5MMVJW8j6xPrL/lOhKk6li1z8=; b=pjR7eNxNDqQ7MpJNUDDXK397i5 XoJjZed6ZKz0BqNMPpxqU0rf0rM3MauW+oa9kMvuVQgMYxFff6EUw9bp8dVPYtYhggXB6aGeo0zfT vQDRCOcsZ0CuFFSxiu6xDYPhcr+jX30J6EbuvpZFSbqgOBGhrsDg6g7EAQ/ItydQlrXsiyPHBs+hy ggy6GJSroPu83pguqqev+gxoO0M7sLRJ1gWSbs6LV84e9QfZU/IgZyiLBWx4FwmqBgHS1/OM2m8d1 dwtmS3vcXOPjI7Z0Zvx0Pa8aYaCpE+I2gi8an/5Gy2/FUT1AIzPYLXhTyMhfU0KDLPyeJFZ8KOQ7g 833TZm6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpYh7-0006He-BO; Mon, 22 Jul 2019 13:49:37 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpYdW-0003SR-JH for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 13:45:55 +0000 Received: by mail-qt1-x843.google.com with SMTP id l9so38510267qtu.6 for ; Mon, 22 Jul 2019 06:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U0GR2nWszffo7XIu1Xrb5HHx28cgNDg/rwJdE5U3hzA=; b=MicxfiUt/NHh+TlfWiCAc1s8UkgRgbJsFsrjnWhxTyO0f92JEw0idq9uPSckxpMY4m 1PyYoKkr9knQfVMO6PCcjlZ/+DN53d4ZFhAR8RjRlG2CUB0H2JL6nnpYqvVHuC2cOp8L x0Sov9jvzJtJtuoka8fNnh/ZjmneiUTBE67n53X0Kk/c5CWuD4TIVxhdKQaEXoSlD9L3 1R+5/6g+DDm+TVT25cPQPEpW5h6DRAhignsuoC5fB1RNGeBr1S/lEjTyqs/6nW4ZhEgG bX73Hulep9W/y5zMJXMXyUiFXa/sJ5q0uP9Y9NVYMDMXmO1ohBB5b+CXpfHJufw46HR1 S1gg== 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; bh=U0GR2nWszffo7XIu1Xrb5HHx28cgNDg/rwJdE5U3hzA=; b=t9guDy10LU13gahw5Mu6TC5bn5tPMv4fQK4obUuNJYEoRREO6Vdj8+7MuJbl3YoKpt Kr5oDKzSOJ1uxfLsG1wdb5VD9a2N1Q0k7F49t02eGYwVCTzabfRpL0skSqtl4lcNT5tP sbrsFll4JBVQNjG+EP0G10chtvsNu4mkLKr1xgz1TTn5ISLjCGWqpJwbOLAivAPvQD/C k7gNDDt0PLSERaS2B2AVpAzzVVALhbuAI+YOAU4bbypEzufwiphsSuAMCY0S4f2R0HKC gla3I/ckV0aVuIE1wFzg/tiNs9NlI24rD0sycajwuSshCsRSxit5jI+VW3APgx8z0twB kX6A== X-Gm-Message-State: APjAAAUQHFH0/qPVbiwgAxuQTxqvknz0frizq0LwWMo2JAkL4d7K9YMP oqjHqS2/hoFyQKlQ7bIJygM= X-Google-Smtp-Source: APXvYqxjMVeZs4BGcqedYS62MYZFWn125tLQaO1So940pxkJBWgWAJc5kFvo6vam11StvxqmG7i5eg== X-Received: by 2002:a0c:b758:: with SMTP id q24mr50477956qve.45.1563803153822; Mon, 22 Jul 2019 06:45:53 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id v75sm20062268qka.38.2019.07.22.06.45.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jul 2019 06:45:53 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2 2/2] ARM: imx_v6_v7_defconfig: Select the OV5645 camera driver Date: Mon, 22 Jul 2019 10:45:46 -0300 Message-Id: <20190722134546.15094-2-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190722134546.15094-1-festevam@gmail.com> References: <20190722134546.15094-1-festevam@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_064554_715048_08C47D84 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , ezequiel@collabora.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 OV5645 camera sensor can be used on several i.MX boards, such as imx6qdl-wandboard, imx7d-pico, imx6ul-pico, etc. Select the OV5645 driver by default. Signed-off-by: Fabio Estevam --- Changes since v1: - None arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index a53b29251ed4..bd2e2f5d1c3a 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -272,6 +272,7 @@ CONFIG_VIDEO_IMX_PXP=y CONFIG_VIDEO_ADV7180=m CONFIG_VIDEO_OV2680=m CONFIG_VIDEO_OV5640=m +CONFIG_VIDEO_OV5645=m CONFIG_IMX_IPUV3_CORE=y CONFIG_DRM=y CONFIG_DRM_PANEL_LVDS=y