ar71xx: add support for RB750r2
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / mach-rbspi.c
index 81659ef5035611c3ef6fd3384668ee632a0f440a..c0b27190fecca14b9da72e0d70954bd0c6acbd8a 100644 (file)
@@ -5,6 +5,7 @@
  *  - MikroTik RouterBOARD 941L-2nD
  *  - MikroTik RouterBOARD 951Ui-2nD
  *  - MikroTik RouterBOARD 750UP r2
+ *  - MikroTik RouterBOARD 750 r2
  *
  *  Copyright (C) 2017 Thibaut VARENE <varenet@parisc-linux.org>
  *
@@ -472,18 +473,22 @@ static void __init rb952_setup(void)
 }
 
 /*
- * Init the hEX PoE lite hardware.
+ * Init the hEX (PoE) lite hardware.
  * The 750UP r2 (hEX PoE lite) is nearly identical to the hAP, only without
- * WLAN.
+ * WLAN. The 750 r2 (hEX lite) is nearly identical to the 750UP r2, only
+ * without USB and POE. It shares the same bootloader board identifier.
  */
 static void __init rb750upr2_setup(void)
 {
-       u32 flags = RBSPI_HAS_WAN4 | RBSPI_HAS_USB |
-                       RBSPI_HAS_SSR | RBSPI_HAS_POE;
+       u32 flags = RBSPI_HAS_WAN4 | RBSPI_HAS_SSR;
 
        if (rbspi_platform_setup())
                return;
 
+       /* differentiate the hEX lite from the hEX PoE lite */
+       if (strstr(mips_get_machine_name(), "750UP r2"))
+               flags |= RBSPI_HAS_USB | RBSPI_HAS_POE;
+
        rbspi_952_750r2_setup(flags);
 }