On 29/04/2024 16:55, Witold Sadowski wrote: >> >>> + >>> +static bool cdns_xspi_get_hw_overlay(struct platform_device *pdev) { >>> + int err; >>> + >>> + err = device_property_match_string(&pdev->dev, >>> + "compatible", "mrvl,xspi-nor"); >> >> No, do not add matching in some random parts of the code, but use driver >> match/data from ID table. > > Ok. As I have written in different mail, a little bit of manual matching > Will be necessary to handle both ACPI and device-tree case. ACPI also handle variants with match data. > >> >> .... >> >>> >>> + cdns_xspi_print_phy_config(cdns_xspi); >>> ret = cdns_xspi_controller_init(cdns_xspi); >>> if (ret) { >>> dev_err(dev, "Failed to initialize controller\n"); @@ -613,6 >> +911,9 >>> @@ static const struct of_device_id cdns_xspi_of_match[] = { >>> { >>> .compatible = "cdns,xspi-nor", >>> }, >>> + { >>> + .compatible = "mrvl,xspi-nor", >> >> This falsely suggest they are compatible :/ > > I'm not sure if I understand what do you mean. > cdns, xspi will be compatible with overlay, as it won't touch any > additional HW. It possibly fail in second direction, as overlay > handling code will not see expected values. That's clear rule for almost every driver: if you do not have any match data, it suggests entry is redundant, because devices are compatible. There is no different treatment for SPI. As seen in other pieces of this code, devices are not compatible, so it points to missing match data to handle variants. Best regards, Krzysztof