Add a new wireless object for controlling WLAN power state. Change the power sequence to enable WLAN at board init and disable it at power off. Newer galp5 units sold to customers have an issue where they do not fully power off. This is apparently somehow caused by `WLAN_PWR_EN`. The unit received for development do not have this issue. Signed-off-by: Tim Crawford <tcrawford@system76.com>
25 lines
561 B
C
25 lines
561 B
C
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include <board/board.h>
|
|
#include <board/gpio.h>
|
|
#include <board/wireless.h>
|
|
|
|
void board_init(void) {
|
|
// Allow CPU to boot
|
|
gpio_set(&SB_KBCRST_N, true);
|
|
// Allow backlight to be turned on
|
|
gpio_set(&BKL_EN, true);
|
|
// Enable camera
|
|
gpio_set(&CCD_EN, true);
|
|
// Enable right USB port
|
|
gpio_set(&USB_PWR_EN_N, false);
|
|
// Assert SMI#, SCI#, and SWI#
|
|
gpio_set(&SCI_N, true);
|
|
gpio_set(&SMI_N, true);
|
|
gpio_set(&SWI_N, true);
|
|
|
|
wireless_power(true);
|
|
}
|
|
|
|
void board_event(void) {}
|