xref: /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/chosen.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunThe chosen node
2*4882a593Smuzhiyun---------------
3*4882a593SmuzhiyunThe chosen node does not represent a real device, but serves as a place
4*4882a593Smuzhiyunfor passing data like which serial device to used to print the logs etc
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunstdout-path property
8*4882a593Smuzhiyun--------------------
9*4882a593SmuzhiyunDevice trees may specify the device to be used for boot console output
10*4882a593Smuzhiyunwith a stdout-path property under /chosen.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunExample
13*4882a593Smuzhiyun-------
14*4882a593Smuzhiyun/ {
15*4882a593Smuzhiyun	chosen {
16*4882a593Smuzhiyun		stdout-path = "/serial@f00:115200";
17*4882a593Smuzhiyun	};
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun	serial@f00 {
20*4882a593Smuzhiyun		compatible = "vendor,some-uart";
21*4882a593Smuzhiyun		reg = <0xf00 0x10>;
22*4882a593Smuzhiyun	};
23*4882a593Smuzhiyun};
24*4882a593Smuzhiyun
25*4882a593Smuzhiyuntick-timer property
26*4882a593Smuzhiyun-------------------
27*4882a593SmuzhiyunIn a system there are multiple timers, specify which timer to be used
28*4882a593Smuzhiyunas the tick-timer. Earlier it was hardcoded in the timer driver now
29*4882a593Smuzhiyunsince device tree has all the timer nodes. Specify which timer to be
30*4882a593Smuzhiyunused as tick timer.
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunExample
33*4882a593Smuzhiyun-------
34*4882a593Smuzhiyun/ {
35*4882a593Smuzhiyun	chosen {
36*4882a593Smuzhiyun		tick-timer = "/timer2@f00";
37*4882a593Smuzhiyun	};
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	timer2@f00 {
40*4882a593Smuzhiyun		compatible = "vendor,some-timer";
41*4882a593Smuzhiyun		reg = <0xf00 0x10>;
42*4882a593Smuzhiyun	};
43*4882a593Smuzhiyun};
44*4882a593Smuzhiyun
45*4882a593Smuzhiyunu-boot,spl-boot-order property
46*4882a593Smuzhiyun------------------------------
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunIn a system using an SPL stage and having multiple boot sources
49*4882a593Smuzhiyun(e.g. SPI NOR flash, on-board eMMC and a removable SD-card), the boot
50*4882a593Smuzhiyundevice may be probed by reading the image and verifying an image
51*4882a593Smuzhiyunsignature.
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunIf the SPL is configured through the device-tree, the boot-order can
54*4882a593Smuzhiyunbe configured with the spl-boot-order property under the /chosen node.
55*4882a593SmuzhiyunEach list element of the property should specify a device to be probed
56*4882a593Smuzhiyunin the order they are listed: references (i.e. implicit paths), a full
57*4882a593Smuzhiyunpath or an alias is expected for each entry.
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunA special specifier "same-as-spl" can be used at any position in the
60*4882a593Smuzhiyunboot-order to direct U-Boot to insert the device the SPL was booted
61*4882a593Smuzhiyunfrom there.  Whether this is indeed inserted or silently ignored (if
62*4882a593Smuzhiyunit is not supported on any given SoC/board or if the boot-device is
63*4882a593Smuzhiyunnot available to continue booting from) is implementation-defined.
64*4882a593SmuzhiyunNote that if "same-as-spl" expands to an actual node for a given
65*4882a593Smuzhiyunboard, the corresponding node may appear multiple times in the
66*4882a593Smuzhiyunboot-order (as there currently exists no mechanism to suppress
67*4882a593Smuzhiyunduplicates from the list).
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunExample
70*4882a593Smuzhiyun-------
71*4882a593Smuzhiyun/ {
72*4882a593Smuzhiyun	chosen {
73*4882a593Smuzhiyun		u-boot,spl-boot-order = "same-as-spl", &sdmmc, "/sdhci@fe330000";
74*4882a593Smuzhiyun	};
75*4882a593Smuzhiyun};
76