Add PWM control
This commit is contained in:
8
src/board/system76/galp3-c/include/board/pwm.h
Normal file
8
src/board/system76/galp3-c/include/board/pwm.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef _BOARD_PWM_H
|
||||
#define _BOARD_PWM_H
|
||||
|
||||
#include <ec/pwm.h>
|
||||
|
||||
void pwm_init(void);
|
||||
|
||||
#endif // _BOARD_PWM_H
|
@ -9,6 +9,7 @@
|
||||
#include <board/kbscan.h>
|
||||
#include <board/pmc.h>
|
||||
#include <board/ps2.h>
|
||||
#include <board/pwm.h>
|
||||
|
||||
void external_0(void) __interrupt(0) {
|
||||
printf("external_0\n");
|
||||
@ -40,8 +41,9 @@ void init(void) {
|
||||
kbc_init();
|
||||
pmc_init();
|
||||
kbscan_init();
|
||||
pwm_init();
|
||||
|
||||
//TODO: INTC, PECI, PWM, SMBUS
|
||||
//TODO: INTC, PECI, SMBUS
|
||||
|
||||
// PECI information can be found here: https://www.intel.com/content/dam/www/public/us/en/documents/design-guides/core-i7-lga-2011-guide.pdf
|
||||
}
|
||||
|
8
src/board/system76/galp3-c/pwm.c
Normal file
8
src/board/system76/galp3-c/pwm.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <board/pwm.h>
|
||||
|
||||
void pwm_init(void) {
|
||||
// Set T0CHSEL to TACH0A and T1CHSEL to TACH1A
|
||||
TSWCTLR = 0;
|
||||
// Turn on the CPU fan at full blast (temperature control TODO)
|
||||
DCR2 = 0xFF;
|
||||
}
|
Reference in New Issue
Block a user