From patchwork Fri Nov 21 23:46:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 5358591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C5409F2F1 for ; Fri, 21 Nov 2014 23:47:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 451FC201BB for ; Fri, 21 Nov 2014 23:47:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EEF52015D for ; Fri, 21 Nov 2014 23:47:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrxtJ-0006c9-2U; Fri, 21 Nov 2014 23:45:29 +0000 Received: from 36.223.133.77.rev.sfr.net ([77.133.223.36] helo=smtp.natisbad.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrxsS-0004ox-PZ for linux-arm-kernel@lists.infradead.org; Fri, 21 Nov 2014 23:44:37 +0000 Received: by smtp.natisbad.org (Postfix, from userid 109) id 2359F1700D75; Sat, 22 Nov 2014 00:44:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416613456; bh=+GNcbm15FX8YhXAeLRNM3oJTdmEYHnREog9lUp2VCNA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Drn+BksEpm+Pgbs2jWm7cHC1zdIdOZJxK3DWejpYFIcspRxGd+P8LVY1G7MDZ957j a/s76YeDVxvVD7hoCDBBvntnPqOWjB8aMKgmodd+blhr74Inn0a64q6Kc8ACDU5OKw r7dRojvdSMbCYOx8uLxPYTncOCzBS76F3EGgSBGw= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from small (localhost [IPv6:::1]) by smtp.natisbad.org (Postfix) with ESMTP id 5C34517004A0; Sat, 22 Nov 2014 00:42:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416613366; bh=+GNcbm15FX8YhXAeLRNM3oJTdmEYHnREog9lUp2VCNA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=zhqq4CzEsroCu4om0r6IVgssh+9dY5rQFroMnQFwtoNk0UXt78KWgupf/fzUd2/+P 65gmIXjmg9c+Bir6sYcaY+I7S9rACcR77GIIoqoE7l6hXPyx+4ZWmUUoRU0tQ64nTP kshA1SPRzHsQxHjeNN8NsZ4ue28AF7oijyH+kvb4= X-Hashcash: 1:20:141121:jason@lakedaemon.net::Pde+1ftjqrF9Mrmp:000000000000000000000000000000000000000008319 X-Hashcash: 1:20:141121:andrew@lunn.ch::HlJqt579ilphHrAg:0000T2w X-Hashcash: 1:20:141121:gregory.clement@free-electrons.com::9p7DwM8C/9agR6FP:000000000000000000000000000L2mM X-Hashcash: 1:20:141121:sebastian.hesselbarth@gmail.com::nJRybpvooRuUr0Yy:0000000000000000000000000000002gNq X-Hashcash: 1:20:141121:klightspeed@killerwolves.net::fqwnBL9yZ40faRUj:000000000000000000000000000000000MarY X-Hashcash: 1:20:141121:linux@arm.linux.org.uk::y9oLbDzqpTtEx3mh:000000000000000000000000000000000000000Mu5V X-Hashcash: 1:20:141121:linux-arm-kernel@lists.infradead.org::ZutZkZ9Ic6D+L7NQ:0000000000000000000000000A8iL X-Hashcash: 1:20:141121:rob.herring@calxeda.com::5hbQrgD8AKAKmQZW:000000000000000000000000000000000000000rJd X-Hashcash: 1:20:141121:pawel.moll@arm.com::wxMGsLDLXOExZtIS:00000000000000000000000000000000000000000003DA8 X-Hashcash: 1:20:141121:mark.rutland@arm.com::4qFgW4S0IqG6RHQY:000000000000000000000000000000000000000000+sH X-Hashcash: 1:20:141121:swarren@wwwdotorg.org::zS+sNAX5oIZQ/IfE:000000000000000000000000000000000000000022Sj X-Hashcash: 1:20:141121:ijc+devicetree@hellion.org.uk::na7IA9G/9Khbao9S:00000000000000000000000000000000CqJF X-Hashcash: 1:20:141121:devicetree@vger.kernel.org::6Zd+0Ria41DSO/Mt:000000000000000000000000000000000004Kj5 From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ben Peddell Subject: [PATCHv6 05/10] arm: mvebu: define and use common Armada 370 SPI pinctrl settings In-Reply-To: References: Message-Id: <1e812eb63b37718e273463e22e4d7512f8f0b624.1416613429.git.arno@natisbad.org> Date: Sat, 22 Nov 2014 00:46:10 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141121_154437_050094_E17ACADC X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: 0.3 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Pawel Moll , Stephen Warren , Ian Campbell , Rob Herring , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 This patch defines common Armada 370 pinctrl settings for spi0 and spi1 interfaces: spi0: MPP33-36 as default, MPP32,63-65 as available alternate config spi1: MPP49-52 as default Currently, the Armada 370 DB .dts file has no explicit pinctrl info for the spi0 interface used to access the flash on the board. The patch fixes that by also adding explicit pinctrl info (MPP32,63-65) for this SPI interface. Note: this patch has the potential to break out-of-tree users w/o specific pinctrl settings for their spi interfaces if the default above does not match their config. Suggested-by: Andrew Lunn Acked-by: Andrew Lunn Signed-off-by: Arnaud Ebalard --- arch/arm/boot/dts/armada-370-db.dts | 2 ++ arch/arm/boot/dts/armada-370.dtsi | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 29f1c8c0369f..f688ab4202e3 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -111,6 +111,8 @@ }; spi0: spi@10600 { + pinctrl-0 = <&spi0_pins2>; + pinctrl-names = "default"; status = "okay"; spi-flash@0 { diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 90e1286d414f..f1227c53e92d 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -99,6 +99,20 @@ wt-override; }; + /* + * Default SPI pinctrl setting, can be overwritten on + * board level if a different configuration is used. + */ + spi0: spi@10600 { + pinctrl-0 = <&spi0_pins1>; + pinctrl-names = "default"; + }; + + spi1: spi@10680 { + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + }; + i2c0: i2c@11000 { reg = <0x11000 0x20>; }; @@ -249,6 +263,24 @@ &pinctrl { compatible = "marvell,mv88f6710-pinctrl"; + spi0_pins1: spi0-pins1 { + marvell,pins = "mpp33", "mpp34", + "mpp35", "mpp36"; + marvell,function = "spi0"; + }; + + spi0_pins2: spi0_pins2 { + marvell,pins = "mpp32", "mpp63", + "mpp64", "mpp65"; + marvell,function = "spi0"; + }; + + spi1_pins: spi1-pins { + marvell,pins = "mpp49", "mpp50", + "mpp51", "mpp52"; + marvell,function = "spi1"; + }; + sdio_pins1: sdio-pins1 { marvell,pins = "mpp9", "mpp11", "mpp12", "mpp13", "mpp14", "mpp15";