blob: 0b32728c5749882fca70833a251e1c4bdb449b01 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +01002/*
3 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
4 * Copyright (C) 2010 Freescale Semiconductor, Inc.
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +01005 */
6
7#include <common.h>
8#include <usb.h>
9#include <errno.h>
10#include <linux/compiler.h>
Mateusz Kulikowski3add69e2016-03-31 23:12:23 +020011#include <usb/ehci-ci.h>
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010012#include <asm/io.h>
13#include <asm/arch/imx-regs.h>
14#include <asm/arch/clock.h>
Lukasz Majewskidbc70f82019-04-04 12:26:52 +020015#include <dm.h>
16#include <power/regulator.h>
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010017
18#include "ehci.h"
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010019
20#define MX5_USBOTHER_REGS_OFFSET 0x800
21
22
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000023#define MXC_OTG_OFFSET 0
24#define MXC_H1_OFFSET 0x200
25#define MXC_H2_OFFSET 0x400
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000026#define MXC_H3_OFFSET 0x600
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010027
28#define MXC_USBCTRL_OFFSET 0
29#define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8
30#define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc
31#define MXC_USB_CTRL_1_OFFSET 0x10
32#define MXC_USBH2CTRL_OFFSET 0x14
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000033#define MXC_USBH3CTRL_OFFSET 0x18
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010034
35/* USB_CTRL */
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000036/* OTG wakeup intr enable */
37#define MXC_OTG_UCTRL_OWIE_BIT (1 << 27)
38/* OTG power mask */
39#define MXC_OTG_UCTRL_OPM_BIT (1 << 24)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000040/* OTG power pin polarity */
41#define MXC_OTG_UCTRL_O_PWR_POL_BIT (1 << 24)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000042/* Host1 ULPI interrupt enable */
43#define MXC_H1_UCTRL_H1UIE_BIT (1 << 12)
44/* HOST1 wakeup intr enable */
45#define MXC_H1_UCTRL_H1WIE_BIT (1 << 11)
46/* HOST1 power mask */
47#define MXC_H1_UCTRL_H1PM_BIT (1 << 8)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000048/* HOST1 power pin polarity */
49#define MXC_H1_UCTRL_H1_PWR_POL_BIT (1 << 8)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010050
51/* USB_PHY_CTRL_FUNC */
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000052/* OTG Polarity of Overcurrent */
53#define MXC_OTG_PHYCTRL_OC_POL_BIT (1 << 9)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000054/* OTG Disable Overcurrent Event */
55#define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000056/* UH1 Polarity of Overcurrent */
57#define MXC_H1_OC_POL_BIT (1 << 6)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000058/* UH1 Disable Overcurrent Event */
59#define MXC_H1_OC_DIS_BIT (1 << 5)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000060/* OTG Power Pin Polarity */
61#define MXC_OTG_PHYCTRL_PWR_POL_BIT (1 << 3)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010062
63/* USBH2CTRL */
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000064#define MXC_H2_UCTRL_H2_OC_POL_BIT (1 << 31)
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000065#define MXC_H2_UCTRL_H2_OC_DIS_BIT (1 << 30)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000066#define MXC_H2_UCTRL_H2UIE_BIT (1 << 8)
67#define MXC_H2_UCTRL_H2WIE_BIT (1 << 7)
68#define MXC_H2_UCTRL_H2PM_BIT (1 << 4)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000069#define MXC_H2_UCTRL_H2_PWR_POL_BIT (1 << 4)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010070
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000071/* USBH3CTRL */
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000072#define MXC_H3_UCTRL_H3_OC_POL_BIT (1 << 31)
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000073#define MXC_H3_UCTRL_H3_OC_DIS_BIT (1 << 30)
74#define MXC_H3_UCTRL_H3UIE_BIT (1 << 8)
75#define MXC_H3_UCTRL_H3WIE_BIT (1 << 7)
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000076#define MXC_H3_UCTRL_H3_PWR_POL_BIT (1 << 4)
Benoît Thébaudeau284a4592012-11-13 09:57:14 +000077
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010078/* USB_CTRL_1 */
Benoît Thébaudeaucb109722012-11-13 09:56:15 +000079#define MXC_USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010080
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010081int mxc_set_usbcontrol(int port, unsigned int flags)
82{
83 unsigned int v;
84 void __iomem *usb_base = (void __iomem *)OTG_BASE_ADDR;
85 void __iomem *usbother_base;
86 int ret = 0;
87
88 usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
89
90 switch (port) {
91 case 0: /* OTG port */
92 if (flags & MXC_EHCI_INTERNAL_PHY) {
93 v = __raw_readl(usbother_base +
94 MXC_USB_PHY_CTR_FUNC_OFFSET);
Benoît Thébaudeau17971a92012-11-13 09:57:27 +000095 if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
96 v |= MXC_OTG_PHYCTRL_OC_POL_BIT;
97 else
98 v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT;
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +010099 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100100 /* OC/USBPWR is used */
101 v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
Benoît Thébaudeau2b2a4152012-11-13 09:56:30 +0000102 else
103 /* OC/USBPWR is not used */
104 v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000105#ifdef CONFIG_MX51
106 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
107 v |= MXC_OTG_PHYCTRL_PWR_POL_BIT;
108 else
109 v &= ~MXC_OTG_PHYCTRL_PWR_POL_BIT;
110#endif
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100111 __raw_writel(v, usbother_base +
112 MXC_USB_PHY_CTR_FUNC_OFFSET);
113
114 v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000115#ifdef CONFIG_MX51
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100116 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100117 v &= ~MXC_OTG_UCTRL_OPM_BIT;
Benoît Thébaudeaub7647f32012-11-13 09:56:44 +0000118 else
119 v |= MXC_OTG_UCTRL_OPM_BIT;
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000120#endif
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000121#ifdef CONFIG_MX53
122 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
123 v |= MXC_OTG_UCTRL_O_PWR_POL_BIT;
124 else
125 v &= ~MXC_OTG_UCTRL_O_PWR_POL_BIT;
126#endif
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100127 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
128 }
129 break;
Benoît Thébaudeaucb109722012-11-13 09:56:15 +0000130 case 1: /* Host 1 ULPI */
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100131#ifdef CONFIG_MX51
132 /* The clock for the USBH1 ULPI port will come externally
133 from the PHY. */
134 v = __raw_readl(usbother_base + MXC_USB_CTRL_1_OFFSET);
135 __raw_writel(v | MXC_USB_CTRL_UH1_EXT_CLK_EN, usbother_base +
136 MXC_USB_CTRL_1_OFFSET);
137#endif
138
139 v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000140#ifdef CONFIG_MX51
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100141 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +0000142 v &= ~MXC_H1_UCTRL_H1PM_BIT; /* H1 power mask unused */
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100143 else
Benoît Thébaudeaucb109722012-11-13 09:56:15 +0000144 v |= MXC_H1_UCTRL_H1PM_BIT; /* H1 power mask used */
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000145#endif
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000146#ifdef CONFIG_MX53
147 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
148 v |= MXC_H1_UCTRL_H1_PWR_POL_BIT;
149 else
150 v &= ~MXC_H1_UCTRL_H1_PWR_POL_BIT;
151#endif
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100152 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
153
154 v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000155 if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
156 v |= MXC_H1_OC_POL_BIT;
157 else
158 v &= ~MXC_H1_OC_POL_BIT;
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100159 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
160 v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */
161 else
162 v |= MXC_H1_OC_DIS_BIT; /* OC is not used */
163 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
164
165 break;
166 case 2: /* Host 2 ULPI */
167 v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET);
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000168#ifdef CONFIG_MX51
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100169 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
Benoît Thébaudeaucb109722012-11-13 09:56:15 +0000170 v &= ~MXC_H2_UCTRL_H2PM_BIT; /* H2 power mask unused */
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100171 else
Benoît Thébaudeaucb109722012-11-13 09:56:15 +0000172 v |= MXC_H2_UCTRL_H2PM_BIT; /* H2 power mask used */
Benoît Thébaudeau46a53ab2012-11-13 09:56:59 +0000173#endif
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000174#ifdef CONFIG_MX53
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000175 if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
176 v |= MXC_H2_UCTRL_H2_OC_POL_BIT;
177 else
178 v &= ~MXC_H2_UCTRL_H2_OC_POL_BIT;
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000179 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
180 v &= ~MXC_H2_UCTRL_H2_OC_DIS_BIT; /* OC is used */
181 else
182 v |= MXC_H2_UCTRL_H2_OC_DIS_BIT; /* OC is not used */
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000183 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
184 v |= MXC_H2_UCTRL_H2_PWR_POL_BIT;
185 else
186 v &= ~MXC_H2_UCTRL_H2_PWR_POL_BIT;
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000187#endif
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100188 __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);
189 break;
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000190#ifdef CONFIG_MX53
191 case 3: /* Host 3 ULPI */
192 v = __raw_readl(usbother_base + MXC_USBH3CTRL_OFFSET);
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000193 if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
194 v |= MXC_H3_UCTRL_H3_OC_POL_BIT;
195 else
196 v &= ~MXC_H3_UCTRL_H3_OC_POL_BIT;
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000197 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
198 v &= ~MXC_H3_UCTRL_H3_OC_DIS_BIT; /* OC is used */
199 else
200 v |= MXC_H3_UCTRL_H3_OC_DIS_BIT; /* OC is not used */
Benoît Thébaudeau17971a92012-11-13 09:57:27 +0000201 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
202 v |= MXC_H3_UCTRL_H3_PWR_POL_BIT;
203 else
204 v &= ~MXC_H3_UCTRL_H3_PWR_POL_BIT;
Benoît Thébaudeau284a4592012-11-13 09:57:14 +0000205 __raw_writel(v, usbother_base + MXC_USBH3CTRL_OFFSET);
206 break;
207#endif
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100208 }
209
210 return ret;
211}
212
Benoît Thébaudeau98023c12012-11-13 09:58:35 +0000213int __weak board_ehci_hcd_init(int port)
Marek Vasutde09b792011-11-24 05:14:00 +0100214{
Benoît Thébaudeau98023c12012-11-13 09:58:35 +0000215 return 0;
Marek Vasutde09b792011-11-24 05:14:00 +0100216}
217
Benoît Thébaudeau98023c12012-11-13 09:58:35 +0000218void __weak board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
219{
220}
Marek Vasutde09b792011-11-24 05:14:00 +0100221
Simon Glassdc9f3ed2015-03-25 12:22:27 -0600222__weak void mx5_ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg,
223 uint32_t *reg)
224{
225 mdelay(50);
226}
227
Lukasz Majewskidbc70f82019-04-04 12:26:52 +0200228#if !CONFIG_IS_ENABLED(DM_USB)
Simon Glassdc9f3ed2015-03-25 12:22:27 -0600229static const struct ehci_ops mx5_ehci_ops = {
230 .powerup_fixup = mx5_ehci_powerup_fixup,
231};
232
Troy Kisky7d6bbb92013-10-10 15:27:57 -0700233int ehci_hcd_init(int index, enum usb_init_type init,
234 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100235{
236 struct usb_ehci *ehci;
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100237
Simon Glassdc9f3ed2015-03-25 12:22:27 -0600238 /* The only user for this is efikamx-usb */
239 ehci_set_controller_priv(index, NULL, &mx5_ehci_ops);
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100240 set_usboh3_clk();
Fabio Estevam800cb812013-07-26 13:54:28 -0300241 enable_usboh3_clk(true);
Benoît Thébaudeauf2f00382012-09-28 07:09:03 +0000242 set_usb_phy_clk();
Fabio Estevam800cb812013-07-26 13:54:28 -0300243 enable_usb_phy1_clk(true);
244 enable_usb_phy2_clk(true);
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100245 mdelay(1);
246
Marek Vasutde09b792011-11-24 05:14:00 +0100247 /* Do board specific initialization */
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100248 board_ehci_hcd_init(CONFIG_MXC_USB_PORT);
249
250 ehci = (struct usb_ehci *)(OTG_BASE_ADDR +
251 (0x200 * CONFIG_MXC_USB_PORT));
Lucas Stach3494a4c2012-09-26 00:14:35 +0200252 *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
253 *hcor = (struct ehci_hcor *)((uint32_t)*hccr +
254 HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100255 setbits_le32(&ehci->usbmode, CM_HOST);
256
257 __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc);
258 setbits_le32(&ehci->portsc, USB_EN);
259
260 mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS);
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100261 mdelay(10);
262
Marek Vasutde09b792011-11-24 05:14:00 +0100263 /* Do board specific post-initialization */
264 board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT);
265
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100266 return 0;
267}
268
Lucas Stach3494a4c2012-09-26 00:14:35 +0200269int ehci_hcd_stop(int index)
Wolfgang Grandeggerd17f2d22011-11-11 14:03:36 +0100270{
271 return 0;
272}
Lukasz Majewskidbc70f82019-04-04 12:26:52 +0200273#else /* CONFIG_IS_ENABLED(DM_USB) */
274struct ehci_mx5_priv_data {
275 struct ehci_ctrl ctrl;
276 struct usb_ehci *ehci;
277 struct udevice *vbus_supply;
278 enum usb_init_type init_type;
279 int portnr;
280};
281
282static const struct ehci_ops mx5_ehci_ops = {
283 .powerup_fixup = mx5_ehci_powerup_fixup,
284};
285
286static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
287{
288 struct usb_platdata *plat = dev_get_platdata(dev);
289 const char *mode;
290
291 mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "dr_mode", NULL);
292 if (mode) {
293 if (strcmp(mode, "peripheral") == 0)
294 plat->init_type = USB_INIT_DEVICE;
295 else if (strcmp(mode, "host") == 0)
296 plat->init_type = USB_INIT_HOST;
297 else
298 return -EINVAL;
299 }
300
301 return 0;
302}
303
304static int ehci_usb_probe(struct udevice *dev)
305{
306 struct usb_platdata *plat = dev_get_platdata(dev);
307 struct usb_ehci *ehci = (struct usb_ehci *)devfdt_get_addr(dev);
308 struct ehci_mx5_priv_data *priv = dev_get_priv(dev);
309 enum usb_init_type type = plat->init_type;
310 struct ehci_hccr *hccr;
311 struct ehci_hcor *hcor;
312 int ret;
313
314 set_usboh3_clk();
315 enable_usboh3_clk(true);
316 set_usb_phy_clk();
317 enable_usb_phy1_clk(true);
318 enable_usb_phy2_clk(true);
319 mdelay(1);
320
321 priv->ehci = ehci;
322 priv->portnr = dev->seq;
323 priv->init_type = type;
324
325 ret = device_get_supply_regulator(dev, "vbus-supply",
326 &priv->vbus_supply);
327 if (ret)
328 debug("%s: No vbus supply\n", dev->name);
329
330 if (!ret && priv->vbus_supply) {
331 ret = regulator_set_enable(priv->vbus_supply,
332 (type == USB_INIT_DEVICE) ?
333 false : true);
334 if (ret) {
335 puts("Error enabling VBUS supply\n");
336 return ret;
337 }
338 }
339
340 hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
341 hcor = (struct ehci_hcor *)((uint32_t)hccr +
342 HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
343 setbits_le32(&ehci->usbmode, CM_HOST);
344
345 __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc);
346 setbits_le32(&ehci->portsc, USB_EN);
347
348 mxc_set_usbcontrol(priv->portnr, CONFIG_MXC_USB_FLAGS);
349 mdelay(10);
350
351 return ehci_register(dev, hccr, hcor, &mx5_ehci_ops, 0,
352 priv->init_type);
353}
354
355static const struct udevice_id mx5_usb_ids[] = {
356 { .compatible = "fsl,imx53-usb" },
357 { }
358};
359
360U_BOOT_DRIVER(usb_mx5) = {
361 .name = "ehci_mx5",
362 .id = UCLASS_USB,
363 .of_match = mx5_usb_ids,
364 .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
365 .probe = ehci_usb_probe,
366 .remove = ehci_deregister,
367 .ops = &ehci_usb_ops,
368 .platdata_auto_alloc_size = sizeof(struct usb_platdata),
369 .priv_auto_alloc_size = sizeof(struct ehci_mx5_priv_data),
370 .flags = DM_FLAG_ALLOC_PRIV_DMA,
371};
372#endif /* !CONFIG_IS_ENABLED(DM_USB) */