From d6ea40cb780aad22581436d5748ef3de8f148fd8 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Vauboin Date: Thu, 26 Sep 2024 12:30:49 +0200 Subject: [PATCH] Revert "gateware.interface.ulpi: wait for min Tstart time before using the bus" This reverts commit cf6abaae922bd3f04ca6118f0a7d26b768859d28. --- luna/gateware/interface/ulpi.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/luna/gateware/interface/ulpi.py b/luna/gateware/interface/ulpi.py index 0bc3b7f8..5f947736 100644 --- a/luna/gateware/interface/ulpi.py +++ b/luna/gateware/interface/ulpi.py @@ -688,8 +688,6 @@ class UTMITranslator(Elaboratable): """ - _CYCLES_1_MILLISECONDS = 60000 - # UTMI status signals translated from the ULPI bus. RXEVENT_STATUS_SIGNALS = [ ('line_state', 2), ('vbus_valid', 1), ('session_valid', 1), ('session_end', 1), @@ -852,19 +850,9 @@ def elaborate(self, platform): # Hook up our reset signal iff our ULPI bus has one. - phy_ready = Signal() if hasattr(self.ulpi, 'rst'): m.d.comb += self.ulpi.rst.o.eq(ResetSignal(raw_clock_domain)), - # After reset, DIR may not be driven high immediately. - # Before using the bus, wait for the minimum Tstart time according to [USB334x: Table 4.3]. - startup_counter = Signal(range(self._CYCLES_1_MILLISECONDS + 1)) - m.d.usb += startup_counter.eq(startup_counter + 1) - with m.If(startup_counter == self._CYCLES_1_MILLISECONDS): - m.d.usb += phy_ready.eq(1) - else: - m.d.usb += phy_ready.eq(1) - # Connect our ULPI control signals to each of our subcomponents. m.d.comb += [ @@ -883,13 +871,13 @@ def elaborate(self, platform): # Connect our inputs to our transmit translator. transmit_translator.ulpi_nxt .eq(self.ulpi.nxt.i), transmit_translator.op_mode .eq(self.op_mode), - transmit_translator.bus_idle .eq(~control_translator.busy & ~self.ulpi.dir.i & phy_ready), + transmit_translator.bus_idle .eq(~control_translator.busy & ~self.ulpi.dir.i), transmit_translator.tx_data .eq(self.tx_data), transmit_translator.tx_valid .eq(self.tx_valid), self.tx_ready .eq(transmit_translator.tx_ready), # Connect our inputs to our control translator / register window. - control_translator.bus_idle .eq(~transmit_translator.busy & phy_ready), + control_translator.bus_idle .eq(~transmit_translator.busy), register_window.ulpi_data_in .eq(self.ulpi.data.i), register_window.ulpi_dir .eq(self.ulpi.dir.i), register_window.ulpi_next .eq(self.ulpi.nxt.i),