[usbdev][usbuart] Change USB PHY interface to pass properties back to IP?
@alees24 is already working on this.
Since Jan 12, 2024.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
The USB PHY interface we are using today relies on the USB IP to be configured correctly for the PHY capabilities, which ultimately involves the device driver understanding the PHY. This isn't so convenient for portable software.
**All signal names below are as seen at IP interface**
We should consider reversing this and adding two signals from the PHY to the IP and removing one:
- cio_usbphy_tx_d_se0_i: set if PHY transmit side uses {cio_d_o, cio_d_en_o, cio_se0_o} and clear if it uses {cio_dp_o, cio_dp_en_o, cio_dn_o, cio_dn_en_o}.
- cio_usbphy_has_diff_rx_i: set if PHY has a differential receiver that drives {cio_d_i, cio_dp_i, cio_dn_i} and clear if it is only single ended and only drived {cio_dp_i, cio_dn_i}.
- Remove cio_tx_mode_se_o / cio_tx_mode_se_en_o which currently propagates the mode being used by the IP for TX.
The phy_config register bits tx_differential_mode and rx_differential_mode would become status bits reflecting the values from the PHY. A bit for debug would be added to force RX to only use the single ended signals (it is nonsense to force use of differential signal if the phy does not provide it).
This would be of even more use in the usbuart case to make it possible to use the IP without software being aware that it is any different from a regular uart.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.