From patchwork Mon Aug 20 10:31:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 144568 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3797375ljj; Mon, 20 Aug 2018 03:32:13 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxIQ0fP5SXTFXgbb10WtEMI18BMbDrh0vhJfoaD2Evnr0QX8CEUkV0LmbjFyg0dI58oSMOb X-Received: by 2002:a62:ce05:: with SMTP id y5-v6mr47511825pfg.95.1534761132981; Mon, 20 Aug 2018 03:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534761132; cv=none; d=google.com; s=arc-20160816; b=j869k9Oaj0w9M4OaE64MKf+f7dy8EW+OhfvwOjoyg0ZtJs5Qw5dhbgn87McpSxPHCG 3aOEmXe24RrIcNUj9VrSyzcmjnKA7fbpCLdRSYZzNLwO6Db/VUIldyvemSID+kw0kgPM LWzVmyJRCz3WS2zlxJ1QzzGSNx6SkEV1xahSLpk5JxQ0VV8v2ucbAvjiAuKa+uD/ZgNU wpARf1j8qVgOPlniLWLRoMTY4ms+drvrk5x9jduvPAnZq9L27E+BNWjIHwy6TD4p9nD3 M5iUj96jId77G/PiNfXkXZ2z7VYMHRw4bc13dpmD82oJcCco7CpeuuisZlbdFkUMjh7D C5FQ== 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=ZDXLdiqz9lygGsCPgXf3eJDIfNJukQHBxaIZgb14+N8=; b=CptqdOhixs57bOmtFaZIbnzIj6f50gDs5CrIEgwy9ekk1YtkgNIosYlRENYW2y/+V6 FsXEHC39KXZHlf12Dh/yjwx7YHZU7LlRL4rtHxFgyAvw6YuoHIGkU7lbTSG5fLuMlJ1Q UnMhq7QjcC+JvOrSkOkkDdZOPG03UXqKEHJgwllmzoSzwZQRtStB7RI/YjkN1TTqbdes jCBjuckbvJ3GD+PRaDOc1iXCYuDvpzofUHHZazJKfOhpeEDE4YWcmLGZ9FKS2L6ziQKE vOiZ9DUk8lL6VjQlR1E+X2gPYKrY/7Q5kJ+eVdt7Kjmv2tRXssyDgb364O7LfAHJVPi1 avJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=FofU153r; 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 l7-v6si9113982pgm.677.2018.08.20.03.32.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 03:32:12 -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=FofU153r; 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 2C975210F6706; Mon, 20 Aug 2018 03:32:10 -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::444; helo=mail-pf1-x444.google.com; envelope-from=haojian.zhuang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 035E3210F4BDA for ; Mon, 20 Aug 2018 03:32:09 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id u24-v6so6537932pfn.13 for ; Mon, 20 Aug 2018 03:32:08 -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=xMbcXKoIFQzZxLJqi0x4i/ZhI8vQumjg0fFMsTobHN0=; b=FofU153rAyUU4YeJfkbktP2uMJVuXpPluo9aZxsQDAgJa4KR8YqcyPazmgGQlE/lNL R3kZ8RxgZkFeQ5ehheSXbyvQjsVgmTEgVnlpiBoIqBcpTOz62aH1cK4/dLjtPfP2xNzk H2PPXjHhM9Kir4Q6GvBILCcLFujzXp9ykC78c= 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=xMbcXKoIFQzZxLJqi0x4i/ZhI8vQumjg0fFMsTobHN0=; b=bnn1sO3BIx5+55HfNhbnG4Jchcm1gBPVrE/+55mW8FKTlJFE/laVsQ2ASyCT21UNOL JcjSbFXKMjYb4B79BVg77oe41ps1KuvQcVKMaFBDKX1u8itWToT5wubHuYyvw4pE8Ex1 UWb/OdoVM2WWkI17EE9gP3cLEbdd+LaLKveBS5YiVt8CtFEWREEfk3/LB1i82jiyge+g a4wXXx+YHD88HAMNdCy2en/4L9hB5w6PUXi8sP1VUReYEFv8j0XqubTGjK3Q6lio0L2k MalMzwI7ZRNAfjN9qK6pDKY7Oigi6N5pi8Q+Ng/ZZbnfYB8ISvV5oJCGxhJLVj9x5639 jPTA== X-Gm-Message-State: AOUpUlE965pOomkexCFqoZTyUObTi//0eRA5U+L7iaa49Vn3Mv4/17nY PlN5Mmjl0NlhdyxoMvlmsr+UVy7rjYKxIQ== X-Received: by 2002:a62:2c95:: with SMTP id s143-v6mr47532623pfs.3.1534761128449; Mon, 20 Aug 2018 03:32:08 -0700 (PDT) Received: from localhost.localdomain ([64.64.108.180]) by smtp.gmail.com with ESMTPSA id s195-v6sm24217163pgs.76.2018.08.20.03.32.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Aug 2018 03:32:07 -0700 (PDT) From: Haojian Zhuang To: edk2-devel@lists.01.org Date: Mon, 20 Aug 2018 18:31:49 +0800 Message-Id: <1534761109-27037-5-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534761109-27037-1-git-send-email-haojian.zhuang@linaro.org> References: <1534761109-27037-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH edk-platforms v1 4/4] Platform/HiKey960: enable usb device 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 3.0 device driver on HiKey960 platform. Android Fastboot application is based on the USB driver. Cc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- Platform/Hisilicon/HiKey960/HiKey960.dec | 3 +++ Platform/Hisilicon/HiKey960/HiKey960.dsc | 13 +++++++++++++ Platform/Hisilicon/HiKey960/HiKey960.fdf | 3 +++ 3 files changed, 19 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/HiKey960/HiKey960.dec b/Platform/Hisilicon/HiKey960/HiKey960.dec index aa5a0caf52e5..c925ae6c5eb5 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960.dec +++ b/Platform/Hisilicon/HiKey960/HiKey960.dec @@ -33,3 +33,6 @@ [PcdsFixedAtBuild.common] gHiKey960TokenSpaceGuid.PcdAndroidBootFile|{ 0x36, 0x8b, 0x73, 0x3a, 0xc5, 0xb9, 0x63, 0x47, 0xab, 0xbd, 0x6c, 0xbd, 0x4b, 0x25, 0xf9, 0xff }|VOID*|0x00000002 gHiKey960TokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x00000003 gHiKey960TokenSpaceGuid.PcdSdBootDevicePath|L""|VOID*|0x00000004 + gHiKey960TokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L""|VOID*|0x00000005 + gHiKey960TokenSpaceGuid.PcdArmFastbootFlashLimit|L""|VOID*|0x00000006 + gHiKey960TokenSpaceGuid.PcdXloaderDevicePath|L""|VOID*|0x00000007 diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dsc b/Platform/Hisilicon/HiKey960/HiKey960.dsc index 1ce306da5b50..2b65254ba255 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960.dsc +++ b/Platform/Hisilicon/HiKey960/HiKey960.dsc @@ -52,6 +52,8 @@ [LibraryClasses.common] # USB Requirements UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf + UsbSerialNumberLib|Platform/Hisilicon/Library/UsbSerialNumberLib/UsbSerialNumberLib.inf + # Network Libraries UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf @@ -59,6 +61,8 @@ [LibraryClasses.common] 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 @@ -82,6 +86,7 @@ [PcdsFeatureFlag.common] [PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4 + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|"hikey960" gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha" # System Memory (3GB) @@ -123,6 +128,11 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 # + # DW USB3 controller + # + gDwUsb3DxeTokenSpaceGuid.PcdDwUsb3DxeBaseAddress|0xFF100000 + + # # # Fastboot # @@ -216,6 +226,9 @@ [Components.common] # # USB Peripheral Support # + Platform/Hisilicon/HiKey960/HiKey960UsbDxe/HiKey960UsbDxe.inf + EmbeddedPkg/Drivers/DwUsb3Dxe/DwUsb3Dxe.inf + Platform/Hisilicon/HiKey960/HiKey960FastbootDxe/HiKey960FastbootDxe.inf EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf # diff --git a/Platform/Hisilicon/HiKey960/HiKey960.fdf b/Platform/Hisilicon/HiKey960/HiKey960.fdf index d4fe4c46b818..8addf49d1647 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960.fdf +++ b/Platform/Hisilicon/HiKey960/HiKey960.fdf @@ -151,6 +151,9 @@ [FV.FvMain] # # USB Peripheral Support # + INF Platform/Hisilicon/HiKey960/HiKey960UsbDxe/HiKey960UsbDxe.inf + INF EmbeddedPkg/Drivers/DwUsb3Dxe/DwUsb3Dxe.inf + INF Platform/Hisilicon/HiKey960/HiKey960FastbootDxe/HiKey960FastbootDxe.inf INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf #