From patchwork Tue Nov 18 23:02:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 5333601 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 619D09F1E1 for ; Tue, 18 Nov 2014 23:03:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9090D201CE for ; Tue, 18 Nov 2014 23:03:00 +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 B402C2018E for ; Tue, 18 Nov 2014 23:02:59 +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 1Xqrls-0004IM-RK; Tue, 18 Nov 2014 23:01:16 +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 1Xqrlh-0003zE-NC for linux-arm-kernel@lists.infradead.org; Tue, 18 Nov 2014 23:01:06 +0000 Received: by smtp.natisbad.org (Postfix, from userid 109) id A4D2E1700D44; Wed, 19 Nov 2014 00:00:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416351644; bh=GycmWSrCc00kSOSbIWNwhs1SN9v1g4wdgznvLmcdMJ8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=y/YsNDDpJfroq27lqLbs6rqB3H1yYIeQzfllj1qnygj7l/lnJ5UPM1O1qONydM2xf sh/ZJzJax8Q/g9TtuPxEwkcJ16Z/BFDqPQetXQMJv/tKE7MIqHZbB3WNTVidyTEnUy uoQkdY6RI/Oq7msQGG9saNzgGyvr/4rSACMZ4CVE= 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 AF0D217004A8; Tue, 18 Nov 2014 23:58:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416351537; bh=GycmWSrCc00kSOSbIWNwhs1SN9v1g4wdgznvLmcdMJ8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=d1qrBB0ugALJcsUVPu8wRiklC1pa4kBog7SaJNeaCtZ1FikmqrD+fS35W8xsqvtmT u23ZyGXZyivUTYimONoqU5igAUBvR/JdShAiW0TiayXYyBdY8ypWa58P1nxEK1GEcH EHwmL2uyg4l/NsHG1yp98tTaf1hyGrrHeC04JGbQ= X-Hashcash: 1:20:141118:jason@lakedaemon.net::Pi4cxNyUlZpB8J8Z:000000000000000000000000000000000000000000mcZ X-Hashcash: 1:20:141118:andrew@lunn.ch::op9Md80/ZxxWbX7V:0004Yaf X-Hashcash: 1:20:141118:gregory.clement@free-electrons.com::3I3thcY8QH4EaRfY:0000000000000000000000000009rNc X-Hashcash: 1:20:141118:sebastian.hesselbarth@gmail.com::X3VsydbPqONw8xfz:0000000000000000000000000000008SZ7 X-Hashcash: 1:20:141118:klightspeed@killerwolves.net::ogs1VYwohuX3KFOU:0000000000000000000000000000000008AwK X-Hashcash: 1:20:141118:linux@arm.linux.org.uk::QuwCsWqx+HbdtNCG:0000000000000000000000000000000000000004Kj/ X-Hashcash: 1:20:141118:linux-arm-kernel@lists.infradead.org::66dwIuiIy565wDse:000000000000000000000000026Zj X-Hashcash: 1:20:141118:rob.herring@calxeda.com::SM2L296u1JMCbseu:00000000000000000000000000000000000000834F X-Hashcash: 1:20:141118:pawel.moll@arm.com::NKBOEj5FN3KWHD3e:0000000000000000000000000000000000000000000376b X-Hashcash: 1:20:141118:mark.rutland@arm.com::ocpZOwsrUBE3+81C:000000000000000000000000000000000000000003TlL X-Hashcash: 1:20:141118:swarren@wwwdotorg.org::+DPFwOsol5OIMr3f:00000000000000000000000000000000000000000c3y X-Hashcash: 1:20:141118:ijc+devicetree@hellion.org.uk::fAYn13/+PFPx1zkX:000000000000000000000000000000006nAf X-Hashcash: 1:20:141118:devicetree@vger.kernel.org::59WlXAbY8JKAM/QC:000000000000000000000000000000000002BT5 From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ben Peddell Subject: [PATCHv4 05/10] arm: mvebu: define and use common Armada 370 SPI pinctrl settings In-Reply-To: References: Message-Id: <8690589e7b966e0dfe659cafb8a17164d4b4c5df.1416351426.git.arno@natisbad.org> Date: Wed, 19 Nov 2014 00:02:19 +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-20141118_150106_102239_25DBD10F 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 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..f1284ae0cddd 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -197,6 +197,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>; }; @@ -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";