5.1.2 ATWILC1000/3000 Power ON

To turn ON the chip, set the CHIP_EN and RESET low, then set the CHIP_EN line high, then set the RESET high with a 5 ms delay.

Note: For the power-up sequence, the chip must be set to power-off, then set to power-on together. Applicable for WILC1000 and 3000 devices.

A reference power control API implementation is provided below.

void wilc_wlan_power(struct wilc *wilc, bool on)
	if (!gpio_is_valid(wilc->power.gpios.chip_en) ||
	    !gpio_is_valid(wilc->power.gpios.reset)) {
		/* In case SDIO power sequence driver is used to power this
		 * device then the powering sequence is handled by the bus
		 * via pm_runtime_* functions. */
		return;
	}

	if (on) {
		gpio_direction_output(wilc->power.gpios.chip_en, 1);
		mdelay(5);
		gpio_direction_output(wilc->power.gpios.reset, 1);
	} else {
		gpio_direction_output(wilc->power.gpios.chip_en, 0);
		gpio_direction_output(wilc->power.gpios.reset, 0);
	}
}