aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/at91/patches/600-usb_vbus_active_high.patch84
-rw-r--r--target/linux/at91/patches/700-tqma9263-support.patch25
2 files changed, 109 insertions, 0 deletions
diff --git a/target/linux/at91/patches/600-usb_vbus_active_high.patch b/target/linux/at91/patches/600-usb_vbus_active_high.patch
new file mode 100644
index 0000000000..0a55ac69a4
--- /dev/null
+++ b/target/linux/at91/patches/600-usb_vbus_active_high.patch
@@ -0,0 +1,84 @@
+--- a/arch/arm/mach-at91/at91cap9_devices.c
++++ b/arch/arm/mach-at91/at91cap9_devices.c
+@@ -77,7 +77,7 @@
+ /* Enable VBus control for UHP ports */
+ for (i = 0; i < data->ports; i++) {
+ if (data->vbus_pin[i])
+- at91_set_gpio_output(data->vbus_pin[i], 0);
++ at91_set_gpio_output(data->vbus_pin[i], data->vbus_active_high);
+ }
+
+ usbh_data = *data;
+--- a/arch/arm/mach-at91/at91sam9263_devices.c
++++ b/arch/arm/mach-at91/at91sam9263_devices.c
+@@ -71,7 +71,7 @@
+ /* Enable VBus control for UHP ports */
+ for (i = 0; i < data->ports; i++) {
+ if (data->vbus_pin[i])
+- at91_set_gpio_output(data->vbus_pin[i], 0);
++ at91_set_gpio_output(data->vbus_pin[i], data->vbus_active_high);
+ }
+
+ usbh_data = *data;
+--- a/arch/arm/mach-at91/at91sam9g45_devices.c
++++ b/arch/arm/mach-at91/at91sam9g45_devices.c
+@@ -119,7 +119,7 @@
+ /* Enable VBus control for UHP ports */
+ for (i = 0; i < data->ports; i++) {
+ if (data->vbus_pin[i])
+- at91_set_gpio_output(data->vbus_pin[i], 0);
++ at91_set_gpio_output(data->vbus_pin[i], data->vbus_active_high);
+ }
+
+ usbh_ohci_data = *data;
+@@ -174,7 +174,7 @@
+ /* Enable VBus control for UHP ports */
+ for (i = 0; i < data->ports; i++) {
+ if (data->vbus_pin[i])
+- at91_set_gpio_output(data->vbus_pin[i], 0);
++ at91_set_gpio_output(data->vbus_pin[i], data->vbus_active_high);
+ }
+
+ usbh_ehci_data = *data;
+--- a/arch/arm/mach-at91/include/mach/board.h
++++ b/arch/arm/mach-at91/include/mach/board.h
+@@ -93,8 +93,9 @@
+
+ /* USB Host */
+ struct at91_usbh_data {
+- u8 ports; /* number of ports on root hub */
+- u8 vbus_pin[2]; /* port power-control pin */
++ u8 ports; /* number of ports on root hub */
++ u8 vbus_pin[2]; /* port power-control pin */
++ u8 vbus_active_high; /* true == vbus_pins are active high */
+ };
+ extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
+ extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
+--- a/drivers/usb/host/ohci-at91.c
++++ b/drivers/usb/host/ohci-at91.c
+@@ -277,14 +277,13 @@
+ if (pdata) {
+ /* REVISIT make the driver support per-port power switching,
+ * and also overcurrent detection. Here we assume the ports
+- * are always powered while this driver is active, and use
+- * active-low power switches.
++ * are always powered while this driver is active.
+ */
+ for (i = 0; i < ARRAY_SIZE(pdata->vbus_pin); i++) {
+ if (pdata->vbus_pin[i] <= 0)
+ continue;
+ gpio_request(pdata->vbus_pin[i], "ohci_vbus");
+- gpio_direction_output(pdata->vbus_pin[i], 0);
++ gpio_direction_output(pdata->vbus_pin[i], pdata->vbus_active_high);
+ }
+ }
+
+@@ -301,7 +300,7 @@
+ for (i = 0; i < ARRAY_SIZE(pdata->vbus_pin); i++) {
+ if (pdata->vbus_pin[i] <= 0)
+ continue;
+- gpio_direction_output(pdata->vbus_pin[i], 1);
++ gpio_direction_output(pdata->vbus_pin[i], !pdata->vbus_active_high);
+ gpio_free(pdata->vbus_pin[i]);
+ }
+ }
diff --git a/target/linux/at91/patches/700-tqma9263-support.patch b/target/linux/at91/patches/700-tqma9263-support.patch
new file mode 100644
index 0000000000..941b4a6654
--- /dev/null
+++ b/target/linux/at91/patches/700-tqma9263-support.patch
@@ -0,0 +1,25 @@
+--- a/arch/arm/mach-at91/Kconfig
++++ b/arch/arm/mach-at91/Kconfig
+@@ -317,6 +317,12 @@
+ help
+ Select this if you are using the Adeneo Neocore 926 board.
+
++config MACH_TQMA9263
++ bool "TQ Components TQMa9263 board"
++ help
++ Select this if you are using the an TQ Components TQMa9263 board.
++ <http://www.tq-components.com/>
++
+ endif
+
+ # ----------------------------------------------------------
+--- a/arch/arm/mach-at91/Makefile
++++ b/arch/arm/mach-at91/Makefile
+@@ -55,6 +55,7 @@
+ obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
+ obj-$(CONFIG_MACH_USB_A9263) += board-usb-a9263.o
+ obj-$(CONFIG_MACH_NEOCORE926) += board-neocore926.o
++obj-$(CONFIG_MACH_TQMA9263) += board-tqma9263.o
+
+ # AT91SAM9RL board-specific support
+ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o