summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io-module/mts_io.c61
-rw-r--r--io-module/mts_io.h3
2 files changed, 64 insertions, 0 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index b0b09e7..ba9996f 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -692,6 +692,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.active_low = 1,
},
{
+ .name = "LED3",
+ .attr_name = "led-b",
+ .pin = AT91_PIN_PC15,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ .active_low = 1,
+ },
+ {
.name = "LED4",
.attr_name = "led-cd",
.pin = AT91_PIN_PC20,
@@ -701,6 +710,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.active_low = 1,
},
{
+ .name = "LED4",
+ .attr_name = "led-c",
+ .pin = AT91_PIN_PC20,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ .active_low = 1,
+ },
+ {
.name = "LED6",
.attr_name = "led-sig1",
.pin = AT91_PIN_PC19,
@@ -710,6 +728,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.active_low = 1,
},
{
+ .name = "LED6",
+ .attr_name = "led-d",
+ .pin = AT91_PIN_PC19,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ .active_low = 1,
+ },
+ {
.name = "LED7",
.attr_name = "led-sig2",
.pin = AT91_PIN_PC18,
@@ -719,6 +746,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.active_low = 1,
},
{
+ .name = "LED7",
+ .attr_name = "led-e",
+ .pin = AT91_PIN_PC18,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ .active_low = 1,
+ },
+ {
.name = "LED8",
.attr_name = "led-sig3",
.pin = AT91_PIN_PC17,
@@ -728,6 +764,15 @@ static struct gpio_pin gpio_pins_mtr_0_0[] = {
.active_low = 1,
},
{
+ .name = "LED8",
+ .attr_name = "led-f",
+ .pin = AT91_PIN_PC17,
+ .direction = GPIO_DIR_OUTPUT,
+ .output_value = 1,
+ .use_pullup = 0,
+ .active_low = 1,
+ },
+ {
.name = "RI_B",
.attr_name = "extserial-ri",
.pin = AT91_PIN_PC25,
@@ -2352,6 +2397,13 @@ static struct attribute *mtr_platform_attributes[] = {
&dev_attr_led_cd_gpio.attr,
&dev_attr_led_wifi_gpio.attr,
+ &dev_attr_led_a_gpio.attr,
+ &dev_attr_led_b_gpio.attr,
+ &dev_attr_led_c_gpio.attr,
+ &dev_attr_led_d_gpio.attr,
+ &dev_attr_led_e_gpio.attr,
+ &dev_attr_led_f_gpio.attr,
+
NULL,
};
@@ -2599,6 +2651,15 @@ static int mts_id_eeprom_load(void)
has_spi_dout = 0;
has_spi_temp = 1;
log_info("detected board %s", HW_VERSION_MTOCGD3_0_0);
+ } else if (strncmp(id_eeprom.hw_version, HW_VERSION_MTOCGD_0_0, strlen(HW_VERSION_MTOCGD_0_0)) == 0) {
+ attr_group = &mtr_platform_attribute_group;
+ gpio_pins = gpio_pins_mtr_0_0;
+ mts_product_id = MTOCGD_0_0;
+ has_spi_sout = 0;
+ has_spi_din = 0;
+ has_spi_dout = 0;
+ has_spi_temp = 0;
+ log_info("detected board %s", HW_VERSION_MTOCGD_0_0);
} else {
attr_group = &mtcdp_platform_attribute_group;
gpio_pins = gpio_pins_mtcdp_1_0;
diff --git a/io-module/mts_io.h b/io-module/mts_io.h
index a8d302e..30b794d 100644
--- a/io-module/mts_io.h
+++ b/io-module/mts_io.h
@@ -31,6 +31,7 @@ struct device_attribute _dev_name = { \
#define PRODUCT_ID_MTR2 "MTR2"
#define PRODUCT_ID_MTR "MTR"
#define PRODUCT_ID_MTOCGD3 "MTOCGD3"
+#define PRODUCT_ID_MTOCGD "MTOCGD"
#define HW_VERSION_MTCBA2_2_0 "MTCBA2-2.0"
#define HW_VERSION_MTCDP_0_0 "MTCDP-0.0"
@@ -40,6 +41,7 @@ struct device_attribute _dev_name = { \
#define HW_VERSION_MTR_0_0 "MTR-0.0"
#define HW_VERSION_MTR_0_1 "MTR-0.1"
#define HW_VERSION_MTOCGD3_0_0 "MTOCGD3-0.0"
+#define HW_VERSION_MTOCGD_0_0 "MTOCGD-0.0"
enum {
MTCDP_E1_DK_0_0,
@@ -49,6 +51,7 @@ enum {
MTR_0_0,
MTR_0_1,
MTOCGD3_0_0,
+ MTOCGD_0_0,
};
#define DEVICE_CAPA_INDEX(c) (((c) & 0xFF) >> 3)