diff --git a/src/board/system76/galp3-c/gpio.c b/src/board/system76/galp3-c/gpio.c index 53e518b..a569254 100644 --- a/src/board/system76/galp3-c/gpio.c +++ b/src/board/system76/galp3-c/gpio.c @@ -80,7 +80,7 @@ void gpio_init() { GPCRH2 = 0x44; GPCRH3 = 0x44; GPCRH4 = 0x80; - GPCRH5 = 0x80; + GPCRH5 = 0x44; GPCRH6 = 0x80; GPCRH7 = 0x80; GPCRI0 = 0x00; @@ -108,6 +108,7 @@ void gpio_init() { GPCRM6 = 0x00; } +#if GPIO_DEBUG void gpio_debug_bank( char * bank, uint8_t data, @@ -142,3 +143,4 @@ void gpio_debug(void) { bank(J); #undef bank } +#endif diff --git a/src/board/system76/galp3-c/main.c b/src/board/system76/galp3-c/main.c index 0367335..b27fbfe 100644 --- a/src/board/system76/galp3-c/main.c +++ b/src/board/system76/galp3-c/main.c @@ -422,13 +422,17 @@ void main(void) { static struct Gpio __code SCI_N = GPIO(D, 4); static struct Gpio __code SWI_N = GPIO(E, 0); static struct Gpio __code SB_KBCRST_N = GPIO(E, 6); + static struct Gpio __code BT_EN = GPIO(F, 3); static struct Gpio __code PM_CLKRUN_N = GPIO(H, 0); static struct Gpio __code BKL_EN = GPIO(H, 2); + static struct Gpio __code WLAN_EN = GPIO(H, 5); // Set the battery full LED (to know our firmware is loading) gpio_set(&LED_BAT_CHG, true); +#if GPIO_DEBUG gpio_debug(); +#endif //battery_debug(); @@ -436,6 +440,9 @@ void main(void) { gpio_set(&SB_KBCRST_N, true); // Allow backlight to be turned on gpio_set(&BKL_EN, true); + // Enable wireless + gpio_set(&BT_EN, true); + gpio_set(&WLAN_EN, true); // Assert SMI#, SCI#, and SWI# gpio_set(&SCI_N, true); gpio_set(&SMI_N, true); diff --git a/src/board/system76/galp3-c/stdio.c b/src/board/system76/galp3-c/stdio.c index 3a57dbf..7ff7cf2 100644 --- a/src/board/system76/galp3-c/stdio.c +++ b/src/board/system76/galp3-c/stdio.c @@ -2,8 +2,13 @@ #include +#define I2C_DEBUGGER 0 +// #define I2C_DEBUGGER 0x76 + int putchar(int c) { unsigned char byte = (unsigned char)c; - i2c_send(0x76, &byte, 1); +#if I2C_DEBUGGER + i2c_send(I2C_DEBUGGER, &byte, 1); +#endif return (int)byte; }