blob: d92a63a5b0c9dd25b5858bc7015dd816034ab1ca [file] [log] [blame]
Benoit Goby91525d02011-03-09 16:28:55 -08001/*
Benoit Goby91525d02011-03-09 16:28:55 -08002 * Copyright (C) 2010 Google, Inc.
Venu Byravarasu2d22b422013-05-16 19:43:02 +05303 * Copyright (C) 2013 NVIDIA Corporation
Benoit Goby91525d02011-03-09 16:28:55 -08004 *
5 * Author:
6 * Erik Gilling <konkers@google.com>
7 * Benoit Goby <benoit@android.com>
Venu Byravarasu2d22b422013-05-16 19:43:02 +05308 * Venu Byravarasu <vbyravarasu@nvidia.com>
Benoit Goby91525d02011-03-09 16:28:55 -08009 *
10 * This software is licensed under the terms of the GNU General Public
11 * License version 2, as published by the Free Software Foundation, and
12 * may be copied, distributed, and modified under those terms.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 */
20
21#include <linux/resource.h>
22#include <linux/delay.h>
23#include <linux/slab.h>
24#include <linux/err.h>
Arnd Bergmann4265cbf2012-03-02 15:58:42 -050025#include <linux/export.h>
Stephen Warren587376a2013-06-13 11:24:08 -060026#include <linux/module.h>
Benoit Goby91525d02011-03-09 16:28:55 -080027#include <linux/platform_device.h>
28#include <linux/io.h>
29#include <linux/gpio.h>
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +000030#include <linux/of.h>
Stephen Warrenaa607eb2012-04-12 15:46:49 -060031#include <linux/of_gpio.h>
Benoit Goby91525d02011-03-09 16:28:55 -080032#include <linux/usb/otg.h>
33#include <linux/usb/ulpi.h>
34#include <asm/mach-types.h>
Stephen Warren91a687d2013-06-13 11:24:11 -060035#include <linux/usb/ehci_def.h>
Venu Byravarasu1ba82162012-09-05 18:50:23 +053036#include <linux/usb/tegra_usb_phy.h>
Mikko Perttunenf5b8c8b2013-07-17 10:37:49 +030037#include <linux/regulator/consumer.h>
Benoit Goby91525d02011-03-09 16:28:55 -080038
39#define ULPI_VIEWPORT 0x170
40
Stephen Warren91a687d2013-06-13 11:24:11 -060041/* PORTSC registers */
42#define TEGRA_USB_PORTSC1 0x184
43#define TEGRA_USB_PORTSC1_PTS(x) (((x) & 0x3) << 30)
44#define TEGRA_USB_PORTSC1_PHCD (1 << 23)
45
46/* Bits of PORTSC1, which will get cleared by writing 1 into them */
47#define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
48
Benoit Goby91525d02011-03-09 16:28:55 -080049#define USB_SUSP_CTRL 0x400
50#define USB_WAKE_ON_CNNT_EN_DEV (1 << 3)
51#define USB_WAKE_ON_DISCON_EN_DEV (1 << 4)
52#define USB_SUSP_CLR (1 << 5)
53#define USB_PHY_CLK_VALID (1 << 7)
54#define UTMIP_RESET (1 << 11)
55#define UHSIC_RESET (1 << 11)
56#define UTMIP_PHY_ENABLE (1 << 12)
57#define ULPI_PHY_ENABLE (1 << 13)
58#define USB_SUSP_SET (1 << 14)
59#define USB_WAKEUP_DEBOUNCE_COUNT(x) (((x) & 0x7) << 16)
60
61#define USB1_LEGACY_CTRL 0x410
62#define USB1_NO_LEGACY_MODE (1 << 0)
63#define USB1_VBUS_SENSE_CTL_MASK (3 << 1)
64#define USB1_VBUS_SENSE_CTL_VBUS_WAKEUP (0 << 1)
65#define USB1_VBUS_SENSE_CTL_AB_SESS_VLD_OR_VBUS_WAKEUP \
66 (1 << 1)
67#define USB1_VBUS_SENSE_CTL_AB_SESS_VLD (2 << 1)
68#define USB1_VBUS_SENSE_CTL_A_SESS_VLD (3 << 1)
69
70#define ULPI_TIMING_CTRL_0 0x424
71#define ULPI_OUTPUT_PINMUX_BYP (1 << 10)
72#define ULPI_CLKOUT_PINMUX_BYP (1 << 11)
73
74#define ULPI_TIMING_CTRL_1 0x428
75#define ULPI_DATA_TRIMMER_LOAD (1 << 0)
76#define ULPI_DATA_TRIMMER_SEL(x) (((x) & 0x7) << 1)
77#define ULPI_STPDIRNXT_TRIMMER_LOAD (1 << 16)
78#define ULPI_STPDIRNXT_TRIMMER_SEL(x) (((x) & 0x7) << 17)
79#define ULPI_DIR_TRIMMER_LOAD (1 << 24)
80#define ULPI_DIR_TRIMMER_SEL(x) (((x) & 0x7) << 25)
81
82#define UTMIP_PLL_CFG1 0x804
83#define UTMIP_XTAL_FREQ_COUNT(x) (((x) & 0xfff) << 0)
84#define UTMIP_PLLU_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 27)
85
86#define UTMIP_XCVR_CFG0 0x808
87#define UTMIP_XCVR_SETUP(x) (((x) & 0xf) << 0)
88#define UTMIP_XCVR_LSRSLEW(x) (((x) & 0x3) << 8)
89#define UTMIP_XCVR_LSFSLEW(x) (((x) & 0x3) << 10)
90#define UTMIP_FORCE_PD_POWERDOWN (1 << 14)
91#define UTMIP_FORCE_PD2_POWERDOWN (1 << 16)
92#define UTMIP_FORCE_PDZI_POWERDOWN (1 << 18)
93#define UTMIP_XCVR_HSSLEW_MSB(x) (((x) & 0x7f) << 25)
94
95#define UTMIP_BIAS_CFG0 0x80c
96#define UTMIP_OTGPD (1 << 11)
97#define UTMIP_BIASPD (1 << 10)
98
99#define UTMIP_HSRX_CFG0 0x810
100#define UTMIP_ELASTIC_LIMIT(x) (((x) & 0x1f) << 10)
101#define UTMIP_IDLE_WAIT(x) (((x) & 0x1f) << 15)
102
103#define UTMIP_HSRX_CFG1 0x814
104#define UTMIP_HS_SYNC_START_DLY(x) (((x) & 0x1f) << 1)
105
106#define UTMIP_TX_CFG0 0x820
107#define UTMIP_FS_PREABMLE_J (1 << 19)
108#define UTMIP_HS_DISCON_DISABLE (1 << 8)
109
110#define UTMIP_MISC_CFG0 0x824
111#define UTMIP_DPDM_OBSERVE (1 << 26)
112#define UTMIP_DPDM_OBSERVE_SEL(x) (((x) & 0xf) << 27)
113#define UTMIP_DPDM_OBSERVE_SEL_FS_J UTMIP_DPDM_OBSERVE_SEL(0xf)
114#define UTMIP_DPDM_OBSERVE_SEL_FS_K UTMIP_DPDM_OBSERVE_SEL(0xe)
115#define UTMIP_DPDM_OBSERVE_SEL_FS_SE1 UTMIP_DPDM_OBSERVE_SEL(0xd)
116#define UTMIP_DPDM_OBSERVE_SEL_FS_SE0 UTMIP_DPDM_OBSERVE_SEL(0xc)
117#define UTMIP_SUSPEND_EXIT_ON_EDGE (1 << 22)
118
119#define UTMIP_MISC_CFG1 0x828
120#define UTMIP_PLL_ACTIVE_DLY_COUNT(x) (((x) & 0x1f) << 18)
121#define UTMIP_PLLU_STABLE_COUNT(x) (((x) & 0xfff) << 6)
122
123#define UTMIP_DEBOUNCE_CFG0 0x82c
124#define UTMIP_BIAS_DEBOUNCE_A(x) (((x) & 0xffff) << 0)
125
126#define UTMIP_BAT_CHRG_CFG0 0x830
127#define UTMIP_PD_CHRG (1 << 0)
128
129#define UTMIP_SPARE_CFG0 0x834
130#define FUSE_SETUP_SEL (1 << 3)
131
132#define UTMIP_XCVR_CFG1 0x838
133#define UTMIP_FORCE_PDDISC_POWERDOWN (1 << 0)
134#define UTMIP_FORCE_PDCHRP_POWERDOWN (1 << 2)
135#define UTMIP_FORCE_PDDR_POWERDOWN (1 << 4)
136#define UTMIP_XCVR_TERM_RANGE_ADJ(x) (((x) & 0xf) << 18)
137
138#define UTMIP_BIAS_CFG1 0x83c
139#define UTMIP_BIAS_PDTRK_COUNT(x) (((x) & 0x1f) << 3)
140
141static DEFINE_SPINLOCK(utmip_pad_lock);
142static int utmip_pad_count;
143
144struct tegra_xtal_freq {
145 int freq;
146 u8 enable_delay;
147 u8 stable_count;
148 u8 active_delay;
149 u8 xtal_freq_count;
150 u16 debounce;
151};
152
153static const struct tegra_xtal_freq tegra_freq_table[] = {
154 {
155 .freq = 12000000,
156 .enable_delay = 0x02,
157 .stable_count = 0x2F,
158 .active_delay = 0x04,
159 .xtal_freq_count = 0x76,
160 .debounce = 0x7530,
161 },
162 {
163 .freq = 13000000,
164 .enable_delay = 0x02,
165 .stable_count = 0x33,
166 .active_delay = 0x05,
167 .xtal_freq_count = 0x7F,
168 .debounce = 0x7EF4,
169 },
170 {
171 .freq = 19200000,
172 .enable_delay = 0x03,
173 .stable_count = 0x4B,
174 .active_delay = 0x06,
175 .xtal_freq_count = 0xBB,
176 .debounce = 0xBB80,
177 },
178 {
179 .freq = 26000000,
180 .enable_delay = 0x04,
181 .stable_count = 0x66,
182 .active_delay = 0x09,
183 .xtal_freq_count = 0xFE,
184 .debounce = 0xFDE8,
185 },
186};
187
Stephen Warren91a687d2013-06-13 11:24:11 -0600188static void set_pts(struct tegra_usb_phy *phy, u8 pts_val)
189{
190 void __iomem *base = phy->regs;
191 unsigned long val;
192
193 val = readl(base + TEGRA_USB_PORTSC1) & ~TEGRA_PORTSC1_RWC_BITS;
194 val &= ~TEGRA_USB_PORTSC1_PTS(3);
195 val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
196 writel(val, base + TEGRA_USB_PORTSC1);
197}
198
199static void set_phcd(struct tegra_usb_phy *phy, bool enable)
200{
201 void __iomem *base = phy->regs;
202 unsigned long val;
203
204 val = readl(base + TEGRA_USB_PORTSC1) & ~TEGRA_PORTSC1_RWC_BITS;
205 if (enable)
206 val |= TEGRA_USB_PORTSC1_PHCD;
207 else
208 val &= ~TEGRA_USB_PORTSC1_PHCD;
209 writel(val, base + TEGRA_USB_PORTSC1);
210}
211
Benoit Goby91525d02011-03-09 16:28:55 -0800212static int utmip_pad_open(struct tegra_usb_phy *phy)
213{
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530214 phy->pad_clk = devm_clk_get(phy->dev, "utmi-pads");
Benoit Goby91525d02011-03-09 16:28:55 -0800215 if (IS_ERR(phy->pad_clk)) {
216 pr_err("%s: can't get utmip pad clock\n", __func__);
217 return PTR_ERR(phy->pad_clk);
218 }
219
Benoit Goby91525d02011-03-09 16:28:55 -0800220 return 0;
221}
222
Benoit Goby91525d02011-03-09 16:28:55 -0800223static void utmip_pad_power_on(struct tegra_usb_phy *phy)
224{
225 unsigned long val, flags;
226 void __iomem *base = phy->pad_regs;
227
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530228 clk_prepare_enable(phy->pad_clk);
Benoit Goby91525d02011-03-09 16:28:55 -0800229
230 spin_lock_irqsave(&utmip_pad_lock, flags);
231
232 if (utmip_pad_count++ == 0) {
233 val = readl(base + UTMIP_BIAS_CFG0);
234 val &= ~(UTMIP_OTGPD | UTMIP_BIASPD);
235 writel(val, base + UTMIP_BIAS_CFG0);
236 }
237
238 spin_unlock_irqrestore(&utmip_pad_lock, flags);
239
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530240 clk_disable_unprepare(phy->pad_clk);
Benoit Goby91525d02011-03-09 16:28:55 -0800241}
242
243static int utmip_pad_power_off(struct tegra_usb_phy *phy)
244{
245 unsigned long val, flags;
246 void __iomem *base = phy->pad_regs;
247
248 if (!utmip_pad_count) {
249 pr_err("%s: utmip pad already powered off\n", __func__);
250 return -EINVAL;
251 }
252
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530253 clk_prepare_enable(phy->pad_clk);
Benoit Goby91525d02011-03-09 16:28:55 -0800254
255 spin_lock_irqsave(&utmip_pad_lock, flags);
256
257 if (--utmip_pad_count == 0) {
258 val = readl(base + UTMIP_BIAS_CFG0);
259 val |= UTMIP_OTGPD | UTMIP_BIASPD;
260 writel(val, base + UTMIP_BIAS_CFG0);
261 }
262
263 spin_unlock_irqrestore(&utmip_pad_lock, flags);
264
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530265 clk_disable_unprepare(phy->pad_clk);
Benoit Goby91525d02011-03-09 16:28:55 -0800266
267 return 0;
268}
269
270static int utmi_wait_register(void __iomem *reg, u32 mask, u32 result)
271{
272 unsigned long timeout = 2000;
273 do {
274 if ((readl(reg) & mask) == result)
275 return 0;
276 udelay(1);
277 timeout--;
278 } while (timeout);
279 return -1;
280}
281
282static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
283{
284 unsigned long val;
285 void __iomem *base = phy->regs;
286
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000287 if (phy->is_legacy_phy) {
Benoit Goby91525d02011-03-09 16:28:55 -0800288 val = readl(base + USB_SUSP_CTRL);
289 val |= USB_SUSP_SET;
290 writel(val, base + USB_SUSP_CTRL);
291
292 udelay(10);
293
294 val = readl(base + USB_SUSP_CTRL);
295 val &= ~USB_SUSP_SET;
296 writel(val, base + USB_SUSP_CTRL);
Venu Byravarasubbdabdb2013-01-17 20:15:37 +0000297 } else
Stephen Warren91a687d2013-06-13 11:24:11 -0600298 set_phcd(phy, true);
Benoit Goby91525d02011-03-09 16:28:55 -0800299
300 if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
301 pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
302}
303
304static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
305{
306 unsigned long val;
307 void __iomem *base = phy->regs;
308
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000309 if (phy->is_legacy_phy) {
Benoit Goby91525d02011-03-09 16:28:55 -0800310 val = readl(base + USB_SUSP_CTRL);
311 val |= USB_SUSP_CLR;
312 writel(val, base + USB_SUSP_CTRL);
313
314 udelay(10);
315
316 val = readl(base + USB_SUSP_CTRL);
317 val &= ~USB_SUSP_CLR;
318 writel(val, base + USB_SUSP_CTRL);
Venu Byravarasubbdabdb2013-01-17 20:15:37 +0000319 } else
Stephen Warren91a687d2013-06-13 11:24:11 -0600320 set_phcd(phy, false);
Benoit Goby91525d02011-03-09 16:28:55 -0800321
322 if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
323 USB_PHY_CLK_VALID))
324 pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
325}
326
327static int utmi_phy_power_on(struct tegra_usb_phy *phy)
328{
329 unsigned long val;
330 void __iomem *base = phy->regs;
331 struct tegra_utmip_config *config = phy->config;
332
333 val = readl(base + USB_SUSP_CTRL);
334 val |= UTMIP_RESET;
335 writel(val, base + USB_SUSP_CTRL);
336
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000337 if (phy->is_legacy_phy) {
Benoit Goby91525d02011-03-09 16:28:55 -0800338 val = readl(base + USB1_LEGACY_CTRL);
339 val |= USB1_NO_LEGACY_MODE;
340 writel(val, base + USB1_LEGACY_CTRL);
341 }
342
343 val = readl(base + UTMIP_TX_CFG0);
344 val &= ~UTMIP_FS_PREABMLE_J;
345 writel(val, base + UTMIP_TX_CFG0);
346
347 val = readl(base + UTMIP_HSRX_CFG0);
348 val &= ~(UTMIP_IDLE_WAIT(~0) | UTMIP_ELASTIC_LIMIT(~0));
349 val |= UTMIP_IDLE_WAIT(config->idle_wait_delay);
350 val |= UTMIP_ELASTIC_LIMIT(config->elastic_limit);
351 writel(val, base + UTMIP_HSRX_CFG0);
352
353 val = readl(base + UTMIP_HSRX_CFG1);
354 val &= ~UTMIP_HS_SYNC_START_DLY(~0);
355 val |= UTMIP_HS_SYNC_START_DLY(config->hssync_start_delay);
356 writel(val, base + UTMIP_HSRX_CFG1);
357
358 val = readl(base + UTMIP_DEBOUNCE_CFG0);
359 val &= ~UTMIP_BIAS_DEBOUNCE_A(~0);
360 val |= UTMIP_BIAS_DEBOUNCE_A(phy->freq->debounce);
361 writel(val, base + UTMIP_DEBOUNCE_CFG0);
362
363 val = readl(base + UTMIP_MISC_CFG0);
364 val &= ~UTMIP_SUSPEND_EXIT_ON_EDGE;
365 writel(val, base + UTMIP_MISC_CFG0);
366
367 val = readl(base + UTMIP_MISC_CFG1);
368 val &= ~(UTMIP_PLL_ACTIVE_DLY_COUNT(~0) | UTMIP_PLLU_STABLE_COUNT(~0));
369 val |= UTMIP_PLL_ACTIVE_DLY_COUNT(phy->freq->active_delay) |
370 UTMIP_PLLU_STABLE_COUNT(phy->freq->stable_count);
371 writel(val, base + UTMIP_MISC_CFG1);
372
373 val = readl(base + UTMIP_PLL_CFG1);
374 val &= ~(UTMIP_XTAL_FREQ_COUNT(~0) | UTMIP_PLLU_ENABLE_DLY_COUNT(~0));
375 val |= UTMIP_XTAL_FREQ_COUNT(phy->freq->xtal_freq_count) |
376 UTMIP_PLLU_ENABLE_DLY_COUNT(phy->freq->enable_delay);
377 writel(val, base + UTMIP_PLL_CFG1);
378
379 if (phy->mode == TEGRA_USB_PHY_MODE_DEVICE) {
380 val = readl(base + USB_SUSP_CTRL);
381 val &= ~(USB_WAKE_ON_CNNT_EN_DEV | USB_WAKE_ON_DISCON_EN_DEV);
382 writel(val, base + USB_SUSP_CTRL);
383 }
384
385 utmip_pad_power_on(phy);
386
387 val = readl(base + UTMIP_XCVR_CFG0);
388 val &= ~(UTMIP_FORCE_PD_POWERDOWN | UTMIP_FORCE_PD2_POWERDOWN |
389 UTMIP_FORCE_PDZI_POWERDOWN | UTMIP_XCVR_SETUP(~0) |
390 UTMIP_XCVR_LSFSLEW(~0) | UTMIP_XCVR_LSRSLEW(~0) |
391 UTMIP_XCVR_HSSLEW_MSB(~0));
392 val |= UTMIP_XCVR_SETUP(config->xcvr_setup);
393 val |= UTMIP_XCVR_LSFSLEW(config->xcvr_lsfslew);
394 val |= UTMIP_XCVR_LSRSLEW(config->xcvr_lsrslew);
395 writel(val, base + UTMIP_XCVR_CFG0);
396
397 val = readl(base + UTMIP_XCVR_CFG1);
398 val &= ~(UTMIP_FORCE_PDDISC_POWERDOWN | UTMIP_FORCE_PDCHRP_POWERDOWN |
399 UTMIP_FORCE_PDDR_POWERDOWN | UTMIP_XCVR_TERM_RANGE_ADJ(~0));
400 val |= UTMIP_XCVR_TERM_RANGE_ADJ(config->term_range_adj);
401 writel(val, base + UTMIP_XCVR_CFG1);
402
403 val = readl(base + UTMIP_BAT_CHRG_CFG0);
404 val &= ~UTMIP_PD_CHRG;
405 writel(val, base + UTMIP_BAT_CHRG_CFG0);
406
407 val = readl(base + UTMIP_BIAS_CFG1);
408 val &= ~UTMIP_BIAS_PDTRK_COUNT(~0);
409 val |= UTMIP_BIAS_PDTRK_COUNT(0x5);
410 writel(val, base + UTMIP_BIAS_CFG1);
411
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000412 if (phy->is_legacy_phy) {
Benoit Goby91525d02011-03-09 16:28:55 -0800413 val = readl(base + UTMIP_SPARE_CFG0);
414 if (phy->mode == TEGRA_USB_PHY_MODE_DEVICE)
415 val &= ~FUSE_SETUP_SEL;
416 else
417 val |= FUSE_SETUP_SEL;
418 writel(val, base + UTMIP_SPARE_CFG0);
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000419 } else {
Benoit Goby91525d02011-03-09 16:28:55 -0800420 val = readl(base + USB_SUSP_CTRL);
421 val |= UTMIP_PHY_ENABLE;
422 writel(val, base + USB_SUSP_CTRL);
423 }
424
425 val = readl(base + USB_SUSP_CTRL);
426 val &= ~UTMIP_RESET;
427 writel(val, base + USB_SUSP_CTRL);
428
Venu Byravarasu3a55c6a2013-01-16 03:30:20 +0000429 if (phy->is_legacy_phy) {
Benoit Goby91525d02011-03-09 16:28:55 -0800430 val = readl(base + USB1_LEGACY_CTRL);
431 val &= ~USB1_VBUS_SENSE_CTL_MASK;
432 val |= USB1_VBUS_SENSE_CTL_A_SESS_VLD;
433 writel(val, base + USB1_LEGACY_CTRL);
434
435 val = readl(base + USB_SUSP_CTRL);
436 val &= ~USB_SUSP_SET;
437 writel(val, base + USB_SUSP_CTRL);
438 }
439
440 utmi_phy_clk_enable(phy);
441
Venu Byravarasubbdabdb2013-01-17 20:15:37 +0000442 if (!phy->is_legacy_phy)
Stephen Warren91a687d2013-06-13 11:24:11 -0600443 set_pts(phy, 0);
Benoit Goby91525d02011-03-09 16:28:55 -0800444
445 return 0;
446}
447
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530448static int utmi_phy_power_off(struct tegra_usb_phy *phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800449{
450 unsigned long val;
451 void __iomem *base = phy->regs;
452
453 utmi_phy_clk_disable(phy);
454
455 if (phy->mode == TEGRA_USB_PHY_MODE_DEVICE) {
456 val = readl(base + USB_SUSP_CTRL);
457 val &= ~USB_WAKEUP_DEBOUNCE_COUNT(~0);
458 val |= USB_WAKE_ON_CNNT_EN_DEV | USB_WAKEUP_DEBOUNCE_COUNT(5);
459 writel(val, base + USB_SUSP_CTRL);
460 }
461
462 val = readl(base + USB_SUSP_CTRL);
463 val |= UTMIP_RESET;
464 writel(val, base + USB_SUSP_CTRL);
465
466 val = readl(base + UTMIP_BAT_CHRG_CFG0);
467 val |= UTMIP_PD_CHRG;
468 writel(val, base + UTMIP_BAT_CHRG_CFG0);
469
470 val = readl(base + UTMIP_XCVR_CFG0);
471 val |= UTMIP_FORCE_PD_POWERDOWN | UTMIP_FORCE_PD2_POWERDOWN |
472 UTMIP_FORCE_PDZI_POWERDOWN;
473 writel(val, base + UTMIP_XCVR_CFG0);
474
475 val = readl(base + UTMIP_XCVR_CFG1);
476 val |= UTMIP_FORCE_PDDISC_POWERDOWN | UTMIP_FORCE_PDCHRP_POWERDOWN |
477 UTMIP_FORCE_PDDR_POWERDOWN;
478 writel(val, base + UTMIP_XCVR_CFG1);
479
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530480 return utmip_pad_power_off(phy);
Benoit Goby91525d02011-03-09 16:28:55 -0800481}
482
483static void utmi_phy_preresume(struct tegra_usb_phy *phy)
484{
485 unsigned long val;
486 void __iomem *base = phy->regs;
487
488 val = readl(base + UTMIP_TX_CFG0);
489 val |= UTMIP_HS_DISCON_DISABLE;
490 writel(val, base + UTMIP_TX_CFG0);
491}
492
493static void utmi_phy_postresume(struct tegra_usb_phy *phy)
494{
495 unsigned long val;
496 void __iomem *base = phy->regs;
497
498 val = readl(base + UTMIP_TX_CFG0);
499 val &= ~UTMIP_HS_DISCON_DISABLE;
500 writel(val, base + UTMIP_TX_CFG0);
501}
502
503static void utmi_phy_restore_start(struct tegra_usb_phy *phy,
504 enum tegra_usb_phy_port_speed port_speed)
505{
506 unsigned long val;
507 void __iomem *base = phy->regs;
508
509 val = readl(base + UTMIP_MISC_CFG0);
510 val &= ~UTMIP_DPDM_OBSERVE_SEL(~0);
511 if (port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW)
512 val |= UTMIP_DPDM_OBSERVE_SEL_FS_K;
513 else
514 val |= UTMIP_DPDM_OBSERVE_SEL_FS_J;
515 writel(val, base + UTMIP_MISC_CFG0);
516 udelay(1);
517
518 val = readl(base + UTMIP_MISC_CFG0);
519 val |= UTMIP_DPDM_OBSERVE;
520 writel(val, base + UTMIP_MISC_CFG0);
521 udelay(10);
522}
523
524static void utmi_phy_restore_end(struct tegra_usb_phy *phy)
525{
526 unsigned long val;
527 void __iomem *base = phy->regs;
528
529 val = readl(base + UTMIP_MISC_CFG0);
530 val &= ~UTMIP_DPDM_OBSERVE;
531 writel(val, base + UTMIP_MISC_CFG0);
532 udelay(10);
533}
534
535static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
536{
537 int ret;
538 unsigned long val;
539 void __iomem *base = phy->regs;
Benoit Goby91525d02011-03-09 16:28:55 -0800540
Venu Byravarasu6829f922013-05-16 19:43:01 +0530541 ret = gpio_direction_output(phy->reset_gpio, 0);
542 if (ret < 0) {
543 dev_err(phy->dev, "gpio %d not set to 0\n", phy->reset_gpio);
544 return ret;
545 }
Benoit Goby91525d02011-03-09 16:28:55 -0800546 msleep(5);
Venu Byravarasu6829f922013-05-16 19:43:01 +0530547 ret = gpio_direction_output(phy->reset_gpio, 1);
548 if (ret < 0) {
549 dev_err(phy->dev, "gpio %d not set to 1\n", phy->reset_gpio);
550 return ret;
551 }
Benoit Goby91525d02011-03-09 16:28:55 -0800552
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530553 clk_prepare_enable(phy->clk);
Benoit Goby91525d02011-03-09 16:28:55 -0800554 msleep(1);
555
556 val = readl(base + USB_SUSP_CTRL);
557 val |= UHSIC_RESET;
558 writel(val, base + USB_SUSP_CTRL);
559
560 val = readl(base + ULPI_TIMING_CTRL_0);
561 val |= ULPI_OUTPUT_PINMUX_BYP | ULPI_CLKOUT_PINMUX_BYP;
562 writel(val, base + ULPI_TIMING_CTRL_0);
563
564 val = readl(base + USB_SUSP_CTRL);
565 val |= ULPI_PHY_ENABLE;
566 writel(val, base + USB_SUSP_CTRL);
567
568 val = 0;
569 writel(val, base + ULPI_TIMING_CTRL_1);
570
571 val |= ULPI_DATA_TRIMMER_SEL(4);
572 val |= ULPI_STPDIRNXT_TRIMMER_SEL(4);
573 val |= ULPI_DIR_TRIMMER_SEL(4);
574 writel(val, base + ULPI_TIMING_CTRL_1);
575 udelay(10);
576
577 val |= ULPI_DATA_TRIMMER_LOAD;
578 val |= ULPI_STPDIRNXT_TRIMMER_LOAD;
579 val |= ULPI_DIR_TRIMMER_LOAD;
580 writel(val, base + ULPI_TIMING_CTRL_1);
581
582 /* Fix VbusInvalid due to floating VBUS */
Heikki Krogerusb96d3b02012-02-13 13:24:18 +0200583 ret = usb_phy_io_write(phy->ulpi, 0x40, 0x08);
Benoit Goby91525d02011-03-09 16:28:55 -0800584 if (ret) {
585 pr_err("%s: ulpi write failed\n", __func__);
586 return ret;
587 }
588
Heikki Krogerusb96d3b02012-02-13 13:24:18 +0200589 ret = usb_phy_io_write(phy->ulpi, 0x80, 0x0B);
Benoit Goby91525d02011-03-09 16:28:55 -0800590 if (ret) {
591 pr_err("%s: ulpi write failed\n", __func__);
592 return ret;
593 }
594
Benoit Goby91525d02011-03-09 16:28:55 -0800595 val = readl(base + USB_SUSP_CTRL);
596 val |= USB_SUSP_CLR;
597 writel(val, base + USB_SUSP_CTRL);
598 udelay(100);
599
600 val = readl(base + USB_SUSP_CTRL);
601 val &= ~USB_SUSP_CLR;
602 writel(val, base + USB_SUSP_CTRL);
603
604 return 0;
605}
606
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530607static int ulpi_phy_power_off(struct tegra_usb_phy *phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800608{
Benoit Goby91525d02011-03-09 16:28:55 -0800609 clk_disable(phy->clk);
Venu Byravarasu12ea18e2013-05-16 19:43:00 +0530610 return gpio_direction_output(phy->reset_gpio, 0);
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530611}
612
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530613static void tegra_usb_phy_close(struct usb_phy *x)
614{
615 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
616
Mikko Perttunenf5b8c8b2013-07-17 10:37:49 +0300617 if (!IS_ERR(phy->vbus))
618 regulator_disable(phy->vbus);
619
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530620 clk_disable_unprepare(phy->pll_u);
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530621}
622
623static int tegra_usb_phy_power_on(struct tegra_usb_phy *phy)
624{
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000625 if (phy->is_ulpi_phy)
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530626 return ulpi_phy_power_on(phy);
627 else
628 return utmi_phy_power_on(phy);
629}
630
631static int tegra_usb_phy_power_off(struct tegra_usb_phy *phy)
632{
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000633 if (phy->is_ulpi_phy)
Venu Byravarasu1ba82162012-09-05 18:50:23 +0530634 return ulpi_phy_power_off(phy);
635 else
636 return utmi_phy_power_off(phy);
637}
638
639static int tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
640{
641 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
642 if (suspend)
643 return tegra_usb_phy_power_off(phy);
644 else
645 return tegra_usb_phy_power_on(phy);
Benoit Goby91525d02011-03-09 16:28:55 -0800646}
647
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530648static int ulpi_open(struct tegra_usb_phy *phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800649{
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530650 int err;
651
652 phy->clk = devm_clk_get(phy->dev, "ulpi-link");
653 if (IS_ERR(phy->clk)) {
654 pr_err("%s: can't get ulpi clock\n", __func__);
655 return PTR_ERR(phy->clk);
656 }
657
658 err = devm_gpio_request(phy->dev, phy->reset_gpio, "ulpi_phy_reset_b");
659 if (err < 0) {
660 dev_err(phy->dev, "request failed for gpio: %d\n",
661 phy->reset_gpio);
662 return err;
663 }
664
665 err = gpio_direction_output(phy->reset_gpio, 0);
666 if (err < 0) {
667 dev_err(phy->dev, "gpio %d direction not set to output\n",
668 phy->reset_gpio);
669 return err;
670 }
671
672 phy->ulpi = otg_ulpi_create(&ulpi_viewport_access_ops, 0);
673 if (!phy->ulpi) {
674 dev_err(phy->dev, "otg_ulpi_create returned NULL\n");
675 err = -ENOMEM;
676 return err;
677 }
678
679 phy->ulpi->io_priv = phy->regs + ULPI_VIEWPORT;
680 return 0;
681}
682
683static int tegra_usb_phy_init(struct tegra_usb_phy *phy)
684{
Benoit Goby91525d02011-03-09 16:28:55 -0800685 unsigned long parent_rate;
686 int i;
687 int err;
688
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530689 phy->pll_u = devm_clk_get(phy->dev, "pll_u");
Benoit Goby91525d02011-03-09 16:28:55 -0800690 if (IS_ERR(phy->pll_u)) {
691 pr_err("Can't get pll_u clock\n");
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530692 return PTR_ERR(phy->pll_u);
Benoit Goby91525d02011-03-09 16:28:55 -0800693 }
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530694
695 err = clk_prepare_enable(phy->pll_u);
696 if (err)
697 return err;
Benoit Goby91525d02011-03-09 16:28:55 -0800698
699 parent_rate = clk_get_rate(clk_get_parent(phy->pll_u));
700 for (i = 0; i < ARRAY_SIZE(tegra_freq_table); i++) {
701 if (tegra_freq_table[i].freq == parent_rate) {
702 phy->freq = &tegra_freq_table[i];
703 break;
704 }
705 }
706 if (!phy->freq) {
707 pr_err("invalid pll_u parent rate %ld\n", parent_rate);
708 err = -EINVAL;
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530709 goto fail;
Benoit Goby91525d02011-03-09 16:28:55 -0800710 }
711
Mikko Perttunenf5b8c8b2013-07-17 10:37:49 +0300712 if (!IS_ERR(phy->vbus)) {
713 err = regulator_enable(phy->vbus);
714 if (err) {
715 dev_err(phy->dev,
716 "failed to enable usb vbus regulator: %d\n",
717 err);
718 goto fail;
719 }
720 }
721
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530722 if (phy->is_ulpi_phy)
723 err = ulpi_open(phy);
724 else
725 err = utmip_pad_open(phy);
726 if (err < 0)
727 goto fail;
Benoit Goby91525d02011-03-09 16:28:55 -0800728
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530729 return 0;
Benoit Goby91525d02011-03-09 16:28:55 -0800730
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530731fail:
Prashant Gaikwad6a5278d2012-06-05 09:59:35 +0530732 clk_disable_unprepare(phy->pll_u);
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530733 return err;
Benoit Goby91525d02011-03-09 16:28:55 -0800734}
735
Venu Byravarasuab137d02013-01-24 15:57:03 +0530736void tegra_usb_phy_preresume(struct usb_phy *x)
Benoit Goby91525d02011-03-09 16:28:55 -0800737{
Venu Byravarasuab137d02013-01-24 15:57:03 +0530738 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
739
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000740 if (!phy->is_ulpi_phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800741 utmi_phy_preresume(phy);
742}
Arnd Bergmann4265cbf2012-03-02 15:58:42 -0500743EXPORT_SYMBOL_GPL(tegra_usb_phy_preresume);
Benoit Goby91525d02011-03-09 16:28:55 -0800744
Venu Byravarasuab137d02013-01-24 15:57:03 +0530745void tegra_usb_phy_postresume(struct usb_phy *x)
Benoit Goby91525d02011-03-09 16:28:55 -0800746{
Venu Byravarasuab137d02013-01-24 15:57:03 +0530747 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
748
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000749 if (!phy->is_ulpi_phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800750 utmi_phy_postresume(phy);
751}
Arnd Bergmann4265cbf2012-03-02 15:58:42 -0500752EXPORT_SYMBOL_GPL(tegra_usb_phy_postresume);
Benoit Goby91525d02011-03-09 16:28:55 -0800753
Venu Byravarasuab137d02013-01-24 15:57:03 +0530754void tegra_ehci_phy_restore_start(struct usb_phy *x,
Benoit Goby91525d02011-03-09 16:28:55 -0800755 enum tegra_usb_phy_port_speed port_speed)
756{
Venu Byravarasuab137d02013-01-24 15:57:03 +0530757 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
758
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000759 if (!phy->is_ulpi_phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800760 utmi_phy_restore_start(phy, port_speed);
761}
Arnd Bergmann4265cbf2012-03-02 15:58:42 -0500762EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_start);
Benoit Goby91525d02011-03-09 16:28:55 -0800763
Venu Byravarasuab137d02013-01-24 15:57:03 +0530764void tegra_ehci_phy_restore_end(struct usb_phy *x)
Benoit Goby91525d02011-03-09 16:28:55 -0800765{
Venu Byravarasuab137d02013-01-24 15:57:03 +0530766 struct tegra_usb_phy *phy = container_of(x, struct tegra_usb_phy, u_phy);
767
Venu Byravarasu3f9db1a2013-01-16 03:30:21 +0000768 if (!phy->is_ulpi_phy)
Benoit Goby91525d02011-03-09 16:28:55 -0800769 utmi_phy_restore_end(phy);
770}
Arnd Bergmann4265cbf2012-03-02 15:58:42 -0500771EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_end);
Benoit Goby91525d02011-03-09 16:28:55 -0800772
Mikko Perttunen81d5dfe2013-07-17 09:31:01 +0300773static int read_utmi_param(struct platform_device *pdev, const char *param,
774 u8 *dest)
775{
776 u32 value;
777 int err = of_property_read_u32(pdev->dev.of_node, param, &value);
778 *dest = (u8)value;
779 if (err < 0)
780 dev_err(&pdev->dev, "Failed to read USB UTMI parameter %s: %d\n",
781 param, err);
782 return err;
783}
784
785static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy,
786 struct platform_device *pdev)
787{
788 struct resource *res;
789 int err;
790 struct tegra_utmip_config *config;
791
792 tegra_phy->is_ulpi_phy = false;
793
794 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
795 if (!res) {
796 dev_err(&pdev->dev, "Failed to get UTMI Pad regs\n");
797 return -ENXIO;
798 }
799
800 tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
801 resource_size(res));
802 if (!tegra_phy->regs) {
803 dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
804 return -ENOMEM;
805 }
806
807 tegra_phy->config = devm_kzalloc(&pdev->dev,
808 sizeof(*tegra_phy->config), GFP_KERNEL);
809 if (!tegra_phy->config) {
810 dev_err(&pdev->dev,
811 "unable to allocate memory for USB UTMIP config\n");
812 return -ENOMEM;
813 }
814
815 config = tegra_phy->config;
816
817 err = read_utmi_param(pdev, "nvidia,hssync-start-delay",
818 &config->hssync_start_delay);
819 if (err < 0)
820 return err;
821
822 err = read_utmi_param(pdev, "nvidia,elastic-limit",
823 &config->elastic_limit);
824 if (err < 0)
825 return err;
826
827 err = read_utmi_param(pdev, "nvidia,idle-wait-delay",
828 &config->idle_wait_delay);
829 if (err < 0)
830 return err;
831
832 err = read_utmi_param(pdev, "nvidia,term-range-adj",
833 &config->term_range_adj);
834 if (err < 0)
835 return err;
836
837 err = read_utmi_param(pdev, "nvidia,xcvr-setup",
838 &config->xcvr_setup);
839 if (err < 0)
840 return err;
841
842 err = read_utmi_param(pdev, "nvidia,xcvr-lsfslew",
843 &config->xcvr_lsfslew);
844 if (err < 0)
845 return err;
846
847 err = read_utmi_param(pdev, "nvidia,xcvr-lsrslew",
848 &config->xcvr_lsrslew);
849 if (err < 0)
850 return err;
851
852 return 0;
853}
854
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530855static int tegra_usb_phy_probe(struct platform_device *pdev)
856{
857 struct resource *res;
858 struct tegra_usb_phy *tegra_phy = NULL;
859 struct device_node *np = pdev->dev.of_node;
860 int err;
861
862 tegra_phy = devm_kzalloc(&pdev->dev, sizeof(*tegra_phy), GFP_KERNEL);
863 if (!tegra_phy) {
864 dev_err(&pdev->dev, "unable to allocate memory for USB2 PHY\n");
865 return -ENOMEM;
866 }
867
868 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
869 if (!res) {
870 dev_err(&pdev->dev, "Failed to get I/O memory\n");
871 return -ENXIO;
872 }
873
874 tegra_phy->regs = devm_ioremap(&pdev->dev, res->start,
875 resource_size(res));
876 if (!tegra_phy->regs) {
877 dev_err(&pdev->dev, "Failed to remap I/O memory\n");
878 return -ENOMEM;
879 }
880
881 tegra_phy->is_legacy_phy =
882 of_property_read_bool(np, "nvidia,has-legacy-mode");
883
884 err = of_property_match_string(np, "phy_type", "ulpi");
885 if (err < 0) {
Mikko Perttunen81d5dfe2013-07-17 09:31:01 +0300886 err = utmi_phy_probe(tegra_phy, pdev);
887 if (err < 0)
888 return err;
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530889 } else {
890 tegra_phy->is_ulpi_phy = true;
891
892 tegra_phy->reset_gpio =
893 of_get_named_gpio(np, "nvidia,phy-reset-gpio", 0);
894 if (!gpio_is_valid(tegra_phy->reset_gpio)) {
895 dev_err(&pdev->dev, "invalid gpio: %d\n",
896 tegra_phy->reset_gpio);
897 return tegra_phy->reset_gpio;
898 }
Mikko Perttunen81d5dfe2013-07-17 09:31:01 +0300899
900 tegra_phy->config = NULL;
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530901 }
902
903 err = of_property_match_string(np, "dr_mode", "otg");
904 if (err < 0) {
905 err = of_property_match_string(np, "dr_mode", "peripheral");
906 if (err < 0)
907 tegra_phy->mode = TEGRA_USB_PHY_MODE_HOST;
908 else
909 tegra_phy->mode = TEGRA_USB_PHY_MODE_DEVICE;
910 } else
911 tegra_phy->mode = TEGRA_USB_PHY_MODE_OTG;
912
Mikko Perttunenf5b8c8b2013-07-17 10:37:49 +0300913 /* On some boards, the VBUS regulator doesn't need to be controlled */
914 if (of_find_property(np, "vbus-supply", NULL)) {
915 tegra_phy->vbus = devm_regulator_get(&pdev->dev, "vbus");
916 if (IS_ERR(tegra_phy->vbus))
917 return PTR_ERR(tegra_phy->vbus);
918 } else {
919 dev_notice(&pdev->dev, "no vbus regulator");
920 tegra_phy->vbus = ERR_PTR(-ENODEV);
921 }
922
Venu Byravarasu2d22b422013-05-16 19:43:02 +0530923 tegra_phy->dev = &pdev->dev;
924 err = tegra_usb_phy_init(tegra_phy);
925 if (err < 0)
926 return err;
927
928 tegra_phy->u_phy.shutdown = tegra_usb_phy_close;
929 tegra_phy->u_phy.set_suspend = tegra_usb_phy_suspend;
930
931 dev_set_drvdata(&pdev->dev, tegra_phy);
932 return 0;
933}
934
935static struct of_device_id tegra_usb_phy_id_table[] = {
936 { .compatible = "nvidia,tegra20-usb-phy", },
937 { },
938};
939MODULE_DEVICE_TABLE(of, tegra_usb_phy_id_table);
940
941static struct platform_driver tegra_usb_phy_driver = {
942 .probe = tegra_usb_phy_probe,
943 .driver = {
944 .name = "tegra-phy",
945 .owner = THIS_MODULE,
946 .of_match_table = of_match_ptr(tegra_usb_phy_id_table),
947 },
948};
949module_platform_driver(tegra_usb_phy_driver);
950
951static int tegra_usb_phy_match(struct device *dev, void *data)
952{
953 struct tegra_usb_phy *tegra_phy = dev_get_drvdata(dev);
954 struct device_node *dn = data;
955
956 return (tegra_phy->dev->of_node == dn) ? 1 : 0;
957}
958
959struct usb_phy *tegra_usb_get_phy(struct device_node *dn)
960{
961 struct device *dev;
962 struct tegra_usb_phy *tegra_phy;
963
964 dev = driver_find_device(&tegra_usb_phy_driver.driver, NULL, dn,
965 tegra_usb_phy_match);
966 if (!dev)
967 return ERR_PTR(-EPROBE_DEFER);
968
969 tegra_phy = dev_get_drvdata(dev);
970
971 return &tegra_phy->u_phy;
972}
973EXPORT_SYMBOL_GPL(tegra_usb_get_phy);
Stephen Warren587376a2013-06-13 11:24:08 -0600974
975MODULE_DESCRIPTION("Tegra USB PHY driver");
976MODULE_LICENSE("GPL v2");