Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * |
| 4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
Uwe Kleine-König | 767c38b | 2010-03-04 16:39:53 +0100 | [diff] [blame] | 17 | /* |
| 18 | * This machine is known as: |
| 19 | * - i.MX35 3-Stack Development System |
| 20 | * - i.MX35 Platform Development Kit (i.MX35 PDK) |
| 21 | */ |
| 22 | |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 23 | #include <linux/types.h> |
| 24 | #include <linux/init.h> |
| 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/memory.h> |
| 27 | #include <linux/gpio.h> |
Harro Haan | 9c2daf1 | 2009-11-27 11:44:36 +0100 | [diff] [blame] | 28 | #include <linux/fsl_devices.h> |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 29 | |
| 30 | #include <asm/mach-types.h> |
| 31 | #include <asm/mach/arch.h> |
| 32 | #include <asm/mach/time.h> |
| 33 | #include <asm/mach/map.h> |
| 34 | |
| 35 | #include <mach/hardware.h> |
| 36 | #include <mach/common.h> |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 37 | #include <mach/iomux-mx35.h> |
| 38 | |
Uwe Kleine-König | 6eafde5 | 2010-06-23 11:49:34 +0200 | [diff] [blame] | 39 | #include "devices-imx35.h" |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 40 | #include "devices.h" |
| 41 | |
Uwe Kleine-König | 6eafde5 | 2010-06-23 11:49:34 +0200 | [diff] [blame] | 42 | static const struct imxuart_platform_data uart_pdata __initconst = { |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 43 | .flags = IMXUART_HAVE_RTSCTS, |
| 44 | }; |
| 45 | |
| 46 | static struct platform_device *devices[] __initdata = { |
| 47 | &mxc_fec_device, |
| 48 | }; |
| 49 | |
| 50 | static struct pad_desc mx35pdk_pads[] = { |
| 51 | /* UART1 */ |
| 52 | MX35_PAD_CTS1__UART1_CTS, |
| 53 | MX35_PAD_RTS1__UART1_RTS, |
| 54 | MX35_PAD_TXD1__UART1_TXD_MUX, |
| 55 | MX35_PAD_RXD1__UART1_RXD_MUX, |
| 56 | /* FEC */ |
| 57 | MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, |
| 58 | MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, |
| 59 | MX35_PAD_FEC_RX_DV__FEC_RX_DV, |
| 60 | MX35_PAD_FEC_COL__FEC_COL, |
| 61 | MX35_PAD_FEC_RDATA0__FEC_RDATA_0, |
| 62 | MX35_PAD_FEC_TDATA0__FEC_TDATA_0, |
| 63 | MX35_PAD_FEC_TX_EN__FEC_TX_EN, |
| 64 | MX35_PAD_FEC_MDC__FEC_MDC, |
| 65 | MX35_PAD_FEC_MDIO__FEC_MDIO, |
| 66 | MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, |
| 67 | MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, |
| 68 | MX35_PAD_FEC_CRS__FEC_CRS, |
| 69 | MX35_PAD_FEC_RDATA1__FEC_RDATA_1, |
| 70 | MX35_PAD_FEC_TDATA1__FEC_TDATA_1, |
| 71 | MX35_PAD_FEC_RDATA2__FEC_RDATA_2, |
| 72 | MX35_PAD_FEC_TDATA2__FEC_TDATA_2, |
| 73 | MX35_PAD_FEC_RDATA3__FEC_RDATA_3, |
| 74 | MX35_PAD_FEC_TDATA3__FEC_TDATA_3, |
Harro Haan | 9c2daf1 | 2009-11-27 11:44:36 +0100 | [diff] [blame] | 75 | /* USBOTG */ |
| 76 | MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR, |
| 77 | MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, |
| 78 | }; |
| 79 | |
| 80 | /* OTG config */ |
| 81 | static struct fsl_usb2_platform_data usb_pdata = { |
| 82 | .operating_mode = FSL_USB2_DR_DEVICE, |
| 83 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 84 | }; |
| 85 | |
| 86 | /* |
| 87 | * Board specific initialization. |
| 88 | */ |
| 89 | static void __init mxc_board_init(void) |
| 90 | { |
| 91 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
| 92 | |
| 93 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 94 | |
Uwe Kleine-König | 6eafde5 | 2010-06-23 11:49:34 +0200 | [diff] [blame] | 95 | imx35_add_imx_uart0(&uart_pdata); |
Harro Haan | 9c2daf1 | 2009-11-27 11:44:36 +0100 | [diff] [blame] | 96 | |
| 97 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | static void __init mx35pdk_timer_init(void) |
| 101 | { |
| 102 | mx35_clocks_init(); |
| 103 | } |
| 104 | |
| 105 | struct sys_timer mx35pdk_timer = { |
| 106 | .init = mx35pdk_timer_init, |
| 107 | }; |
| 108 | |
| 109 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") |
| 110 | /* Maintainer: Freescale Semiconductor, Inc */ |
Uwe Kleine-König | f568dd7 | 2009-12-09 11:57:21 +0100 | [diff] [blame] | 111 | .phys_io = MX35_AIPS1_BASE_ADDR, |
| 112 | .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
Uwe Kleine-König | 3410123 | 2010-01-29 17:36:05 +0100 | [diff] [blame] | 113 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 114 | .map_io = mx35_map_io, |
Sascha Hauer | c5aa0ad | 2009-05-25 17:36:19 +0200 | [diff] [blame] | 115 | .init_irq = mx35_init_irq, |
Fabio Estevam | aefa1c6 | 2009-06-02 17:24:16 -0700 | [diff] [blame] | 116 | .init_machine = mxc_board_init, |
| 117 | .timer = &mx35pdk_timer, |
| 118 | MACHINE_END |