json2dts_linux: update ethmac DT node generation
The Linux LiteETH driver parses registers by name. Provide the expected names for each register: "mac", "mdio", and "buffer", respectively. For setting up tx and rx slots, the Linux driver expects three pieces of information: number of tx and rx slots, and slot size. Update json2dts_linux to provide the appropriate names and values.
This commit is contained in:
parent
f017b06926
commit
98a0b688bf
|
@ -275,8 +275,10 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False):
|
||||||
reg = <0x{ethmac_csr_base:x} 0x7c>,
|
reg = <0x{ethmac_csr_base:x} 0x7c>,
|
||||||
<0x{ethphy_csr_base:x} 0x0a>,
|
<0x{ethphy_csr_base:x} 0x0a>,
|
||||||
<0x{ethmac_mem_base:x} 0x{ethmac_mem_size:x}>;
|
<0x{ethmac_mem_base:x} 0x{ethmac_mem_size:x}>;
|
||||||
tx-fifo-depth = <{ethmac_tx_slots}>;
|
reg-names = "mac", "mdio", "buffer";
|
||||||
rx-fifo-depth = <{ethmac_rx_slots}>;
|
litex,rx-slots = <{ethmac_rx_slots}>;
|
||||||
|
litex,tx-slots = <{ethmac_tx_slots}>;
|
||||||
|
litex,slot-size = <{ethmac_slot_size}>;
|
||||||
{ethmac_interrupt}
|
{ethmac_interrupt}
|
||||||
status = "okay";
|
status = "okay";
|
||||||
}};
|
}};
|
||||||
|
@ -285,8 +287,9 @@ def generate_dts(d, initrd_start=None, initrd_size=None, polling=False):
|
||||||
ethmac_csr_base = d["csr_bases"]["ethmac"],
|
ethmac_csr_base = d["csr_bases"]["ethmac"],
|
||||||
ethmac_mem_base = d["memories"]["ethmac"]["base"],
|
ethmac_mem_base = d["memories"]["ethmac"]["base"],
|
||||||
ethmac_mem_size = d["memories"]["ethmac"]["size"],
|
ethmac_mem_size = d["memories"]["ethmac"]["size"],
|
||||||
ethmac_tx_slots = d["constants"]["ethmac_tx_slots"],
|
|
||||||
ethmac_rx_slots = d["constants"]["ethmac_rx_slots"],
|
ethmac_rx_slots = d["constants"]["ethmac_rx_slots"],
|
||||||
|
ethmac_tx_slots = d["constants"]["ethmac_tx_slots"],
|
||||||
|
ethmac_slot_size = d["constants"]["ethmac_slot_size"],
|
||||||
ethmac_interrupt = "" if polling else "interrupts = <{}>;".format(d["constants"]["ethmac_interrupt"]))
|
ethmac_interrupt = "" if polling else "interrupts = <{}>;".format(d["constants"]["ethmac_interrupt"]))
|
||||||
|
|
||||||
# USB OHCI -------------------------------------------------------------------------------------
|
# USB OHCI -------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue