NCT5525D Super I/O
The Super I/O has the ID 0xd293 and the source can be found in
src/superio/nuvoton/nct5525d/.
Logical devices
These logical devices are switched with device pnp <port>.<ldn> on|off
below the chip superio/nuvoton/nct5525d entry:
Path |
Function |
|
|---|---|---|
|
UART A |
CR30[0] |
|
Keyboard controller |
CR30[0] |
|
Hardware monitor, SMBus master, LED |
CR30[0] |
|
Deep S5 |
LDN 16 CR30[0] |
Logical devices that aren’t in the devicetree are left untouched. Several
settings of this chip, like Deep S5 (2e.16), are battery-backed.
Pin configuration
The multi-function pins are only programmed when the chip ID matches:
Register |
Description |
|---|---|
|
|
|
Route pins 39/40 to TSIC/TSID for AMD SB-TSI |
|
GP60-GP64 and GP66 as input or output, see the example |
Only the GPIO6 pins are supported, so gpio[] has one entry per GPIO6 pin.
A pin configured in gpio[] is switched from its default function to GPIO:
GPIO |
Pin |
Default function |
|---|---|---|
|
33 |
PSON# |
|
34 |
SLP_S3# |
|
36 |
RSMRST# |
|
46 |
SDA |
|
48 |
SCL |
|
56 |
THERMTRIP# |
register "pins_46_48" = "NCT5525D_PINS_46_48_GPIO"
register "gpio[0]" = "{ .pin = NCT5525D_GP64, .mode = NCT5525D_GPIO_OUTPUT_HIGH,
.push_pull = true }"
Hardware monitor
The hardware monitor is programmed when 2e.b is on and has its base
in io 0x60. The temperature sensor types are set with systin_type,
cputin_type and auxtin_type: NCT5525D_SENSOR_DIODE (thermal diode,
voltage mode) or NCT5525D_SENSOR_DIODE_CURRENT (CPU thermal diode or
diode-connected transistor such as a 2N3904, current mode).
SB-TSI agent 0 is enabled with tsi_agent0_enable, which needs tsi_pins
and the SMBus master base in io 0x62. On eSPI, the SMBus master base needs
an I/O decode range of 0x20 bytes.
SYSFAN and CPUFAN can run in SMART FAN IV mode, configured with a
struct nct5525d_fan_config in the sysfan or cpufan register:
Field |
Description |
|---|---|
|
Fan control mode, |
|
Fan output type, |
|
Temperature source, |
|
Curve, in degrees C and duty cycle 0-255 |
|
Lowest duty cycle |
|
Step times in 0.1 s |
|
Critical temperature, full speed above |
For an SB-TSI source (NCT5525D_TEMP_SMBUSMASTER0), the fan control uses the
raw SB-TSI value. When an AMD processor uses its extended temperature range
(-49 to 206.875 degrees C), that value is the temperature plus 49 degrees C, so
the driver adds 49 to the configured temperatures. The fan control temperature
registers are signed, so thresholds are limited to 127 degrees C, which is 78
degrees C for an SB-TSI source in the extended range. Higher values are capped.
Example:
chip superio/nuvoton/nct5525d
register "cputin_type" = "NCT5525D_SENSOR_DIODE_CURRENT"
register "cpufan" = "{
.mode = NCT5525D_FAN_SMART_FAN_IV,
.source = NCT5525D_TEMP_CPUTIN,
.temp = { 55, 60, 65, 70 },
.curve_duty = { 0x4d, 0x80, 0xb3, 0xff },
.stop_duty_en = true,
.stop_duty = 0x4d,
.crit_temp = 80,
}"
device pnp 2e.b on
io 0x60 = 0x290
end
end
For developers
The Super I/O generates ACPI using the SSDT generator for generic SuperIOs for the hardware monitor.