tools/litex_json2dts: Add initial USB OHCI support.

This commit is contained in:
Florent Kermarrec 2021-06-01 10:41:35 +02:00
parent acebc949c6
commit 0b329c3dce

View file

@ -229,7 +229,21 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False):
ethmac_rx_slots = d["constants"]["ethmac_rx_slots"],
ethmac_interrupt = "" if polling else "interrupts = <{}>;".format(d["constants"]["ethmac_interrupt"]))
# SPI Flash -------------------------------------------------------------------------------------
# USB OHCI -------------------------------------------------------------------------------------
if "usb_ohci_ctrl" in d["memories"]:
dts += """
usb0: mac@{usb_ohci_mem_base:x} {{
compatible = "generic-ohci";
reg = <0x{usb_ohci_mem_base:x} 0x1000>;
{usb_ohci_interrupt}
status = "okay";
}};
""".format(
usb_ohci_mem_base = d["memories"]["usb_ohci_ctrl"]["base"],
usb_ohci_interrupt = "" if polling else "interrupts = <{}>;".format(16)) # FIXME
# SPI Flash ------------------------------------------------------------------------------------
if "spiflash" in d["csr_bases"]:
aliases["spiflash"] = "litespiflash"