/** @file
  Differentiated System Description Table Fields (DSDT)

  Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
  Copyright (c) 2015-2016, Hisilicon Limited. All rights reserved.<BR>
  Copyright (c) 2015-2016, Linaro Limited. All rights reserved.<BR>
    SPDX-License-Identifier: BSD-2-Clause-Patent

  Based on the files under ArmPlatformPkg/ArmJunoPkg/AcpiTables/

**/

//#include "ArmPlatform.h"
Scope(_SB)
{
  Device (USB0)
  {
    Name (_HID, "PNP0D20")  // _HID: Hardware ID
    Name (_CID, "HISI0D2" /* EHCI USB Controller without debug */)  // _CID: Compatible ID
    Name (_CCA, One)  // _CCA: Cache Coherency Attribute
    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
    {
      Name (RBUF, ResourceTemplate ()
      {
        Memory32Fixed (ReadWrite,
            0xa7020000,         // Address Base
            0x00010000,         // Address Length
            )
        Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI5")
        {
          641,
        }
      })
      Return (RBUF) /* \_SB_.USB0._CRS.RBUF */
    }

    Device (RHUB)
    {
      Name (_ADR, Zero)  // _ADR: Address
      Device (PRT1)
      {
        Name (_ADR, One)  // _ADR: Address
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
          0xFF,
          Zero,
          Zero,
          Zero
        })
        Name (_PLD, Package (0x01)  // _PLD: Physical Location of Device
        {
          ToPLD (
            PLD_Revision       = 0x1,
            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 = "UPPER",
            PLD_HorizontalPosition = "LEFT",
            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)
        })
      }

      Device (PRT2)
      {
        Name (_ADR, 0x02)  // _ADR: Address
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
          Zero,
          0xFF,
          Zero,
          Zero
        })
      }

      Device (PRT3)
      {
        Name (_ADR, 0x03)  // _ADR: Address
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
          Zero,
          0xFF,
          Zero,
          Zero
        })
      }

      Device (PRT4)
      {
        Name (_ADR, 0x04)  // _ADR: Address
        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
        {
          Zero,
          0xFF,
          Zero,
          Zero
        })
      }
    }
  }
}

