blob: 6b54100536b221740ab6c70653356cf6a95dafcb [file] [log] [blame]
Furquan Shaikh20a91c92017-02-11 11:16:18 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2017 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __SPI_ACPI_CHIP_H__
17#define __SPI_ACPI_CHIP_H__
18
19#include <arch/acpi_device.h>
20
21struct drivers_spi_acpi_config {
22 const char *hid; /* ACPI _HID (required) */
23 const char *cid; /* ACPI _CID */
24 const char *name; /* ACPI Device Name */
25 const char *desc; /* Device Description */
26 unsigned uid; /* ACPI _UID */
Duncan Lauriec9db3842017-02-17 17:14:35 -080027 unsigned speed; /* Bus speed in Hz (default 1MHz) */
Furquan Shaikh20a91c92017-02-11 11:16:18 -080028 const char *compat_string; /* Compatible string for _HID=PRP0001 */
29 struct acpi_irq irq; /* Interrupt */
Duncan Lauriec9db3842017-02-17 17:14:35 -080030 unsigned wake; /* Wake GPE */
31
32 /* Use GPIO based interrupt instead of PIRQ */
33 struct acpi_gpio irq_gpio;
34
35 /* Disable reset and enable GPIO export in _CRS */
36 bool disable_gpio_export_in_crs;
37
38 /* Does the device have a power resource? */
39 bool has_power_resource;
40
41 /* GPIO used to take device out of reset or to put it into reset. */
42 struct acpi_gpio reset_gpio;
43 /* Delay to be inserted after device is taken out of reset. */
44 unsigned reset_delay_ms;
45
46 /* GPIO used to enable device. */
47 struct acpi_gpio enable_gpio;
48 /* Delay to be inserted after device is enabled. */
49 unsigned enable_delay_ms;
Furquan Shaikh20a91c92017-02-11 11:16:18 -080050};
51
52#endif /* __SPI_ACPI_CHIP_H__ */