+/*
+ * Init the hAP mini hardware (QCA953x).
+ * The 931-2nD (hAP mini) has 3 ethernet ports, with port 2-3
+ * being assigned to LAN on the casing, and port 1 being assigned
+ * to "internet" (WAN) on the casing. Port 1 is connected to PHY2.
+ * Since WAN is neither PHY0 nor PHY4, we cannot use GMAC0 with this device.
+ */
+static void __init rb931_setup(void)
+{
+ u32 flags = RBSPI_HAS_WLAN0;
+
+ if (!rbspi_platform_setup())
+ return;
+
+ rbspi_peripherals_setup(flags);
+
+ /* GMAC1 is HW MAC, WLAN0 MAC is HW MAC + 3 */
+ rbspi_network_setup(flags, 0, 3, 0);
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(rb931_leds), rb931_leds);
+
+ /* hAP mini has two buttons */
+ ath79_register_gpio_keys_polled(-1, RBSPI_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(rb931_gpio_keys),
+ rb931_gpio_keys);
+}
+