diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx35_3ds.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx35_3ds.c | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index b1963f257c20..ff5fe231b8d6 100644 --- a/arch/arm/mach-mx3/mach-mx35_3ds.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -118,24 +118,42 @@ static iomux_v3_cfg_t mx35pdk_pads[] = { | |||
118 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | 118 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, |
119 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | 119 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, |
120 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 120 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
121 | /* I2C1 */ | ||
122 | MX35_PAD_I2C1_CLK__I2C1_SCL, | ||
123 | MX35_PAD_I2C1_DAT__I2C1_SDA, | ||
121 | }; | 124 | }; |
122 | 125 | ||
126 | static int mx35_3ds_otg_init(struct platform_device *pdev) | ||
127 | { | ||
128 | return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); | ||
129 | } | ||
130 | |||
123 | /* OTG config */ | 131 | /* OTG config */ |
124 | static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = { | 132 | static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = { |
125 | .operating_mode = FSL_USB2_DR_DEVICE, | 133 | .operating_mode = FSL_USB2_DR_DEVICE, |
126 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | 134 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
135 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | ||
136 | /* | ||
137 | * ENGCM09152 also requires a hardware change. | ||
138 | * Please check the MX35 Chip Errata document for details. | ||
139 | */ | ||
127 | }; | 140 | }; |
128 | 141 | ||
129 | static struct mxc_usbh_platform_data otg_pdata __initdata = { | 142 | static struct mxc_usbh_platform_data otg_pdata __initdata = { |
143 | .init = mx35_3ds_otg_init, | ||
130 | .portsc = MXC_EHCI_MODE_UTMI, | 144 | .portsc = MXC_EHCI_MODE_UTMI, |
131 | .flags = MXC_EHCI_INTERNAL_PHY, | ||
132 | }; | 145 | }; |
133 | 146 | ||
147 | static int mx35_3ds_usbh_init(struct platform_device *pdev) | ||
148 | { | ||
149 | return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI | | ||
150 | MXC_EHCI_INTERNAL_PHY); | ||
151 | } | ||
152 | |||
134 | /* USB HOST config */ | 153 | /* USB HOST config */ |
135 | static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { | 154 | static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { |
155 | .init = mx35_3ds_usbh_init, | ||
136 | .portsc = MXC_EHCI_MODE_SERIAL, | 156 | .portsc = MXC_EHCI_MODE_SERIAL, |
137 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | | ||
138 | MXC_EHCI_INTERNAL_PHY, | ||
139 | }; | 157 | }; |
140 | 158 | ||
141 | static int otg_mode_host; | 159 | static int otg_mode_host; |
@@ -153,10 +171,14 @@ static int __init mx35_3ds_otg_mode(char *options) | |||
153 | } | 171 | } |
154 | __setup("otg_mode=", mx35_3ds_otg_mode); | 172 | __setup("otg_mode=", mx35_3ds_otg_mode); |
155 | 173 | ||
174 | static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { | ||
175 | .bitrate = 100000, | ||
176 | }; | ||
177 | |||
156 | /* | 178 | /* |
157 | * Board specific initialization. | 179 | * Board specific initialization. |
158 | */ | 180 | */ |
159 | static void __init mxc_board_init(void) | 181 | static void __init mx35_3ds_init(void) |
160 | { | 182 | { |
161 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 183 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
162 | 184 | ||
@@ -180,6 +202,7 @@ static void __init mxc_board_init(void) | |||
180 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 202 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
181 | pr_warn("Init of the debugboard failed, all " | 203 | pr_warn("Init of the debugboard failed, all " |
182 | "devices on the debugboard are unusable.\n"); | 204 | "devices on the debugboard are unusable.\n"); |
205 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); | ||
183 | } | 206 | } |
184 | 207 | ||
185 | static void __init mx35pdk_timer_init(void) | 208 | static void __init mx35pdk_timer_init(void) |
@@ -193,9 +216,10 @@ struct sys_timer mx35pdk_timer = { | |||
193 | 216 | ||
194 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") | 217 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") |
195 | /* Maintainer: Freescale Semiconductor, Inc */ | 218 | /* Maintainer: Freescale Semiconductor, Inc */ |
196 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 219 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
197 | .map_io = mx35_map_io, | 220 | .map_io = mx35_map_io, |
198 | .init_irq = mx35_init_irq, | 221 | .init_early = imx35_init_early, |
199 | .init_machine = mxc_board_init, | 222 | .init_irq = mx35_init_irq, |
200 | .timer = &mx35pdk_timer, | 223 | .timer = &mx35pdk_timer, |
224 | .init_machine = mx35_3ds_init, | ||
201 | MACHINE_END | 225 | MACHINE_END |