diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-05-04 08:40:06 +0200 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-05-10 15:28:57 -0400 |
commit | ab56c86b96efdea799438b437d7faa139a407fe3 (patch) | |
tree | 5bb275f0ef0233b8edbe4bc0c51fc22826115d44 | |
parent | 7b8b1fe4b8c56593faeb19413adf44d2acbd730d (diff) | |
download | meta-ti-ab56c86b96efdea799438b437d7faa139a407fe3.tar.gz |
linux-mainline 3.2: add support for beagleboard wifi expansion board
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r-- | recipes-kernel/linux/linux-mainline-3.2/beagle/0014-expansion-add-wifi.patch | 142 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-mainline_3.2.bb | 3 |
2 files changed, 144 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-mainline-3.2/beagle/0014-expansion-add-wifi.patch b/recipes-kernel/linux/linux-mainline-3.2/beagle/0014-expansion-add-wifi.patch new file mode 100644 index 00000000..fe175c08 --- /dev/null +++ b/recipes-kernel/linux/linux-mainline-3.2/beagle/0014-expansion-add-wifi.patch | |||
@@ -0,0 +1,142 @@ | |||
1 | From cd3ddffcde4c2b2c8c66389abed3b890b12f31c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Nelson <robertcnelson@gmail.com> | ||
3 | Date: Mon, 16 Apr 2012 10:56:17 -0500 | ||
4 | Subject: [PATCH 14/14] expansion: add wifi | ||
5 | |||
6 | Signed-off-by: Robert Nelson <robertcnelson@gmail.com> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 103 +++++++++++++++++++++++++++++++ | ||
9 | 1 files changed, 103 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index 0299d47..a7d81fc 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -166,6 +166,90 @@ static void __init omap3_beagle_init_rev(void) | ||
16 | char expansionboard_name[16]; | ||
17 | char expansionboard2_name[16]; | ||
18 | |||
19 | +#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) | ||
20 | +#include <linux/regulator/fixed.h> | ||
21 | +#include <linux/ti_wilink_st.h> | ||
22 | +#include <linux/wl12xx.h> | ||
23 | + | ||
24 | +#define OMAP_BEAGLE_WLAN_EN_GPIO (139) | ||
25 | +#define OMAP_BEAGLE_BT_EN_GPIO (138) | ||
26 | +#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137) | ||
27 | +#define OMAP_BEAGLE_FM_EN_BT_WU (136) | ||
28 | + | ||
29 | +struct wl12xx_platform_data omap_beagle_wlan_data __initdata = { | ||
30 | + .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO), | ||
31 | + .board_ref_clock = 2, /* 38.4 MHz */ | ||
32 | +}; | ||
33 | + | ||
34 | +static struct ti_st_plat_data wilink_platform_data = { | ||
35 | + .nshutdown_gpio = OMAP_BEAGLE_BT_EN_GPIO, | ||
36 | + .dev_name = "/dev/ttyO1", | ||
37 | + .flow_cntrl = 1, | ||
38 | + .baud_rate = 3000000, | ||
39 | + .chip_enable = NULL, | ||
40 | + .suspend = NULL, | ||
41 | + .resume = NULL, | ||
42 | +}; | ||
43 | + | ||
44 | +static struct platform_device wl12xx_device = { | ||
45 | + .name = "kim", | ||
46 | + .id = -1, | ||
47 | + .dev.platform_data = &wilink_platform_data, | ||
48 | +}; | ||
49 | + | ||
50 | +static struct platform_device btwilink_device = { | ||
51 | + .name = "btwilink", | ||
52 | + .id = -1, | ||
53 | +}; | ||
54 | + | ||
55 | +static struct omap2_hsmmc_info mmcbbt[] = { | ||
56 | + { | ||
57 | + .mmc = 1, | ||
58 | + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
59 | + .gpio_wp = -EINVAL, | ||
60 | + }, | ||
61 | + { | ||
62 | + .name = "wl1271", | ||
63 | + .mmc = 2, | ||
64 | + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
65 | + .gpio_wp = -EINVAL, | ||
66 | + .gpio_cd = -EINVAL, | ||
67 | + .ocr_mask = MMC_VDD_165_195, | ||
68 | + .nonremovable = true, | ||
69 | + }, | ||
70 | + {} /* Terminator */ | ||
71 | +}; | ||
72 | + | ||
73 | +static struct regulator_consumer_supply beagle_vmmc2_supply = | ||
74 | + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
75 | + | ||
76 | +static struct regulator_init_data beagle_vmmc2 = { | ||
77 | + .constraints = { | ||
78 | + .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
79 | + }, | ||
80 | + .num_consumer_supplies = 1, | ||
81 | + .consumer_supplies = &beagle_vmmc2_supply, | ||
82 | +}; | ||
83 | + | ||
84 | +static struct fixed_voltage_config beagle_vwlan = { | ||
85 | + .supply_name = "vwl1271", | ||
86 | + .microvolts = 1800000, /* 1.8V */ | ||
87 | + .gpio = OMAP_BEAGLE_WLAN_EN_GPIO, | ||
88 | + .startup_delay = 70000, /* 70ms */ | ||
89 | + .enable_high = 1, | ||
90 | + .enabled_at_boot = 0, | ||
91 | + .init_data = &beagle_vmmc2, | ||
92 | +}; | ||
93 | + | ||
94 | +static struct platform_device omap_vwlan_device = { | ||
95 | + .name = "reg-fixed-voltage", | ||
96 | + .id = 1, | ||
97 | + .dev = { | ||
98 | + .platform_data = &beagle_vwlan, | ||
99 | + }, | ||
100 | +}; | ||
101 | +#endif | ||
102 | + | ||
103 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
104 | |||
105 | #include <plat/mcspi.h> | ||
106 | @@ -449,7 +533,15 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
107 | mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp; | ||
108 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
109 | mmc[0].gpio_cd = gpio + 0; | ||
110 | +#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) | ||
111 | + if(!strcmp(expansionboard_name, "bbtoys-wifi")) { | ||
112 | + omap2_hsmmc_init(mmcbbt); | ||
113 | + } else { | ||
114 | + omap2_hsmmc_init(mmc); | ||
115 | + } | ||
116 | +#else | ||
117 | omap2_hsmmc_init(mmc); | ||
118 | +#endif | ||
119 | |||
120 | /* | ||
121 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active | ||
122 | @@ -849,6 +941,17 @@ static void __init omap3_beagle_init(void) | ||
123 | gpio_export(162, 1); | ||
124 | } | ||
125 | |||
126 | + if(!strcmp(expansionboard_name, "bbtoys-wifi")) | ||
127 | + { | ||
128 | + if (wl12xx_set_platform_data(&omap_beagle_wlan_data)) | ||
129 | + pr_err("error setting wl12xx data\n"); | ||
130 | + printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n"); | ||
131 | + platform_device_register(&wl12xx_device); | ||
132 | + platform_device_register(&btwilink_device); | ||
133 | + printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n"); | ||
134 | + platform_device_register(&omap_vwlan_device); | ||
135 | + } | ||
136 | + | ||
137 | if(!strcmp(expansionboard2_name, "bbtoys-ulcd")) | ||
138 | { | ||
139 | printk(KERN_INFO "Beagle second expansionboard: initializing touchscreen: tsc2007\n"); | ||
140 | -- | ||
141 | 1.7.7.4 | ||
142 | |||
diff --git a/recipes-kernel/linux/linux-mainline_3.2.bb b/recipes-kernel/linux/linux-mainline_3.2.bb index dd86bbf7..3e57ccf2 100644 --- a/recipes-kernel/linux/linux-mainline_3.2.bb +++ b/recipes-kernel/linux/linux-mainline_3.2.bb | |||
@@ -10,7 +10,7 @@ PV = "3.2.16" | |||
10 | SRCREV_pn-${PN} = "b1be7dd1ec231ae751d0ce3acd0d2e5760704a6f" | 10 | SRCREV_pn-${PN} = "b1be7dd1ec231ae751d0ce3acd0d2e5760704a6f" |
11 | 11 | ||
12 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc | 12 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc |
13 | MACHINE_KERNEL_PR_append = "a" | 13 | MACHINE_KERNEL_PR_append = "b" |
14 | 14 | ||
15 | FILESPATH =. "${FILE_DIRNAME}/linux-mainline-3.2:${FILE_DIRNAME}/linux-mainline-3.2/${MACHINE}:" | 15 | FILESPATH =. "${FILE_DIRNAME}/linux-mainline-3.2:${FILE_DIRNAME}/linux-mainline-3.2/${MACHINE}:" |
16 | 16 | ||
@@ -57,6 +57,7 @@ SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gi | |||
57 | file://beagle/0011-default-to-fifo-mode-5-for-old-musb-beagles.patch \ | 57 | file://beagle/0011-default-to-fifo-mode-5-for-old-musb-beagles.patch \ |
58 | file://beagle/0012-backlight-Add-TLC59108-backlight-control-driver.patch \ | 58 | file://beagle/0012-backlight-Add-TLC59108-backlight-control-driver.patch \ |
59 | file://beagle/0013-tlc59108-adjust-for-beagleboard-uLCD7.patch \ | 59 | file://beagle/0013-tlc59108-adjust-for-beagleboard-uLCD7.patch \ |
60 | file://beagle/0014-expansion-add-wifi.patch \ | ||
60 | file://devkit8000/0001-arm-omap-devkit8000-for-lcd-use-samsung_lte_panel.patch \ | 61 | file://devkit8000/0001-arm-omap-devkit8000-for-lcd-use-samsung_lte_panel.patch \ |
61 | file://touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch \ | 62 | file://touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch \ |
62 | file://touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch \ | 63 | file://touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch \ |