From patchwork Wed Feb 21 05:59:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Donnellan X-Patchwork-Id: 875951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zmRjT2GLzz9ryC for ; Wed, 21 Feb 2018 17:02:53 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zmRjT0kRjzF0xY for ; Wed, 21 Feb 2018 17:02:53 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=au1.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=andrew.donnellan@au1.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zmRf605MJzF0mP for ; Wed, 21 Feb 2018 16:59:57 +1100 (AEDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1L5xqGi107598 for ; Wed, 21 Feb 2018 00:59:56 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g8x03gqtw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Feb 2018 00:59:55 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Feb 2018 05:59:45 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Feb 2018 05:59:42 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1L5xfaC62980268; Wed, 21 Feb 2018 05:59:41 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E384F52146; Wed, 21 Feb 2018 04:51:35 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 442AE52145; Wed, 21 Feb 2018 04:51:35 +0000 (GMT) Received: from intelligence.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 72816A03AB; Wed, 21 Feb 2018 16:59:38 +1100 (AEDT) From: Andrew Donnellan To: skiboot@lists.ozlabs.org Date: Wed, 21 Feb 2018 16:59:22 +1100 X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18022105-0012-0000-0000-000005B2E2C0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022105-0013-0000-0000-0000192EF56F Message-Id: <48e4054af89a54da944c9dec595b53f29e8ad88a.1519192720.git-series.andrew.donnellan@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-21_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 lowpriorityscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802210074 Subject: [Skiboot] [PATCH 10/10] doc/device-tree: Add OpenCAPI device tree bindings X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair@popple.id.au MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Suggested-by: Stewart Smith Signed-off-by: Andrew Donnellan --- doc/device-tree/opencapi.rst | 95 +++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+) create mode 100644 doc/device-tree/opencapi.rst diff --git a/doc/device-tree/opencapi.rst b/doc/device-tree/opencapi.rst new file mode 100644 index 000000000000..54ac36cf477d --- /dev/null +++ b/doc/device-tree/opencapi.rst @@ -0,0 +1,95 @@ +.. _device-tree/opencapi: + +============================= +OpenCAPI Device Tree Bindings +============================= + +NPU bindings: + +.. code-block:: dts + + xscom@603fc00000000 { + npu@5011000 { + compatible = "ibm,power9-npu"; + phandle = <0xe6>; + ibm,phb-index = <0x7>; + reg = <0x5011000 0x2c>; + ibm,npu-index = <0x0>; + ibm,npu-links = <0x2>; /* Number of links wired up to this npu. */ + + link@2 { + compatible = "ibm,npu-link-opencapi"; + ibm,npu-group-id = <0x1>; + ibm,npu-lane-mask = <0xf1e000>; /* Mask specifying which IBM PHY lanes + * are used for this link. 24-bit, + * lane 0 is most significant bit */ + ibm,npu-phy = <0x80000000 0x9010c3f>; /* SCOM address of the IBM PHY + * controlling this link. */ + ibm,npu-link-index = <0x2>; /* Hardware link index. + * Used to calculate various address offsets. */ + phandle = <0xe7>; + }; + + link@3 { + compatible = "ibm,npu-link-opencapi"; + ibm,npu-group-id = <0x2>; + ibm,npu-lane-mask = <0x78f>; + ibm,npu-phy = <0x80000000 0x9010c3f>; + ibm,npu-link-index = <0x3>; + phandle = <0xe8>; + }; + }; + }; + +PCI device bindings +------------------- + +.. code-block:: dts + + pciex@600e800000000 { + compatible = "ibm,power9-npu-opencapi-pciex", "ibm,ioda2-npu2-opencapi-phb"; + ibm,mmio-window = <0x600e8 0x0 0x8 0x0>; + ibm,opal-num-pes = <0x10>; + device_type = "pciex"; + ibm,links = <0x1>; + ibm,phb-diag-data-size = <0x0>; + ibm,xscom-base = <0x5011000>; + ranges = <0x2000000 0x600e8 0x0 0x600e8 0x0 0x8 0x0>; + #interrupt-cells = <0x1>; + bus-range = <0x0 0xff>; + interrupt-parent = <0xdf>; + #address-cells = <0x3>; + ibm,opal-phbid = <0x0 0x5>; + ibm,npcq = <0xe6>; /* phandle to the NPU node */ + ibm,chip-id = <0x0>; + #size-cells = <0x2>; + phandle = <0x581>; + reg = <0x600e8 0x0 0x8 0x0>; + clock-frequency = <0x200 0x0>; + ibm,npu-index = <0x0>; + + device@0 { + ibm,opal-xsl-irq = <0x58>; + revision-id = <0x0>; + ibm,opal-xsl-mmio = <0x60302 0x1d0000 0x60302 0x1d0008 0x60302 0x1d0010 0x60302 0x1d0018>; + ibm,pci-config-space-type = <0x1>; + class-code = <0x120000>; + vendor-id = <0x1014>; + device-id = <0x62b>; + phandle = <0x58d>; + reg = <0x0 0x0 0x0 0x0 0x0>; + }; + + device@0,1 { + ibm,opal-xsl-irq = <0x58>; + revision-id = <0x0>; + ibm,opal-xsl-mmio = <0x60302 0x1d0000 0x60302 0x1d0008 0x60302 0x1d0010 0x60302 0x1d0018>; + ibm,pci-config-space-type = <0x1>; + class-code = <0x120000>; + vendor-id = <0x1014>; + device-id = <0x62b>; + phandle = <0x58e>; + reg = <0x100 0x0 0x0 0x0 0x0>; + }; + }; +