2020-04-15 14:45:25 +00:00
|
|
|
.. SPDX-License-Identifier: GPL-2.0
|
2013-12-17 16:59:40 +00:00
|
|
|
|
2020-04-15 14:45:25 +00:00
|
|
|
==========================================
|
2021-03-25 16:47:09 +00:00
|
|
|
Submitting Devicetree (DT) binding patches
|
2020-04-15 14:45:25 +00:00
|
|
|
==========================================
|
2013-12-17 16:59:40 +00:00
|
|
|
|
|
|
|
I. For patch submitters
|
2020-04-15 14:45:25 +00:00
|
|
|
=======================
|
2013-12-17 16:59:40 +00:00
|
|
|
|
2021-06-16 06:27:26 +00:00
|
|
|
0) Normal patch submission rules from
|
|
|
|
Documentation/process/submitting-patches.rst applies.
|
2013-12-17 16:59:40 +00:00
|
|
|
|
2018-06-05 22:37:47 +00:00
|
|
|
1) The Documentation/ and include/dt-bindings/ portion of the patch should
|
2020-04-15 14:45:25 +00:00
|
|
|
be a separate patch. The preferred subject prefix for binding patches is::
|
2018-06-05 22:37:47 +00:00
|
|
|
|
|
|
|
"dt-bindings: <binding dir>: ..."
|
|
|
|
|
|
|
|
The 80 characters of the subject are precious. It is recommended to not
|
|
|
|
use "Documentation" or "doc" because that is implied. All bindings are
|
|
|
|
docs. Repeating "binding" again should also be avoided.
|
2013-12-17 16:59:40 +00:00
|
|
|
|
2019-10-15 15:47:49 +00:00
|
|
|
2) DT binding files are written in DT schema format using json-schema
|
|
|
|
vocabulary and YAML file format. The DT binding files must pass validation
|
2020-04-15 14:45:25 +00:00
|
|
|
by running::
|
2019-10-15 15:47:49 +00:00
|
|
|
|
|
|
|
make dt_binding_check
|
|
|
|
|
2021-06-16 06:27:26 +00:00
|
|
|
See Documentation/devicetree/bindings/writing-schema.rst for more details
|
|
|
|
about schema and tools setup.
|
2019-10-15 15:47:49 +00:00
|
|
|
|
|
|
|
3) DT binding files should be dual licensed. The preferred license tag is
|
|
|
|
(GPL-2.0-only OR BSD-2-Clause).
|
|
|
|
|
|
|
|
4) Submit the entire series to the devicetree mailinglist at
|
2013-12-17 16:59:40 +00:00
|
|
|
|
|
|
|
devicetree@vger.kernel.org
|
|
|
|
|
2015-03-05 15:53:11 +00:00
|
|
|
and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify
|
|
|
|
all of the DT maintainers.
|
|
|
|
|
2019-10-15 15:47:49 +00:00
|
|
|
5) The Documentation/ portion of the patch should come in the series before
|
2014-10-09 18:24:07 +00:00
|
|
|
the code implementing the binding.
|
|
|
|
|
2019-10-15 15:47:49 +00:00
|
|
|
6) Any compatible strings used in a chip or board DTS file must be
|
2015-01-30 22:11:04 +00:00
|
|
|
previously documented in the corresponding DT binding text file
|
|
|
|
in Documentation/devicetree/bindings. This rule applies even if
|
|
|
|
the Linux device driver does not yet match on the compatible
|
|
|
|
string. [ checkpatch will emit warnings if this step is not
|
|
|
|
followed as of commit bff5da4335256513497cc8c79f9a9d1665e09864
|
|
|
|
("checkpatch: add DT compatible string documentation checks"). ]
|
|
|
|
|
2019-10-15 15:47:49 +00:00
|
|
|
7) The wildcard "<chip>" may be used in compatible strings, as in
|
2015-01-30 22:11:04 +00:00
|
|
|
the following example:
|
|
|
|
|
|
|
|
- compatible: Must contain '"nvidia,<chip>-pcie",
|
|
|
|
"nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
|
|
|
|
|
|
|
|
As in the above example, the known values of "<chip>" should be
|
|
|
|
documented if it is used.
|
|
|
|
|
2019-10-15 15:47:49 +00:00
|
|
|
8) If a documented compatible string is not yet matched by the
|
2015-01-30 22:11:04 +00:00
|
|
|
driver, the documentation should also include a compatible
|
|
|
|
string that is matched by the driver (as in the "nvidia,tegra20-pcie"
|
|
|
|
example above).
|
|
|
|
|
2021-09-10 14:24:19 +00:00
|
|
|
9) Bindings are actively used by multiple projects other than the Linux
|
|
|
|
Kernel, extra care and consideration may need to be taken when making changes
|
|
|
|
to existing bindings.
|
2015-01-30 22:11:04 +00:00
|
|
|
|
2013-12-17 16:59:40 +00:00
|
|
|
II. For kernel maintainers
|
2020-04-15 14:45:25 +00:00
|
|
|
==========================
|
2013-12-17 16:59:40 +00:00
|
|
|
|
|
|
|
1) If you aren't comfortable reviewing a given binding, reply to it and ask
|
|
|
|
the devicetree maintainers for guidance. This will help them prioritize
|
|
|
|
which ones to review and which ones are ok to let go.
|
|
|
|
|
|
|
|
2) For driver (not subsystem) bindings: If you are comfortable with the
|
|
|
|
binding, and it hasn't received an Acked-by from the devicetree
|
|
|
|
maintainers after a few weeks, go ahead and take it.
|
|
|
|
|
2021-03-09 13:06:50 +00:00
|
|
|
For subsystem bindings (anything affecting more than a single device),
|
|
|
|
getting a devicetree maintainer to review it is required.
|
2013-12-17 16:59:40 +00:00
|
|
|
|
|
|
|
3) For a series going though multiple trees, the binding patch should be
|
|
|
|
kept with the driver using the binding.
|
|
|
|
|
|
|
|
III. Notes
|
2020-04-15 14:45:25 +00:00
|
|
|
==========
|
2013-12-17 16:59:40 +00:00
|
|
|
|
2021-06-16 06:27:26 +00:00
|
|
|
0) Please see Documentation/devicetree/bindings/ABI.rst for details
|
|
|
|
regarding devicetree ABI.
|
2013-12-17 16:59:40 +00:00
|
|
|
|
|
|
|
1) This document is intended as a general familiarization with the process as
|
|
|
|
decided at the 2013 Kernel Summit. When in doubt, the current word of the
|
|
|
|
devicetree maintainers overrules this document. In that situation, a patch
|
|
|
|
updating this document would be appreciated.
|