2 * linux/arch/arm/mach-mmp/gplugd.c
4 * Support for the Marvell PXA168-based GuruPlug Display (gplugD) Platform.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * publishhed by the Free Software Foundation.
11 #include <linux/init.h>
13 #include <asm/mach/arch.h>
14 #include <asm/mach-types.h>
16 #include <mach/gpio.h>
17 #include <mach/pxa168.h>
18 #include <mach/mfp-pxa168.h>
19 #include <mach/mfp-gplugd.h>
23 static unsigned long gplugd_pin_config
[] __initdata
= {
38 /* LCD & HDMI clock selection GPIO: 0: 74.176MHz, 1: 74.25 MHz */
40 GPIO36_GPIO
, /* CEC Interrupt */
103 GPIO104_GPIO
, /* Reset PHY */
121 static struct i2c_board_info gplugd_i2c_board_info
[] = {
128 /* Bring PHY out of reset by setting GPIO 104 */
129 static int gplugd_eth_init(void)
131 if (unlikely(gpio_request(104, "ETH_RESET_N"))) {
132 printk(KERN_ERR
"Can't get hold of GPIO 104 to bring Ethernet "
133 "PHY out of reset\n");
137 gpio_direction_output(104, 1);
142 struct pxa168_eth_platform_data gplugd_eth_platform_data
= {
145 .speed
= 0, /* Autonagotiation */
146 .init
= gplugd_eth_init
,
149 static void __init
select_disp_freq(void)
151 /* set GPIO 35 & clear GPIO 85 to set LCD External Clock to 74.25 MHz */
152 if (unlikely(gpio_request(35, "DISP_FREQ_SEL"))) {
153 printk(KERN_ERR
"Can't get hold of GPIO 35 to select display "
156 gpio_direction_output(35, 1);
160 if (unlikely(gpio_request(85, "DISP_FREQ_SEL_2"))) {
161 printk(KERN_ERR
"Can't get hold of GPIO 85 to select display "
164 gpio_direction_output(85, 0);
169 static void __init
gplugd_init(void)
171 mfp_config(ARRAY_AND_SIZE(gplugd_pin_config
));
175 /* on-chip devices */
178 pxa168_add_twsi(0, NULL
, ARRAY_AND_SIZE(gplugd_i2c_board_info
));
180 pxa168_add_eth(&gplugd_eth_platform_data
);
183 MACHINE_START(SHEEVAD
, "PXA168-based GuruPlug Display (gplugD) Platform")
184 .map_io
= mmp_map_io
,
185 .nr_irqs
= IRQ_BOARD_START
,
186 .init_irq
= pxa168_init_irq
,
187 .timer
= &pxa168_timer
,
188 .init_machine
= gplugd_init
,