From patchwork Fri Nov 21 19:45:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 5357651 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 6489B9F2F1 for ; Fri, 21 Nov 2014 19:47:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86092201FA for ; Fri, 21 Nov 2014 19:47:23 +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 A4C3A200E6 for ; Fri, 21 Nov 2014 19:47:22 +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 1Xru8M-0006LU-Ay; Fri, 21 Nov 2014 19:44:46 +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 1Xru84-000658-My for linux-arm-kernel@lists.infradead.org; Fri, 21 Nov 2014 19:44:29 +0000 Received: by smtp.natisbad.org (Postfix, from userid 109) id C233A1700769; Fri, 21 Nov 2014 20:44:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416599046; bh=GycmWSrCc00kSOSbIWNwhs1SN9v1g4wdgznvLmcdMJ8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LvCOYj9o5BlvWWzIagHiXPJDMEfilZZszkPhvDxPvLWMV//ouSLPF786YhVTrFSpJ g3pAf2RAGx52aqPxJeWONMbmK1fMl6Jk4ZhDARRW0cr/iuMs5pm24D3+Rj3ukLCQU6 F8sC+boICytW+ofPiWt6dnNJWmQ+cG9XZE3Kqo5c= 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 39A921700D2F; Fri, 21 Nov 2014 20:42:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1416598934; bh=GycmWSrCc00kSOSbIWNwhs1SN9v1g4wdgznvLmcdMJ8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=V1TpenqzU5goxyGln05BpTiuN8KT1V+MNEiARfP1LYULYWb09h1sb5hySiE7jyMKf e+p9F0L8vIUhUmUX/Dv2w527cck8pN1PDHkoiu/26ntTNbjJfIgc8iX8eyuIUYH8F2 lA3kOB5pqh0s/YQBHMUUp7t+cFRVnNtD+zd9Po1A= X-Hashcash: 1:20:141121:jason@lakedaemon.net::yd7IzfauI0L5KzNe:0000000000000000000000000000000000000000031eQ X-Hashcash: 1:20:141121:andrew@lunn.ch::6HWEeMFl+0YTz9ny:0003yvS X-Hashcash: 1:20:141121:gregory.clement@free-electrons.com::SQbuAu1tKzlx0A0G:0000000000000000000000000000cdW X-Hashcash: 1:20:141121:sebastian.hesselbarth@gmail.com::KuD4StYcFshcvaP2:000000000000000000000000000000YcL6 X-Hashcash: 1:20:141121:klightspeed@killerwolves.net::wr67HJATT95/KI03:000000000000000000000000000000000Afao X-Hashcash: 1:20:141121:linux@arm.linux.org.uk::EgNuz1oMZJXhODlN:00000000000000000000000000000000000000019Q0 X-Hashcash: 1:20:141121:linux-arm-kernel@lists.infradead.org::CfuyhVtyRoezREVH:00000000000000000000000000q0q X-Hashcash: 1:20:141121:rob.herring@calxeda.com::87zUqaNgLCR/XkqK:000000000000000000000000000000000000001h3m X-Hashcash: 1:20:141121:pawel.moll@arm.com::QrZN7/A4plfjcHet:00000000000000000000000000000000000000000001X4r X-Hashcash: 1:20:141121:mark.rutland@arm.com::fNXR1nh5TJ3Yqxml:000000000000000000000000000000000000000006p58 X-Hashcash: 1:20:141121:swarren@wwwdotorg.org::Lrg2/yNnHLeI0Jav:000000000000000000000000000000000000000011hC X-Hashcash: 1:20:141121:ijc+devicetree@hellion.org.uk::p1E2N+Ub+m7KGD2i:000000000000000000000000000000000C0X X-Hashcash: 1:20:141121:devicetree@vger.kernel.org::05HDA5kURkhEJKgK:000000000000000000000000000000000000Bgz From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ben Peddell Subject: [PATCHv5 05/10] arm: mvebu: define and use common Armada 370 SPI pinctrl settings In-Reply-To: References: Message-Id: Date: Fri, 21 Nov 2014 20:45:44 +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_114428_979212_16B399E4 X-CRM114-Status: GOOD ( 12.13 ) 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";