Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 1 | /* |
Nikita Kiryanov | b7792f0 | 2012-01-02 04:01:31 +0000 | [diff] [blame] | 2 | * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 3 | * |
Igor Grinberg | bebedbf | 2011-04-18 17:48:31 -0400 | [diff] [blame] | 4 | * Authors: Mike Rapoport <mike@compulab.co.il> |
| 5 | * Igor Grinberg <grinberg@compulab.co.il> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 6 | * |
| 7 | * Derived from omap3evm and Beagle Board by |
| 8 | * Manikandan Pillai <mani.pillai@ti.com> |
| 9 | * Richard Woodruff <r-woodruff2@ti.com> |
| 10 | * Syed Mohammed Khasim <x0khasim@ti.com> |
| 11 | * |
| 12 | * See file CREDITS for list of people who contributed to this |
| 13 | * project. |
| 14 | * |
| 15 | * This program is free software; you can redistribute it and/or |
| 16 | * modify it under the terms of the GNU General Public License as |
| 17 | * published by the Free Software Foundation; either version 2 of |
| 18 | * the License, or (at your option) any later version. |
| 19 | * |
| 20 | * This program is distributed in the hope that it will be useful, |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | * GNU General Public License for more details. |
| 24 | * |
| 25 | * You should have received a copy of the GNU General Public License |
| 26 | * along with this program; if not, write to the Free Software |
Igor Grinberg | bebedbf | 2011-04-18 17:48:31 -0400 | [diff] [blame] | 27 | * Foundation, Inc. |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 28 | */ |
| 29 | |
| 30 | #include <common.h> |
Igor Grinberg | d2367bc | 2011-04-18 17:54:33 -0400 | [diff] [blame] | 31 | #include <status_led.h> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 32 | #include <netdev.h> |
| 33 | #include <net.h> |
| 34 | #include <i2c.h> |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 35 | #include <usb.h> |
Nikita Kiryanov | 4459e76 | 2012-12-03 02:19:45 +0000 | [diff] [blame] | 36 | #include <mmc.h> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 37 | #include <twl4030.h> |
Nikita Kiryanov | b47cb9d | 2012-01-12 03:26:30 +0000 | [diff] [blame] | 38 | #include <linux/compiler.h> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 39 | |
| 40 | #include <asm/io.h> |
| 41 | #include <asm/arch/mem.h> |
| 42 | #include <asm/arch/mux.h> |
| 43 | #include <asm/arch/mmc_host_def.h> |
| 44 | #include <asm/arch/sys_proto.h> |
| 45 | #include <asm/mach-types.h> |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 46 | #include <asm/ehci-omap.h> |
| 47 | #include <asm/gpio.h> |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 48 | |
Nikita Kiryanov | f1ef869 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 49 | #include "eeprom.h" |
| 50 | |
Igor Grinberg | 8bd1b19 | 2011-04-18 17:43:26 -0400 | [diff] [blame] | 51 | DECLARE_GLOBAL_DATA_PTR; |
| 52 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 53 | const omap3_sysinfo sysinfo = { |
| 54 | DDR_DISCRETE, |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 55 | "CM-T3x board", |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 56 | "NAND", |
| 57 | }; |
| 58 | |
| 59 | static u32 gpmc_net_config[GPMC_MAX_REG] = { |
| 60 | NET_GPMC_CONFIG1, |
| 61 | NET_GPMC_CONFIG2, |
| 62 | NET_GPMC_CONFIG3, |
| 63 | NET_GPMC_CONFIG4, |
| 64 | NET_GPMC_CONFIG5, |
| 65 | NET_GPMC_CONFIG6, |
| 66 | 0 |
| 67 | }; |
| 68 | |
| 69 | static u32 gpmc_nand_config[GPMC_MAX_REG] = { |
| 70 | SMNAND_GPMC_CONFIG1, |
| 71 | SMNAND_GPMC_CONFIG2, |
| 72 | SMNAND_GPMC_CONFIG3, |
| 73 | SMNAND_GPMC_CONFIG4, |
| 74 | SMNAND_GPMC_CONFIG5, |
| 75 | SMNAND_GPMC_CONFIG6, |
| 76 | 0, |
| 77 | }; |
| 78 | |
| 79 | /* |
| 80 | * Routine: board_init |
Igor Grinberg | 7e741ff | 2012-06-13 19:41:40 +0000 | [diff] [blame] | 81 | * Description: hardware init. |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 82 | */ |
| 83 | int board_init(void) |
| 84 | { |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 85 | gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ |
| 86 | |
| 87 | enable_gpmc_cs_config(gpmc_nand_config, &gpmc_cfg->cs[0], |
| 88 | CONFIG_SYS_NAND_BASE, GPMC_SIZE_16M); |
| 89 | |
| 90 | /* board id for Linux */ |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 91 | if (get_cpu_family() == CPU_OMAP34XX) |
| 92 | gd->bd->bi_arch_number = MACH_TYPE_CM_T35; |
| 93 | else |
| 94 | gd->bd->bi_arch_number = MACH_TYPE_CM_T3730; |
| 95 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 96 | /* boot param addr */ |
| 97 | gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); |
| 98 | |
Igor Grinberg | d2367bc | 2011-04-18 17:54:33 -0400 | [diff] [blame] | 99 | #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) |
| 100 | status_led_set(STATUS_LED_BOOT, STATUS_LED_ON); |
| 101 | #endif |
| 102 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 103 | return 0; |
| 104 | } |
| 105 | |
Nikita Kiryanov | cc935c6 | 2012-05-24 04:01:24 +0000 | [diff] [blame] | 106 | static u32 cm_t3x_rev; |
| 107 | |
| 108 | /* |
| 109 | * Routine: get_board_rev |
| 110 | * Description: read system revision |
| 111 | */ |
| 112 | u32 get_board_rev(void) |
| 113 | { |
| 114 | if (!cm_t3x_rev) |
| 115 | cm_t3x_rev = cm_t3x_eeprom_get_board_rev(); |
| 116 | |
| 117 | return cm_t3x_rev; |
| 118 | }; |
| 119 | |
| 120 | /* |
| 121 | * Routine: misc_init_r |
| 122 | * Description: display die ID |
| 123 | */ |
| 124 | int misc_init_r(void) |
| 125 | { |
| 126 | u32 board_rev = get_board_rev(); |
| 127 | u32 rev_major = board_rev / 100; |
| 128 | u32 rev_minor = board_rev - (rev_major * 100); |
| 129 | |
| 130 | if ((rev_minor / 10) * 10 == rev_minor) |
| 131 | rev_minor = rev_minor / 10; |
| 132 | |
| 133 | printf("PCB: %u.%u\n", rev_major, rev_minor); |
| 134 | dieid_num_r(); |
| 135 | |
| 136 | return 0; |
| 137 | } |
| 138 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 139 | /* |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 140 | * Routine: set_muxconf_regs |
| 141 | * Description: Setting up the configuration Mux registers specific to the |
| 142 | * hardware. Many pins need to be moved from protect to primary |
| 143 | * mode. |
| 144 | */ |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 145 | static void cm_t3x_set_common_muxconf(void) |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 146 | { |
| 147 | /* SDRC */ |
| 148 | MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)); /*SDRC_D0*/ |
| 149 | MUX_VAL(CP(SDRC_D1), (IEN | PTD | DIS | M0)); /*SDRC_D1*/ |
| 150 | MUX_VAL(CP(SDRC_D2), (IEN | PTD | DIS | M0)); /*SDRC_D2*/ |
| 151 | MUX_VAL(CP(SDRC_D3), (IEN | PTD | DIS | M0)); /*SDRC_D3*/ |
| 152 | MUX_VAL(CP(SDRC_D4), (IEN | PTD | DIS | M0)); /*SDRC_D4*/ |
| 153 | MUX_VAL(CP(SDRC_D5), (IEN | PTD | DIS | M0)); /*SDRC_D5*/ |
| 154 | MUX_VAL(CP(SDRC_D6), (IEN | PTD | DIS | M0)); /*SDRC_D6*/ |
| 155 | MUX_VAL(CP(SDRC_D7), (IEN | PTD | DIS | M0)); /*SDRC_D7*/ |
| 156 | MUX_VAL(CP(SDRC_D8), (IEN | PTD | DIS | M0)); /*SDRC_D8*/ |
| 157 | MUX_VAL(CP(SDRC_D9), (IEN | PTD | DIS | M0)); /*SDRC_D9*/ |
| 158 | MUX_VAL(CP(SDRC_D10), (IEN | PTD | DIS | M0)); /*SDRC_D10*/ |
| 159 | MUX_VAL(CP(SDRC_D11), (IEN | PTD | DIS | M0)); /*SDRC_D11*/ |
| 160 | MUX_VAL(CP(SDRC_D12), (IEN | PTD | DIS | M0)); /*SDRC_D12*/ |
| 161 | MUX_VAL(CP(SDRC_D13), (IEN | PTD | DIS | M0)); /*SDRC_D13*/ |
| 162 | MUX_VAL(CP(SDRC_D14), (IEN | PTD | DIS | M0)); /*SDRC_D14*/ |
| 163 | MUX_VAL(CP(SDRC_D15), (IEN | PTD | DIS | M0)); /*SDRC_D15*/ |
| 164 | MUX_VAL(CP(SDRC_D16), (IEN | PTD | DIS | M0)); /*SDRC_D16*/ |
| 165 | MUX_VAL(CP(SDRC_D17), (IEN | PTD | DIS | M0)); /*SDRC_D17*/ |
| 166 | MUX_VAL(CP(SDRC_D18), (IEN | PTD | DIS | M0)); /*SDRC_D18*/ |
| 167 | MUX_VAL(CP(SDRC_D19), (IEN | PTD | DIS | M0)); /*SDRC_D19*/ |
| 168 | MUX_VAL(CP(SDRC_D20), (IEN | PTD | DIS | M0)); /*SDRC_D20*/ |
| 169 | MUX_VAL(CP(SDRC_D21), (IEN | PTD | DIS | M0)); /*SDRC_D21*/ |
| 170 | MUX_VAL(CP(SDRC_D22), (IEN | PTD | DIS | M0)); /*SDRC_D22*/ |
| 171 | MUX_VAL(CP(SDRC_D23), (IEN | PTD | DIS | M0)); /*SDRC_D23*/ |
| 172 | MUX_VAL(CP(SDRC_D24), (IEN | PTD | DIS | M0)); /*SDRC_D24*/ |
| 173 | MUX_VAL(CP(SDRC_D25), (IEN | PTD | DIS | M0)); /*SDRC_D25*/ |
| 174 | MUX_VAL(CP(SDRC_D26), (IEN | PTD | DIS | M0)); /*SDRC_D26*/ |
| 175 | MUX_VAL(CP(SDRC_D27), (IEN | PTD | DIS | M0)); /*SDRC_D27*/ |
| 176 | MUX_VAL(CP(SDRC_D28), (IEN | PTD | DIS | M0)); /*SDRC_D28*/ |
| 177 | MUX_VAL(CP(SDRC_D29), (IEN | PTD | DIS | M0)); /*SDRC_D29*/ |
| 178 | MUX_VAL(CP(SDRC_D30), (IEN | PTD | DIS | M0)); /*SDRC_D30*/ |
| 179 | MUX_VAL(CP(SDRC_D31), (IEN | PTD | DIS | M0)); /*SDRC_D31*/ |
| 180 | MUX_VAL(CP(SDRC_CLK), (IEN | PTD | DIS | M0)); /*SDRC_CLK*/ |
| 181 | MUX_VAL(CP(SDRC_DQS0), (IEN | PTD | DIS | M0)); /*SDRC_DQS0*/ |
| 182 | MUX_VAL(CP(SDRC_DQS1), (IEN | PTD | DIS | M0)); /*SDRC_DQS1*/ |
| 183 | MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)); /*SDRC_DQS2*/ |
| 184 | MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)); /*SDRC_DQS3*/ |
| 185 | MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)); /*SDRC_CKE0*/ |
| 186 | MUX_VAL(CP(SDRC_CKE1), (IDIS | PTD | DIS | M7)); /*SDRC_CKE1*/ |
| 187 | |
| 188 | /* GPMC */ |
| 189 | MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)); /*GPMC_A1*/ |
| 190 | MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)); /*GPMC_A2*/ |
| 191 | MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)); /*GPMC_A3*/ |
| 192 | MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)); /*GPMC_A4*/ |
| 193 | MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)); /*GPMC_A5*/ |
| 194 | MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)); /*GPMC_A6*/ |
| 195 | MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)); /*GPMC_A7*/ |
| 196 | MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)); /*GPMC_A8*/ |
| 197 | MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)); /*GPMC_A9*/ |
| 198 | MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)); /*GPMC_A10*/ |
| 199 | MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)); /*GPMC_D0*/ |
| 200 | MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)); /*GPMC_D1*/ |
| 201 | MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)); /*GPMC_D2*/ |
| 202 | MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)); /*GPMC_D3*/ |
| 203 | MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)); /*GPMC_D4*/ |
| 204 | MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)); /*GPMC_D5*/ |
| 205 | MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)); /*GPMC_D6*/ |
| 206 | MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)); /*GPMC_D7*/ |
| 207 | MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)); /*GPMC_D8*/ |
| 208 | MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)); /*GPMC_D9*/ |
| 209 | MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)); /*GPMC_D10*/ |
| 210 | MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)); /*GPMC_D11*/ |
| 211 | MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)); /*GPMC_D12*/ |
| 212 | MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)); /*GPMC_D13*/ |
| 213 | MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)); /*GPMC_D14*/ |
| 214 | MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)); /*GPMC_D15*/ |
| 215 | MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)); /*GPMC_nCS0*/ |
| 216 | |
| 217 | /* SB-T35 Ethernet */ |
| 218 | MUX_VAL(CP(GPMC_NCS4), (IEN | PTU | EN | M0)); /*GPMC_nCS4*/ |
| 219 | |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 220 | /* CM-T3x Ethernet */ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 221 | MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | DIS | M0)); /*GPMC_nCS5*/ |
| 222 | MUX_VAL(CP(GPMC_CLK), (IEN | PTD | DIS | M4)); /*GPIO_59*/ |
| 223 | MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)); /*nADV_ALE*/ |
| 224 | MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS | M0)); /*nOE*/ |
| 225 | MUX_VAL(CP(GPMC_NWE), (IDIS | PTD | DIS | M0)); /*nWE*/ |
| 226 | MUX_VAL(CP(GPMC_NBE0_CLE), (IDIS | PTU | EN | M0)); /*nBE0_CLE*/ |
| 227 | MUX_VAL(CP(GPMC_NBE1), (IDIS | PTD | DIS | M4)); /*GPIO_61*/ |
| 228 | MUX_VAL(CP(GPMC_NWP), (IEN | PTD | DIS | M0)); /*nWP*/ |
| 229 | MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)); /*WAIT0*/ |
| 230 | |
| 231 | /* DSS */ |
| 232 | MUX_VAL(CP(DSS_PCLK), (IDIS | PTD | DIS | M0)); /*DSS_PCLK*/ |
| 233 | MUX_VAL(CP(DSS_HSYNC), (IDIS | PTD | DIS | M0)); /*DSS_HSYNC*/ |
| 234 | MUX_VAL(CP(DSS_VSYNC), (IDIS | PTD | DIS | M0)); /*DSS_VSYNC*/ |
| 235 | MUX_VAL(CP(DSS_ACBIAS), (IDIS | PTD | DIS | M0)); /*DSS_ACBIAS*/ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 236 | MUX_VAL(CP(DSS_DATA6), (IDIS | PTD | DIS | M0)); /*DSS_DATA6*/ |
| 237 | MUX_VAL(CP(DSS_DATA7), (IDIS | PTD | DIS | M0)); /*DSS_DATA7*/ |
| 238 | MUX_VAL(CP(DSS_DATA8), (IDIS | PTD | DIS | M0)); /*DSS_DATA8*/ |
| 239 | MUX_VAL(CP(DSS_DATA9), (IDIS | PTD | DIS | M0)); /*DSS_DATA9*/ |
| 240 | MUX_VAL(CP(DSS_DATA10), (IDIS | PTD | DIS | M0)); /*DSS_DATA10*/ |
| 241 | MUX_VAL(CP(DSS_DATA11), (IDIS | PTD | DIS | M0)); /*DSS_DATA11*/ |
| 242 | MUX_VAL(CP(DSS_DATA12), (IDIS | PTD | DIS | M0)); /*DSS_DATA12*/ |
| 243 | MUX_VAL(CP(DSS_DATA13), (IDIS | PTD | DIS | M0)); /*DSS_DATA13*/ |
| 244 | MUX_VAL(CP(DSS_DATA14), (IDIS | PTD | DIS | M0)); /*DSS_DATA14*/ |
| 245 | MUX_VAL(CP(DSS_DATA15), (IDIS | PTD | DIS | M0)); /*DSS_DATA15*/ |
| 246 | MUX_VAL(CP(DSS_DATA16), (IDIS | PTD | DIS | M0)); /*DSS_DATA16*/ |
| 247 | MUX_VAL(CP(DSS_DATA17), (IDIS | PTD | DIS | M0)); /*DSS_DATA17*/ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 248 | |
| 249 | /* serial interface */ |
| 250 | MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTD | DIS | M0)); /*UART3_RX*/ |
| 251 | MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)); /*UART3_TX*/ |
| 252 | |
| 253 | /* mUSB */ |
| 254 | MUX_VAL(CP(HSUSB0_CLK), (IEN | PTD | DIS | M0)); /*HSUSB0_CLK*/ |
| 255 | MUX_VAL(CP(HSUSB0_STP), (IDIS | PTU | EN | M0)); /*HSUSB0_STP*/ |
| 256 | MUX_VAL(CP(HSUSB0_DIR), (IEN | PTD | DIS | M0)); /*HSUSB0_DIR*/ |
| 257 | MUX_VAL(CP(HSUSB0_NXT), (IEN | PTD | DIS | M0)); /*HSUSB0_NXT*/ |
| 258 | MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA0*/ |
| 259 | MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA1*/ |
| 260 | MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA2*/ |
| 261 | MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA3*/ |
| 262 | MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA4*/ |
| 263 | MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA5*/ |
| 264 | MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA6*/ |
| 265 | MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA7*/ |
| 266 | |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 267 | /* USB EHCI */ |
| 268 | MUX_VAL(CP(ETK_D0_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT0*/ |
| 269 | MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT1*/ |
| 270 | MUX_VAL(CP(ETK_D2_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT2*/ |
| 271 | MUX_VAL(CP(ETK_D7_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT3*/ |
| 272 | MUX_VAL(CP(ETK_D4_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT4*/ |
| 273 | MUX_VAL(CP(ETK_D5_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT5*/ |
| 274 | MUX_VAL(CP(ETK_D6_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT6*/ |
| 275 | MUX_VAL(CP(ETK_D3_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT7*/ |
| 276 | MUX_VAL(CP(ETK_D8_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DIR*/ |
| 277 | MUX_VAL(CP(ETK_D9_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_NXT*/ |
| 278 | MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTD | DIS | M3)); /*HSUSB1_CLK*/ |
| 279 | MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | DIS | M3)); /*HSUSB1_STP*/ |
| 280 | |
| 281 | MUX_VAL(CP(ETK_D14_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DT0*/ |
| 282 | MUX_VAL(CP(ETK_D15_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DT1*/ |
| 283 | MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | EN | M3)); /*HSUSB2_DT2*/ |
| 284 | MUX_VAL(CP(MCSPI2_CS1), (IEN | PTD | EN | M3)); /*HSUSB2_DT3*/ |
| 285 | MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | EN | M3)); /*HSUSB2_DT4*/ |
| 286 | MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTD | EN | M3)); /*HSUSB2_DT5*/ |
| 287 | MUX_VAL(CP(MCSPI2_CS0), (IEN | PTD | EN | M3)); /*HSUSB2_DT6*/ |
| 288 | MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | EN | M3)); /*HSUSB2_DT7*/ |
| 289 | MUX_VAL(CP(ETK_D12_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DIR*/ |
| 290 | MUX_VAL(CP(ETK_D13_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_NXT*/ |
| 291 | MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTD | DIS | M3)); /*HSUSB2_CLK*/ |
| 292 | MUX_VAL(CP(ETK_D11_ES2), (IDIS | PTU | DIS | M3)); /*HSUSB2_STP*/ |
| 293 | |
| 294 | /* SB_T35_USB_HUB_RESET_GPIO */ |
| 295 | MUX_VAL(CP(CAM_WEN), (IDIS | PTD | DIS | M4)); /*GPIO_167*/ |
| 296 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 297 | /* I2C1 */ |
| 298 | MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)); /*I2C1_SCL*/ |
| 299 | MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)); /*I2C1_SDA*/ |
Nikita Kiryanov | da4da30 | 2012-04-02 02:29:31 +0000 | [diff] [blame] | 300 | /* I2C2 */ |
| 301 | MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)); /*I2C2_SCL*/ |
| 302 | MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)); /*I2C2_SDA*/ |
| 303 | /* I2C3 */ |
| 304 | MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)); /*I2C3_SCL*/ |
| 305 | MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)); /*I2C3_SDA*/ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 306 | |
| 307 | /* control and debug */ |
| 308 | MUX_VAL(CP(SYS_32K), (IEN | PTD | DIS | M0)); /*SYS_32K*/ |
| 309 | MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS | M0)); /*SYS_CLKREQ*/ |
| 310 | MUX_VAL(CP(SYS_NIRQ), (IEN | PTU | EN | M0)); /*SYS_nIRQ*/ |
| 311 | MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)); /*OFF_MODE*/ |
| 312 | MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)); /*CLKOUT1*/ |
Igor Grinberg | d2367bc | 2011-04-18 17:54:33 -0400 | [diff] [blame] | 313 | MUX_VAL(CP(SYS_CLKOUT2), (IDIS | PTU | DIS | M4)); /*green LED*/ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 314 | MUX_VAL(CP(JTAG_nTRST), (IEN | PTD | DIS | M0)); /*JTAG_nTRST*/ |
| 315 | MUX_VAL(CP(JTAG_TCK), (IEN | PTD | DIS | M0)); /*JTAG_TCK*/ |
| 316 | MUX_VAL(CP(JTAG_TMS), (IEN | PTD | DIS | M0)); /*JTAG_TMS*/ |
| 317 | MUX_VAL(CP(JTAG_TDI), (IEN | PTD | DIS | M0)); /*JTAG_TDI*/ |
Igor Grinberg | a704ce0 | 2011-04-18 17:50:07 -0400 | [diff] [blame] | 318 | |
| 319 | /* MMC1 */ |
| 320 | MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)); /*MMC1_CLK*/ |
| 321 | MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)); /*MMC1_CMD*/ |
| 322 | MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)); /*MMC1_DAT0*/ |
| 323 | MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)); /*MMC1_DAT1*/ |
| 324 | MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)); /*MMC1_DAT2*/ |
| 325 | MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)); /*MMC1_DAT3*/ |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 326 | } |
| 327 | |
| 328 | static void cm_t35_set_muxconf(void) |
| 329 | { |
| 330 | /* DSS */ |
| 331 | MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M0)); /*DSS_DATA0*/ |
| 332 | MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M0)); /*DSS_DATA1*/ |
| 333 | MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M0)); /*DSS_DATA2*/ |
| 334 | MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M0)); /*DSS_DATA3*/ |
| 335 | MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M0)); /*DSS_DATA4*/ |
| 336 | MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M0)); /*DSS_DATA5*/ |
| 337 | |
| 338 | MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M0)); /*DSS_DATA18*/ |
| 339 | MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M0)); /*DSS_DATA19*/ |
| 340 | MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M0)); /*DSS_DATA20*/ |
| 341 | MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M0)); /*DSS_DATA21*/ |
| 342 | MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M0)); /*DSS_DATA22*/ |
| 343 | MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M0)); /*DSS_DATA23*/ |
| 344 | |
| 345 | /* MMC1 */ |
Igor Grinberg | a704ce0 | 2011-04-18 17:50:07 -0400 | [diff] [blame] | 346 | MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)); /*MMC1_DAT4*/ |
| 347 | MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)); /*MMC1_DAT5*/ |
| 348 | MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)); /*MMC1_DAT6*/ |
| 349 | MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)); /*MMC1_DAT7*/ |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 350 | } |
| 351 | |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 352 | static void cm_t3730_set_muxconf(void) |
| 353 | { |
| 354 | /* DSS */ |
| 355 | MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M3)); /*DSS_DATA0*/ |
| 356 | MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M3)); /*DSS_DATA1*/ |
| 357 | MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M3)); /*DSS_DATA2*/ |
| 358 | MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M3)); /*DSS_DATA3*/ |
| 359 | MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M3)); /*DSS_DATA4*/ |
| 360 | MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M3)); /*DSS_DATA5*/ |
| 361 | |
| 362 | MUX_VAL(CP(SYS_BOOT0), (IDIS | PTD | DIS | M3)); /*DSS_DATA18*/ |
| 363 | MUX_VAL(CP(SYS_BOOT1), (IDIS | PTD | DIS | M3)); /*DSS_DATA19*/ |
| 364 | MUX_VAL(CP(SYS_BOOT3), (IDIS | PTD | DIS | M3)); /*DSS_DATA20*/ |
| 365 | MUX_VAL(CP(SYS_BOOT4), (IDIS | PTD | DIS | M3)); /*DSS_DATA21*/ |
| 366 | MUX_VAL(CP(SYS_BOOT5), (IDIS | PTD | DIS | M3)); /*DSS_DATA22*/ |
| 367 | MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M3)); /*DSS_DATA23*/ |
| 368 | } |
| 369 | |
| 370 | void set_muxconf_regs(void) |
| 371 | { |
| 372 | cm_t3x_set_common_muxconf(); |
| 373 | |
| 374 | if (get_cpu_family() == CPU_OMAP34XX) |
| 375 | cm_t35_set_muxconf(); |
| 376 | else |
| 377 | cm_t3730_set_muxconf(); |
| 378 | } |
| 379 | |
Tom Rini | d0974a8 | 2011-09-03 21:49:24 -0400 | [diff] [blame] | 380 | #ifdef CONFIG_GENERIC_MMC |
Nikita Kiryanov | 4459e76 | 2012-12-03 02:19:45 +0000 | [diff] [blame] | 381 | int board_mmc_getcd(struct mmc *mmc) |
| 382 | { |
| 383 | u8 val; |
| 384 | |
| 385 | if (twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, TWL4030_BASEADD_GPIO)) |
| 386 | return -1; |
| 387 | |
| 388 | return !(val & 1); |
| 389 | } |
| 390 | |
Tom Rini | d0974a8 | 2011-09-03 21:49:24 -0400 | [diff] [blame] | 391 | int board_mmc_init(bd_t *bis) |
| 392 | { |
Nikita Kiryanov | 4be9dbc | 2012-12-03 02:19:47 +0000 | [diff] [blame] | 393 | return omap_mmc_init(0, 0, 0, -1, 59); |
Tom Rini | d0974a8 | 2011-09-03 21:49:24 -0400 | [diff] [blame] | 394 | } |
| 395 | #endif |
| 396 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 397 | /* |
| 398 | * Routine: setup_net_chip_gmpc |
| 399 | * Description: Setting up the configuration GPMC registers specific to the |
| 400 | * Ethernet hardware. |
| 401 | */ |
| 402 | static void setup_net_chip_gmpc(void) |
| 403 | { |
| 404 | struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE; |
| 405 | |
| 406 | enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[5], |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 407 | CM_T3X_SMC911X_BASE, GPMC_SIZE_16M); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 408 | enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[4], |
| 409 | SB_T35_SMC911X_BASE, GPMC_SIZE_16M); |
| 410 | |
| 411 | /* Enable off mode for NWE in PADCONF_GPMC_NWE register */ |
| 412 | writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe); |
| 413 | |
| 414 | /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */ |
| 415 | writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe); |
| 416 | |
| 417 | /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */ |
| 418 | writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00, |
| 419 | &ctrl_base->gpmc_nadv_ale); |
| 420 | } |
| 421 | |
| 422 | #ifdef CONFIG_DRIVER_OMAP34XX_I2C |
| 423 | /* |
| 424 | * Routine: reset_net_chip |
| 425 | * Description: reset the Ethernet controller via TPS65930 GPIO |
| 426 | */ |
| 427 | static void reset_net_chip(void) |
| 428 | { |
| 429 | /* Set GPIO1 of TPS65930 as output */ |
| 430 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, |
Igor Grinberg | e4d26a2 | 2012-04-02 20:12:58 +0000 | [diff] [blame] | 431 | TWL4030_BASEADD_GPIO + 0x03); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 432 | /* Send a pulse on the GPIO pin */ |
| 433 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, |
Igor Grinberg | e4d26a2 | 2012-04-02 20:12:58 +0000 | [diff] [blame] | 434 | TWL4030_BASEADD_GPIO + 0x0C); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 435 | udelay(1); |
| 436 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, |
Igor Grinberg | e4d26a2 | 2012-04-02 20:12:58 +0000 | [diff] [blame] | 437 | TWL4030_BASEADD_GPIO + 0x09); |
| 438 | mdelay(40); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 439 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02, |
Igor Grinberg | e4d26a2 | 2012-04-02 20:12:58 +0000 | [diff] [blame] | 440 | TWL4030_BASEADD_GPIO + 0x0C); |
| 441 | mdelay(1); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 442 | } |
| 443 | #else |
| 444 | static inline void reset_net_chip(void) {} |
| 445 | #endif |
| 446 | |
Nikita Kiryanov | b7792f0 | 2012-01-02 04:01:31 +0000 | [diff] [blame] | 447 | #ifdef CONFIG_SMC911X |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 448 | /* |
| 449 | * Routine: handle_mac_address |
| 450 | * Description: prepare MAC address for on-board Ethernet. |
| 451 | */ |
| 452 | static int handle_mac_address(void) |
| 453 | { |
| 454 | unsigned char enetaddr[6]; |
| 455 | int rc; |
| 456 | |
| 457 | rc = eth_getenv_enetaddr("ethaddr", enetaddr); |
| 458 | if (rc) |
| 459 | return 0; |
| 460 | |
Nikita Kiryanov | f1ef869 | 2012-01-12 03:28:09 +0000 | [diff] [blame] | 461 | rc = cm_t3x_eeprom_read_mac_addr(enetaddr); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 462 | if (rc) |
| 463 | return rc; |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 464 | |
| 465 | if (!is_valid_ether_addr(enetaddr)) |
| 466 | return -1; |
| 467 | |
| 468 | return eth_setenv_enetaddr("ethaddr", enetaddr); |
| 469 | } |
| 470 | |
| 471 | |
| 472 | /* |
| 473 | * Routine: board_eth_init |
| 474 | * Description: initialize module and base-board Ethernet chips |
| 475 | */ |
| 476 | int board_eth_init(bd_t *bis) |
| 477 | { |
| 478 | int rc = 0, rc1 = 0; |
| 479 | |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 480 | setup_net_chip_gmpc(); |
| 481 | reset_net_chip(); |
| 482 | |
| 483 | rc1 = handle_mac_address(); |
| 484 | if (rc1) |
Igor Grinberg | 7e741ff | 2012-06-13 19:41:40 +0000 | [diff] [blame] | 485 | printf("No MAC address found! "); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 486 | |
Igor Grinberg | 05a96a4 | 2011-04-18 17:55:21 -0400 | [diff] [blame] | 487 | rc1 = smc911x_initialize(0, CM_T3X_SMC911X_BASE); |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 488 | if (rc1 > 0) |
| 489 | rc++; |
| 490 | |
| 491 | rc1 = smc911x_initialize(1, SB_T35_SMC911X_BASE); |
| 492 | if (rc1 > 0) |
| 493 | rc++; |
Mike Rapoport | 8abe730 | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 494 | |
| 495 | return rc; |
| 496 | } |
Nikita Kiryanov | b7792f0 | 2012-01-02 04:01:31 +0000 | [diff] [blame] | 497 | #endif |
Nikita Kiryanov | b47cb9d | 2012-01-12 03:26:30 +0000 | [diff] [blame] | 498 | |
| 499 | void __weak get_board_serial(struct tag_serialnr *serialnr) |
| 500 | { |
| 501 | /* |
| 502 | * This corresponds to what happens when we can communicate with the |
| 503 | * eeprom but don't get a valid board serial value. |
| 504 | */ |
| 505 | serialnr->low = 0; |
| 506 | serialnr->high = 0; |
| 507 | }; |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 508 | |
| 509 | #ifdef CONFIG_USB_EHCI_OMAP |
| 510 | struct omap_usbhs_board_data usbhs_bdata = { |
| 511 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 512 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 513 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 514 | }; |
| 515 | |
| 516 | #define SB_T35_USB_HUB_RESET_GPIO 167 |
Nikita Kiryanov | 35fbb0e | 2012-12-03 16:17:58 +0200 | [diff] [blame] | 517 | int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 518 | { |
| 519 | u8 val; |
| 520 | int offset; |
| 521 | |
| 522 | if (gpio_request(SB_T35_USB_HUB_RESET_GPIO, "SB-T35 usb hub reset")) { |
| 523 | printf("Error: can't obtain GPIO %d for SB-T35 usb hub reset", |
| 524 | SB_T35_USB_HUB_RESET_GPIO); |
| 525 | return -1; |
| 526 | } |
| 527 | |
| 528 | gpio_direction_output(SB_T35_USB_HUB_RESET_GPIO, 0); |
| 529 | udelay(10); |
| 530 | gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1); |
| 531 | udelay(1000); |
| 532 | |
| 533 | offset = TWL4030_BASEADD_GPIO + TWL4030_GPIO_GPIODATADIR1; |
| 534 | twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, offset); |
| 535 | /* Set GPIO6 and GPIO7 of TPS65930 as output */ |
| 536 | val |= 0xC0; |
| 537 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, val, offset); |
| 538 | offset = TWL4030_BASEADD_GPIO + TWL4030_GPIO_SETGPIODATAOUT1; |
| 539 | /* Take both PHYs out of reset */ |
| 540 | twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0xC0, offset); |
| 541 | udelay(1); |
| 542 | |
Nikita Kiryanov | 35fbb0e | 2012-12-03 16:17:58 +0200 | [diff] [blame] | 543 | return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); |
Nikita Kiryanov | 9f957be | 2012-12-02 13:59:19 +0200 | [diff] [blame] | 544 | } |
| 545 | |
| 546 | int ehci_hcd_stop(void) |
| 547 | { |
| 548 | return omap_ehci_hcd_stop(); |
| 549 | } |
| 550 | |
| 551 | #endif /* CONFIG_USB_EHCI_OMAP */ |