From bae9f85ddbd2e62af1b47169cbfeb10b06d45e04 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 7 May 2018 14:18:13 -0700 Subject: devicetree: Add USB device type This commit adds support for describing USB ports in devicetree.cb. It allows a USB port location to be described in the tree with configuration information, and ACPI code to be generated that provides this information to the OS. A new scan_usb_bus() is added that will scan bridges for devices so a tree of ports and hubs can be created. The device address is computed with a 'port type' and a 'port id' which is flexible for SOC to handle depending on their specific USB setup and allows USB2 and USB3 ports to be described separately. For example a board may have devices on two ports, one with a USB2 device and one with a USB3 device, both of which are connected to an xHCI controller with a root hub: xHCI | RootHub | | USB2[0] USB3[2] device pci 14.0 on chip drivers/usb/acpi register "name" = ""Root Hub"" device usb 0.0 on chip drivers/usb/acpi register "name" = ""USB 2.0 Port 0"" device usb 2.0 on end end chip drivers/usb/acpi register "name" = ""USB 3.0 Port 2"" device usb 3.2 on end end end end end Change-Id: I64e6eba503cdab49be393465b535e139a8c90ef4 Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/26169 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- util/sconfig/sconfig.l | 1 + 1 file changed, 1 insertion(+) (limited to 'util/sconfig/sconfig.l') diff --git a/util/sconfig/sconfig.l b/util/sconfig/sconfig.l index 484843dd22..3af70f8951 100755 --- a/util/sconfig/sconfig.l +++ b/util/sconfig/sconfig.l @@ -40,6 +40,7 @@ domain {yylval.number=DOMAIN; return(BUS);} generic {yylval.number=GENERIC; return(BUS);} mmio {yylval.number=MMIO; return(BUS);} spi {yylval.number=SPI; return(BUS);} +usb {yylval.number=USB; return(BUS);} irq {yylval.number=IRQ; return(RESOURCE);} drq {yylval.number=DRQ; return(RESOURCE);} io {yylval.number=IO; return(RESOURCE);} -- cgit v1.2.3