All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-acpi@vger.kernel.org
Cc: mika.westerberg@linux.intel.com, rafael@kernel.org
Subject: [RFC 15/15] ACPI / DSD: Document references, ports and endpoints
Date: Wed,  5 Oct 2016 01:45:48 +0300	[thread overview]
Message-ID: <1475621148-21427-16-git-send-email-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <1475621148-21427-1-git-send-email-sakari.ailus@linux.intel.com>

Document the use of references into the hierarchical data extension
structure, as well as the use of port and endpoint concepts that are very
similar to those in Devicetree.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/acpi/dsd/graph.txt | 166 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 166 insertions(+)
 create mode 100644 Documentation/acpi/dsd/graph.txt

diff --git a/Documentation/acpi/dsd/graph.txt b/Documentation/acpi/dsd/graph.txt
new file mode 100644
index 0000000..fe6eb57
--- /dev/null
+++ b/Documentation/acpi/dsd/graph.txt
@@ -0,0 +1,166 @@
+Graphs
+
+
+DSD
+---
+
+Device specific data (DSD) [1] is an ACPI feature which can be used to
+describe hardware features that are not directly defined by an
+existing ACPI standard [6]. Besides the usual DSD device and fwnode
+properties [4], the DSD extension also supports hierarchical data
+structure [5] the nodes of which may contain additional properties.
+Functionality-wise this is somewhat equivalent to the phandles in
+Devicetree [2].
+
+The hierarchical data extension [5] may be used to construct a
+tree-like structure with nodes which may contain other nodes (again
+using the hierarchical data extension) or properties (using device and
+fwnode properties [4]).
+
+The data structure may be referenced to elsewhere in the ACPI tables
+by using a hard reference to the device itself and an index to the
+hierarchical data extension array on each depth.
+
+
+Ports and endpoints
+-------------------
+
+The port and endpoint concepts are very similar to those in Devicetree
+[3]. The port represent represent interface in a device, and an
+endpoint represents a connection to that interface.
+
+All port nodes are located under a child node under the device's
+"_DSD" node in hierarchical data extension tree. The first
+hierarchical data extension package list entry of this node must be
+called "ports". Individual ports are declared as child nodes of this
+node. The first package list entry of the hierarchical data extension
+must begin with "port@" string and must be followed by the number of
+the port.
+
+Further on, endpoints are located under the individual port nodes. The
+first hierarchical data extension package list entry of the endpoint
+nodes must begin with "endpoint@" and must be followed by the number
+of the endpoint.
+
+Each port node contains a property extension key "port", the value of
+which is the number of the port node. Similarly, each endpoint node
+must contain "endpoint" property which is the number of the endpoint
+node.
+
+The endpoint reference uses property extension with "remote-endpoint"
+property name followed by a reference in the same package. The
+references to endpoints must be always done both to and from the
+endpoint node. Individual references thus appear as:
+
+    Package() { device, ports_node_index,
+		port_node_index, endpoint_node_index }
+
+A simple example of this is show below:
+
+    Scope (\_SB.PCI0.I2C2)
+    {
+	Device (CAM0)
+	{
+	    Name (_DSD, Package () {
+		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+		    Package () { "compatible", Package () { "nokia,smia" } },
+		},
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "ports", "PRTS" },
+		}
+	    })
+	    Name (PRTS, Package() {
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "port@0", "PRT0" },
+		}
+	    })
+	    Name (PRT0, Package() {
+		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+		    Package () { "port", 0 },
+		},
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "endpoint@0", "EP0" },
+		}
+	    })
+	    Name (EP0, Package() {
+		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+		    Package () { "endpoint", 0 },
+		    Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, 0, 0, 0 } },
+		}
+	    })
+	}
+    }
+
+    Scope (\_SB.PCI0)
+    {
+	Device (ISP)
+	{
+	    Name (_DSD, Package () {
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "ports", "PRTS" },
+		}
+	    })
+
+	    Name (PRTS, Package() {
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "port@4", "PRT4" },
+		}
+	    })
+
+	    Name (PRT4, Package() {
+		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+		    Package () { "port", 4 }, /* CSI-2 port number */
+		},
+		ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+		    Package () { "endpoint@0", "EP0" },
+		}
+	    })
+
+	    Name (EP0, Package() {
+		ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+		    Package () { "endpoint", 0 },
+		    Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, 0, 0, 0 } },
+		}
+	    })
+	}
+    }
+
+Here, the port 0 of the "CAM0" device is connected to the port 4 of
+the "ISP" device. Note that the port index in the reference is still
+0, as it refers to an entry in the table and not the port node number
+itself.
+
+
+References
+----------
+
+[1] _DSD (Device Specific Data) Implementation Guide.
+    <URL:http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm>,
+    referenced 2016-10-03.
+
+[2] Devicetree. <URL:http://www.devicetree.org>, referenced 2016-10-03.
+
+[3] Documentation/devicetree/bindings/graph.txt
+
+[4] Device Properties UUID For _DSD.
+    <URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
+    referenced 2016-10-04.
+
+[5] Hierarchical Data Extension UUID For _DSD.
+    <URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf>,
+    referenced 2016-10-04.
+
+[6] Advanced Configuration and Power Interface Specification.
+    <URL:http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf>,
+    referenced 2016-10-04.
-- 
2.7.4


  parent reply	other threads:[~2016-10-04 22:47 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 22:45 [RFC 00/15] ACPI graph support Sakari Ailus
2016-10-04 22:45 ` [RFC 01/15] ACPI / property: Add possiblity to retrieve parent firmware node Sakari Ailus
2016-10-04 22:45 ` [RFC 02/15] device property: Add fwnode_get_parent() Sakari Ailus
2016-10-04 22:45 ` [RFC 03/15] ACPI / property: Add fwnode_get_next_child_node() Sakari Ailus
2016-10-04 22:45 ` [RFC 04/15] device property: Add fwnode_get_named_child_node() Sakari Ailus
2016-10-04 22:45 ` [RFC 05/15] ACPI / property: Add support for remote endpoints Sakari Ailus
2016-10-04 22:45 ` [RFC 06/15] device " Sakari Ailus
2016-10-04 22:45 ` [RFC 07/15] device property: Add fwnode_handle_get() Sakari Ailus
2016-10-04 22:45 ` [RFC 08/15] of: Add of_fwnode_handle() to convert device nodes to fwnode_handle Sakari Ailus
2016-10-04 22:45 ` [RFC 09/15] driver core: Arrange headers alphabetically Sakari Ailus
2016-10-04 22:45 ` [RFC 10/15] of: No need to include property.h, fwnode.h is sufficient Sakari Ailus
2016-10-04 22:45 ` [RFC 11/15] device property: Obtain device's fwnode independently of FW type Sakari Ailus
2016-10-04 22:45 ` [RFC 12/15] device property: Add support for fwnode endpoints Sakari Ailus
2016-10-04 22:45 ` [RFC 13/15] of: Add nop implementation of of_get_next_parent() Sakari Ailus
2016-10-04 22:45 ` [RFC 14/15] device property: Add fwnode_get_next_parent() Sakari Ailus
2016-10-04 22:45 ` Sakari Ailus [this message]
2016-10-05  9:22 ` [RFC 00/15] ACPI graph support Lorenzo Pieralisi
2016-10-05 11:41   ` Mika Westerberg
2016-10-05 15:06     ` Lorenzo Pieralisi
2016-10-05 15:32       ` Mika Westerberg
2016-10-05 16:18         ` Lorenzo Pieralisi
2016-10-05 20:33           ` Rafael J. Wysocki
2016-10-06  8:57             ` Lorenzo Pieralisi
2016-10-06  9:11               ` Mika Westerberg
2016-10-06  9:57                 ` Lorenzo Pieralisi
2016-10-06 11:19                   ` Mika Westerberg
2016-10-06 15:31                     ` Mark Brown
2016-10-06 16:00                       ` Rafael J. Wysocki
2016-10-06 16:14                         ` Mark Brown
2016-10-06 17:02                           ` Rafael J. Wysocki
2016-10-11 12:44                         ` Mark Rutland
2016-10-12  0:19                           ` Rafael J. Wysocki
2016-10-06 12:30                   ` Rafael J. Wysocki
2016-10-06 10:40                 ` Mark Brown
2016-10-06 12:26                   ` Mika Westerberg
2016-10-06 13:15                   ` Rafael J. Wysocki
2016-10-06 15:23                     ` Mark Brown
2016-10-06 15:56                       ` Rafael J. Wysocki
2016-10-06 15:57                       ` Sudeep Holla
2016-10-06 12:26               ` Rafael J. Wysocki
2016-10-06 21:37                 ` Mark Brown
2016-10-10 23:44                   ` Rafael J. Wysocki
2016-10-11 12:11                     ` Rafael J. Wysocki
2016-10-11 13:05                       ` Mark Brown
2016-10-11 12:44                     ` Mark Brown
2016-10-11 13:32                       ` Mark Rutland
2016-10-12  0:32                       ` Rafael J. Wysocki
2016-10-12 12:05                         ` Mark Brown
2016-10-12 12:26                           ` Rafael J. Wysocki
2016-10-11 13:01                   ` Mark Rutland
2016-10-11 13:26                     ` Mark Brown
2016-10-11 12:56                 ` Mark Rutland
2016-10-06 22:02             ` Sakari Ailus
2016-10-11 12:35         ` Mark Rutland
2016-10-12  9:00           ` Mika Westerberg
2016-10-12 10:28             ` Mark Brown
2016-10-12 11:12               ` Mika Westerberg
2016-10-12 11:25                 ` Rafael J. Wysocki
2016-10-12 16:00                   ` Mark Brown
2016-10-12 11:14               ` Rafael J. Wysocki
2016-10-12 12:32                 ` Mark Brown
2016-10-12 12:42                   ` Rafael J. Wysocki
2016-10-12 14:59                     ` Mark Brown
2016-10-12 17:50                       ` Rafael J. Wysocki
2016-10-06 21:58       ` Sakari Ailus
2016-10-05 15:21     ` Mark Brown
2016-10-05 15:30     ` Sudeep Holla
2016-10-05 18:14       ` Mika Westerberg
2016-10-05 20:18       ` Rafael J. Wysocki
2016-10-06 10:29         ` Sudeep Holla
2016-10-06 13:04           ` Rafael J. Wysocki
2016-10-06 14:20             ` Sudeep Holla
2016-10-06 17:05               ` Rafael J. Wysocki
2016-10-06 17:20                 ` Sudeep Holla
2016-10-11  0:05                   ` Rafael J. Wysocki
2016-10-11  8:57                     ` Sudeep Holla
2016-10-11 11:59                       ` Rafael J. Wysocki
2016-10-11 13:15                         ` Mark Brown
2016-10-12  0:35                           ` Rafael J. Wysocki
2016-10-06 17:20               ` Al Stone
2016-10-06 20:14                 ` Mark Brown
2016-10-06 20:54                   ` Al Stone
2016-10-11 12:28     ` Mark Rutland
2016-10-12  1:18       ` Rafael J. Wysocki
2016-10-06 21:10   ` Sakari Ailus
2016-10-11 13:30     ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475621148-21427-16-git-send-email-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.