18c2ecf20Sopenharmony_ciDT compatible string versioning for SiFive open-source IP blocks 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis document describes the version specification for DT "compatible" 48c2ecf20Sopenharmony_cistrings for open-source SiFive IP blocks. HDL for these IP blocks 58c2ecf20Sopenharmony_cican be found in this public repository: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cihttps://github.com/sifive/sifive-blocks 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciIP block-specific DT compatible strings are contained within the HDL, 108c2ecf20Sopenharmony_ciin the form "sifive,<ip-block-name><integer version number>". 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciAn example is "sifive,uart0" from: 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cihttps://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciUntil these IP blocks (or IP integration) support version 178c2ecf20Sopenharmony_ciauto-discovery, the maintainers of these IP blocks intend to increment 188c2ecf20Sopenharmony_cithe suffixed number in the compatible string whenever the software 198c2ecf20Sopenharmony_ciinterface to these IP blocks changes, or when the functionality of the 208c2ecf20Sopenharmony_ciunderlying IP blocks changes in a way that software should be aware of. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciDriver developers can use compatible string "match" values such as 238c2ecf20Sopenharmony_ci"sifive,uart0" to indicate that their driver is compatible with the 248c2ecf20Sopenharmony_ciregister interface and functionality associated with the relevant 258c2ecf20Sopenharmony_ciupstream sifive-blocks commits. It is expected that most drivers will 268c2ecf20Sopenharmony_cimatch on these IP block-specific compatible strings. 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciDT data authors, when writing data for a particular SoC, should 298c2ecf20Sopenharmony_cicontinue to specify an SoC-specific compatible string value, such as 308c2ecf20Sopenharmony_ci"sifive,fu540-c000-uart". This way, if SoC-specific 318c2ecf20Sopenharmony_ciintegration-specific bug fixes or workarounds are needed, the kernel 328c2ecf20Sopenharmony_cior other system software can match on this string to apply them. The 338c2ecf20Sopenharmony_ciIP block-specific compatible string (such as "sifive,uart0") should 348c2ecf20Sopenharmony_cithen be specified as a subsequent value. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciAn example of this style: 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci compatible = "sifive,fu540-c000-uart", "sifive,uart0"; 39