From 92d911b2eedec8fee1f494ab961585e253351d4f Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Tue, 19 Feb 2019 14:21:04 +0100 Subject: mach-meson: g12a: add DWC2 peripheral mode support Adds support for Amlogic G12A USB Device mode. The DWC2 Controller behind the Glue can be connected to an OTG capable PHY. The Glue setups the PHY mode. This patch implements Device mode support by adding a board_usb_init/cleanup setting up the DWC2 controller and switch the OTG capable port to Device before starting the DWC2 controller in Device mode. Signed-off-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/usb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/arm/include/asm/arch-meson/usb.h (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/arch-meson/usb.h b/arch/arm/include/asm/arch-meson/usb.h new file mode 100644 index 0000000000..b794b5ce77 --- /dev/null +++ b/arch/arm/include/asm/arch-meson/usb.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +#ifndef __MESON_USB_H__ +#define __MESON_USB_H__ + +int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode); + +#endif /* __MESON_USB_H__ */ -- cgit v1.2.3