€•lŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ8/translations/zh_CN/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/zh_TW/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/it_IT/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ja_JP/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ko_KR/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/pt_BR/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/sp_SP/devicetree/bindings/writing-bindings”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒR/var/lib/git/docbuild/linux/Documentation/devicetree/bindings/writing-bindings.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒDOs and DON’Ts for designing and writing Devicetree bindings”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ’This is a list of common review feedback items focused on binding design. With every rule, there are exceptions and bindings have many gray areas.”h]”hŒ’This is a list of common review feedback items focused on binding design. With every rule, there are exceptions and bindings have many gray areas.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒ_For guidelines related to patches, see Documentation/devicetree/bindings/submitting-patches.rst”h]”hŒ_For guidelines related to patches, see Documentation/devicetree/bindings/submitting-patches.rst”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒOverall design”h]”hŒOverall design”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhûh²hh³hÇh´KubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒÏDO attempt to make bindings complete even if a driver doesn't support some features. For example, if a device has an interrupt, then include the 'interrupts' property even if the driver is only polled mode. ”h]”hÞ)”}”(hŒÎDO attempt to make bindings complete even if a driver doesn't support some features. For example, if a device has an interrupt, then include the 'interrupts' property even if the driver is only polled mode.”h]”hŒÔDO attempt to make bindings complete even if a driver doesn’t support some features. For example, if a device has an interrupt, then include the ‘interrupts’ property even if the driver is only polled mode.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒ•DON'T refer to Linux or "device driver" in bindings. Bindings should be based on what the hardware has, not what an OS and driver currently support. ”h]”hÞ)”}”(hŒ”DON'T refer to Linux or "device driver" in bindings. Bindings should be based on what the hardware has, not what an OS and driver currently support.”h]”hŒšDON’T refer to Linux or “device driver†in bindings. Bindings should be based on what the hardware has, not what an OS and driver currently support.”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒŒDO use node names matching the class of the device. Many standard names are defined in the DT Spec. If there isn't one, consider adding it. ”h]”hÞ)”}”(hŒ‹DO use node names matching the class of the device. Many standard names are defined in the DT Spec. If there isn't one, consider adding it.”h]”hŒDO use node names matching the class of the device. Many standard names are defined in the DT Spec. If there isn’t one, consider adding it.”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒ\DO check that the example matches the documentation especially after making review changes. ”h]”hÞ)”}”(hŒ[DO check that the example matches the documentation especially after making review changes.”h]”hŒ[DO check that the example matches the documentation especially after making review changes.”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒàDON'T create nodes just for the sake of instantiating drivers. Multi-function devices only need child nodes when the child nodes have their own DT resources. A single node can be multiple providers (e.g. clocks and resets). ”h]”hÞ)”}”(hŒßDON'T create nodes just for the sake of instantiating drivers. Multi-function devices only need child nodes when the child nodes have their own DT resources. A single node can be multiple providers (e.g. clocks and resets).”h]”hŒáDON’T create nodes just for the sake of instantiating drivers. Multi-function devices only need child nodes when the child nodes have their own DT resources. A single node can be multiple providers (e.g. clocks and resets).”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjsubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒØDON'T treat device node names as a stable ABI, but instead use phandles or compatibles to find sibling devices. Exception: sub-nodes of given device could be treated as ABI, if explicitly documented in the bindings. ”h]”hÞ)”}”(hŒ×DON'T treat device node names as a stable ABI, but instead use phandles or compatibles to find sibling devices. Exception: sub-nodes of given device could be treated as ABI, if explicitly documented in the bindings.”h]”hŒÙDON’T treat device node names as a stable ABI, but instead use phandles or compatibles to find sibling devices. Exception: sub-nodes of given device could be treated as ABI, if explicitly documented in the bindings.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K"hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒÈDON'T use 'syscon' alone without a specific compatible string. A 'syscon' hardware block should have a compatible string unique enough to infer the register layout of the entire block (at a minimum). ”h]”hÞ)”}”(hŒÇDON'T use 'syscon' alone without a specific compatible string. A 'syscon' hardware block should have a compatible string unique enough to infer the register layout of the entire block (at a minimum).”h]”hŒÑDON’T use ‘syscon’ alone without a specific compatible string. A ‘syscon’ hardware block should have a compatible string unique enough to infer the register layout of the entire block (at a minimum).”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒíDON'T use 'simple-mfd' compatible for non-trivial devices, where children depend on some resources from the parent. Similarly, 'simple-bus' should not be used for complex buses and even 'regs' property means device is not a simple bus. ”h]”hÞ)”}”(hŒëDON'T use 'simple-mfd' compatible for non-trivial devices, where children depend on some resources from the parent. Similarly, 'simple-bus' should not be used for complex buses and even 'regs' property means device is not a simple bus.”h]”hŒùDON’T use ‘simple-mfd’ compatible for non-trivial devices, where children depend on some resources from the parent. Similarly, ‘simple-bus’ should not be used for complex buses and even ‘regs’ property means device is not a simple bus.”…””}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K*hj»ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j h³hÇh´Khhûh²hubeh}”(h]”Œoverall-design”ah ]”h"]”Œoverall design”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Properties”h]”hŒ Properties”…””}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjãh²hh³hÇh´K1ubj )”}”(hhh]”(j)”}”(hXDO make 'compatible' properties specific. - DON'T use wildcards or device-family names in compatible strings. - DO use fallback compatibles when devices are the same as or a superset of prior implementations. - DO add new compatibles in case there are new features or bugs. - DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks. - DON'T use bus suffixes to encode the type of interface device is using. The parent bus node already implies that interface. DON'T add the type of device, if the device cannot be anything else. ”h]”(hÞ)”}”(hŒ)DO make 'compatible' properties specific.”h]”hŒ-DO make ‘compatible’ properties specific.”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K3hj÷ubhŒ block_quote”“”)”}”(hXX- DON'T use wildcards or device-family names in compatible strings. - DO use fallback compatibles when devices are the same as or a superset of prior implementations. - DO add new compatibles in case there are new features or bugs. - DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks. - DON'T use bus suffixes to encode the type of interface device is using. The parent bus node already implies that interface. DON'T add the type of device, if the device cannot be anything else. ”h]”j )”}”(hhh]”(j)”}”(hŒBDON'T use wildcards or device-family names in compatible strings. ”h]”hÞ)”}”(hŒADON'T use wildcards or device-family names in compatible strings.”h]”hŒCDON’T use wildcards or device-family names in compatible strings.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K5hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒaDO use fallback compatibles when devices are the same as or a superset of prior implementations. ”h]”hÞ)”}”(hŒ`DO use fallback compatibles when devices are the same as or a superset of prior implementations.”h]”hŒ`DO use fallback compatibles when devices are the same as or a superset of prior implementations.”…””}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K7hj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒ?DO add new compatibles in case there are new features or bugs. ”h]”hÞ)”}”(hŒ>DO add new compatibles in case there are new features or bugs.”h]”hŒ>DO add new compatibles in case there are new features or bugs.”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K:hjBubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒœDO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks. ”h]”hÞ)”}”(hŒ›DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks.”h]”hŒ›DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks.”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kh²hh³hÇh´Nubj)”}”(hŒŒDO use non-empty 'ranges' to limit the size of child buses/devices. 64-bit platforms don't need all devices to have 64-bit address and size.”h]”hÞ)”}”(hŒŒDO use non-empty 'ranges' to limit the size of child buses/devices. 64-bit platforms don't need all devices to have 64-bit address and size.”h]”hŒ’DO use non-empty ‘ranges’ to limit the size of child buses/devices. 64-bit platforms don’t need all devices to have 64-bit address and size.”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KƒhjYubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj>h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1j h³hÇh´Khj-h²hubeh}”(h]”Œboard-soc-dts-files”ah ]”h"]”Œboard/soc .dts files”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kubeh}”(h]”Œ