blob: 98bee6240b65f44268996dcdda868525d6f7c72f [file] [log] [blame]
Jason Cooper2a933002013-12-17 16:59:40 +00001
2 Submitting devicetree (DT) binding patches
3
4I. For patch submitters
5
Mauro Carvalho Chehab8c27ceff32016-10-18 10:12:27 -02006 0) Normal patch submission rules from Documentation/process/submitting-patches.rst
Jason Cooper2a933002013-12-17 16:59:40 +00007 applies.
8
Rob Herring44acf102018-06-05 16:37:47 -06009 1) The Documentation/ and include/dt-bindings/ portion of the patch should
10 be a separate patch. The preferred subject prefix for binding patches is:
11
12 "dt-bindings: <binding dir>: ..."
13
14 The 80 characters of the subject are precious. It is recommended to not
15 use "Documentation" or "doc" because that is implied. All bindings are
16 docs. Repeating "binding" again should also be avoided.
Jason Cooper2a933002013-12-17 16:59:40 +000017
Rob Herring70145d12019-10-15 10:47:49 -050018 2) DT binding files are written in DT schema format using json-schema
19 vocabulary and YAML file format. The DT binding files must pass validation
20 by running:
21
22 make dt_binding_check
23
24 See ../writing-schema.rst for more details about schema and tools setup.
25
26 3) DT binding files should be dual licensed. The preferred license tag is
27 (GPL-2.0-only OR BSD-2-Clause).
28
29 4) Submit the entire series to the devicetree mailinglist at
Jason Cooper2a933002013-12-17 16:59:40 +000030
31 devicetree@vger.kernel.org
32
Matt Porterd1e9fa92015-03-05 10:53:11 -050033 and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify
34 all of the DT maintainers.
35
Rob Herring70145d12019-10-15 10:47:49 -050036 5) The Documentation/ portion of the patch should come in the series before
Javier Martinez Canillasef0b97e2014-10-09 20:24:07 +020037 the code implementing the binding.
38
Rob Herring70145d12019-10-15 10:47:49 -050039 6) Any compatible strings used in a chip or board DTS file must be
Paul Walmsley10638a42015-01-30 15:11:04 -070040 previously documented in the corresponding DT binding text file
41 in Documentation/devicetree/bindings. This rule applies even if
42 the Linux device driver does not yet match on the compatible
43 string. [ checkpatch will emit warnings if this step is not
44 followed as of commit bff5da4335256513497cc8c79f9a9d1665e09864
45 ("checkpatch: add DT compatible string documentation checks"). ]
46
Rob Herring70145d12019-10-15 10:47:49 -050047 7) The wildcard "<chip>" may be used in compatible strings, as in
Paul Walmsley10638a42015-01-30 15:11:04 -070048 the following example:
49
50 - compatible: Must contain '"nvidia,<chip>-pcie",
51 "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
52
53 As in the above example, the known values of "<chip>" should be
54 documented if it is used.
55
Rob Herring70145d12019-10-15 10:47:49 -050056 8) If a documented compatible string is not yet matched by the
Paul Walmsley10638a42015-01-30 15:11:04 -070057 driver, the documentation should also include a compatible
58 string that is matched by the driver (as in the "nvidia,tegra20-pcie"
59 example above).
60
61
Jason Cooper2a933002013-12-17 16:59:40 +000062II. For kernel maintainers
63
64 1) If you aren't comfortable reviewing a given binding, reply to it and ask
65 the devicetree maintainers for guidance. This will help them prioritize
66 which ones to review and which ones are ok to let go.
67
68 2) For driver (not subsystem) bindings: If you are comfortable with the
69 binding, and it hasn't received an Acked-by from the devicetree
70 maintainers after a few weeks, go ahead and take it.
71
72 Subsystem bindings (anything affecting more than a single device)
73 then getting a devicetree maintainer to review it is required.
74
75 3) For a series going though multiple trees, the binding patch should be
76 kept with the driver using the binding.
77
78III. Notes
79
80 0) Please see ...bindings/ABI.txt for details regarding devicetree ABI.
81
82 1) This document is intended as a general familiarization with the process as
83 decided at the 2013 Kernel Summit. When in doubt, the current word of the
84 devicetree maintainers overrules this document. In that situation, a patch
85 updating this document would be appreciated.