coreboot-kgpe-d16/src
Duncan Laurie 70c86d9b26 acpi_device: Add support for writing ACPI SPI descriptors
Add required definitions to describe an ACPI SPI bus and a method to
write the SpiSerialBus() descriptor to the SSDT.

This will be used by device drivers to describe their SPI resources to
the OS.  SPI devices are not currently enumerated in the devicetree but
can be enumerated by device drivers directly.

generic.c:
  void acpi_fill_ssdt_generator(struct device *dev) {
    struct acpi_spi spi = {
      .device_select = dev->path->generic.device.id,
      .device_select_polarity = SPI_POLARITY_LOW,
      .spi_wire_mode = SPI_4_WIRE_MODE,
      .speed = 1000 * 1000; /* 1 mHz */
      .data_bit_length = 8,
      .clock_phase = SPI_CLOCK_PHASE_FIRST,
      .clock_polarity = SPI_POLARITY_LOW,
      .resource = acpi_device_path(dev->bus->dev)
    };
    ...
    acpi_device_write_spi(&spi);
    ...
  }

devicetree.cb:
  device pci 1e.2 on
    chip drivers/spi/generic
      device generic 0 on end
    end
  end

SSDT.dsl:
  SpiSerialBus (0, PolarityLow, FourWireMode, 8, ControllerInitiated,
                1000000, ClockPolarityLow, ClockPhaseFirst,
                "\\_SB.PCI0.SPI0", 0, ResourceConsumer)

Change-Id: I0ef83dc111ac6c19d68872ab64e1e5e3a7756cae
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14936
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-28 03:48:06 +02:00
..
acpi
arch acpi_device: Add support for writing ACPI SPI descriptors 2016-05-28 03:48:06 +02:00
commonlib cbfstool/fsp: Rename fsp1_1_relocate 2016-05-11 18:38:28 +02:00
console console/post: be explicit about conditional cmos_post_log() compiling 2016-05-25 18:04:11 +02:00
cpu AGESA vendorcode: Build a common amdlib 2016-05-18 10:44:43 +02:00
device device: Add an ACPI device name and path concept to devices 2016-05-21 05:59:52 +02:00
drivers drivers/intel/fsp2_0: Send post codes around calls to the blobs 2016-05-26 23:50:02 +02:00
ec ec/google/chromeec/acpi: Add MKBP support 2016-05-18 20:22:38 +02:00
include acpi_device: Add support for writing ACPI I2C descriptors 2016-05-28 03:47:09 +02:00
lib program.ld: Don't exclude sbe region from verstage 2016-05-21 06:04:32 +02:00
mainboard mainboard/google/reef: increase BIOS region size 2016-05-27 19:55:30 +02:00
northbridge intel/sch: Merge northbridge and southbridge in src/soc 2016-05-17 21:38:17 +02:00
soc soc/intel/apollolake: provide SMM dependency requirements 2016-05-27 19:56:01 +02:00
southbridge AGESA vendorcode: Build a common amdlib 2016-05-18 10:44:43 +02:00
superio sio/winbond: Expose enter/exit configuration state functions 2016-05-20 04:11:58 +02:00
vendorcode vendorcode/google/chromeos/vboot2: use cbmem for postcar region selection 2016-05-25 18:04:30 +02:00
Kconfig src/Kconfig: Move acpi Kconfig below chipset Kconfigs 2016-05-19 19:29:59 +02:00