Kunihiko Hayashi | ef2313b | 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; |
Kunihiko Hayashi | 211a066 | 2023-02-20 14:50:29 +0900 | [diff] [blame] | 20 | fdt_size_t size; |
Kunihiko Hayashi | ef2313b | 2023-02-20 14:50:28 +0900 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | struct dwc3_glue_ops { |
| 24 | int (*glue_get_ctrl_dev)(struct udevice *parent, ofnode *node); |
| 25 | void (*glue_configure)(struct udevice *dev, int index, |
| 26 | enum usb_dr_mode mode); |
| 27 | }; |
| 28 | |
| 29 | int dwc3_glue_bind(struct udevice *parent); |
| 30 | int dwc3_glue_probe(struct udevice *dev); |
| 31 | int dwc3_glue_remove(struct udevice *dev); |
| 32 | |
| 33 | #endif |