blob: d4e711094da5925900be4277643fb3d92f33e906 [file] [log] [blame]
Timothy Pearson988ee172015-11-24 14:11:57 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Felix Held <felix-coreboot@felixheld.de>
Timothy Pearsonbdd9df72016-04-06 23:56:51 -05005 * Copyright (C) 2015 - 2016 Raptor Engineering, LLC
Timothy Pearson988ee172015-11-24 14:11:57 -06006 *
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 Pearson69088c22016-05-25 10:22:10 -050021/* 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 Pearson988ee172015-11-24 14:11:57 -060028/* 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 Pearsonbdd9df72016-04-06 23:56:51 -050044/* Virtual LDN for GPIO and SPI */
45#define W83667HG_A_SPI1 ((1 << 8) | W83667HG_A_SPI)
Timothy Pearson988ee172015-11-24 14:11:57 -060046#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 */