From patchwork Tue Jan 2 14:55:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 10140749 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 8DD0D601A1 for ; Tue, 2 Jan 2018 15:00:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 957B228B81 for ; Tue, 2 Jan 2018 15:00:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 870A228B99; Tue, 2 Jan 2018 15:00:33 +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 DB58928B81 for ; Tue, 2 Jan 2018 15:00:32 +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=zSrFLTkRPdtZPRlMqRlD+d2c6ptAzYe7PJQLywRbP3I=; b=kV8NnFupwFu8ee8q7mSqRCeAw5 +xbdbXeE7pCySYCldpj2XGISHybyKIfd9wDQzBX34KE3AxAozDUeaz5qKakxm8UfsntUntYoXcNtF zpLVYLDvZU+mSHi3uZ00PeVUdvWn/gTaOSXqQ7KWAWtsyBBc0aFRXWT49le2LkQIxo5Ucg9W/tXyH +MYF+um4KSxKncXklRoBh7gYX5tJPWFZuO6u7iCA3h4QLI350pRHpKFGsslzsno8j4JRpRsL4fkDM E8b3vUQ4pwnM9rPdYJVG+T499vtu9g0/g6KRMdcrzbozgu/37xCeOs+TzsoK/IMS2A6Fw2Fa0zcTx QeM/dp8Q==; 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 1eWO3G-0001XU-Ll; Tue, 02 Jan 2018 15:00:26 +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 1eWO0K-0007Ti-52 for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2018 14:57:32 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 87BAA207A7; Tue, 2 Jan 2018 15:56:59 +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 5D49120377; Tue, 2 Jan 2018 15:56:59 +0100 (CET) From: Thomas Petazzoni To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Subject: [PATCH v2 6/8] arm64: dts: marvell: use aliases for SPI busses on Armada 7K/8K Date: Tue, 2 Jan 2018 15:55:56 +0100 Message-Id: <20180102145558.9773-7-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180102145558.9773-1-thomas.petazzoni@free-electrons.com> References: <20180102145558.9773-1-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_065725_086484_64F64F78 X-CRM114-Status: GOOD ( 12.40 ) 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 , Hanna Hawa , Nadav Haklai , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Antoine Tenart , 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 0575207cafee..f9b66b81f9fc 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 f89053577bcc..162e6c228bd9 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi @@ -280,7 +280,6 @@ reg = <0x700600 0x50>; #address-cells = <0x1>; #size-cells = <0x0>; - cell-index = <1>; clocks = <&cpm_clk 1 21>; status = "disabled"; }; @@ -290,7 +289,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 a658b72b0229..207b6f444e24 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi @@ -281,7 +281,6 @@ reg = <0x700600 0x50>; #address-cells = <0x1>; #size-cells = <0x0>; - cell-index = <3>; clocks = <&cps_clk 1 21>; status = "disabled"; }; @@ -291,7 +290,6 @@ reg = <0x700680 0x50>; #address-cells = <1>; #size-cells = <0>; - cell-index = <4>; clocks = <&cps_clk 1 21>; status = "disabled"; };