Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e71fbaf7
Commit
e71fbaf7
authored
Dec 21, 2009
by
Baruch Siach
Committed by
Sascha Hauer
Jan 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mx25: pdk: add platform code for FEC support
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
a759544f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
arch/arm/mach-mx25/mx25pdk.c
arch/arm/mach-mx25/mx25pdk.c
+44
-2
No files found.
arch/arm/mach-mx25/mx25pdk.c
View file @
e71fbaf7
...
...
@@ -18,10 +18,11 @@
#include <linux/types.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/gpio.h>
#include <linux/
smsc911x
.h>
#include <linux/
fec
.h>
#include <linux/platform_device.h>
#include <mach/hardware.h>
...
...
@@ -35,16 +36,57 @@
#include <mach/mx25.h>
#include <mach/mxc_nand.h>
#include "devices.h"
#include <mach/iomux
-v3
.h>
#include <mach/iomux.h>
static
struct
imxuart_platform_data
uart_pdata
=
{
.
flags
=
IMXUART_HAVE_RTSCTS
,
};
static
struct
pad_desc
mx25pdk_pads
[]
=
{
MX25_PAD_FEC_MDC__FEC_MDC
,
MX25_PAD_FEC_MDIO__FEC_MDIO
,
MX25_PAD_FEC_TDATA0__FEC_TDATA0
,
MX25_PAD_FEC_TDATA1__FEC_TDATA1
,
MX25_PAD_FEC_TX_EN__FEC_TX_EN
,
MX25_PAD_FEC_RDATA0__FEC_RDATA0
,
MX25_PAD_FEC_RDATA1__FEC_RDATA1
,
MX25_PAD_FEC_RX_DV__FEC_RX_DV
,
MX25_PAD_FEC_TX_CLK__FEC_TX_CLK
,
MX25_PAD_A17__GPIO_2_3
,
/* FEC_EN, GPIO 35 */
MX25_PAD_D12__GPIO_4_8
,
/* FEC_RESET_B, GPIO 104 */
};
static
struct
fec_platform_data
mx25_fec_pdata
=
{
.
phy
=
PHY_INTERFACE_MODE_RMII
,
};
#define FEC_ENABLE_GPIO 35
#define FEC_RESET_B_GPIO 104
static
void
__init
mx25pdk_fec_reset
(
void
)
{
gpio_request
(
FEC_ENABLE_GPIO
,
"FEC PHY enable"
);
gpio_request
(
FEC_RESET_B_GPIO
,
"FEC PHY reset"
);
gpio_direction_output
(
FEC_ENABLE_GPIO
,
0
);
/* drop PHY power */
gpio_direction_output
(
FEC_RESET_B_GPIO
,
0
);
/* assert reset */
udelay
(
2
);
/* turn on PHY power and lift reset */
gpio_set_value
(
FEC_ENABLE_GPIO
,
1
);
gpio_set_value
(
FEC_RESET_B_GPIO
,
1
);
}
static
void
__init
mx25pdk_init
(
void
)
{
mxc_iomux_v3_setup_multiple_pads
(
mx25pdk_pads
,
ARRAY_SIZE
(
mx25pdk_pads
));
mxc_register_device
(
&
mxc_uart_device0
,
&
uart_pdata
);
mxc_register_device
(
&
mxc_usbh2
,
NULL
);
mx25pdk_fec_reset
();
mxc_register_device
(
&
mx25_fec_device
,
&
mx25_fec_pdata
);
}
static
void
__init
mx25pdk_timer_init
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment