Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IT8785E #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* IT8781F Super I/O chip w/LPC interface
* IT8782F Super I/O chip w/LPC interface
* IT8783E/F Super I/O chip w/LPC interface
* IT8785E Super I/O chip w/LPC interface
* IT8786E Super I/O chip w/LPC interface
* IT8790E Super I/O chip w/LPC interface
* IT8792E Super I/O chip w/LPC interface
Expand Down Expand Up @@ -80,7 +81,7 @@

enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732,
it8736, it8738,
it8771, it8772, it8781, it8782, it8783, it8786, it8790,
it8771, it8772, it8781, it8782, it8783, it8785, it8786, it8790,
it8792, it8603, it8606, it8607, it8613, it8620, it8622, it8625,
it8628, it8655, it8665, it8686, it8688, it8689, it87952 };

Expand Down Expand Up @@ -173,6 +174,7 @@ static inline void superio_exit(int ioreg, bool noexit)
#define IT8781F_DEVID 0x8781
#define IT8782F_DEVID 0x8782
#define IT8783E_DEVID 0x8783
#define IT8785E_DEVID 0x8785
#define IT8786E_DEVID 0x8786
#define IT8790E_DEVID 0x8790
#define IT8603E_DEVID 0x8603
Expand Down Expand Up @@ -570,6 +572,17 @@ static const struct it87_devices it87_devices[] = {
.num_temp_map = 3,
.old_peci_mask = 0x4,
},
[it8785] = {
.name = "it8785",
.model = "IT8785E",
.features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
| FEAT_TEMP_PECI | FEAT_IN7_INTERNAL
| FEAT_PWM_FREQ2 | FEAT_FANCTL_ONOFF,
.num_temp_limit = 3,
.num_temp_offset = 3,
.num_temp_map = 3,
.peci_mask = 0x07,
},
[it8786] = {
.name = "it8786",
.model = "IT8786E",
Expand Down Expand Up @@ -3187,6 +3200,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,
case IT8783E_DEVID:
sio_data->type = it8783;
break;
case IT8785E_DEVID:
sio_data->type = it8785;
break;
case IT8786E_DEVID:
sio_data->type = it8786;
break;
Expand Down Expand Up @@ -3722,7 +3738,10 @@ static int __init it87_find(int sioaddr, unsigned short *address,
sio_data->skip_fan |= BIT(2);

/* Check if fan2 is there or not */
reg = superio_inb(sioaddr, IT87_SIO_GPIO5_REG);
if (sio_data->type == it8785)
reg = superio_inb(sioaddr, IT87_SIO_GPIO4_REG);
else
reg = superio_inb(sioaddr, IT87_SIO_GPIO5_REG);
if (reg & BIT(1))
sio_data->skip_pwm |= BIT(1);
if (reg & BIT(2))
Expand Down