1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
--- a/mts-io.c 2013-04-22 11:53:16.467357847 -0500
+++ b/mts_io.c 2013-04-22 13:00:45.943391356 -0500
@@ -349,21 +349,23 @@
.use_pullup = 0,
.active_low = 1,
},
+ // MTPCIE-H5: Wifi and BT enable pins
+ // (was TXD1 and DTR1) (PB17 and PB7 are tied together)
{
- .name = "TXD1",
- .pin = AT91_PIN_PB17,
- .direction = GPIO_DIR_INPUT,
+ .name = "WLAN_EN",
+ .attr_name = "wlan-enabled",
+ .pin = AT91_PIN_PB7,
+ .direction = GPIO_DIR_OUTPUT,
.output_value = 0,
.use_pullup = 0,
},
{
- .name = "DTR1",
- .attr_name = "extserial-dtr",
+ .name = "BT_EN",
+ .attr_name = "bt-enabled",
.pin = AT91_PIN_PB18,
- .direction = GPIO_DIR_INPUT,
+ .direction = GPIO_DIR_OUTPUT,
.output_value = 0,
.use_pullup = 0,
- .active_low = 1,
},
{
.name = "DCD1",
@@ -374,6 +376,8 @@
.use_pullup = 0,
.active_low = 1,
},
+ // PCIE-H5 GPIO11 used for WLAN_IRQ
+#if 0
{
.name = "GPIO11",
.attr_name = "gpio11",
@@ -382,6 +386,7 @@
.output_value = 1,
.use_pullup = 1,
},
+#endif
{
.name = "GPIO12",
.attr_name = "gpio12",
@@ -1936,13 +1941,13 @@
&dev_attr_product_id.attr,
&dev_attr_device_id.attr,
&dev_attr_hw_version.attr,
- &dev_attr_extserial_dtr.attr,
&dev_attr_extserial_dcd_gpio.attr,
&dev_attr_rsersrc.attr,
&dev_attr_radio_reset.attr,
&dev_attr_eth0_enabled.attr,
- &dev_attr_gpio11.attr,
&dev_attr_gpio12.attr,
+ &dev_attr_bt_enabled.attr,
+ &dev_attr_wlan_enabled.attr,
&dev_attr_gpo1.attr,
&dev_attr_gpo2.attr,
@@ -2175,7 +2180,7 @@
return tmp;
}
- spi_dout_value = 0x00;
+ spi_dout_value = 0xFF; // 0x00
spi_writen(spi, &spi_dout_value, 1);
spi_dout_dev = spi;
@@ -2308,6 +2313,8 @@
mts_product_id = MTCDP_E1_DK_0_0;
log_info("detected board %s", HW_VERSION_MTCDP_0_0);
} else if (strncmp(id_eeprom.product_id, PRODUCT_ID_MT100EOCG, strlen(PRODUCT_ID_MT100EOCG)) == 0) {
+ DEVICE_CAPA_SET(id_eeprom.capa, CAPA_WIFI);
+ DEVICE_CAPA_SET(id_eeprom.capa, CAPA_BLUETOOTH);
attr_group = &mt100eocg_platform_attribute_group;
gpio_pins = gpio_pins_mt100eocg_0_0;
mts_product_id = MT100EOCG_0_0;
|