From patchwork Mon Nov 17 23:27:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 5324461 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 409ED9F2ED for ; Mon, 17 Nov 2014 23:29:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7156520125 for ; Mon, 17 Nov 2014 23:29:45 +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 8BFEA20120 for ; Mon, 17 Nov 2014 23:29:44 +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 1XqVha-0003dB-CZ; Mon, 17 Nov 2014 23:27:22 +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 1XqVgr-0002pk-Oi for linux-arm-kernel@lists.infradead.org; Mon, 17 Nov 2014 23:26:38 +0000 Received: by smtp.natisbad.org (Postfix, from userid 109) id 73B33170073C; Tue, 18 Nov 2014 00:25:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416266754; bh=hyka154VIN6SBcBYF+QAL/+cQpWpmCnB0WfaTkpN9is=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hGT4IKylako+7wWZg94tCjR3if66cC3oNCPEsi+YtwCNJ6x19ZFuQa+VEP6vWkCF/ 6fz7EL0p2yCBKLzAhj+puDAZzeKVMDtT9FiY40mzOvehi4kcPJpymQYlkz3/WJUioB VqjZU7qwKp3MD7PzdycKZuwKJhF/jD8F5kTqKQM0= 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 8227417004FB; Tue, 18 Nov 2014 00:24:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416266661; bh=hyka154VIN6SBcBYF+QAL/+cQpWpmCnB0WfaTkpN9is=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dh4BhpijSp3OcFctRYEA1DSe7zcC0TdsdEN0Rg8vQlSeHAI0TD/on+qH/zjd7T+S0 VAvhGhqkR2nfx21IlBZBMih8RtUL7bPFQvtp+1l39hTCM3pjT9ZK8DeBCTRoIqWEih hwBk5x0q5ZQjKwp5WW31bsbFpj9epvFIHwAXT1zg= X-Hashcash: 1:20:141117:jason@lakedaemon.net::gRZKxwjgq8dfjuo7:000000000000000000000000000000000000000000bu9 X-Hashcash: 1:20:141117:andrew@lunn.ch::ey4WOjTKvmzIpKPF:0003uGc X-Hashcash: 1:20:141117:gregory.clement@free-electrons.com::BBWmIu1+0F1j0s2g:0000000000000000000000000003/wD X-Hashcash: 1:20:141117:sebastian.hesselbarth@gmail.com::gET9bON/QC0yXalU:0000000000000000000000000000005lKA X-Hashcash: 1:20:141117:klightspeed@killerwolves.net::N4GV6iqW+87QossZ:0000000000000000000000000000000004iwq X-Hashcash: 1:20:141117:linux@arm.linux.org.uk::ZDuZOT9ZqpJr16DF:0000000000000000000000000000000000000005LLz X-Hashcash: 1:20:141117:linux-arm-kernel@lists.infradead.org::TvYVi4QU3KlIx3sL:0000000000000000000000000575Y X-Hashcash: 1:20:141117:rob.herring@calxeda.com::tF+1WKqEysDPIJWs:000000000000000000000000000000000000000nf8 X-Hashcash: 1:20:141117:pawel.moll@arm.com::aS8po2BpchqvP1xE:00000000000000000000000000000000000000000000x+u X-Hashcash: 1:20:141117:mark.rutland@arm.com::RGiS7P5UtBRSZ5X/:000000000000000000000000000000000000000001o7q X-Hashcash: 1:20:141117:swarren@wwwdotorg.org::5YjcPCBj5x7mZh+2:00000000000000000000000000000000000000000RMS X-Hashcash: 1:20:141117:ijc+devicetree@hellion.org.uk::amVlgc7/3crbadwl:0000000000000000000000000000000052A5 X-Hashcash: 1:20:141117:devicetree@vger.kernel.org::6TlskcarGgHkEhBx:000000000000000000000000000000000004wfZ From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ben Peddell Subject: [PATCHv3 06/12] arm: mvebu: define and use common Armada 370 SPI pinctrl settings In-Reply-To: References: Message-Id: <153bdd2b24b1760a264e5f2b5db83da1939a1306.1416266432.git.arno@natisbad.org> Date: Tue, 18 Nov 2014 00:27:42 +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-20141117_152637_980486_D422A4A4 X-CRM114-Status: GOOD ( 12.46 ) 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 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 a495e5821ab8..c73fe9a91e59 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -135,6 +135,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 2040da11462b..901806f35f40 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -114,6 +114,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"; @@ -256,6 +274,20 @@ status = "disabled"; }; + /* + * 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"; + }; + usb@50000 { clocks = <&coreclk 0>; };