mb/google/poppy/variant/nocturne: enable USB acpi

Main objective for this change is to export the bluetooth reset
gpio to the kernel for use in an rf-kill operation.
To do so, we enable USB acpi and define all of the USB2 devices,
which includes bluetooth's reset gpio information.

This change produces the following nodes in the SSDT :
    Scope (\_SB.PCI0.XHCI.RHUB.HS01)
    {
        Name (_DDN, "USB Type C Port 1")  // _DDN: DOS Device Name
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
            0xFF,
            0x09,
            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              = "OVAL",
            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)
        )  // _PLD: Physical Location of Device
    }

    Scope (\_SB.PCI0.XHCI.RHUB.HS03)
    {
        Name (_DDN, "Bluetooth")  // _DDN: DOS Device Name
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
            0xFF,
            0xFF,
            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        = 0x0,
            PLD_Dock               = 0x0,
            PLD_Lid                = 0x0,
            PLD_Panel              = "UNKNOWN",
            PLD_VerticalPosition   = "CENTER",
            PLD_HorizontalPosition = "CENTER",
            PLD_Shape              = "UNKNOWN",
            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)
        )  // _PLD: Physical Location of Device
        Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
        {
            GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                "\\_SB.PCI0.GPIO", 0x00, ResourceConsumer, ,
                )
                {   // Pin list
                    0x0062
                }
        })
        Name (_DSD, Package (0x02)  // _DSD: Device-Specific Data
        {
            ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
            Package (0x01)
            {
                Package (0x02)
                {
                    "reset-gpio",
                    Package (0x04)
                    {
                        \_SB.PCI0.XHCI.RHUB.HS03,
                        Zero,
                        Zero,
                        One
                    }
                }
            }
        })
    }

    Scope (\_SB.PCI0.XHCI.RHUB.HS05)
    {
        Name (_DDN, "USB Type C Port 2")  // _DDN: DOS Device Name
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
            0xFF,
            0x09,
            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              = "OVAL",
            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)
        )  // _PLD: Physical Location of Device
    }

    Scope (\_SB.PCI0.XHCI.RHUB.HS07)
    {
        Name (_DDN, "POGO")  // _DDN: DOS Device Name
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
            0xFF,
            0xFF,
            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        = 0x0,
            PLD_Dock               = 0x0,
            PLD_Lid                = 0x0,
            PLD_Panel              = "UNKNOWN",
            PLD_VerticalPosition   = "CENTER",
            PLD_HorizontalPosition = "CENTER",
            PLD_Shape              = "UNKNOWN",
            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)
        )  // _PLD: Physical Location of Device
    }

BUG=b:119275094
TEST=build and flash to nocturne, log into nocturne and
'cat /sys/firmware/acpi/tables/SSDT > /tmp/ssdt.dml', copy
that ssdt.dsml to /tmp/ssdt.dml on host machine,
'iasl -d /tmp/ssdt.dml', then verify that "reset gpio"
shows up in the HS03 node's _DSD package in the table.

Change-Id: I65d9b580fd69fd0a2c84f14b78a8e8b5e9217b16
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/29622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Rajat Jain <rajatja@google.com>
diff --git a/src/mainboard/google/poppy/variants/nocturne/devicetree.cb b/src/mainboard/google/poppy/variants/nocturne/devicetree.cb
index c798db5..1786502 100644
--- a/src/mainboard/google/poppy/variants/nocturne/devicetree.cb
+++ b/src/mainboard/google/poppy/variants/nocturne/devicetree.cb
@@ -280,7 +280,36 @@
 	device domain 0 on
 		device pci 00.0 on  end # Host Bridge
 		device pci 02.0 on  end # Integrated Graphics Device
-		device pci 14.0 on  end # USB xHCI
+
+		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 Type C Port 1""
+						register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
+						device usb 2.0 on end
+					end
+					chip drivers/usb/acpi
+						register "desc" = ""Bluetooth""
+						register "type" = "UPC_TYPE_INTERNAL"
+						register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E2)"
+						device usb 2.2 on end
+					end
+					chip drivers/usb/acpi
+						register "desc" = ""USB Type C Port 2""
+						register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
+						device usb 2.4 on end
+					end
+					chip drivers/usb/acpi
+						register "desc" = ""POGO""
+						register "type" = "UPC_TYPE_INTERNAL"
+						device usb 2.6 on end
+					end
+				end
+			end
+		end # USB xHCI
 		device pci 14.1 on  end # USB xDCI (OTG)
 		device pci 14.2 on  end # Thermal Subsystem
 		device pci 15.0 on