From patchwork Tue Aug 8 05:40:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 109603 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp2508777qge; Mon, 7 Aug 2017 22:41:04 -0700 (PDT) X-Received: by 10.84.139.36 with SMTP id 33mr3358022plq.20.1502170864307; Mon, 07 Aug 2017 22:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502170864; cv=none; d=google.com; s=arc-20160816; b=v93Nq6AlLU69wHtVQc1cKBuguwuFCHSvPYnSwuBAzUd+XIG8J+irDWPgpaOpu2q+qS l0Jkj03JWpZzIINSPy/3eDdY3GqK5VW86Z9BUwKQVJHJVv62MEEa1B4IeIsK8laQcQWr st8cgLi9p5PIdQ2zmKKnFTy/g7m66xeqb0WWyELEnJykR2C7kXjxdk0Uow9zjQcS+Sfj pRLZAT/rZSaHbyujg7MQmblStBL2FN15wmApfP66BIxB2QLJ4V/J/2QilxlAlQuCXITt weTEoZvhFh6hzkAV++XgTAJwffPflBVBMI8gRKDQht3G1ntlY3K91VuTu9j2xHfptR7z +3vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=74gWRixzgi2wkPxFuPhvIR6ZOYj5soym2YCde9QWxf4=; b=yDx+LC7VYEac5ryDjz+8rQpCetC1Ny0vY8Wq2DVX2WTd2sqkQe26qUIOFuFA9O0CyZ fskzHbHLVfilsxwHs4ySVicwMFEpY0vgypa0/9UTcTIbXcs8ESg/OySErm3Ds08DHwf2 nFAEMnvspfHeQBLvZnxkTMLnwPLJgMC1bjyu8DkDLWgDalu2dmd9C8FjpJgc0VmRmi3a msle41lnbZZwQXS+VlMqMcQxIqjpAHJLpTsJmenyeABJHV+lPDlhwNp8Wor8N5bX/0JZ mX0+OyrIt5hXvycg2JQ+/166aJnafuI7AZwK3DA3cG5tqnmrLQxXOJ415PxtBbitalQf hRww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=WsEWglgU; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k26si379598pfa.429.2017.08.07.22.41.03; Mon, 07 Aug 2017 22:41:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=WsEWglgU; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750801AbdHHFlC (ORCPT + 6 others); Tue, 8 Aug 2017 01:41:02 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:59327 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbdHHFlB (ORCPT ); Tue, 8 Aug 2017 01:41:01 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v785eWjg012724; Tue, 8 Aug 2017 00:40:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502170833; bh=+fiYdwLEo7hXdXFZlsGGOOhAHOfeo+aC73H8tat2SPE=; h=From:To:CC:Subject:Date; b=WsEWglgU3hqT0zJmjnhF27B1t8GgMf2qf4A9qFvKQcFmGumEqWoVk/Cu8SE32flGp 8f0nGtz41d5AAqsgz9uzinR40BiKDhXSOHEVZqPCnDBK5rKIfXqEVfdIVFYKBB8fsR LSMMKFiPAcDh8KQyQfZzminUhKKDEuyLKAEJ0Mag= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v785eWLE014937; Tue, 8 Aug 2017 00:40:32 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Tue, 8 Aug 2017 00:40:32 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v785eTcb012538; Tue, 8 Aug 2017 00:40:30 -0500 From: Kishon Vijay Abraham I To: Tony Lindgren CC: , , , , , , Subject: [PATCH] ARM: dts: DRA7: Add pcie1 dt node for EP mode Date: Tue, 8 Aug 2017 11:10:24 +0530 Message-ID: <20170808054024.18507-1-kishon@ti.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add pcie1 dt node in order for the controller to operate in endpoint mode. However since none of the dra7 based boards have slots configured to operate in endpoint mode, keep EP mode disabled. Signed-off-by: Kishon Vijay Abraham I --- arch/arm/boot/dts/am571x-idk.dts | 9 +++++++++ arch/arm/boot/dts/am572x-idk.dts | 7 ++++++- arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 7 ++++++- arch/arm/boot/dts/dra7-evm.dts | 4 ++++ arch/arm/boot/dts/dra7.dtsi | 23 ++++++++++++++++++++++- arch/arm/boot/dts/dra72-evm-common.dtsi | 4 ++++ 6 files changed, 51 insertions(+), 3 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/am571x-idk.dts b/arch/arm/boot/dts/am571x-idk.dts index adc70fb091a2..0c0bb4e93f25 100644 --- a/arch/arm/boot/dts/am571x-idk.dts +++ b/arch/arm/boot/dts/am571x-idk.dts @@ -96,3 +96,12 @@ status = "okay"; }; }; + +&pcie1_rc { + status = "okay"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; + +&pcie1_ep { + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; diff --git a/arch/arm/boot/dts/am572x-idk.dts b/arch/arm/boot/dts/am572x-idk.dts index 940fcbe5380b..5ff75004afcf 100644 --- a/arch/arm/boot/dts/am572x-idk.dts +++ b/arch/arm/boot/dts/am572x-idk.dts @@ -88,7 +88,12 @@ load-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; }; -&pcie1 { +&pcie1_rc { + status = "okay"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; + +&pcie1_ep { gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; }; diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi index fdfe5b16b806..d433a50cd18a 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi @@ -570,7 +570,12 @@ }; }; -&pcie1 { +&pcie1_rc { + status = "ok"; + gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; +}; + +&pcie1_ep { gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; }; diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index f47fc4daf062..57bd75909d96 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -720,3 +720,7 @@ status = "okay"; }; }; + +&pcie1_rc { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 0f0f6f58bd18..e6f2c6a15dc1 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi @@ -196,6 +196,7 @@ scm_conf1: scm_conf@1c04 { compatible = "syscon"; reg = <0x1c04 0x0020>; + #syscon-cells = <2>; }; scm_conf_pcie: scm_conf@1c24 { @@ -287,7 +288,11 @@ #address-cells = <1>; ranges = <0x51000000 0x51000000 0x3000 0x0 0x20000000 0x10000000>; - pcie1: pcie@51000000 { + /** + * To enable PCI endpoint mode, disable the pcie1_rc + * node and enable pcie1_ep mode. + */ + pcie1_rc: pcie@51000000 { compatible = "ti,dra7-pcie"; reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>; reg-names = "rc_dbics", "ti_conf", "config"; @@ -309,12 +314,28 @@ <0 0 0 2 &pcie1_intc 2>, <0 0 0 3 &pcie1_intc 3>, <0 0 0 4 &pcie1_intc 4>; + status = "disabled"; pcie1_intc: interrupt-controller { interrupt-controller; #address-cells = <0>; #interrupt-cells = <1>; }; }; + + pcie1_ep: pcie_ep@51000000 { + compatible = "ti,dra7-pcie-ep"; + reg = <0x51000000 0x28>, <0x51002000 0x14c>, <0x51001000 0x28>, <0x1000 0x10000000>; + reg-names = "ep_dbics", "ti_conf", "ep_dbics2", "addr_space"; + interrupts = <0 232 0x4>; + num-lanes = <1>; + num-ib-windows = <4>; + num-ob-windows = <16>; + ti,hwmods = "pcie1"; + phys = <&pcie1_phy>; + phy-names = "pcie-phy0"; + ti,syscon-unaligned-access = <&scm_conf1 0x14 2>; + status = "disabled"; + }; }; axi@1 { diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi index 85780549bc26..2e619748d948 100644 --- a/arch/arm/boot/dts/dra72-evm-common.dtsi +++ b/arch/arm/boot/dts/dra72-evm-common.dtsi @@ -564,3 +564,7 @@ status = "okay"; }; }; + +&pcie1_rc { + status = "okay"; +};