Felix Held | 3f3eca9 | 2020-01-23 17:12:32 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Yinghai Lu | bc7ceb1 | 2007-02-03 15:28:20 +0000 | [diff] [blame] | 2 | |
Edward O'Callaghan | 9e308b9 | 2014-04-27 23:28:31 +1000 | [diff] [blame] | 3 | #ifndef SUPERIO_WINBOND_W83627EHG_H |
| 4 | #define SUPERIO_WINBOND_W83627EHG_H |
Stefan Reinauer | bb33fbe | 2010-05-18 16:24:07 +0000 | [diff] [blame] | 5 | |
Elyes HAOUAS | e8fcf1b | 2020-03-30 16:47:28 +0200 | [diff] [blame] | 6 | #define W83627EHG_FDC 0 /* Floppy */ |
| 7 | #define W83627EHG_PP 1 /* Parallel port */ |
| 8 | #define W83627EHG_SP1 2 /* Com1 */ |
| 9 | #define W83627EHG_SP2 3 /* Com2 */ |
| 10 | #define W83627EHG_KBC 5 /* PS/2 keyboard & mouse */ |
| 11 | #define W83627EHG_WDTO_PLED 8 /* Watchdog timer timeout, power LED */ |
| 12 | #define W83627EHG_ACPI 10 /* ACPI */ |
| 13 | #define W83627EHG_HWM 11 /* Hardware monitor */ |
Yinghai Lu | bc7ceb1 | 2007-02-03 15:28:20 +0000 | [diff] [blame] | 14 | |
Uwe Hermann | 3a4ed15 | 2010-12-05 22:36:14 +0000 | [diff] [blame] | 15 | /* The following are handled using "virtual LDNs" (hence the _V suffix). */ |
Elyes HAOUAS | e8fcf1b | 2020-03-30 16:47:28 +0200 | [diff] [blame] | 16 | #define W83627EHG_SFI_V 6 /* Serial flash interface (SFI) */ |
| 17 | #define W83627EHG_GPIO_GAME_MIDI_V 7 /* GPIO1, GPIO6, game port, MIDI */ |
| 18 | #define W83627EHG_GPIO_SUSLED_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5, SUSLED */ |
Uwe Hermann | 3a4ed15 | 2010-12-05 22:36:14 +0000 | [diff] [blame] | 19 | |
Uwe Hermann | 340fa93 | 2010-11-10 14:53:36 +0000 | [diff] [blame] | 20 | /* |
| 21 | * Virtual devices sharing the enables are encoded as follows: |
Zheng Bao | 9db833b | 2009-12-28 09:59:44 +0000 | [diff] [blame] | 22 | * VLDN = baseLDN[7:0] | [10:8] bitpos of enable in 0x30 of baseLDN |
| 23 | */ |
Rudolf Marek | 8dcab78 | 2008-02-18 20:37:49 +0000 | [diff] [blame] | 24 | |
Uwe Hermann | 3a4ed15 | 2010-12-05 22:36:14 +0000 | [diff] [blame] | 25 | /* SFI has bit 1 as enable (instead of bit 0 as usual). */ |
| 26 | #define W83627EHG_SFI ((1 << 8) | W83627EHG_SFI_V) |
Rudolf Marek | 8dcab78 | 2008-02-18 20:37:49 +0000 | [diff] [blame] | 27 | |
Uwe Hermann | 3a4ed15 | 2010-12-05 22:36:14 +0000 | [diff] [blame] | 28 | #define W83627EHG_GPIO1 ((0 << 8) | W83627EHG_GPIO_GAME_MIDI_V) |
| 29 | #define W83627EHG_GAME ((1 << 8) | W83627EHG_GPIO_GAME_MIDI_V) |
| 30 | #define W83627EHG_MIDI ((2 << 8) | W83627EHG_GPIO_GAME_MIDI_V) |
| 31 | #define W83627EHG_GPIO6 ((3 << 8) | W83627EHG_GPIO_GAME_MIDI_V) |
| 32 | |
| 33 | #define W83627EHG_GPIO2 ((0 << 8) | W83627EHG_GPIO_SUSLED_V) |
| 34 | #define W83627EHG_GPIO3 ((1 << 8) | W83627EHG_GPIO_SUSLED_V) |
| 35 | #define W83627EHG_GPIO4 ((2 << 8) | W83627EHG_GPIO_SUSLED_V) |
| 36 | #define W83627EHG_GPIO5 ((3 << 8) | W83627EHG_GPIO_SUSLED_V) |
Stefan Reinauer | 80d9804 | 2010-04-30 20:44:30 +0000 | [diff] [blame] | 37 | |
Edward O'Callaghan | 9e308b9 | 2014-04-27 23:28:31 +1000 | [diff] [blame] | 38 | #endif /* SUPERIO_WINBOND_W83627EHG_H */ |