David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 1 | /dts-v1/; |
| 2 | |
| 3 | / { |
David Gibson | f240527 | 2014-05-09 20:48:49 +1000 | [diff] [blame] | 4 | rref = <&{/}>; |
| 5 | |
David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 6 | /* Explicit phandles */ |
| 7 | n1: node1 { |
| 8 | linux,phandle = <0x2000>; |
David Gibson | 7c44c2f | 2007-11-22 17:10:07 +1100 | [diff] [blame] | 9 | ref = <&{/node2}>; /* reference precedes target */ |
David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 10 | lref = <&n2>; |
| 11 | }; |
| 12 | n2: node2 { |
David Gibson | d75b33a | 2009-11-26 15:37:13 +1100 | [diff] [blame] | 13 | phandle = <0x1>; |
David Gibson | 7c44c2f | 2007-11-22 17:10:07 +1100 | [diff] [blame] | 14 | ref = <&{/node1}>; /* reference after target */ |
David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 15 | lref = <&n1>; |
| 16 | }; |
| 17 | |
| 18 | /* Implicit phandles */ |
| 19 | n3: node3 { |
David Gibson | 7c44c2f | 2007-11-22 17:10:07 +1100 | [diff] [blame] | 20 | ref = <&{/node4}>; |
David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 21 | lref = <&n4>; |
| 22 | }; |
| 23 | n4: node4 { |
| 24 | }; |
David Gibson | 9878f30 | 2008-11-07 12:49:44 +1100 | [diff] [blame] | 25 | |
| 26 | /* Explicit phandle with implicit value */ |
| 27 | /* This self-reference is the standard way to tag a node as requiring |
| 28 | * a phandle (perhaps for reference by nodes that will be dynamically |
| 29 | * added) without explicitly allocating it a phandle. |
| 30 | * The self-reference requires some special internal handling, though |
| 31 | * so check it actually works */ |
| 32 | n5: node5 { |
| 33 | linux,phandle = <&n5>; |
David Gibson | d75b33a | 2009-11-26 15:37:13 +1100 | [diff] [blame] | 34 | phandle = <&n5>; |
David Gibson | 9878f30 | 2008-11-07 12:49:44 +1100 | [diff] [blame] | 35 | }; |
Thierry Reding | 7308750 | 2019-03-26 16:33:02 +0100 | [diff] [blame] | 36 | |
| 37 | node6 { |
| 38 | linux,phandle = <0xfffffffe>; |
| 39 | phandle = <0xfffffffe>; |
| 40 | }; |
David Gibson | 682576d | 2007-11-13 10:02:29 +1100 | [diff] [blame] | 41 | }; |