162306a36Sopenharmony_ciDT compatible string versioning for SiFive open-source IP blocks
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThis document describes the version specification for DT "compatible"
462306a36Sopenharmony_cistrings for open-source SiFive IP blocks.  HDL for these IP blocks
562306a36Sopenharmony_cican be found in this public repository:
662306a36Sopenharmony_ci
762306a36Sopenharmony_cihttps://github.com/sifive/sifive-blocks
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciIP block-specific DT compatible strings are contained within the HDL,
1062306a36Sopenharmony_ciin the form "sifive,<ip-block-name><integer version number>".
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciAn example is "sifive,uart0" from:
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_cihttps://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciUntil these IP blocks (or IP integration) support version
1762306a36Sopenharmony_ciauto-discovery, the maintainers of these IP blocks intend to increment
1862306a36Sopenharmony_cithe suffixed number in the compatible string whenever the software
1962306a36Sopenharmony_ciinterface to these IP blocks changes, or when the functionality of the
2062306a36Sopenharmony_ciunderlying IP blocks changes in a way that software should be aware of.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciDriver developers can use compatible string "match" values such as
2362306a36Sopenharmony_ci"sifive,uart0" to indicate that their driver is compatible with the
2462306a36Sopenharmony_ciregister interface and functionality associated with the relevant
2562306a36Sopenharmony_ciupstream sifive-blocks commits.  It is expected that most drivers will
2662306a36Sopenharmony_cimatch on these IP block-specific compatible strings.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciDT data authors, when writing data for a particular SoC, should
2962306a36Sopenharmony_cicontinue to specify an SoC-specific compatible string value, such as
3062306a36Sopenharmony_ci"sifive,fu540-c000-uart".  This way, if SoC-specific
3162306a36Sopenharmony_ciintegration-specific bug fixes or workarounds are needed, the kernel
3262306a36Sopenharmony_cior other system software can match on this string to apply them.  The
3362306a36Sopenharmony_ciIP block-specific compatible string (such as "sifive,uart0") should
3462306a36Sopenharmony_cithen be specified as a subsequent value.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ciAn example of this style:
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci    compatible = "sifive,fu540-c000-uart", "sifive,uart0";
39