xref: /openbmc/qemu/include/hw/usb/imx-usb-phy.h (revision c122bca9)
1 #ifndef IMX_USB_PHY_H
2 #define IMX_USB_PHY_H
3 
4 #include "hw/sysbus.h"
5 #include "qemu/bitops.h"
6 #include "qom/object.h"
7 
8 enum IMXUsbPhyRegisters {
9     USBPHY_PWD,
10     USBPHY_PWD_SET,
11     USBPHY_PWD_CLR,
12     USBPHY_PWD_TOG,
13     USBPHY_TX,
14     USBPHY_TX_SET,
15     USBPHY_TX_CLR,
16     USBPHY_TX_TOG,
17     USBPHY_RX,
18     USBPHY_RX_SET,
19     USBPHY_RX_CLR,
20     USBPHY_RX_TOG,
21     USBPHY_CTRL,
22     USBPHY_CTRL_SET,
23     USBPHY_CTRL_CLR,
24     USBPHY_CTRL_TOG,
25     USBPHY_STATUS,
26     USBPHY_DEBUG = 0x14,
27     USBPHY_DEBUG_SET,
28     USBPHY_DEBUG_CLR,
29     USBPHY_DEBUG_TOG,
30     USBPHY_DEBUG0_STATUS,
31     USBPHY_DEBUG1 = 0x1c,
32     USBPHY_DEBUG1_SET,
33     USBPHY_DEBUG1_CLR,
34     USBPHY_DEBUG1_TOG,
35     USBPHY_VERSION,
36     USBPHY_MAX
37 };
38 
39 #define USBPHY_CTRL_SFTRST BIT(31)
40 
41 #define TYPE_IMX_USBPHY "imx.usbphy"
42 OBJECT_DECLARE_SIMPLE_TYPE(IMXUSBPHYState, IMX_USBPHY)
43 
44 struct IMXUSBPHYState {
45     /* <private> */
46     SysBusDevice parent_obj;
47 
48     /* <public> */
49     MemoryRegion iomem;
50 
51     uint32_t usbphy[USBPHY_MAX];
52 };
53 
54 #endif /* IMX_USB_PHY_H */
55