Debian Codegraph @

dtschema/schemas/options/u-boot.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 # Copyright 2021 Google LLC
3
4 %YAML 1.2
5 ---
6 $id: http://devicetree.org/schemas/options/u-boot.yaml#
7 $schema: http://devicetree.org/meta-schemas/core.yaml#
8
9 title: U-Boot configuration node
10
11 maintainers:
12 - Simon Glass <[email protected]>
13
14 description: |
15 The u-boot,config node provides basic configuration information to U-Boot,
16 for use during its execution. It can be used to control U-Boot's behaviour
17 in various ways.
18
19 properties:
20 $nodename:
21 const: u-boot
22
23 compatible:
24 const: u-boot,config
25
26 bootcmd:
27 $ref: /schemas/types.yaml#/definitions/string
28 description: |
29 Allows overwriting of the boot command used by U-Boot on startup. If
30 present, U-Boot uses this command instead. Note that this feature can
31 work even if loading the environment is disabled, e.g. for security
32 reasons. See also bootsecure.
33
34 bootdelay-sec:
35 description: |
36 Allows selecting of the U-Boot bootdelay, to control whether U-Boot
37 waits on boot or for how long. This allows this option to be configured
38 by the build system or by a previous-stage binary. For example, if the
39 images is being packed for testing or a user holds down a button, it may
40 allow a delay, but disable it for production.
41
42 If this property is not present, a default value is used instead.
43
44 Note that this uses the 'sec' property unit, even though it allows a
45 negative value.
46
47 Values:
48
49 -1: no bootdelay and the user cannot interrupt boot
50 0: no bootdelay but use user can still interrupt boot by holding down a
51 key, if enabled
52 >= 1: delay for this many seconds
53
54
55 bootsecure:
56 $ref: /schemas/types.yaml#/definitions/uint32
57 default: 0
58 maximum: 2
59 description: |
60 Controls the execution of the boot command in U-Boot, e.g. selecting
61 between using a special function to run commands, or the normal CLI. This
62 can be used in production images, to restrict the amount of parsing done
63 or the options available, to cut back on the available surface for
64 security attacks.
65
66 Values:
67
68 0: normal boot using CLI (default if not present)
69 1: use secure boot mechanism instead to parse and run commands
70 other values are reserved for future use
71 2: use simplified command line (e.g. avoid hush)
72 3... reserved
73
74 bootscr-address:
75 $ref: /schemas/types.yaml#/definitions/uint64
76 default: 0x0
77 description:
78 Holds the full address of the boot script file. It helps in making
79 automated flow easier by fetching the 64bit address directly from DT.
80 Value should be automatically copied to the U-Boot 'scriptaddr' variable.
81 When it is defined, bootscr-ram-offset property should be ignored.
82 Actually only one of them should be present in the DT.
83
84 bootscr-ram-offset:
85 $ref: /schemas/types.yaml#/definitions/uint64
86 default: 0x0
87 description:
88 Holds the boot script file offset from the start of the ram base address.
89 Platforms with run-time RAM-detection algorithms should use this property
90 because it is not clear exactly where the script address should be placed.
91 Using it will provide the option to specify boot script offset from
92 detected RAM start. The U-Boot 'scriptaddr' variable should be composed as
93 detected RAM start plus value of bootscr-ram-offset property.
94 It should be used only when bootscr-address is not defined.
95
96 silent-console:
97 $ref: /schemas/types.yaml#/definitions/uint32
98 default: 0
99 maximum: 2
100 description: |
101 This allows the console to be silenced by default on boot. This can allow
102 easy disabling of console output on a production build, for example. When
103 suppressed, the console is still active. This feature only suppresses the
104 console output itself, on all output devices.
105
106 Values:
107
108 0: console output appears as normal (default)
109 1: console output is suppressed but console recording still operates (if
110 enabled)
111 2: console output is suppressed and not recorded
112
113 boot-led:
114 $ref: /schemas/types.yaml#/definitions/phandle
115 description: |
116 This is used to specify a phandle to an LED to indicate a successful boot.
117
118 boot-led-period-ms:
119 default: 250
120 description: |
121 This is used to specify the default period (in ms) for an LED in blink mode.
122
123 activity-led:
124 $ref: /schemas/types.yaml#/definitions/phandle
125 description: |
126 This is used to specify a phandle to an LED to indicate an activity.
127
128 activity-led-period-ms:
129 default: 250
130 description: |
131 This is used to specify the default period (in ms) for an LED in blink mode.
132
133 required:
134 - compatible
135
136 if:
137 required:
138 - bootscr-address
139 then:
140 properties:
141 bootscr-ram-offset: false
142
143 additionalProperties: false
144
145 examples:
146 - |
147 options {
148 u-boot {
149 compatible = "u-boot,config";
150 bootcmd = "vboot go auto";
151 bootdelay-sec = <(-1)>;
152 bootsecure = <1>;
153 bootscr-address = /bits/ 64 <0x1000>;
154 silent-console = <1>;
155 };
156 };