1*4882a593SmuzhiyunDT compatible string versioning for SiFive open-source IP blocks 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis document describes the version specification for DT "compatible" 4*4882a593Smuzhiyunstrings for open-source SiFive IP blocks. HDL for these IP blocks 5*4882a593Smuzhiyuncan be found in this public repository: 6*4882a593Smuzhiyun 7*4882a593Smuzhiyunhttps://github.com/sifive/sifive-blocks 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunIP block-specific DT compatible strings are contained within the HDL, 10*4882a593Smuzhiyunin the form "sifive,<ip-block-name><integer version number>". 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunAn example is "sifive,uart0" from: 13*4882a593Smuzhiyun 14*4882a593Smuzhiyunhttps://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunUntil these IP blocks (or IP integration) support version 17*4882a593Smuzhiyunauto-discovery, the maintainers of these IP blocks intend to increment 18*4882a593Smuzhiyunthe suffixed number in the compatible string whenever the software 19*4882a593Smuzhiyuninterface to these IP blocks changes, or when the functionality of the 20*4882a593Smuzhiyununderlying IP blocks changes in a way that software should be aware of. 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunDriver developers can use compatible string "match" values such as 23*4882a593Smuzhiyun"sifive,uart0" to indicate that their driver is compatible with the 24*4882a593Smuzhiyunregister interface and functionality associated with the relevant 25*4882a593Smuzhiyunupstream sifive-blocks commits. It is expected that most drivers will 26*4882a593Smuzhiyunmatch on these IP block-specific compatible strings. 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDT data authors, when writing data for a particular SoC, should 29*4882a593Smuzhiyuncontinue to specify an SoC-specific compatible string value, such as 30*4882a593Smuzhiyun"sifive,fu540-c000-uart". This way, if SoC-specific 31*4882a593Smuzhiyunintegration-specific bug fixes or workarounds are needed, the kernel 32*4882a593Smuzhiyunor other system software can match on this string to apply them. The 33*4882a593SmuzhiyunIP block-specific compatible string (such as "sifive,uart0") should 34*4882a593Smuzhiyunthen be specified as a subsequent value. 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunAn example of this style: 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun compatible = "sifive,fu540-c000-uart", "sifive,uart0"; 39