oryp6: set USB port power

This commit is contained in:
Jeremy Soller 2020-06-18 16:10:58 -06:00
parent 9878a53f3e
commit a05cae6e52
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
3 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,8 @@ void board_init(void) {
gpio_set(&BT_EN, true); gpio_set(&BT_EN, true);
gpio_set(&WLAN_EN, true); gpio_set(&WLAN_EN, true);
gpio_set(&WLAN_PWR_EN, true); gpio_set(&WLAN_PWR_EN, true);
// Enable USB port power?
gpio_set(&USB_PWR_EN_N, false);
// Assert SMI#, SCI#, and SWI# // Assert SMI#, SCI#, and SWI#
gpio_set(&SCI_N, true); gpio_set(&SCI_N, true);
gpio_set(&SMI_N, true); gpio_set(&SMI_N, true);

View File

@ -27,6 +27,7 @@ struct Gpio __code SMI_N = GPIO(D, 4);
struct Gpio __code SUSB_N_PCH = GPIO(H, 6); struct Gpio __code SUSB_N_PCH = GPIO(H, 6);
struct Gpio __code SUSC_N_PCH = GPIO(H, 1); struct Gpio __code SUSC_N_PCH = GPIO(H, 1);
struct Gpio __code SWI_N = GPIO(B, 5); struct Gpio __code SWI_N = GPIO(B, 5);
struct Gpio __code USB_PWR_EN_N = GPIO(E, 3);
struct Gpio __code VA_EC_EN = GPIO(J, 4); // renamed to EC_SLP_SUS# struct Gpio __code VA_EC_EN = GPIO(J, 4); // renamed to EC_SLP_SUS#
struct Gpio __code WLAN_EN = GPIO(G, 1); struct Gpio __code WLAN_EN = GPIO(G, 1);
struct Gpio __code WLAN_PWR_EN = GPIO(A, 3); struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
@ -50,7 +51,7 @@ void gpio_init() {
GPDRG = 0x40; GPDRG = 0x40;
GPDRH = 0x00; GPDRH = 0x00;
GPDRI = 0x20; GPDRI = 0x20;
GPDRJ = 0x00; GPDRJ = 0x02;
// Set GPIO control // Set GPIO control
// EC_PWM_PIN_24 // EC_PWM_PIN_24
@ -200,7 +201,7 @@ void gpio_init() {
// LED_BAT_FULL // LED_BAT_FULL
GPCRJ0 = GPIO_OUT | GPIO_UP; GPCRJ0 = GPIO_OUT | GPIO_UP;
// KBC_MUTE# // KBC_MUTE#
GPCRJ1 = GPIO_IN; GPCRJ1 = GPIO_OUT;
// NC // NC
GPCRJ2 = GPIO_IN | GPIO_UP; GPCRJ2 = GPIO_IN | GPIO_UP;
// RGBKB-DET# // RGBKB-DET#

View File

@ -44,6 +44,7 @@ extern struct Gpio __code SUSC_N_PCH;
#define HAVE_SUSWARN_N 0 #define HAVE_SUSWARN_N 0
#define HAVE_SUS_PWR_ACK 0 #define HAVE_SUS_PWR_ACK 0
extern struct Gpio __code SWI_N; extern struct Gpio __code SWI_N;
extern struct Gpio __code USB_PWR_EN_N;
extern struct Gpio __code VA_EC_EN; extern struct Gpio __code VA_EC_EN;
extern struct Gpio __code WLAN_EN; extern struct Gpio __code WLAN_EN;
extern struct Gpio __code WLAN_PWR_EN; extern struct Gpio __code WLAN_PWR_EN;