blob: 40902c8923f57d05ebd9b0941c24b864eb87b276 [file] [log] [blame]
Kunihiko Hayashi6cf357e2023-02-20 14:50:28 +09001/* 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
16struct dwc3_glue_data {
17 struct clk_bulk clks;
18 struct reset_ctl_bulk resets;
19 fdt_addr_t regs;
Kunihiko Hayashi54c277e2023-02-20 14:50:29 +090020 fdt_size_t size;
Kunihiko Hayashi6cf357e2023-02-20 14:50:28 +090021};
22
23struct 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
29int dwc3_glue_bind(struct udevice *parent);
30int dwc3_glue_probe(struct udevice *dev);
31int dwc3_glue_remove(struct udevice *dev);
32
33#endif