diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx5/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx50_rdp.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices-imx50.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-fec.c | 5 |
4 files changed, 31 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index de4fa992fc3e..af8749b04ff1 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -157,6 +157,7 @@ config MACH_MX50_RDP | |||
157 | select IMX_HAVE_PLATFORM_IMX_UART | 157 | select IMX_HAVE_PLATFORM_IMX_UART |
158 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 158 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
159 | select IMX_HAVE_PLATFORM_SPI_IMX | 159 | select IMX_HAVE_PLATFORM_SPI_IMX |
160 | select IMX_HAVE_PLATFORM_FEC | ||
160 | help | 161 | help |
161 | Include support for MX50 reference design platform (RDP) board. This | 162 | Include support for MX50 reference design platform (RDP) board. This |
162 | includes specific configurations for the board and its peripherals. | 163 | includes specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c index e5bb600b4cb2..3180d43aeced 100644 --- a/arch/arm/mach-mx5/board-mx50_rdp.c +++ b/arch/arm/mach-mx5/board-mx50_rdp.c | |||
@@ -37,6 +37,9 @@ | |||
37 | 37 | ||
38 | #include "devices-imx50.h" | 38 | #include "devices-imx50.h" |
39 | 39 | ||
40 | #define FEC_EN IMX_GPIO_NR(6, 23) | ||
41 | #define FEC_RESET_B IMX_GPIO_NR(4, 12) | ||
42 | |||
40 | static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | 43 | static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { |
41 | /* SD1 */ | 44 | /* SD1 */ |
42 | MX50_PAD_ECSPI2_SS0__GPIO_4_19, | 45 | MX50_PAD_ECSPI2_SS0__GPIO_4_19, |
@@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | |||
102 | MX50_PAD_I2C3_SCL__USBOTG_OC, | 105 | MX50_PAD_I2C3_SCL__USBOTG_OC, |
103 | 106 | ||
104 | MX50_PAD_SSI_RXC__FEC_MDIO, | 107 | MX50_PAD_SSI_RXC__FEC_MDIO, |
105 | MX50_PAD_SSI_RXC__FEC_MDIO, | 108 | MX50_PAD_SSI_RXFS__FEC_MDC, |
106 | MX50_PAD_DISP_D0__FEC_TXCLK, | 109 | MX50_PAD_DISP_D0__FEC_TXCLK, |
107 | MX50_PAD_DISP_D1__FEC_RX_ER, | 110 | MX50_PAD_DISP_D1__FEC_RX_ER, |
108 | MX50_PAD_DISP_D2__FEC_RX_DV, | 111 | MX50_PAD_DISP_D2__FEC_RX_DV, |
@@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | |||
111 | MX50_PAD_DISP_D5__FEC_TX_EN, | 114 | MX50_PAD_DISP_D5__FEC_TX_EN, |
112 | MX50_PAD_DISP_D6__FEC_TXD1, | 115 | MX50_PAD_DISP_D6__FEC_TXD1, |
113 | MX50_PAD_DISP_D7__FEC_TXD0, | 116 | MX50_PAD_DISP_D7__FEC_TXD0, |
114 | MX50_PAD_SSI_RXFS__FEC_MDC, | ||
115 | MX50_PAD_I2C3_SDA__GPIO_6_23, | 117 | MX50_PAD_I2C3_SDA__GPIO_6_23, |
116 | MX50_PAD_ECSPI1_SCLK__GPIO_4_12, | 118 | MX50_PAD_ECSPI1_SCLK__GPIO_4_12, |
117 | 119 | ||
@@ -168,6 +170,20 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
168 | .flags = IMXUART_HAVE_RTSCTS, | 170 | .flags = IMXUART_HAVE_RTSCTS, |
169 | }; | 171 | }; |
170 | 172 | ||
173 | static const struct fec_platform_data fec_data __initconst = { | ||
174 | .phy = PHY_INTERFACE_MODE_RMII, | ||
175 | }; | ||
176 | |||
177 | static inline void mx50_rdp_fec_reset(void) | ||
178 | { | ||
179 | gpio_request(FEC_EN, "fec-en"); | ||
180 | gpio_direction_output(FEC_EN, 0); | ||
181 | gpio_request(FEC_RESET_B, "fec-reset_b"); | ||
182 | gpio_direction_output(FEC_RESET_B, 0); | ||
183 | msleep(1); | ||
184 | gpio_set_value(FEC_RESET_B, 1); | ||
185 | } | ||
186 | |||
171 | /* | 187 | /* |
172 | * Board specific initialization. | 188 | * Board specific initialization. |
173 | */ | 189 | */ |
@@ -178,6 +194,8 @@ static void __init mx50_rdp_board_init(void) | |||
178 | 194 | ||
179 | imx50_add_imx_uart(0, &uart_pdata); | 195 | imx50_add_imx_uart(0, &uart_pdata); |
180 | imx50_add_imx_uart(1, &uart_pdata); | 196 | imx50_add_imx_uart(1, &uart_pdata); |
197 | mx50_rdp_fec_reset(); | ||
198 | imx50_add_fec(&fec_data); | ||
181 | } | 199 | } |
182 | 200 | ||
183 | static void __init mx50_rdp_timer_init(void) | 201 | static void __init mx50_rdp_timer_init(void) |
diff --git a/arch/arm/mach-mx5/devices-imx50.h b/arch/arm/mach-mx5/devices-imx50.h index 98ab07468a0e..e1093dbaa786 100644 --- a/arch/arm/mach-mx5/devices-imx50.h +++ b/arch/arm/mach-mx5/devices-imx50.h | |||
@@ -24,3 +24,8 @@ | |||
24 | extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst; | 24 | extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst; |
25 | #define imx50_add_imx_uart(id, pdata) \ | 25 | #define imx50_add_imx_uart(id, pdata) \ |
26 | imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata) | 26 | imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata) |
27 | |||
28 | extern const struct imx_fec_data imx50_fec_data __initconst; | ||
29 | #define imx50_add_fec(pdata) \ | ||
30 | imx_add_fec(&imx50_fec_data, pdata) | ||
31 | |||
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index b50c3517d083..4f529964224d 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c | |||
@@ -31,6 +31,11 @@ const struct imx_fec_data imx35_fec_data __initconst = | |||
31 | imx_fec_data_entry_single(MX35); | 31 | imx_fec_data_entry_single(MX35); |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifdef CONFIG_SOC_IMX50 | ||
35 | const struct imx_fec_data imx50_fec_data __initconst = | ||
36 | imx_fec_data_entry_single(MX50); | ||
37 | #endif | ||
38 | |||
34 | #ifdef CONFIG_SOC_IMX51 | 39 | #ifdef CONFIG_SOC_IMX51 |
35 | const struct imx_fec_data imx51_fec_data __initconst = | 40 | const struct imx_fec_data imx51_fec_data __initconst = |
36 | imx_fec_data_entry_single(MX51); | 41 | imx_fec_data_entry_single(MX51); |