Lines Matching refs:node

26 .. _dt-node-identifiers:
31 To get information about a particular devicetree node, you need a *node
32 identifier* for it. This is a just a C macro that refers to the node.
34 These are the main ways to get a node identifier:
37 Use :c:macro:`DT_PATH()` along with the node's full path in the devicetree,
38 starting from the root node. This is mostly useful if you happen to know the
39 exact node you're looking for.
41 By node label
42 Use :c:macro:`DT_NODELABEL()` to get a node identifier from a :ref:`node
43 label <dt-node-labels>`. Node labels are often provided by SoC :file:`.dtsi`
48 Use :c:macro:`DT_ALIAS()` to get a node identifier for a property of the
49 special ``/aliases`` node. This is sometimes done by applications (like
54 node exists.
61 By chosen node
62 Use :c:macro:`DT_CHOSEN()` to get a node identifier for ``/chosen`` node
66 Use :c:macro:`DT_PARENT()` and :c:macro:`DT_CHILD()` to get a node identifier
67 for a parent or child node, starting from a node identifier you already have.
69 Two node identifiers which refer to the same node are identical and can be used
72 .. _dt-node-main-ex:
81 Here are a few ways to get node identifiers for the ``i2c@40002000`` node:
125 The right API to use to read property values depends on the node and property.
138 You can use :c:macro:`DT_NODE_HAS_PROP()` to check if a node has a property. For
139 the :ref:`example devicetree <dt-node-main-ex>` above:
155 :ref:`above example <dt-node-main-ex>`:
226 Given a node identifier ``node_id``, ``DT_NUM_REGS(node_id)`` is the
227 total number of register blocks in the node's ``reg`` property.
229 You **cannot** read register block addresses and lengths with ``DT_PROP(node,
230 reg)``. Instead, if a node only has one register block, use
233 - ``DT_REG_ADDR(node_id)``: the given node's register block address
237 node has multiple register blocks:
262 Given a node identifier ``node_id``, ``DT_NUM_IRQS(node_id)`` is the total
263 number of interrupt specifiers in the node's ``interrupts`` property.
275 macro, check the bindings file for the node you are interested in to find the
302 Property values can refer to other nodes using the ``&another-node`` phandle
307 You can convert a phandle to a node identifier using :c:macro:`DT_PHANDLE`,
334 of the special ``/chosen`` node
336 node-specific tests related to the ``compatible`` property
337 - :c:macro:`DT_BUS`: get a node's bus controller, if there is one
347 rely on :ref:`instance identifiers <dt-node-identifiers>`.