From patchwork Mon Jan 6 08:42:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318813 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0D4F138D for ; Mon, 6 Jan 2020 08:42:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A1C420656 for ; Mon, 6 Jan 2020 08:42:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sa4ewF+a"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="AyGL9dEO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A1C420656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=9Z+onOZdOIdSgTBHOfKihSL3nBryrHIOyynIs6KCBWI=; b=sa4ewF+aRIsVTp hlXRnb9XCSotJydUI270PDCBwJRvhzSzEyzAqZIjTICpNRvizMQ7zK184CmPfCewjslGTPm3TmJDO DxztT5c7Zhy5EiON5aAQjcqiM2RwlOwrrgnRkZrutB2mrWHsvojA42KGsif2TNsJOKYOL8oLND8PH a2iByC37H4M/OhAxRpvPYjySdT9ZRyc8sqY4TZOND3TsglSSrKERt5oyryuvQsqVqAtKdrAWu5GBU +BfIhrFrhBjsxwvSVA6MAyIs+eHvoDAkKe9OGJI84NOdrjSOBeZFDRkcGKmsqPWJdkcGUso6u5l0r tzIVdxmrQTtBgIW7KPCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyK-0001bq-3c; Mon, 06 Jan 2020 08:42:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyH-0001Z8-DC for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:46 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71EDE21775; Mon, 6 Jan 2020 08:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300163; bh=eVqvnMTAH9P1OLuUyEiot4QmZkLk+LF/E69QJEZ/PAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AyGL9dEOfWJ1ZMV5t/c4+E0O/mQoXPWyshR1ZzH70DS1HxKy2PKcvmoVmSD9dhedZ y/YpPkrj91Sd1UlO9I6XaVUjOxm+DgKNi31oW9xml8bJ5jKRXzfEsuq7S59MxE4qv+ h6MiVGAvf+gbqj5D1cgSJZASimQylhxufVLvYmkA= Received: by wens.tw (Postfix, from userid 1000) id 4E7645FA6A; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 1/7] ARM: dts: sun4i: Add CSI1 controller and pinmux options Date: Mon, 6 Jan 2020 16:42:34 +0800 Message-Id: <20200106084240.1076-2-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004245_478052_0FD3F9B7 X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai The CSI controller driver now supports the second CSI controller, CSI1. Add a device node for it. Pinmuxing options for the MCLK output, the standard 8-bit interface, and a secondary 24-bit interface are included. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun4i-a10.dtsi | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index 4c268b70b735..bf531efc0610 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi @@ -624,6 +624,16 @@ ohci1: usb@1c1c400 { status = "disabled"; }; + csi1: csi@1c1d000 { + compatible = "allwinner,sun4i-a10-csi1"; + reg = <0x01c1d000 0x1000>; + interrupts = <43>; + clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>; + clock-names = "bus", "ram"; + resets = <&ccu RST_CSI1>; + status = "disabled"; + }; + spi3: spi@1c1f000 { compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c1f000 0x1000>; @@ -670,6 +680,31 @@ can0_ph_pins: can0-ph-pins { function = "can"; }; + /omit-if-no-ref/ + csi1_8bits_pg_pins: csi1-8bits-pg-pins { + pins = "PG0", "PG2", "PG3", "PG4", "PG5", + "PG6", "PG7", "PG8", "PG9", "PG10", + "PG11"; + function = "csi1"; + }; + + /omit-if-no-ref/ + csi1_24bits_ph_pins: csi1-24bits-ph-pins { + pins = "PH0", "PH1", "PH2", "PH3", "PH4", + "PH5", "PH6", "PH7", "PH8", "PH9", + "PH10", "PH11", "PH12", "PH13", "PH14", + "PH15", "PH16", "PH17", "PH18", "PH19", + "PH20", "PH21", "PH22", "PH23", "PH24", + "PH25", "PH26", "PH27"; + function = "csi1"; + }; + + /omit-if-no-ref/ + csi1_clk_pg_pin: csi1-clk-pg-pin { + pins = "PG1"; + function = "csi1"; + }; + emac_pins: emac0-pins { pins = "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", From patchwork Mon Jan 6 08:42:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82DD2138D for ; Mon, 6 Jan 2020 08:43:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60D4220656 for ; Mon, 6 Jan 2020 08:43:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PqVFLRyi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="w3/2k6zY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60D4220656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=THa0TwuzhvbeEQzac4gFfE3zmqCV5DzSMI+kehvHn3M=; b=PqVFLRyiXViwQU suXUXC7P5OqQ9VkFZ0o7WbaZ6dDHdlRMPD34yEIoZubS8vqozb3HKCCf5LH/F6KDW9Lecv2aSgBEs NGldYek6EZPBxKXHN4Llt3gXSk18er83kNyQtRcYD1KIAQ5XwuXIzB3Bqyo5ItIT0yTKf/yxWuqtn 313HCHmwMYaGigI58wg2xHFMoXVt9Taf/gi/DCku806RU2J504ruJLlwTbt+RPzVAZrmcGamJqr4h eXPXeab/Lqmj3PCwkP3bc5/LrEoTMwKxg2lTY1RMIIbVuR6Al3TiqI9J0Zi0kJR4IGTXUsJsoxeBT AwoXhp58rNu/mG6DgSGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNzL-0002bW-IU; Mon, 06 Jan 2020 08:43:51 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyH-0001Z4-D9 for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:48 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F2102072A; Mon, 6 Jan 2020 08:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300163; bh=T1Oa7zbOHffWDB1OltdRU6wsYmtDX4x74FL/eNDFpAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w3/2k6zYZvsVRCcVfwz/uGfgdpdoSbDHBsGtA9RAY2VU6wTulkqel+LpymxGNJiPB u89IP4Z+XyD4Y7r1xvKZDdCPrGnKal48LSd/P3FjXGE8b6LW5KGhYBoSH8qVCYZn2D SblmZUGTESwtIYGeYdUc4PzZ0kHLq4TzUsCILOBw= Received: by wens.tw (Postfix, from userid 1000) id 566A15FD2A; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 2/7] ARM: dts: sun7i: Add CSI1 controller and pinmux options Date: Mon, 6 Jan 2020 16:42:35 +0800 Message-Id: <20200106084240.1076-3-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004245_491622_40AB07ED X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai The CSI controller driver now supports the second CSI controller, CSI1. Add a device node for it. Pinmuxing options for the MCLK output, the standard 8-bit interface, and a secondary 24-bit interface are included. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun7i-a20.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 8aebefd6accf..92b5be97085d 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -729,6 +729,17 @@ ohci1: usb@1c1c400 { status = "disabled"; }; + csi1: csi@1c1d000 { + compatible = "allwinner,sun7i-a20-csi1", + "allwinner,sun4i-a10-csi1"; + reg = <0x01c1d000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>; + clock-names = "bus", "ram"; + resets = <&ccu RST_CSI1>; + status = "disabled"; + }; + spi3: spi@1c1f000 { compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c1f000 0x1000>; @@ -802,6 +813,31 @@ csi0_clk_pin: csi-clk-pin { function = "csi0"; }; + /omit-if-no-ref/ + csi1_8bits_pg_pins: csi1-8bits-pg-pins { + pins = "PG0", "PG2", "PG3", "PG4", "PG5", + "PG6", "PG7", "PG8", "PG9", "PG10", + "PG11"; + function = "csi1"; + }; + + /omit-if-no-ref/ + csi1_24bits_ph_pins: csi1-24bits-ph-pins { + pins = "PH0", "PH1", "PH2", "PH3", "PH4", + "PH5", "PH6", "PH7", "PH8", "PH9", + "PH10", "PH11", "PH12", "PH13", "PH14", + "PH15", "PH16", "PH17", "PH18", "PH19", + "PH20", "PH21", "PH22", "PH23", "PH24", + "PH25", "PH26", "PH27"; + function = "csi1"; + }; + + /omit-if-no-ref/ + csi1_clk_pg_pin: csi1-clk-pg-pin { + pins = "PG1"; + function = "csi1"; + }; + /omit-if-no-ref/ emac_pa_pins: emac-pa-pins { pins = "PA0", "PA1", "PA2", From patchwork Mon Jan 6 08:42:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318817 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47A311395 for ; Mon, 6 Jan 2020 08:43:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25DC62072A for ; Mon, 6 Jan 2020 08:43:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nT93e1ig"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="OHzik1a0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25DC62072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=na3gCjmRojM8FUUlUnHxqwdd3oxSq3mcNqjJAyhdaLc=; b=nT93e1igWOt28i pFuiv00GAJ6A+hlRXC6cNn7JE5PzHTq52t/te4x+Gn329bQeeA/ep3xiE/jRTb8hXz6CPVFPBNjoE 5I2esOQMIjcucEC5ZfEjRAcZHz+XXJGsT+LZk5/ApJ/4hXaWzlHrcVm78G74eR3XiwgUcR5Zgm80i B8owm8XrAbEZU9rOieGh1okXSAutK2TxCm2azXYhX+Q57IIQ8EI6Jf6azw4Kv1nG7kgM+LG0KVBUD aVtYLYXtHR3Qo4D0DPhAz2JND/Jf4TZfBIC05xxUSPL/Y/qdmozBcML0UylGsnJUDA3EGLE/CJ/e2 JllQFnmls69g7oNH4/yg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyo-000270-EC; Mon, 06 Jan 2020 08:43:18 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyH-0001Z7-DB for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:48 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7242C218AC; Mon, 6 Jan 2020 08:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300163; bh=skvqTBhyyO1FLCKZxItSUc6ySkZigVQbcigpeQ2las4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OHzik1a0IegjwU3lIugBdpBedMfxBLKx0R7iuzCFdziHpwCK7VMMFrqKp/jkyZpS/ fprm7uOyFh4Cq+RAYj0kOzvGE7I01f60GhKEH124Q5iMzx6fSpZySyYu0lwBhnT8BE G+bHgc598+v8wlHs/+3Mosb+Jayt2KF4UFHwKl5s= Received: by wens.tw (Postfix, from userid 1000) id 5BAB55FCEC; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 3/7] dt-bindings: bus: sunxi: Add R40 MBUS compatible Date: Mon, 6 Jan 2020 16:42:36 +0800 Message-Id: <20200106084240.1076-4-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004245_488293_E9816578 X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai Allwinner R40 SoC also contains MBUS controller. Add compatible for it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- Changes since v1: - Reworked on top of "dt-bindings: interconnect: Convert Allwinner MBUS controller to a schema" This particular patch should go through Rob's tree, instead of the sunxi tree. --- .../devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml index 9370e64992dd..23cda7437dcb 100644 --- a/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml +++ b/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml @@ -30,6 +30,7 @@ properties: enum: - allwinner,sun5i-a13-mbus - allwinner,sun8i-h3-mbus + - allwinner,sun8i-r40-mbus reg: maxItems: 1 From patchwork Mon Jan 6 08:42:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C6E5138D for ; Mon, 6 Jan 2020 08:42:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2C6720656 for ; Mon, 6 Jan 2020 08:42:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oFfrUM3B"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jy2xk/me" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2C6720656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=oG9Hcx0nWh45ajxp93ePcVH3PGmUI1Locoa7WXeOGeY=; b=oFfrUM3Bn5yZ+Q Z27S7mTQQksFkFoPzyU1ITnhH13DiDS97eNZ6V/DueoPSYQ533roy+I910+CgEXrFRWOHwCoUjSlJ HzM0gwr2toiZNRheV8AzIQn2w4P3lEUt/Db+9iKuuWXisMIZ2aixfDUwtUsFLeraRek1KSq+KDbwG lazIAFtI518kp916VAQbYKsBWoolFGphObo4F4Ee9gzOTt2vN4rtvIbw6vemYrWt4rF7R58MxgQlH GLAio1PquxA3n87Ppw7KRscGfVqTwPKZlSEebgHAFKLFIy+wlBpXOk74ybvGrhgRstOHOqVANRk9L Mk89lnfVEt6LNie33ikw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyT-0001ky-59; Mon, 06 Jan 2020 08:42:57 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyH-0001Z6-DC for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:46 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 605E221734; Mon, 6 Jan 2020 08:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300163; bh=VJ4ImZ00cxy3xkCVmZ6KZaFMceyqzh4UVXc9csKCJc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jy2xk/me0XoytAHWGwDMuBVDqNtR7ItKlG980kKOeHCSXvb2oamlqMb0VFYEZSkSz aIC0LdHDay20/0Goe6o4x3cmR22PzfOLbioj2kyxn6laabk1Mfbqa71O+p2cq19vLv ibfxE/BxKLtWTGhQzVmyv6hEe8hWINX4ZnJAQdws= Received: by wens.tw (Postfix, from userid 1000) id 60F0D5FD64; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 4/7] ARM: dts: sun8i: r40: Add device node for CSI0 Date: Mon, 6 Jan 2020 16:42:37 +0800 Message-Id: <20200106084240.1076-5-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004245_482850_A28FA28A X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai The CSI0 and CSI1 blocks are the same as found on the A20. However only CSI0 is supported upstream right now. Add a device node for CSI0 using the A20 compatible as a fallback, and the standard pinctrl options. Also add the MBUS interconnect. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun8i-r40.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi index 7c940b20b81c..84d240c39f0f 100644 --- a/arch/arm/boot/dts/sun8i-r40.dtsi +++ b/arch/arm/boot/dts/sun8i-r40.dtsi @@ -181,6 +181,20 @@ nmi_intc: interrupt-controller@1c00030 { interrupts = ; }; + csi0: csi@1c09000 { + compatible = "allwinner,sun8i-r40-csi0", + "allwinner,sun7i-a20-csi0"; + reg = <0x01c09000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI0>, <&ccu CLK_CSI_SCLK>, + <&ccu CLK_DRAM_CSI0>; + clock-names = "bus", "isp", "ram"; + resets = <&ccu RST_BUS_CSI0>; + interconnects = <&mbus 5>; + interconnect-names = "dma-mem"; + status = "disabled"; + }; + mmc0: mmc@1c0f000 { compatible = "allwinner,sun8i-r40-mmc", "allwinner,sun50i-a64-mmc"; @@ -356,6 +370,20 @@ clk_out_a_pin: clk-out-a-pin { function = "clk_out_a"; }; + /omit-if-no-ref/ + csi0_8bits_pins: csi0-8bits-pins { + pins = "PE0", "PE2", "PE3", "PE4", "PE5", + "PE6", "PE7", "PE8", "PE9", "PE10", + "PE11"; + function = "csi0"; + }; + + /omit-if-no-ref/ + csi0_mclk_pin: csi0-mclk-pin { + pins = "PE1"; + function = "csi0"; + }; + gmac_rgmii_pins: gmac-rgmii-pins { pins = "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", @@ -625,6 +653,14 @@ gmac_mdio: mdio { }; }; + mbus: dram-controller@1c62000 { + compatible = "allwinner,sun8i-r40-mbus"; + reg = <0x01c62000 0x1000>; + clocks = <&ccu 155>; + dma-ranges = <0x00000000 0x40000000 0x80000000>; + #interconnect-cells = <1>; + }; + tcon_top: tcon-top@1c70000 { compatible = "allwinner,sun8i-r40-tcon-top"; reg = <0x01c70000 0x1000>; From patchwork Mon Jan 6 08:42:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318825 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E25A3138D for ; Mon, 6 Jan 2020 08:44:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF3D220656 for ; Mon, 6 Jan 2020 08:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WIjSTBgZ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pXwgWqOL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF3D220656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=+BSsJwyVNTg9fsKmWgc9fZZ4w0ThyxFHwchzjMQ2Aag=; b=WIjSTBgZgsTKvj /VmPmE6ankyeZdLTiUA7YeiQFuzuIKYlbZjI054ykv/ExR+bntvnsFMvNRHt7DgfFboaLZ2Jomtjz geaJFMGM4xM/Ha5u0IqSjTgeVECVyHzbUECGz5idvnoQ2IBW4HEVZ2ZziKzG19AFao4g7axGlBYCO 6jOH7bgdRz1lme4RVQlvLx4lVrI57ZCXay6UmcFidJK88yFs8bJ1LgKvub0xjO+49eiEXle54LSiU UAztCa6A5nQLL9Il/UlMO4tqhkoRViptSrUjgnYVYiCVvpgeHSoLp/SdMvzZ5pPH5jkdAiSz+jGVW 3MPTbFfks+sHNkHxijrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNzn-00032S-L9; Mon, 06 Jan 2020 08:44:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyJ-0001aV-0K for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:50 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C33B24650; Mon, 6 Jan 2020 08:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300165; bh=eabKL18AAzpQs7KMk7cqLiDvGMendqJwGmYVKRn/npc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pXwgWqOLaJDHrV6gn7hPWU3tYmP03Kj7jWrjjfrxSrXL4FWxVbPRsJb70RgiflMH9 BobgEdByqkaNjxeyRIx914goQAcOnICbepYLASF/nDWFRITne3EjYZ9MPoQxn3o7MO vIsjK25aMT5HAXTY/MArWQn7dRAwPSheLdvNQjGg= Received: by wens.tw (Postfix, from userid 1000) id 68F155FD69; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 5/7] [DO NOT MERGE] ARM: dts: sun4i: cubieboard: Enable OV7670 camera on CSI1 Date: Mon, 6 Jan 2020 16:42:38 +0800 Message-Id: <20200106084240.1076-6-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004247_105663_E0118BEB X-CRM114-Status: GOOD ( 13.38 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai The Cubieboard has CSI1 pins exposed on one of its GPIO headers. Combined with I2C1 on the same header, a connected OV7670 based camera module can be used. Power is provided via the 5V rail on the same header. The module has onboard LDOs for the sensor's various power rails. Add a device node for the sensor, enable CSI1 and I2C1, and hook everything up. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 6ca02e824acc..29bfec8fad5b 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts @@ -101,6 +101,25 @@ &cpu0 { cpu-supply = <®_dcdc2>; }; +&csi1 { + pinctrl-names = "default"; + pinctrl-0 = <&csi1_8bits_pg_pins>; + status = "okay"; + + port { + /* Parallel bus endpoint */ + csi_from_ov7670: endpoint { + remote-endpoint = <&ov7670_to_csi>; + bus-width = <8>; + /* driver is broken */ + hsync-active = <0>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &de { status = "okay"; }; @@ -143,6 +162,29 @@ axp209: pmic@34 { &i2c1 { status = "okay"; + + ov7670: camera@21 { + compatible = "ovti,ov7670"; + reg = <0x21>; + pinctrl-names = "default"; + pinctrl-0 = <&csi1_clk_pg_pin>; + clocks = <&ccu CLK_CSI1>; + clock-names = "xclk"; + + reset-gpios = <&pio 7 14 GPIO_ACTIVE_LOW>; /* PH14 */ + powerdown-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ + + port { + ov7670_to_csi: endpoint { + remote-endpoint = <&csi_from_ov7670>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; }; &ir0 { From patchwork Mon Jan 6 08:42:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C1B1138D for ; Mon, 6 Jan 2020 08:44:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0779F20656 for ; Mon, 6 Jan 2020 08:44:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hFhzq+1Z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kkn9GuTF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0779F20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=DDB8Ax69NWJYvaqbpm+BQt5h74LpArCYBmbMCSjWlzE=; b=hFhzq+1ZYu7Urg +M5EXUmL7oZdeIKzqHyb1CDH0Z4WvfWA1Ms3C4NOfuRRBEb4vylK9vWElPEbO8xbP806+Dp1iRXnJ kH2/ZOo+V5U/7NSirXiOIEZqY/3buG7QeZCyT66cw6S2W6E2t30Rq8d3HciOoLrNFECbQMPdcBsxX ZSxpS9KfFOz/xBFmrCKMCeRl2OhBZex1Typv9kj079WgnUjy+lhKcjfypTAyKi7Mnryc7cVmMWPY/ oMsG4wsV2daf4/Z4bEIgsYEEmNF1jyKVRYPVdRNuxsgQMW/SVBiK7Ak3ui+uf+G1sX3hjbzfmOaeB htc1LbE2kY7yx/jLUkCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNzY-0002ne-Ua; Mon, 06 Jan 2020 08:44:04 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyI-0001aY-Us for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:50 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D5B42468B; Mon, 6 Jan 2020 08:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300165; bh=taWgwUhGcd/iS2EKymh/retvbso5JBoh7oLw2x9VN+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkn9GuTFR3efBa3mRAcOm7wiqlxsEGy3SAuaE3IUBLv624JXbGADf6hm/yjtOQDT3 t0KauMUuQgELciro4AUY1eh4eNEbPLg1q9C2Yv4XgUr959yZpg6sfRFAU1l8/HXp23 xRvswfjmhczIMoiuTLpdk9LZf4SRlvohsI89XFRM= Received: by wens.tw (Postfix, from userid 1000) id 6DDE65FD7A; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 6/7] [DO NOT MERGE] ARM: dts: sun7i: cubieboard2: Enable OV7670 camera on CSI1 Date: Mon, 6 Jan 2020 16:42:39 +0800 Message-Id: <20200106084240.1076-7-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004247_025067_5D5F32ED X-CRM114-Status: GOOD ( 13.56 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai The Cubieboard2 has CSI1 pins exposed on one of its GPIO headers. Combined with I2C1 on the same header, a connected OV7670 based camera module can be used. Power is provided via the 5V rail on the same header. The module has onboard LDOs for the sensor's various power rails. Add a device node for the sensor, enable CSI1 and I2C1, and hook everything up. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index b8203e4ef21c..0ff1593041eb 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -100,6 +100,25 @@ &cpu0 { cpu-supply = <®_dcdc2>; }; +&csi1 { + pinctrl-names = "default"; + pinctrl-0 = <&csi1_8bits_pg_pins>; + status = "okay"; + + port { + /* Parallel bus endpoint */ + csi_from_ov7670: endpoint { + remote-endpoint = <&ov7670_to_csi>; + bus-width = <8>; + /* driver is broken */ + hsync-active = <0>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &de { status = "okay"; }; @@ -142,6 +161,29 @@ axp209: pmic@34 { &i2c1 { status = "okay"; + + ov7670: camera@21 { + compatible = "ovti,ov7670"; + reg = <0x21>; + pinctrl-names = "default"; + pinctrl-0 = <&csi1_clk_pg_pin>; + clocks = <&ccu CLK_CSI1>; + clock-names = "xclk"; + + reset-gpios = <&pio 7 14 GPIO_ACTIVE_LOW>; /* PH14 */ + powerdown-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ + + port { + ov7670_to_csi: endpoint { + remote-endpoint = <&csi_from_ov7670>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; }; &ir0 { From patchwork Mon Jan 6 08:42:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11318827 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6F1E138D for ; Mon, 6 Jan 2020 08:44:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 725B820656 for ; Mon, 6 Jan 2020 08:44:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l8l/Gcs8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="unTNw/nH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 725B820656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=kpsrxyJXdT9W7N0ovptgvdURK3FXjBbk1oO2WZvvvS0=; b=l8l/Gcs8jioP5N 0E9Qm17ZUPIf2v2DwYtBBvT8obup1aqmsfwmCARrIrZJol4Zytrug4UxutFszxwPDoUzQSY/7ESoG lq2C+BV9TBe4X3EI6kGl6TkrzllN/4JH5BxPc4oGDYbYYZirB5Yi1nrC6xuQjgyYe2aj+BDbDywOE d9krysPKl8Ej5QJXVCWGLZm71AfY2SGSRtoLrcBEo6EVH4ZGQ97eFBXuffwWp7oqO8gKIk9kRAZLq XqV2VsVxO3eVGYn1o0pMP3SvyqrEt2xzCCVXnhPO9QrtTMN/VAXKGDQWHh58LGH+zrVhc5QgxsXCw LheXycmwZgeaEm/pERAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNzx-0003EK-OS; Mon, 06 Jan 2020 08:44:29 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ioNyI-0001aU-VP for linux-arm-kernel@lists.infradead.org; Mon, 06 Jan 2020 08:42:50 +0000 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6381B2467C; Mon, 6 Jan 2020 08:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578300165; bh=0EIGPjYZo6FBtZUEJQgirKj6xdjoxrfaE3eT2iKS86s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=unTNw/nHTKzY1uXQZVSWdfnLxW9lfD7nao0e3WVvhzeaa2N4VgILukEnQwHayt+PX zD/ZWIdj9j0IDldXXusntoeJxgHzAgLPoFoMdMQMRqZMus1eDGTr7MFBZpjdZZRN3g fnjF2/nNcPxDeqdtX1sdwfm7m7K+bGZKKX+9mymk= Received: by wens.tw (Postfix, from userid 1000) id 73CB35FD7D; Mon, 6 Jan 2020 16:42:41 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 7/7] [DO NOT MERGE] ARM: dts: sun8i-r40: bananapi-m2-ultra: Enable OV5640 camera Date: Mon, 6 Jan 2020 16:42:40 +0800 Message-Id: <20200106084240.1076-8-wens@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106084240.1076-1-wens@kernel.org> References: <20200106084240.1076-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200106_004247_084513_818695BE X-CRM114-Status: GOOD ( 12.89 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Chen-Yu Tsai Bananapi offers a small OV5640 based camera module, attached via an FPC connector. Add the related regulator constraints, and hook everything up. Signed-off-by: Chen-Yu Tsai --- .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts index 42d62d1ba1dc..86183d40c7af 100644 --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts @@ -113,6 +113,24 @@ &ahci { status = "okay"; }; +&csi0 { + pinctrl-names = "default"; + pinctrl-0 = <&csi0_8bits_pins>; + status = "okay"; + + port { + /* Parallel bus endpoint */ + csi0_from_ov5640: endpoint { + remote-endpoint = <&ov5640_to_csi0>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &de { status = "okay"; }; @@ -164,6 +182,37 @@ axp22x: pmic@34 { #include "axp22x.dtsi" +&i2c4 { + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&csi0_mclk_pin>; + clocks = <&ccu CLK_CSI0_MCLK>; + clock-names = "xclk"; + + reset-gpios = <&pio 8 7 GPIO_ACTIVE_LOW>; /* PI7 */ + powerdown-gpios = <&pio 8 6 GPIO_ACTIVE_HIGH>; /* PI6 */ + AVDD-supply = <®_aldo1>; + DOVDD-supply = <®_eldo1>; + DVDD-supply = <®_eldo2>; + + port { + ov5640_to_csi0: endpoint { + remote-endpoint = <&csi0_from_ov5640>; + bus-width = <8>; + data-shift = <2>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; +}; + &mmc0 { vmmc-supply = <®_dcdc1>; bus-width = <4>; @@ -209,6 +258,12 @@ &pio { vcc-pg-supply = <®_dldo1>; }; +®_aldo1 { + regulator-name = "csi-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; + ®_aldo2 { regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; @@ -289,6 +344,18 @@ ®_dldo4 { regulator-name = "vdd2v5-sata"; }; +®_eldo1 { + regulator-name = "csi-iovcc"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; + +®_eldo2 { + regulator-name = "csi-dvdd"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; +}; + ®_eldo3 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>;