diff options
author | Roger Quadros <rogerq@ti.com> | 2012-11-08 09:10:41 -0500 |
---|---|---|
committer | Roger Quadros <rogerq@ti.com> | 2013-02-13 06:22:44 -0500 |
commit | 300c2f8ff4745f65d99cf105e9afef0f01b70d09 (patch) | |
tree | 4bd83875c773dd79eead8394493b09942a8f65fc /drivers/mfd | |
parent | 6675144668883a506f0c11db668b582bd5a3161d (diff) |
mfd: omap-usb-tll: Add OMAP5 revision and HSIC support
The TLL module on OMAP5 has 3 channels.
HSIC mode requires the TLL channel to be in Transparent UTMI mode.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/omap-usb-tll.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 55c85c78ba44..0aef1a768880 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c | |||
@@ -54,10 +54,13 @@ | |||
54 | 54 | ||
55 | #define OMAP_TLL_CHANNEL_CONF(num) (0x040 + 0x004 * num) | 55 | #define OMAP_TLL_CHANNEL_CONF(num) (0x040 + 0x004 * num) |
56 | #define OMAP_TLL_CHANNEL_CONF_FSLSMODE_SHIFT 24 | 56 | #define OMAP_TLL_CHANNEL_CONF_FSLSMODE_SHIFT 24 |
57 | #define OMAP_TLL_CHANNEL_CONF_DRVVBUS (1 << 16) | ||
58 | #define OMAP_TLL_CHANNEL_CONF_CHRGVBUS (1 << 15) | ||
57 | #define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF (1 << 11) | 59 | #define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF (1 << 11) |
58 | #define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE (1 << 10) | 60 | #define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE (1 << 10) |
59 | #define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE (1 << 9) | 61 | #define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE (1 << 9) |
60 | #define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE (1 << 8) | 62 | #define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE (1 << 8) |
63 | #define OMAP_TLL_CHANNEL_CONF_MODE_TRANSPARENT_UTMI (2 << 1) | ||
61 | #define OMAP_TLL_CHANNEL_CONF_CHANMODE_FSLS (1 << 1) | 64 | #define OMAP_TLL_CHANNEL_CONF_CHANMODE_FSLS (1 << 1) |
62 | #define OMAP_TLL_CHANNEL_CONF_CHANEN (1 << 0) | 65 | #define OMAP_TLL_CHANNEL_CONF_CHANEN (1 << 0) |
63 | 66 | ||
@@ -92,6 +95,7 @@ | |||
92 | #define OMAP_USBTLL_REV1 0x00000015 /* OMAP3 */ | 95 | #define OMAP_USBTLL_REV1 0x00000015 /* OMAP3 */ |
93 | #define OMAP_USBTLL_REV2 0x00000018 /* OMAP 3630 */ | 96 | #define OMAP_USBTLL_REV2 0x00000018 /* OMAP 3630 */ |
94 | #define OMAP_USBTLL_REV3 0x00000004 /* OMAP4 */ | 97 | #define OMAP_USBTLL_REV3 0x00000004 /* OMAP4 */ |
98 | #define OMAP_USBTLL_REV4 0x00000006 /* OMAP5 */ | ||
95 | 99 | ||
96 | #define is_ehci_tll_mode(x) (x == OMAP_EHCI_PORT_MODE_TLL) | 100 | #define is_ehci_tll_mode(x) (x == OMAP_EHCI_PORT_MODE_TLL) |
97 | 101 | ||
@@ -245,6 +249,7 @@ static int usbtll_omap_probe(struct platform_device *pdev) | |||
245 | ver = usbtll_read(base, OMAP_USBTLL_REVISION); | 249 | ver = usbtll_read(base, OMAP_USBTLL_REVISION); |
246 | switch (ver) { | 250 | switch (ver) { |
247 | case OMAP_USBTLL_REV1: | 251 | case OMAP_USBTLL_REV1: |
252 | case OMAP_USBTLL_REV4: | ||
248 | tll->nch = OMAP_TLL_CHANNEL_COUNT; | 253 | tll->nch = OMAP_TLL_CHANNEL_COUNT; |
249 | break; | 254 | break; |
250 | case OMAP_USBTLL_REV2: | 255 | case OMAP_USBTLL_REV2: |
@@ -310,6 +315,15 @@ static int usbtll_omap_probe(struct platform_device *pdev) | |||
310 | reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE | 315 | reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE |
311 | | OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF | 316 | | OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF |
312 | | OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE); | 317 | | OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE); |
318 | } else if (pdata->port_mode[i] == | ||
319 | OMAP_EHCI_PORT_MODE_HSIC) { | ||
320 | /* | ||
321 | * HSIC Mode requires UTMI port configurations | ||
322 | */ | ||
323 | reg |= OMAP_TLL_CHANNEL_CONF_DRVVBUS | ||
324 | | OMAP_TLL_CHANNEL_CONF_CHRGVBUS | ||
325 | | OMAP_TLL_CHANNEL_CONF_MODE_TRANSPARENT_UTMI | ||
326 | | OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF; | ||
313 | } else { | 327 | } else { |
314 | continue; | 328 | continue; |
315 | } | 329 | } |