diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch new file mode 100644 index 00000000..07ade0a5 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch | |||
@@ -0,0 +1,135 @@ | |||
1 | From aeef52fa662c9a6d85b11474359fb9504fc1cf49 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <sakoman@gmail.com> | ||
3 | Date: Tue, 15 Dec 2009 15:34:29 -0800 | ||
4 | Subject: [PATCH 03/45] ARM: OMAP: add support for TCT Zippy to Beagle board file | ||
5 | |||
6 | Signed-off-by: Steve Sakoman <sakoman@gmail.com> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 74 +++++++++++++++++++++++++++++- | ||
9 | 1 files changed, 71 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index 330fb25..ddfb9c0 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -21,6 +21,7 @@ | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/leds.h> | ||
18 | #include <linux/gpio.h> | ||
19 | +#include <linux/irq.h> | ||
20 | #include <linux/input.h> | ||
21 | #include <linux/gpio_keys.h> | ||
22 | |||
23 | @@ -56,6 +57,49 @@ | ||
24 | |||
25 | #define NAND_BLOCK_SIZE SZ_128K | ||
26 | |||
27 | +#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
28 | + | ||
29 | +#include <plat/mcspi.h> | ||
30 | +#include <linux/spi/spi.h> | ||
31 | + | ||
32 | +#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 | ||
33 | + | ||
34 | +static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { | ||
35 | + .turbo_mode = 0, | ||
36 | + .single_channel = 1, /* 0: slave, 1: master */ | ||
37 | +}; | ||
38 | + | ||
39 | +static struct spi_board_info omap3beagle_spi_board_info[] __initdata = { | ||
40 | + { | ||
41 | + .modalias = "enc28j60", | ||
42 | + .bus_num = 4, | ||
43 | + .chip_select = 0, | ||
44 | + .max_speed_hz = 20000000, | ||
45 | + .controller_data = &enc28j60_spi_chip_info, | ||
46 | + }, | ||
47 | +}; | ||
48 | + | ||
49 | +static void __init omap3beagle_enc28j60_init(void) | ||
50 | +{ | ||
51 | + if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) && | ||
52 | + (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) { | ||
53 | + gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0); | ||
54 | + omap3beagle_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); | ||
55 | + set_irq_type(omap3beagle_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); | ||
56 | + } else { | ||
57 | + printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n"); | ||
58 | + return; | ||
59 | + } | ||
60 | + | ||
61 | + spi_register_board_info(omap3beagle_spi_board_info, | ||
62 | + ARRAY_SIZE(omap3beagle_spi_board_info)); | ||
63 | +} | ||
64 | + | ||
65 | +#else | ||
66 | +static inline void __init omap3beagle_enc28j60_init(void) { return; } | ||
67 | +#endif | ||
68 | + | ||
69 | + | ||
70 | static struct mtd_partition omap3beagle_nand_partitions[] = { | ||
71 | /* All the partition sizes are listed in terms of NAND block size */ | ||
72 | { | ||
73 | @@ -118,6 +162,14 @@ static struct twl4030_hsmmc_info mmc[] = { | ||
74 | .wires = 8, | ||
75 | .gpio_wp = 29, | ||
76 | }, | ||
77 | + { | ||
78 | + .mmc = 2, | ||
79 | + .wires = 4, | ||
80 | + .gpio_wp = 141, | ||
81 | + .gpio_cd = 162, | ||
82 | + .transceiver = true, | ||
83 | + .ocr_mask = 0x00100000, /* 3.3V */ | ||
84 | + }, | ||
85 | {} /* Terminator */ | ||
86 | }; | ||
87 | |||
88 | @@ -281,7 +333,7 @@ static struct twl4030_platform_data beagle_twldata = { | ||
89 | .vpll2 = &beagle_vpll2, | ||
90 | }; | ||
91 | |||
92 | -static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | ||
93 | +static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { | ||
94 | { | ||
95 | I2C_BOARD_INFO("twl4030", 0x48), | ||
96 | .flags = I2C_CLIENT_WAKE, | ||
97 | @@ -290,10 +342,24 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | +#if defined(CONFIG_RTC_DRV_DS1307) || \ | ||
102 | + defined(CONFIG_RTC_DRV_DS1307_MODULE) | ||
103 | + | ||
104 | +static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { | ||
105 | + { | ||
106 | + I2C_BOARD_INFO("ds1307", 0x68), | ||
107 | + }, | ||
108 | +}; | ||
109 | +#else | ||
110 | +static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; | ||
111 | +#endif | ||
112 | + | ||
113 | static int __init omap3_beagle_i2c_init(void) | ||
114 | { | ||
115 | - omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, | ||
116 | - ARRAY_SIZE(beagle_i2c_boardinfo)); | ||
117 | + omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, | ||
118 | + ARRAY_SIZE(beagle_i2c1_boardinfo)); | ||
119 | + omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, | ||
120 | + ARRAY_SIZE(beagle_i2c2_boardinfo)); | ||
121 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | ||
122 | * projector don't work reliably with 400kHz */ | ||
123 | omap_register_i2c_bus(3, 100, NULL, 0); | ||
124 | @@ -448,6 +514,8 @@ static void __init omap3_beagle_init(void) | ||
125 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
126 | gpio_direction_output(170, true); | ||
127 | |||
128 | + omap3beagle_enc28j60_init(); | ||
129 | + | ||
130 | usb_musb_init(); | ||
131 | usb_ehci_init(&ehci_pdata); | ||
132 | omap3beagle_flash_init(); | ||
133 | -- | ||
134 | 1.6.6.1 | ||
135 | |||