From patchwork Tue May 12 13:25:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 48367 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E2B062121F for ; Tue, 12 May 2015 13:25:50 +0000 (UTC) Received: by laat2 with SMTP id t2sf2015477laa.2 for ; Tue, 12 May 2015 06:25:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=GRaqDvYzt2eDLW1ouqFG3zZllzcTrD+2UWrs2zcwziA=; b=CQAhGvUT1xYqe1yPuiJ2otumHVwZMkViSPmCllaqYMAJjQ5y7wLeZmBEME0Dj6xDWP Jk0vJdG5WLZ11MSz4dKxXTncZfX+AsHzgiOHqb7yzlutUQ0WenEB79ne7+ESX45AXQeB 0+jUp3fq+8Qk3fgS9+z1El6PqO80jsNCHpFmxjfwJ40BKve4nej4J4UKuLBDc8tNWsFw 7JhQ5+WdpH3/3wsc6tZ1aGKmtdWP9RE6HsyaEuDjQGfXjmibwlnHcoWw2m+VEzpMb9oh rWfi94DtXN1OyQUQlrFsA4EOR4HDudBwt3LxgX1Tpy2W0S8qUHgPhZHnzBlK50mK9ZNH XtEw== X-Gm-Message-State: ALoCoQmP00rCMBz6zvMVyKtWUCwf9vciAUowFpqJD41cgzBA2VPwcNk9ChEfzBjnz3EYkURb2WHp X-Received: by 10.194.240.164 with SMTP id wb4mr10678165wjc.1.1431437149885; Tue, 12 May 2015 06:25:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.194 with SMTP id ks2ls35743lac.10.gmail; Tue, 12 May 2015 06:25:49 -0700 (PDT) X-Received: by 10.112.131.104 with SMTP id ol8mr3744627lbb.58.1431437149691; Tue, 12 May 2015 06:25:49 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id yo3si10354907lbb.167.2015.05.12.06.25.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 06:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by layy10 with SMTP id y10so5775562lay.0 for ; Tue, 12 May 2015 06:25:49 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr12157738lbc.19.1431437149604; Tue, 12 May 2015 06:25:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2091426lbb; Tue, 12 May 2015 06:25:49 -0700 (PDT) X-Received: by 10.180.73.230 with SMTP id o6mr5355349wiv.11.1431437148978; Tue, 12 May 2015 06:25:48 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com. [74.125.82.54]) by mx.google.com with ESMTPS id el4si3157745wid.40.2015.05.12.06.25.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 06:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 74.125.82.54 as permitted sender) client-ip=74.125.82.54; Received: by wgic8 with SMTP id c8so9784722wgi.1 for ; Tue, 12 May 2015 06:25:48 -0700 (PDT) X-Received: by 10.180.79.66 with SMTP id h2mr29946183wix.46.1431437148733; Tue, 12 May 2015 06:25:48 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id i13sm2885845wic.13.2015.05.12.06.25.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 May 2015 06:25:47 -0700 (PDT) From: Peter Griffin To: u-boot@lists.denx.de, albert.u.boot@aribaud.net, trini@konsulko.com, panto@antoniou-consulting.com, marex@denx.de Cc: Peter Griffin Subject: [PATCH 1/6] usb: dwc2: Add support for v3 snpsid value Date: Tue, 12 May 2015 14:25:36 +0100 Message-Id: <1431437141-18096-2-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431437141-18096-1-git-send-email-peter.griffin@linaro.org> References: <1431437141-18096-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This has been tested to the extent that I can enumerate a asix usb networking adapter and boot a kernel over usb on the 96boards hikey u-boot port I'm currently doing. Signed-off-by: Peter Griffin --- drivers/usb/host/dwc2.c | 3 ++- drivers/usb/host/dwc2.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index e8142ac..19a6007 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1015,7 +1015,8 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) snpsid = readl(®s->gsnpsid); printf("Core Release: %x.%03x\n", snpsid >> 12 & 0xf, snpsid & 0xfff); - if ((snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_2xx) { + if ((snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_2xx && + (snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_3xx) { printf("SNPSID invalid (not DWC2 OTG device): %08x\n", snpsid); return -ENODEV; } diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h index ba08fd5..1e0f502 100644 --- a/drivers/usb/host/dwc2.h +++ b/drivers/usb/host/dwc2.h @@ -729,6 +729,7 @@ struct dwc2_core_regs { #define DWC2_PCGCCTL_DEEP_SLEEP (1 << 7) #define DWC2_PCGCCTL_DEEP_SLEEP_OFFSET 7 #define DWC2_SNPSID_DEVID_VER_2xx (0x4f542 << 12) +#define DWC2_SNPSID_DEVID_VER_3xx (0x4f543 << 12) #define DWC2_SNPSID_DEVID_MASK (0xfffff << 12) #define DWC2_SNPSID_DEVID_OFFSET 12