From patchwork Fri Dec 29 16:17:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 10137217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29C736020A for ; Fri, 29 Dec 2017 16:19:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1973920182 for ; Fri, 29 Dec 2017 16:19:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CACA2BABC; Fri, 29 Dec 2017 16:19:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2D3320182 for ; Fri, 29 Dec 2017 16:19:47 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=g6Q4FOVTFm5jh0AInqfow2Q+sIWcb7f7kJ09D+rG100=; b=DmAeOjT/Kns3v6GI056MKuZN0l fINfqxOyiiWJQ6N0yiLOAFsBN0dAOxw3Eqrl7F0sTfZg/ALk30SJjtwqbDOUO/Uo7OTOvhN/PxLW7 IFgI//FKJhGhl07dBQ1wkynEAqrLyZenzQzeIdtdUabJgLuEbweQ0a0Nz9xlDWy4EQ2GfYSp7l6v1 T8aQ4XcKDid5tualtb26GP1uawKZgoLQitCbyk113DMfZm2jqa1rwypVKRaaXMPlbq+U7hCpivei6 ATIwfOvCP8ywMYSgbkSn9rnn/DRGJkZTcXu1zkpdhKlry5UWiemfsXBuxqZoToRV/Y1QmOPuJ56kr DrYYubXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUxNn-0007gY-Qt; Fri, 29 Dec 2017 16:19:43 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUxLy-0006Zj-2O for linux-arm-kernel@lists.infradead.org; Fri, 29 Dec 2017 16:17:55 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id EA9A320731; Fri, 29 Dec 2017 17:17:35 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id BC2F120740; Fri, 29 Dec 2017 17:17:25 +0100 (CET) From: Thomas Petazzoni To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Subject: [PATCH 3/4] arm64: dts: marvell: use aliases for SPI busses on Armada 7K/8K Date: Fri, 29 Dec 2017 17:17:17 +0100 Message-Id: <20171229161718.8896-4-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171229161718.8896-1-thomas.petazzoni@free-electrons.com> References: <20171229161718.8896-1-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171229_081750_508340_09A36495 X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Yehuda Yitschak , Antoine Tenart , Nadav Haklai , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Hanna Hawa , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 We are currently using the cell-index DT property to assign SPI bus numbers. This property is specific to the spi-orion driver, and requires each SPI controller to have a unique ID defined in the Device Tree. As we are about to merge armada-cp110-master.dtsi and armada-cp110-slave.dtsi into a single file, those cell-index properties that differ between the master CP110 and the slave CP110 are a difference that would have to be handled. In order to avoid this, we switch to using the "aliases" DT node to assign a unique number to each SPI controller. This is more generic, and directly handled by the SPI core. Signed-off-by: Thomas Petazzoni --- arch/arm64/boot/dts/marvell/armada-70x0.dtsi | 2 ++ arch/arm64/boot/dts/marvell/armada-80x0.dtsi | 4 ++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 -- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 -- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-70x0.dtsi b/arch/arm64/boot/dts/marvell/armada-70x0.dtsi index 0e1a1e5be399..815e64b3a874 100644 --- a/arch/arm64/boot/dts/marvell/armada-70x0.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-70x0.dtsi @@ -50,6 +50,8 @@ aliases { gpio1 = &cpm_gpio1; gpio2 = &cpm_gpio2; + spi1 = &cpm_spi0; + spi2 = &cpm_spi1; }; }; diff --git a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi index b280ddd3c397..de9c34333cd4 100644 --- a/arch/arm64/boot/dts/marvell/armada-80x0.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-80x0.dtsi @@ -51,6 +51,10 @@ aliases { gpio1 = &cps_gpio1; gpio2 = &cpm_gpio2; + spi1 = &cpm_spi0; + spi2 = &cpm_spi1; + spi3 = &cps_spi0; + spi4 = &cps_spi1; }; }; diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi index 7ef72d98f32b..8bf318dbd674 100644 --- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi @@ -58,6 +58,7 @@ serial0 = &uart0; serial1 = &uart1; gpio0 = &ap_gpio; + spi0 = &spi0; }; psci { @@ -203,7 +204,6 @@ reg = <0x510600 0x50>; #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; interrupts = ; clocks = <&ap_clk 3>; status = "disabled"; diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi index 69ef3305b3e7..37d2151bf1c7 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi @@ -274,7 +274,6 @@ reg = <0x700600 0x50>; #address-cells = <0x1>; #size-cells = <0x0>; - cell-index = <1>; clocks = <&cpm_clk 1 21>; status = "disabled"; }; @@ -284,7 +283,6 @@ reg = <0x700680 0x50>; #address-cells = <1>; #size-cells = <0>; - cell-index = <2>; clocks = <&cpm_clk 1 21>; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi index 1458f312497b..646db0938a28 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi @@ -275,7 +275,6 @@ reg = <0x700600 0x50>; #address-cells = <0x1>; #size-cells = <0x0>; - cell-index = <3>; clocks = <&cps_clk 1 21>; status = "disabled"; }; @@ -285,7 +284,6 @@ reg = <0x700680 0x50>; #address-cells = <1>; #size-cells = <0>; - cell-index = <4>; clocks = <&cps_clk 1 21>; status = "disabled"; };