From patchwork Sat Sep 20 18:06:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 4942251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B084BEEA5 for ; Sat, 20 Sep 2014 18:09:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7A96201F7 for ; Sat, 20 Sep 2014 18:09:29 +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 CF224201F5 for ; Sat, 20 Sep 2014 18:09:28 +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 1XVP4X-0001dZ-4G; Sat, 20 Sep 2014 18:07:49 +0000 Received: from mail-wg0-f44.google.com ([74.125.82.44]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XVP3n-000115-QX for linux-arm-kernel@lists.infradead.org; Sat, 20 Sep 2014 18:07:05 +0000 Received: by mail-wg0-f44.google.com with SMTP id z12so1002634wgg.15 for ; Sat, 20 Sep 2014 11:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vXN3ay4m2XxYn1EOkEOOTYP+7+is/xxCkCzWE2oOrlc=; b=q+j7EsUo+Og4CWw9pQeirK3nTcoBkUXjRae8eKzKUqDz5Es7JaKRYclgMDW0ZMi1o0 u3GtfbIn9OKiIctzHUBlaU4LG+24ELqjsFrD4ArhlMOSsg+xVmySiVAflQggj7rYzfMO 9KIGSee+f/EStQKs6EFGWa0fwk2gAEbZ7ycTZktYHQpX2se71wvwSHCgb3DUiYEJyUor 6c/U//HGrG7deQfL/WWRJwAlsrSqtigdUR0dBguIehDGXRhl2Ky8MswJ8eQYdAobFZyo pBKCDtMsREILWxbC8njBHgteRDmAkqEJsYqeCBuMMoA/rh9ZBvst1r3TqDT5VntOIuQ3 Ryfg== X-Received: by 10.180.210.201 with SMTP id mw9mr4598632wic.35.1411236397807; Sat, 20 Sep 2014 11:06:37 -0700 (PDT) Received: from topkick.lan (g226144207.adsl.alicedsl.de. [92.226.144.207]) by mx.google.com with ESMTPSA id ub19sm6121437wib.9.2014.09.20.11.06.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Sep 2014 11:06:36 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 1/5] PCI: mvebu: Amend PCIe controler node documentation Date: Sat, 20 Sep 2014 20:06:27 +0200 Message-Id: <1411236391-422-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1411236391-422-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1411236391-422-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140920_110704_176886_846FEB53 X-CRM114-Status: GOOD ( 14.57 ) X-Spam-Score: -0.8 (/) Cc: Mark Rutland , Andrew Lunn , Jason Cooper , Pawel Moll , Ian Campbell , linux-kernel@vger.kernel.org, Gregory Clement , devicetree@vger.kernel.org, Rob Herring , Kumar Gala , Bjorn Helgaas , Thomas Petazzoni , 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some PCIe controllers found on Armada XP SoCs can be configured as either four single-lane x1 or one quad-lane x4 PCIe. The current binding documentation is a bit unclear about it, so amend the property description of "marvell,pcie-lane" to allow multiple lanes to be passed. Also, rework the binding example to not only show x1 configuration but both x4 and x1. While at it, correct misnumbered PCIe port nodes to reflect pcie@, numbering scheme. Signed-off-by: Sebastian Hesselbarth --- Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: Bjorn Helgaas Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Thomas Petazzoni Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- .../devicetree/bindings/pci/mvebu-pci.txt | 93 ++++++++-------------- 1 file changed, 31 insertions(+), 62 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt index 08c716b2c6b6..0f09c933e025 100644 --- a/Documentation/devicetree/bindings/pci/mvebu-pci.txt +++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt @@ -74,14 +74,29 @@ PCIe interface, having the following mandatory properties: define the mapping of the PCIe interface to interrupt numbers. and the following optional properties: -- marvell,pcie-lane: the physical PCIe lane number, for ports having - multiple lanes. If this property is not found, we assume that the - value is 0. +- marvell,pcie-lane: array of physical PCIe lanes. If this property is + not found, we assume that the value is 0, i.e. x1 PCIe on lane 0. - reset-gpios: optional gpio to PERST# - reset-delay-us: delay in us to wait after reset de-assertion Example: +/* + * Armada XP has two 4x1/1x4 PCIe controllers on Port 0 and 1 that can + * be configured either as four single-lane x1 or one quad-lane x4 PCIe. + * Ports 2 and 3 are single-lane x1 only. + * + * The pcie-controller node below describes Armada XP PCIe configured as + * + * - Quad PCIe x4 on Port 0, Lanes 0-3 + * - Single PCIe x1 on Port 1, Lane 0 + * - Single PCIe x1 on Port 1, Lane 1 + * - Single PCIe x1 on Port 1, Lane 2 + * - Single PCIe x1 on Port 1, Lane 3 + * - Single PCIe x1 on Port 2 + * - Single PCIe x1 on Port 3 + */ + pcie-controller { compatible = "marvell,armada-xp-pcie"; status = "disabled"; @@ -128,7 +143,7 @@ pcie-controller { 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; - pcie@1,0 { + pcie@0,0 { device_type = "pci"; assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; reg = <0x0800 0 0 0 0>; @@ -139,8 +154,9 @@ pcie-controller { 0x81000000 0 0 0x81000000 0x1 0 1 0>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 58>; + /* Quad lane PCIe x4 on Port 0, Lanes 0-3 */ marvell,pcie-port = <0>; - marvell,pcie-lane = <0>; + marvell,pcie-lane = <0 1 2 3>; /* low-active PERST# reset on GPIO 25 */ reset-gpios = <&gpio0 25 1>; /* wait 20ms for device settle after reset deassertion */ @@ -149,58 +165,7 @@ pcie-controller { status = "disabled"; }; - pcie@2,0 { - device_type = "pci"; - assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; - reg = <0x1000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - #interrupt-cells = <1>; - ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 - 0x81000000 0 0 0x81000000 0x2 0 1 0>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0 0 0 0 &mpic 59>; - marvell,pcie-port = <0>; - marvell,pcie-lane = <1>; - clocks = <&gateclk 6>; - status = "disabled"; - }; - - pcie@3,0 { - device_type = "pci"; - assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; - reg = <0x1800 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - #interrupt-cells = <1>; - ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 - 0x81000000 0 0 0x81000000 0x3 0 1 0>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0 0 0 0 &mpic 60>; - marvell,pcie-port = <0>; - marvell,pcie-lane = <2>; - clocks = <&gateclk 7>; - status = "disabled"; - }; - - pcie@4,0 { - device_type = "pci"; - assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; - reg = <0x2000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - #interrupt-cells = <1>; - ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 - 0x81000000 0 0 0x81000000 0x4 0 1 0>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0 0 0 0 &mpic 61>; - marvell,pcie-port = <0>; - marvell,pcie-lane = <3>; - clocks = <&gateclk 8>; - status = "disabled"; - }; - - pcie@5,0 { + pcie@1,0 { device_type = "pci"; assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; reg = <0x2800 0 0 0 0>; @@ -211,13 +176,14 @@ pcie-controller { 0x81000000 0 0 0x81000000 0x5 0 1 0>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 62>; + /* Single lane PCIe x1 on Port 1, Lane 0 */ marvell,pcie-port = <1>; marvell,pcie-lane = <0>; clocks = <&gateclk 9>; status = "disabled"; }; - pcie@6,0 { + pcie@1,1 { device_type = "pci"; assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; reg = <0x3000 0 0 0 0>; @@ -228,13 +194,14 @@ pcie-controller { 0x81000000 0 0 0x81000000 0x6 0 1 0>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 63>; + /* Single lane PCIe x1 on Port 1, Lane 1 */ marvell,pcie-port = <1>; marvell,pcie-lane = <1>; clocks = <&gateclk 10>; status = "disabled"; }; - pcie@7,0 { + pcie@1,2 { device_type = "pci"; assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; reg = <0x3800 0 0 0 0>; @@ -245,13 +212,14 @@ pcie-controller { 0x81000000 0 0 0x81000000 0x7 0 1 0>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 64>; + /* Single lane PCIe x1 on Port 1, Lane 2 */ marvell,pcie-port = <1>; marvell,pcie-lane = <2>; clocks = <&gateclk 11>; status = "disabled"; }; - pcie@8,0 { + pcie@1,3 { device_type = "pci"; assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; reg = <0x4000 0 0 0 0>; @@ -262,13 +230,14 @@ pcie-controller { 0x81000000 0 0 0x81000000 0x8 0 1 0>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 65>; + /* Single lane PCIe x1 on Port 1, Lane 3 */ marvell,pcie-port = <1>; marvell,pcie-lane = <3>; clocks = <&gateclk 12>; status = "disabled"; }; - pcie@9,0 { + pcie@2,0 { device_type = "pci"; assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; reg = <0x4800 0 0 0 0>; @@ -285,7 +254,7 @@ pcie-controller { status = "disabled"; }; - pcie@10,0 { + pcie@3,0 { device_type = "pci"; assigned-addresses = <0x82005000 0 0x82000 0 0x2000>; reg = <0x5000 0 0 0 0>;