18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci========================================== 48c2ecf20Sopenharmony_ciSubmitting devicetree (DT) binding patches 58c2ecf20Sopenharmony_ci========================================== 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciI. For patch submitters 88c2ecf20Sopenharmony_ci======================= 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci 0) Normal patch submission rules from Documentation/process/submitting-patches.rst 118c2ecf20Sopenharmony_ci applies. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci 1) The Documentation/ and include/dt-bindings/ portion of the patch should 148c2ecf20Sopenharmony_ci be a separate patch. The preferred subject prefix for binding patches is:: 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci "dt-bindings: <binding dir>: ..." 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci The 80 characters of the subject are precious. It is recommended to not 198c2ecf20Sopenharmony_ci use "Documentation" or "doc" because that is implied. All bindings are 208c2ecf20Sopenharmony_ci docs. Repeating "binding" again should also be avoided. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci 2) DT binding files are written in DT schema format using json-schema 238c2ecf20Sopenharmony_ci vocabulary and YAML file format. The DT binding files must pass validation 248c2ecf20Sopenharmony_ci by running:: 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci make dt_binding_check 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci See ../writing-schema.rst for more details about schema and tools setup. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci 3) DT binding files should be dual licensed. The preferred license tag is 318c2ecf20Sopenharmony_ci (GPL-2.0-only OR BSD-2-Clause). 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci 4) Submit the entire series to the devicetree mailinglist at 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci devicetree@vger.kernel.org 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci and Cc: the DT maintainers. Use scripts/get_maintainer.pl to identify 388c2ecf20Sopenharmony_ci all of the DT maintainers. 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci 5) The Documentation/ portion of the patch should come in the series before 418c2ecf20Sopenharmony_ci the code implementing the binding. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci 6) Any compatible strings used in a chip or board DTS file must be 448c2ecf20Sopenharmony_ci previously documented in the corresponding DT binding text file 458c2ecf20Sopenharmony_ci in Documentation/devicetree/bindings. This rule applies even if 468c2ecf20Sopenharmony_ci the Linux device driver does not yet match on the compatible 478c2ecf20Sopenharmony_ci string. [ checkpatch will emit warnings if this step is not 488c2ecf20Sopenharmony_ci followed as of commit bff5da4335256513497cc8c79f9a9d1665e09864 498c2ecf20Sopenharmony_ci ("checkpatch: add DT compatible string documentation checks"). ] 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci 7) The wildcard "<chip>" may be used in compatible strings, as in 528c2ecf20Sopenharmony_ci the following example: 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci - compatible: Must contain '"nvidia,<chip>-pcie", 558c2ecf20Sopenharmony_ci "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ... 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci As in the above example, the known values of "<chip>" should be 588c2ecf20Sopenharmony_ci documented if it is used. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci 8) If a documented compatible string is not yet matched by the 618c2ecf20Sopenharmony_ci driver, the documentation should also include a compatible 628c2ecf20Sopenharmony_ci string that is matched by the driver (as in the "nvidia,tegra20-pcie" 638c2ecf20Sopenharmony_ci example above). 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciII. For kernel maintainers 678c2ecf20Sopenharmony_ci========================== 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci 1) If you aren't comfortable reviewing a given binding, reply to it and ask 708c2ecf20Sopenharmony_ci the devicetree maintainers for guidance. This will help them prioritize 718c2ecf20Sopenharmony_ci which ones to review and which ones are ok to let go. 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci 2) For driver (not subsystem) bindings: If you are comfortable with the 748c2ecf20Sopenharmony_ci binding, and it hasn't received an Acked-by from the devicetree 758c2ecf20Sopenharmony_ci maintainers after a few weeks, go ahead and take it. 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci Subsystem bindings (anything affecting more than a single device) 788c2ecf20Sopenharmony_ci then getting a devicetree maintainer to review it is required. 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci 3) For a series going though multiple trees, the binding patch should be 818c2ecf20Sopenharmony_ci kept with the driver using the binding. 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ciIII. Notes 848c2ecf20Sopenharmony_ci========== 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci 0) Please see ...bindings/ABI.txt for details regarding devicetree ABI. 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci 1) This document is intended as a general familiarization with the process as 898c2ecf20Sopenharmony_ci decided at the 2013 Kernel Summit. When in doubt, the current word of the 908c2ecf20Sopenharmony_ci devicetree maintainers overrules this document. In that situation, a patch 918c2ecf20Sopenharmony_ci updating this document would be appreciated. 92