[RFC] Inconsistent sifive,fu540-c000-uart binding.

Conor Dooley conor at kernel.org
Mon Mar 4 10:53:09 PST 2024


On Mon, Mar 04, 2024 at 11:59:47AM +0100, Sebastian Andrzej Siewior wrote:
> | $ git grep fu540-c000-uart
> | Documentation/devicetree/bindings/serial/sifive-serial.yaml:          - sifive,fu540-c000-uart
> | Documentation/devicetree/bindings/serial/sifive-serial.yaml:        compatible = "sifive,fu540-c000-uart", "sifive,uart0";
> | Documentation/devicetree/bindings/sifive/sifive-blocks-ip-versioning.txt:"sifive,fu540-c000-uart".  This way, if SoC-specific
> | Documentation/devicetree/bindings/sifive/sifive-blocks-ip-versioning.txt:    compatible = "sifive,fu540-c000-uart", "sifive,uart0";
> | arch/riscv/boot/dts/sifive/fu540-c000.dtsi:                     compatible = "sifive,fu540-c000-uart", "sifive,uart0";
> | arch/riscv/boot/dts/sifive/fu540-c000.dtsi:                     compatible = "sifive,fu540-c000-uart", "sifive,uart0";
> | drivers/tty/serial/sifive.c:OF_EARLYCON_DECLARE(sifive, "sifive,fu540-c000-uart0",
> | drivers/tty/serial/sifive.c:    { .compatible = "sifive,fu540-c000-uart0" },
> 
> note that the driver has a trailing 0 in the binding while the yaml
> description and the DT part does not.
> The 'sifive,uart' has a trailing 0 where the 0 denotes the version UART
> IP.
> 
> Was this also intended for the fu540-c000-uart binding? Should the 0 be
> added everywhere or removed from the driver?

I suspect that the driver is what's incorrect, given there's little
value in putting the IP version in the SoC-specific compatible as it's
a fixed implementation. I'd change the driver to match the bindings.

Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240304/c1cb09f3/attachment.sig>


More information about the linux-riscv mailing list