Kunihiko Hayashi | 6cf357e | 2023-02-20 14:50:28 +0900 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * dwc3-generic.h - Generic DWC3 Glue layer header |
| 4 | * |
| 5 | * Copyright (C) 2016 - 2018 Xilinx, Inc. |
| 6 | * Copyright (C) 2023 Socionext Inc. |
| 7 | */ |
| 8 | |
| 9 | #ifndef __DRIVERS_USB_DWC3_GENERIC_H |
| 10 | #define __DRIVERS_USB_DWC3_GENERIC_H |
| 11 | |
| 12 | #include <clk.h> |
| 13 | #include <reset.h> |
| 14 | #include <dwc3-uboot.h> |
| 15 | |
| 16 | struct dwc3_glue_data { |
| 17 | struct clk_bulk clks; |
| 18 | struct reset_ctl_bulk resets; |
| 19 | fdt_addr_t regs; |
| 20 | }; |
| 21 | |
| 22 | struct dwc3_glue_ops { |
| 23 | int (*glue_get_ctrl_dev)(struct udevice *parent, ofnode *node); |
| 24 | void (*glue_configure)(struct udevice *dev, int index, |
| 25 | enum usb_dr_mode mode); |
| 26 | }; |
| 27 | |
| 28 | int dwc3_glue_bind(struct udevice *parent); |
| 29 | int dwc3_glue_probe(struct udevice *dev); |
| 30 | int dwc3_glue_remove(struct udevice *dev); |
| 31 | |
| 32 | #endif |