diff options
Diffstat (limited to 'io-module/mtr2d2.c')
-rw-r--r-- | io-module/mtr2d2.c | 197 |
1 files changed, 139 insertions, 58 deletions
diff --git a/io-module/mtr2d2.c b/io-module/mtr2d2.c index 58aeb03..7e44881 100644 --- a/io-module/mtr2d2.c +++ b/io-module/mtr2d2.c @@ -1,9 +1,8 @@ - static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { { .name = "RADIO_RESET", .pin = { - .gpio = AT91_PIN_PC5, + .gpio = AT91_PIN_PC3, .flags = GPIOF_OUT_INIT_HIGH, .label = "radio-reset", }, @@ -11,7 +10,7 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { { .name = "RADIO_RESET", .pin = { - .gpio = AT91_PIN_PC5, + .gpio = AT91_PIN_PC3, .flags = GPIOF_OUT_INIT_HIGH, .label = "radio-power", }, @@ -19,14 +18,14 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { { .name = "DEVICE_RESET", .pin = { - .gpio = AT91_PIN_PC4, + .gpio = AT91_PIN_PC2, .flags = GPIOF_IN, .label = "reset", }, .active_low = 1, }, { - .name = "LS_LED", + .name = "LS_LED", /* LED7 */ .pin = { .gpio = AT91_PIN_PA14, #if LED_LS_CONTROLLABLE @@ -39,7 +38,7 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "STATUS_LED", + .name = "STATUS_LED", /* LED2 */ .pin = { .gpio = AT91_PIN_PA24, .flags = GPIOF_OUT_INIT_LOW, @@ -57,7 +56,7 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "LED7", + .name = "LED5", .pin = { .gpio = AT91_PIN_PA25, .flags = GPIOF_OUT_INIT_HIGH, @@ -66,16 +65,16 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "LED7", + .name = "LED5", .pin = { .gpio = AT91_PIN_PA25, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-c", + .label = "led-b", }, .active_low = 1, }, { - .name = "LED10", + .name = "LED1", .pin = { .gpio = AT91_PIN_PA26, .flags = GPIOF_OUT_INIT_HIGH, @@ -84,16 +83,16 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "LED10", + .name = "LED1", .pin = { .gpio = AT91_PIN_PA26, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-d", + .label = "led-c", }, .active_low = 1, }, { - .name = "LED11", + .name = "LED4", .pin = { .gpio = AT91_PIN_PA27, .flags = GPIOF_OUT_INIT_HIGH, @@ -102,16 +101,16 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "LED11", + .name = "LED4", .pin = { .gpio = AT91_PIN_PA27, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-e", + .label = "led-d", }, .active_low = 1, }, { - .name = "LED12", + .name = "LED3", .pin = { .gpio = AT91_PIN_PA28, .flags = GPIOF_OUT_INIT_HIGH, @@ -120,32 +119,149 @@ static struct gpio_pin gpio_pins_mtr2d2_0_0[] = { .active_low = 1, }, { - .name = "LED12", + .name = "LED3", .pin = { .gpio = AT91_PIN_PA28, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-f", + .label = "led-e", }, .active_low = 1, }, + + // gpio pins for Accessory Card 1 { - .name = "LED13", + .name = "AP1_RESET", .pin = { - .gpio = AT91_PIN_PA29, + .gpio = AT91_PIN_PB12, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-wifi", + .label = "ap1-reset", + } + }, + { + .name = "AP1_GPIO1", + .pin = { + .gpio = AT91_PIN_PC6, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio1", }, .active_low = 1, }, { - .name = "LED13", + .name = "AP1_GPIO2", + .pin = { + .gpio = AT91_PIN_PC7, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio2", + } + }, + { + .name = "AP1_GPIO3", + .pin = { + .gpio = AT91_PIN_PC8, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio3", + } + }, + { + .name = "AP1_GPIO4", + .pin = { + .gpio = AT91_PIN_PC9, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap1-gpio4", + } + }, + { + .name = "AP1_INTERRUPT1", + .pin = { + .gpio = AT91_PIN_PB14, + .flags = GPIOF_IN, + .label = "ap1-interrupt1", + } + }, + { + .name = "AP1_INTERRUPT2", + .pin = { + .gpio = AT91_PIN_PB15, + .flags = GPIOF_IN, + .label = "ap1-interrupt2", + } + }, + { + .name = "AP1_GPS_PPS", .pin = { .gpio = AT91_PIN_PA29, + .flags = GPIOF_IN, + .label = "ap1-gps-pps", + } + }, + + // gpio pins for Accessory Card 2 + { + .name = "AP2_RESET", + .pin = { + .gpio = AT91_PIN_PB13, .flags = GPIOF_OUT_INIT_HIGH, - .label = "led-b", + .label = "ap2-reset", + } + }, + { + .name = "AP2_GPIO1", + .pin = { + .gpio = AT91_PIN_PC20, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio1", }, .active_low = 1, }, + { + .name = "AP2_GPIO2", + .pin = { + .gpio = AT91_PIN_PC21, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio2", + } + }, + { + .name = "AP2_GPIO3", + .pin = { + .gpio = AT91_PIN_PC22, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio3", + } + }, + { + .name = "AP2_GPIO4", + .pin = { + .gpio = AT91_PIN_PC23, + .flags = GPIOF_OUT_INIT_LOW, + .label = "ap2-gpio4", + } + }, + { + .name = "AP2_INTERRUPT1", + .pin = { + .gpio = AT91_PIN_PB17, + .flags = GPIOF_IN, + .label = "ap2-interrupt1", + } + }, + { + .name = "AP2_INTERRUPT2", + .pin = { + .gpio = AT91_PIN_PB18, + .flags = GPIOF_IN, + .label = "ap2-interrupt2", + } + }, + { + .name = "AP2_GPS_PPS", + .pin = { + .gpio = AT91_PIN_PA6, + .flags = GPIOF_IN, + .label = "ap2-gps-pps", + } + }, + { }, }; @@ -162,7 +278,6 @@ static struct attribute *mtr2d2_platform_attributes[] = { &dev_attr_radio_reset.attr, &dev_attr_led_status.attr, - &dev_attr_led_wifi_gpio.attr, &dev_attr_led_cd_gpio.attr, &dev_attr_led_sig1_gpio.attr, &dev_attr_led_sig2_gpio.attr, @@ -173,40 +288,6 @@ static struct attribute *mtr2d2_platform_attributes[] = { &dev_attr_led_c_gpio.attr, &dev_attr_led_d_gpio.attr, &dev_attr_led_e_gpio.attr, - &dev_attr_led_f_gpio.attr, - - &dev_attr_board_temperature.attr, - - /* extra space for the accessory card attributes */ - NULL, // index 23 - NULL, // index 24 - NULL, // index 25 - NULL, // index 26 - NULL, // index 27 - NULL, // index 28 - NULL, // index 29 - NULL, // index 30 - NULL, // index 31 - NULL, // index 32 - NULL, // index 33 - NULL, // index 34 - NULL, // index 35 - NULL, // index 36 - NULL, // index 37 - NULL, // index 38 - NULL, // index 39 - NULL, // index 40 - NULL, // index 41 - NULL, // index 42 - NULL, // index 43 - NULL, // index 44 - NULL, // index 45 - NULL, // index 46 - NULL, // index 47 - NULL, // index 48 - NULL, // index 49 - NULL, // index 50 - NULL, // index 51 NULL, }; |