Timothy Pearson | 988ee17 | 2015-11-24 14:11:57 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2014 Felix Held <felix-coreboot@felixheld.de> |
Timothy Pearson | bdd9df7 | 2016-04-06 23:56:51 -0500 | [diff] [blame] | 5 | * Copyright (C) 2015 - 2016 Raptor Engineering, LLC |
Timothy Pearson | 988ee17 | 2015-11-24 14:11:57 -0600 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
| 18 | #ifndef SUPERIO_WINBOND_W83667HG_A |
| 19 | #define SUPERIO_WINBOND_W83667HG_A |
| 20 | |
Timothy Pearson | 69088c2 | 2016-05-25 10:22:10 -0500 | [diff] [blame] | 21 | /* Pinmux configuration defines */ |
| 22 | #define W83667HG_SPI_PINMUX_OFFSET 0x2a |
| 23 | |
| 24 | #define W83667HG_SPI_PINMUX_GPIO4_SERIAL_B_MASK (1 << 2) |
| 25 | #define W83667HG_SPI_PINMUX_GPIO4 (0 << 2) |
| 26 | #define W83667HG_SPI_PINMUX_SERIAL_B (1 << 2) |
| 27 | |
Timothy Pearson | 988ee17 | 2015-11-24 14:11:57 -0600 | [diff] [blame] | 28 | /* Logical Device Numbers (LDN). */ |
| 29 | #define W83667HG_A_FDC 0x00 |
| 30 | #define W83667HG_A_PP 0x01 |
| 31 | #define W83667HG_A_SP1 0x02 /* Com1 */ |
| 32 | #define W83667HG_A_SP2 0x03 /* Com2 */ |
| 33 | #define W83667HG_A_KBC 0x05 |
| 34 | #define W83667HG_A_SPI 0x06 |
| 35 | #define W83667HG_A_GPIO6789_V 0x07 |
| 36 | #define W83667HG_A_WDT1 0x08 |
| 37 | #define W83667HG_A_GPIO2345_V 0x09 |
| 38 | #define W83667HG_A_ACPI 0x0A |
| 39 | #define W83667HG_A_HWM_TSI 0x0B /* HW monitor/SB-TSI/deep S5 */ |
| 40 | #define W83667HG_A_PECI 0x0C |
| 41 | #define W83667HG_A_VID_BUSSEL 0x0D /* VID and BUSSEL */ |
| 42 | #define W83667HG_A_GPIO_PP_OD 0x0F /* GPIO Push-Pull/Open drain select */ |
| 43 | |
Timothy Pearson | bdd9df7 | 2016-04-06 23:56:51 -0500 | [diff] [blame] | 44 | /* Virtual LDN for GPIO and SPI */ |
| 45 | #define W83667HG_A_SPI1 ((1 << 8) | W83667HG_A_SPI) |
Timothy Pearson | 988ee17 | 2015-11-24 14:11:57 -0600 | [diff] [blame] | 46 | #define W83667HG_A_GPIO1 ((1 << 8) | W83667HG_A_WDT1) |
| 47 | #define W83667HG_A_GPIO2 ((0 << 8) | W83667HG_A_GPIO2345_V) |
| 48 | #define W83667HG_A_GPIO3 ((1 << 8) | W83667HG_A_GPIO2345_V) |
| 49 | #define W83667HG_A_GPIO4 ((2 << 8) | W83667HG_A_GPIO2345_V) |
| 50 | #define W83667HG_A_GPIO5 ((3 << 8) | W83667HG_A_GPIO2345_V) |
| 51 | #define W83667HG_A_GPIO6 ((1 << 8) | W83667HG_A_GPIO6789_V) |
| 52 | #define W83667HG_A_GPIO7 ((2 << 8) | W83667HG_A_GPIO6789_V) |
| 53 | #define W83667HG_A_GPIO8 ((3 << 8) | W83667HG_A_GPIO6789_V) |
| 54 | #define W83667HG_A_GPIO9 ((4 << 8) | W83667HG_A_GPIO6789_V) |
| 55 | |
| 56 | #endif /* SUPERIO_WINBOND_W83667HG_A */ |