*W, ENUMERR This assignment is a violation of SystemVerilog strong typing rules for enumeration datatypes

In reply to Reuben:

There should only be one typedef spi_mode_e in only one package. Any other package, interface, or module that needs that typedef needs to import the package with the typedef.

Also note that package imports do not chain like `include files. If you have package A that imports a package B, importing package A does not give you all the definitions in package B. There is an export mechanism to the chaining, but that is probably more complicated than just making sure you import all the necessary packages that are needed.