From patchwork Tue Aug 21 11:35:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 144713 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5155767ljj; Tue, 21 Aug 2018 04:36:00 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw1abnwtVGQ4uD2G8hgBTJpFm+c3WfY+zGPRQ6tpD752u6q+es1YaIWjc8mOBsY3bm2sKO1 X-Received: by 2002:aa7:818f:: with SMTP id g15-v6mr51817659pfi.71.1534851360119; Tue, 21 Aug 2018 04:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534851360; cv=none; d=google.com; s=arc-20160816; b=l/BWJkmqDWWod3pMA34Is6hByhVJnwNsouR4dzG0Uj6CXguoBYk+O4i6dpGTScBH2s K+60MRnJ4fl4XSmf9lIoXtUaXxJd8TzP+75ErREqRz6llzmR5qI+mxZxWJ7lsV2Wt0YC Cx6crq9qw7UAbCX++7l5OrbUDmq2JcJe8rCGWbo0Rj6OZGUTt4rgSkugRCiUeHGGF+Kk gf16b+URAXyYlbcF+rhCMY6aNRFrL6MKZoIKB5dRpXuykAAM8TyPg8UyJwSMUL7K1rVw LQJeQnA1FYNLAuo/ElnRfTH8UH41NZcVOuP1IBXir2fLxZcFcUrX4NtuQKW75r8how2o 2+YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=KRaQMmb+y8RTSn8imjv75YfoVOq8htZph3o1iZNcXOo=; b=GS4K6oko4ugUixjdkATZ1PyE5GBIQU8ku4UXcSFujmESbLHn5HHho1MKgSowdCqs7C dOFQUIuRb4uhuRWDG6FFX/FZRgvWLmQEVlYSqFVSE90/rB4RGztCubw0/s0ARlnprmOY WdrSpNkzOYngR5I+GQfglBtyTijv6jf9Jw9SMEvrjcBgmcXCaWbyFDmfY5Eiam8qMqFr dZpQJKWFydERPBq0OpyibHMrg3HXqrByt0dhvmbpwiXrknDzPh/h0roKQVPToblMnhSy 0jsVQV249AluSLwK8aTWZW+HsMIqEePswPQQbzCubwOKPxy5Y7hHNZI3H2vSqr2o6ZuD geqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kULbtpb6; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id q61-v6si12379428plb.231.2018.08.21.04.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 04:36:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kULbtpb6; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 19A8C210F93D7; Tue, 21 Aug 2018 04:35:56 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::542; helo=mail-pg1-x542.google.com; envelope-from=haojian.zhuang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CA001210F92B5 for ; Tue, 21 Aug 2018 04:35:54 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id h17-v6so2097671pgv.3 for ; Tue, 21 Aug 2018 04:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oM2CuTQ398BtmId27o9qnYp7mBshE6q7OnNqPiHrbhY=; b=kULbtpb6JvqsgeFtGpQ7ykH6a5Mk4AiLeJweyJUXTnsVAhb0+r+GIDi6FdnRC0gX7m lZUpve3fP6x8z7cH4liH8zd6ZwWnhAltg8btXh03PIpz00KQKWn9ip6Bib7Skr+NarPv G6YCP7g4uhi+qizlGNfom1c7WOQxfKN64NjDo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oM2CuTQ398BtmId27o9qnYp7mBshE6q7OnNqPiHrbhY=; b=s9lxOjI1Du2grSMnEkyG6A4w3VkirbtTaPK6+5bae/EyYoC8IoEBLtJM7Io6484fRh F+VRYXvjcqtqlgqDHbb6y/ALX/xfrhha1A8PrrdXTkNoyJmF3Nxw+PD9OnnvAGXKAh4k G+MRi5LB6Ss6lalZjDwRlfP0saSSSMnsYJ5kdPkOh6hHbap+BGkvKa9XwtZWk749BNN/ 4nMWS+7PL5z3HB8M4wpPLGk8pjtzHygHxdE9O0VKlraafKU8C0JGe7oWXDCTtFCKXF9+ dJQBEDQ6dlhNorBpDi+higurdaYuZAoTqQA0xsFPKDpQSdQ0NsuqAiC5EgzHsbgUYGuX JRyg== X-Gm-Message-State: AOUpUlEWfS2hn7eJMPLMXk5IMmuR8QC+LzRR03waaf0i9qkmLUGTnYOH YHkhLDmIrMQT7aON2rpn0+8F040aNf9aVg== X-Received: by 2002:a63:2fc6:: with SMTP id v189-v6mr46962518pgv.61.1534851353943; Tue, 21 Aug 2018 04:35:53 -0700 (PDT) Received: from localhost.localdomain ([64.64.108.219]) by smtp.gmail.com with ESMTPSA id s14-v6sm21678388pfj.105.2018.08.21.04.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Aug 2018 04:35:53 -0700 (PDT) From: Haojian Zhuang To: edk2-devel@lists.01.org Date: Tue, 21 Aug 2018 19:35:38 +0800 Message-Id: <1534851338-21419-5-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534851338-21419-1-git-send-email-haojian.zhuang@linaro.org> References: <1534851338-21419-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH edk-platforms v1 4/4] Platform/HiKey: enable usb driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Enable Designware USB 2.0 device driver on HiKey platform. It's used in Android Fastboot App. Cc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- Platform/Hisilicon/HiKey/HiKey.dec | 2 ++ Platform/Hisilicon/HiKey/HiKey.dsc | 13 +++++++++++++ Platform/Hisilicon/HiKey/HiKey.fdf | 3 +++ 3 files changed, 18 insertions(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Hisilicon/HiKey/HiKey.dec b/Platform/Hisilicon/HiKey/HiKey.dec index d5de1a165910..ed9eab7ff2a9 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dec +++ b/Platform/Hisilicon/HiKey/HiKey.dec @@ -36,3 +36,5 @@ [PcdsFixedAtBuild.common] gHiKeyTokenSpaceGuid.PcdAndroidBootFile|{ 0x36, 0x8b, 0x73, 0x3a, 0xc5, 0xb9, 0x63, 0x47, 0xab, 0xbd, 0x6c, 0xbd, 0x4b, 0x25, 0xf9, 0xff }|VOID*|0x00000002 gHiKeyTokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x00000003 gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L""|VOID*|0x00000004 + gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L""|VOID*|0x00000005 + gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|L""|VOID*|0x00000006 diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 4b5b73c15afe..93b981767681 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -53,12 +53,16 @@ [LibraryClasses.common] # USB Requirements UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf + UsbSerialNumberLib|Platform/Hisilicon/Library/UsbSerialNumberLib/UsbSerialNumberLib.inf + # Network Libraries NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf + DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf + [LibraryClasses.common.SEC] PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf @@ -85,6 +89,7 @@ [PcdsFeatureFlag.common] [PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4 + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|"hikey" gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha" # System Memory (1GB) @@ -126,6 +131,11 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 # + # DW USB controller + # + gDwUsbDxeTokenSpaceGuid.PcdDwUsbDxeBaseAddress|0xF72C0000 + + # # # Fastboot # @@ -222,6 +232,9 @@ [Components.common] # # USB Peripheral Support # + Platform/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf + EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf + Platform/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf # diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf b/Platform/Hisilicon/HiKey/HiKey.fdf index 89d3e9280ff6..aedf71667903 100644 --- a/Platform/Hisilicon/HiKey/HiKey.fdf +++ b/Platform/Hisilicon/HiKey/HiKey.fdf @@ -152,6 +152,9 @@ [FV.FvMain] # # USB Peripheral Support # + INF Platform/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf + INF EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf + INF Platform/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf #