diff options
author | John Crispin <blogic@openwrt.org> | 2015-10-26 09:01:28 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-10-26 09:01:28 +0000 |
commit | f539d3d452145090145a6bdc498577f47b1d0589 (patch) | |
tree | 4b5ebb94e75b32cfe668a537df5693ff996c1e00 /target/linux/ar71xx | |
parent | 8f3f905b91f165f8d8ffe0ab0edd6b45bb8e9495 (diff) | |
download | master-187ad058-f539d3d452145090145a6bdc498577f47b1d0589.tar.gz master-187ad058-f539d3d452145090145a6bdc498577f47b1d0589.tar.bz2 master-187ad058-f539d3d452145090145a6bdc498577f47b1d0589.zip |
ar71xx: Bitmain Antminer S1/S3 set GPIO for USB Power
Antminers using the stock bootloader will not hash without this GPIO set.
Applies to DD and CC
Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47261 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c index 880bc72e9d..0a81227b51 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c @@ -26,7 +26,7 @@ #define ANTMINER_S1_GPIO_LED_SYSTEM 23 #define ANTMINER_S1_GPIO_LED_WLAN 0 -#define ANTMINER_S1_GPIO_USB_POWER 8 +#define ANTMINER_S1_GPIO_USB_POWER 26 #define ANTMINER_S1_KEYSPOLL_INTERVAL 20 /* msecs */ #define ANTMINER_S1_KEYSDEBOUNCE_INTERVAL (3 * ANTMINER_S1_KEYSPOLL_INTERVAL) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c index aa54e9cafc..b77a6ccc4e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c @@ -25,6 +25,7 @@ #define ANTMINER_S3_GPIO_LED_WLAN 0 #define ANTMINER_S3_GPIO_LED_SYSTEM 17 #define ANTMINER_S3_GPIO_LED_LAN 22 +#define ANTMINER_S3_GPIO_USB_POWER 26 #define ANTMINER_S3_GPIO_BTN_RESET 11 @@ -81,6 +82,10 @@ static void __init antminer_s3_setup(void) ath79_register_gpio_keys_polled(-1, ANTMINER_S3_KEYSPOLL_INTERVAL, ARRAY_SIZE(ANTMINER_S3_GPIO_keys), ANTMINER_S3_GPIO_keys); + + gpio_request_one(ANTMINER_S3_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); ath79_register_usb(); ath79_register_m25p80(&ANTMINER_S3_flash_data); |