coreboot/src/drivers
Duncan Laurie 4721f43390 drivers/usb/acpi: Add a driver for generating USB ACPI
Add a support for generating USB port descriptors for ACPI based
on their definition by the board in devicetree.cb.  This will
generate a _UPC and _PLD for each port, using a generic _PLD by
default.  The _PLD can also be customized for more accurate
descriptions if necessary.

This sample devictree.cb shows a USB 2.0 type-A port behind a root
hub connected to an xHCI controller:

device pci 14.0 on
  chip drivers/usb/acpi
    register "desc" = ""Root Hub""
    register "type" = "UPC_TYPE_HUB"
    device usb 0.0 on
      chip drivers/usb/acpi
        register "desc" = ""USB 2.0 Type-A""
        register "type" = "UPC_TYPE_A"
        device usb 2.0 on end
      end
    end
  end
end

It will generate the following ACPI code in the SSDT:

Scope (\_SB.PCI0.XHCI.RHUB.HS01)
{
  Name (_DDN, "USB 2.0 Type-A")
  Name (_UPC, Package (0x04)
  {
    0xFF,
    0x00,
    Zero,
    Zero
  })
  Name (_PLD, ToPLD (
    PLD_Revision           = 0x2,
    PLD_IgnoreColor        = 0x1,
    PLD_Red                = 0x0,
    PLD_Green              = 0x0,
    PLD_Blue               = 0x0,
    PLD_Width              = 0x0,
    PLD_Height             = 0x0,
    PLD_UserVisible        = 0x1,
    PLD_Dock               = 0x0,
    PLD_Lid                = 0x0,
    PLD_Panel              = "UNKNOWN",
    PLD_VerticalPosition   = "CENTER",
    PLD_HorizontalPosition = "CENTER",
    PLD_Shape              = "RECTANGLE",
    PLD_GroupOrientation   = 0x0,
    PLD_GroupToken         = 0x0,
    PLD_GroupPosition      = 0x0,
    PLD_Bay                = 0x0,
    PLD_Ejectable          = 0x0,
    PLD_EjectRequired      = 0x0,
    PLD_CabinetNumber      = 0x0,
    PLD_CardCageNumber     = 0x0,
    PLD_Reference          = 0x0,
    PLD_Rotation           = 0x0,
    PLD_Order              = 0x0,
    PLD_VerticalOffset     = 0x0,
    PLD_HorizontalOffset   = 0x0)
  )
}

Change-Id: I7024390e407fda4b195211bd4755bb5ca53b2b37
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/26173
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-18 12:22:50 +00:00
..
amd/agesa compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
ams include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
asmedia drivers/asmedia: Add ASPM blacklist 2018-04-27 09:17:52 +00:00
aspeed drivers/aspeed/ast2050: Get rid of device_t 2018-05-08 02:57:53 +00:00
ati/ragexl src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
emulation/qemu src/drivers: Add license headers 2017-06-12 04:08:14 +02:00
generic drivers/generic/bayhub: Add driver for BayHub BH720 2018-05-02 20:48:31 +00:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c drivers/i2c/da7219: Add mclk-name property 2018-05-04 10:04:37 +00:00
intel ACPI: Set the correct number of arguments in ACPI methods 2018-05-15 15:43:41 +00:00
ipmi src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
lenovo src/drivers/lenovo/wacom.c: Get rid of device_t 2018-05-04 10:20:03 +00:00
maxim include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
mrc_cache drivers/mrc_cache: Always generate an FMAP region 2018-01-20 16:11:44 +00:00
net drivers/net: Check "ethernet_mac" when the device index is 1 2018-05-15 11:14:54 +00:00
parade include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
pc80 drivers/pc80/tpm: get ioport from pnp records 2018-05-13 10:16:24 +00:00
ricoh/rce822 drivers/ricoh/rce822: Get rid of device_t 2018-05-04 10:20:37 +00:00
siemens/nc_fpga {device,drivers,lib,mb,nb}: Use only one space after 'if' 2018-05-09 13:11:04 +00:00
sil/3114 src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
spi src/drivers: Add reset/enable/stop_off_ms variables to ACPI devices 2018-05-02 20:44:24 +00:00
ti include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
uart drivers/uart/oxpcie.c: Get rid of device_t 2018-05-04 10:20:24 +00:00
usb drivers/usb/acpi: Add a driver for generating USB ACPI 2018-05-18 12:22:50 +00:00
xgi drivers/xgi/z9s: Get rid of device_t 2018-05-08 02:57:38 +00:00
xpowers/axp209 include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00