Author: blogic
Date: 2015-10-26 10:17:51 +0100 (Mon, 26 Oct 2015)
New Revision: 47267

Modified:
   
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
   
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
Log:
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 <[email protected]>

Backport of r47261

Modified: 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
  2015-10-26 09:02:09 UTC (rev 47266)
+++ 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
  2015-10-26 09:17:51 UTC (rev 47267)
@@ -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)

Modified: 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
  2015-10-26 09:02:09 UTC (rev 47266)
+++ 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
  2015-10-26 09:17:51 UTC (rev 47267)
@@ -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 @@
        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);
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to