blob: 11a0a88154a260f4c74c6a12cbd1395617feba29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# NPCD378
This page describes the [Nuvoton] SuperIO chip that can be found on various [HP]
mainboards.
As no datasheet is available most of the functions have been reverse engineered and
might be inaccurate or wrong.
## LDNs
```eval_rst
+-------+---------------------------+
| LDN # | Function |
+=======+===========================+
| 0 | FDC |
+-------+---------------------------+
| 1 | Parallel Port |
+-------+---------------------------+
| 2 | Com1 |
+-------+---------------------------+
| 3 | Com2 / IR |
+-------+---------------------------+
| 4 | LED and PWR button CTRL |
+-------+---------------------------+
| 5 | PS/2 AUX |
+-------+---------------------------+
| 6 | PS/2 KB |
+-------+---------------------------+
| 7 | WDT1 |
+-------+---------------------------+
| 8 | HWM |
+-------+---------------------------+
| 0xf | GPIO |
+-------+---------------------------+
| 0x15 | I2C ? |
+-------+---------------------------+
| 0x1e | SUSPEND CTL ? |
+-------+---------------------------+
| 0x1c | GPIO ? |
+-------+---------------------------+
```
### LDN0
Follows [Nuvoton]'s default FDC register set. See [NCT6102D] for more details.
### LDN1
Follows [Nuvoton]'s default LPT register set. See [NCT6102D] for more details.
### LDN2
Follows [Nuvoton]'s default COM1 register set. See [NCT6102D] for more details.
### LDN3
Follows [Nuvoton]'s default COM2 register set. See [NCT6102D] for more details.
### LDN4
On most SuperIOs the use of LDN4 is forbidden. That's not the case on NPCD378.
It exposes 16 byte of IO config space to control the front LEDs PWM duty cycle
and power button behaviour on normal / during S3 resume.
### LDN5
A custom PS/2 AUX port.
### LDN6
Follows [Nuvoton]'s default KBC register set. See [NCT6102D] for more details.
### LDN7
Looks like a WDT.
### LDN8
Custom HWM space. It exposes 256 byte of IO config space.
See [HWM](#HWM) for more details.
## HWM
### Register
The registers are accessible via IO space and are located at LDN8's IOBASE.
```eval_rst
+---------------+-----------------------+
| IOBASE offset | Register |
+---------------+-----------------------+
| 0x4 | Host Write CTRL |
+---------------+-----------------------+
| 0x10 - 0xfe | HWM Page # |
+---------------+-----------------------+
| 0xff | Page index select |
+---------------+-----------------------+
```
### Host Write CTRL
Bit 0 must be cleared prior to writing any of the HWM register and it must be
set after writing to HWM register to signal the SuperIO that data has changed.
Reading register is possible at any time and doesn't need special locking.
### HWM Page
The SuperIO exposes 16 different pages. Nearly all registers are unknown.
**Page 1**
```eval_rst
+---------------+-----------------------+
| IOBASE offset | Register |
+---------------+-----------------------+
| 0x98 | PSU fan PWM |
+---------------+-----------------------+
```
### Page index
The 4 LSB of the page index register selects which HWM page is active.
A write takes effect immediately.
[NCT6102D]: https://www.nuvoton.com/resource-files/NCT6102D_NCT6106D_Datasheet_V1_0.pdf
[Nuvoton]: http://www.nuvoton.com/hq/
[HP]: https://www.hp.com/
|