18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci===================
48c2ecf20Sopenharmony_ciDevicetree (DT) ABI
58c2ecf20Sopenharmony_ci===================
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciI. Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit
88c2ecf20Sopenharmony_ci   summary document:
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci     "That still leaves the question of, what does a stable binding look
118c2ecf20Sopenharmony_ci     like?  Certainly a stable binding means that a newer kernel will not
128c2ecf20Sopenharmony_ci     break on an older device tree, but that doesn't mean the binding is
138c2ecf20Sopenharmony_ci     frozen for all time. Grant said there are ways to change bindings that
148c2ecf20Sopenharmony_ci     don't result in breakage. For instance, if a new property is added,
158c2ecf20Sopenharmony_ci     then default to the previous behaviour if it is missing. If a binding
168c2ecf20Sopenharmony_ci     truly needs an incompatible change, then change the compatible string
178c2ecf20Sopenharmony_ci     at the same time.  The driver can bind against both the old and the
188c2ecf20Sopenharmony_ci     new. These guidelines aren't new, but they desperately need to be
198c2ecf20Sopenharmony_ci     documented."
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciII.  General binding rules
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci  1) Maintainers, don't let perfect be the enemy of good.  Don't hold up a
248c2ecf20Sopenharmony_ci     binding because it isn't perfect.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  2) Use specific compatible strings so that if we need to add a feature (DMA)
278c2ecf20Sopenharmony_ci     in the future, we can create a new compatible string.  See I.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci  3) Bindings can be augmented, but the driver shouldn't break when given
308c2ecf20Sopenharmony_ci     the old binding. ie. add additional properties, but don't change the
318c2ecf20Sopenharmony_ci     meaning of an existing property. For drivers, default to the original
328c2ecf20Sopenharmony_ci     behaviour when a newly added property is missing.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  4) Don't submit bindings for staging or unstable.  That will be decided by
358c2ecf20Sopenharmony_ci     the devicetree maintainers *after* discussion on the mailinglist.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciIII. Notes
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci  1) This document is intended as a general familiarization with the process as
408c2ecf20Sopenharmony_ci     decided at the 2013 Kernel Summit.  When in doubt, the current word of the
418c2ecf20Sopenharmony_ci     devicetree maintainers overrules this document.  In that situation, a patch
428c2ecf20Sopenharmony_ci     updating this document would be appreciated.
43