^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) DT compatible string versioning for SiFive open-source IP blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) This document describes the version specification for DT "compatible"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) strings for open-source SiFive IP blocks. HDL for these IP blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) can be found in this public repository:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) https://github.com/sifive/sifive-blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) IP block-specific DT compatible strings are contained within the HDL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) in the form "sifive,<ip-block-name><integer version number>".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) An example is "sifive,uart0" from:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) https://github.com/sifive/sifive-blocks/blob/v1.0/src/main/scala/devices/uart/UART.scala#L43
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Until these IP blocks (or IP integration) support version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) auto-discovery, the maintainers of these IP blocks intend to increment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) the suffixed number in the compatible string whenever the software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) interface to these IP blocks changes, or when the functionality of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) underlying IP blocks changes in a way that software should be aware of.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Driver developers can use compatible string "match" values such as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) "sifive,uart0" to indicate that their driver is compatible with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) register interface and functionality associated with the relevant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) upstream sifive-blocks commits. It is expected that most drivers will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) match on these IP block-specific compatible strings.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) DT data authors, when writing data for a particular SoC, should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) continue to specify an SoC-specific compatible string value, such as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) "sifive,fu540-c000-uart". This way, if SoC-specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) integration-specific bug fixes or workarounds are needed, the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) or other system software can match on this string to apply them. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) IP block-specific compatible string (such as "sifive,uart0") should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) then be specified as a subsequent value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) An example of this style:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) compatible = "sifive,fu540-c000-uart", "sifive,uart0";