summaryrefslogtreecommitdiff
path: root/io-module/mtcdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mtcdt.c')
-rw-r--r--io-module/mtcdt.c156
1 files changed, 140 insertions, 16 deletions
diff --git a/io-module/mtcdt.c b/io-module/mtcdt.c
index 0fca7aa..e8aed3b 100644
--- a/io-module/mtcdt.c
+++ b/io-module/mtcdt.c
@@ -145,7 +145,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP1_GPIO1",
.pin = {
.gpio = AT91_PIN_PC6,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio1",
},
.active_low = 1,
@@ -154,7 +154,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP1_GPIO2",
.pin = {
.gpio = AT91_PIN_PC7,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio2",
}
},
@@ -162,7 +162,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP1_GPIO3",
.pin = {
.gpio = AT91_PIN_PC8,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio3",
}
},
@@ -170,7 +170,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP1_GPIO4",
.pin = {
.gpio = AT91_PIN_PC9,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio4",
}
},
@@ -212,7 +212,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP2_GPIO1",
.pin = {
.gpio = AT91_PIN_PC20,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio1",
},
.active_low = 1,
@@ -221,7 +221,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP2_GPIO2",
.pin = {
.gpio = AT91_PIN_PC21,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio2",
}
},
@@ -229,7 +229,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP2_GPIO3",
.pin = {
.gpio = AT91_PIN_PC22,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio3",
}
},
@@ -237,7 +237,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_0[] = {
.name = "AP2_GPIO4",
.pin = {
.gpio = AT91_PIN_PC23,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio4",
}
},
@@ -403,7 +403,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP1_GPIO1",
.pin = {
.gpio = AT91_PIN_PC6,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio1",
},
.active_low = 1,
@@ -412,7 +412,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP1_GPIO2",
.pin = {
.gpio = AT91_PIN_PC7,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio2",
}
},
@@ -420,7 +420,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP1_GPIO3",
.pin = {
.gpio = AT91_PIN_PC8,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio3",
}
},
@@ -428,7 +428,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP1_GPIO4",
.pin = {
.gpio = AT91_PIN_PC9,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap1-gpio4",
}
},
@@ -471,7 +471,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP2_GPIO1",
.pin = {
.gpio = AT91_PIN_PC20,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio1",
},
.active_low = 1,
@@ -480,7 +480,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP2_GPIO2",
.pin = {
.gpio = AT91_PIN_PC21,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio2",
}
},
@@ -488,7 +488,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP2_GPIO3",
.pin = {
.gpio = AT91_PIN_PC22,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio3",
}
},
@@ -496,7 +496,7 @@ static struct gpio_pin gpio_pins_mtcdt_0_1[] = {
.name = "AP2_GPIO4",
.pin = {
.gpio = AT91_PIN_PC23,
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_IN,
.label = "ap2-gpio4",
}
},
@@ -650,6 +650,130 @@ static struct gpio_pin lora_h[3 /* Port */][3 /* Pin */] = {
{ },
};
+// GPIO Board
+static struct gpio_pin gpiob[3 /* Port */][5 /* Pin */] = {
+ { // port 1 of 2
+ {
+ .name = "AP1_GPIO1",
+ .pin = {
+ .gpio = AT91_PIN_PC6,
+ .flags = GPIOF_OUT_INIT_LOW,
+ .label = "ap1-gpio1",
+ },
+ .active_low = 1,
+ },
+ {
+ .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",
+ }
+ },
+ { },
+ }, // End of port 1
+// GPIOB AP2
+ { // Port 2 of 2
+ {
+ .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",
+ }
+ },
+ { },
+ }, // End of port 2
+ { },
+};
+
+
+// MFSER AP1
+static struct gpio_pin mfser[3 /* Port */][3 /* Pin */] = {
+ { // port 1 of 2
+ {
+ .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",
+ }
+ },
+ { },
+ }, // End of port 1
+// MFSER
+ { // Port 2 of 2
+ {
+ .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",
+ }
+ },
+ { },
+ }, // End of port 2
+ { },
+};
+
+
static DEVICE_ATTR_MTS(dev_attr_wifi_bt_lpwkup, "wifi-bt-lpwkup",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
static DEVICE_ATTR_MTS(dev_attr_wifi_bt_ulpwkup, "wifi-bt-ulpwkup",