1*c66ec88fSEmmanuel VadotDT compatible string versioning for SiFive open-source IP blocks 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThis document describes the version specification for DT "compatible" 4*c66ec88fSEmmanuel Vadotstrings for open-source SiFive IP blocks. HDL for these IP blocks 5*c66ec88fSEmmanuel Vadotcan be found in this public repository: 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadothttps://github.com/sifive/sifive-blocks 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel VadotIP block-specific DT compatible strings are contained within the HDL, 10*c66ec88fSEmmanuel Vadotin the form "sifive,<ip-block-name><integer version number>". 11*c66ec88fSEmmanuel Vadot 12*c66ec88fSEmmanuel VadotAn example is "sifive,uart0" from: 13*c66ec88fSEmmanuel Vadot 14*c66ec88fSEmmanuel Vadothttps://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel VadotUntil these IP blocks (or IP integration) support version 17*c66ec88fSEmmanuel Vadotauto-discovery, the maintainers of these IP blocks intend to increment 18*c66ec88fSEmmanuel Vadotthe suffixed number in the compatible string whenever the software 19*c66ec88fSEmmanuel Vadotinterface to these IP blocks changes, or when the functionality of the 20*c66ec88fSEmmanuel Vadotunderlying IP blocks changes in a way that software should be aware of. 21*c66ec88fSEmmanuel Vadot 22*c66ec88fSEmmanuel VadotDriver developers can use compatible string "match" values such as 23*c66ec88fSEmmanuel Vadot"sifive,uart0" to indicate that their driver is compatible with the 24*c66ec88fSEmmanuel Vadotregister interface and functionality associated with the relevant 25*c66ec88fSEmmanuel Vadotupstream sifive-blocks commits. It is expected that most drivers will 26*c66ec88fSEmmanuel Vadotmatch on these IP block-specific compatible strings. 27*c66ec88fSEmmanuel Vadot 28*c66ec88fSEmmanuel VadotDT data authors, when writing data for a particular SoC, should 29*c66ec88fSEmmanuel Vadotcontinue to specify an SoC-specific compatible string value, such as 30*c66ec88fSEmmanuel Vadot"sifive,fu540-c000-uart". This way, if SoC-specific 31*c66ec88fSEmmanuel Vadotintegration-specific bug fixes or workarounds are needed, the kernel 32*c66ec88fSEmmanuel Vadotor other system software can match on this string to apply them. The 33*c66ec88fSEmmanuel VadotIP block-specific compatible string (such as "sifive,uart0") should 34*c66ec88fSEmmanuel Vadotthen be specified as a subsequent value. 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel VadotAn example of this style: 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel Vadot compatible = "sifive,fu540-c000-uart", "sifive,uart0"; 39