From patchwork Thu Aug 20 16:01:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QW50dGkgU2VwcMOkbMOk?= X-Patchwork-Id: 509090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 367C81402A2 for ; Fri, 21 Aug 2015 02:05:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=T5L4TU1o; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D34A728BC4A; Thu, 20 Aug 2015 18:02:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 49ACC28BC23 for ; Thu, 20 Aug 2015 18:01:58 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 20 Aug 2015 18:01:52 +0200 (CEST) Received: by laba3 with SMTP id a3so25512037lab.1 for ; Thu, 20 Aug 2015 09:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=GmVMIwSsnO97OynCSjR7OCV9jWB8oAlFZmIVtCpgtCE=; b=T5L4TU1owBWFohDnLzgcNGKUS2sHk9ftIaizZT3tL/D0v+QRQFRkzKeKG9Zlbs0oVp LPk8jpFAulMfyZASdXZ60O9jVgRx4xGtoJFQitypIbv289QBSIpw0xcqwaH1MMT5FjUU pVLg88fxJjieyVqqF5kRRP26B4RW1KOrrv5yPTcd0GxuTDzp7QvXs3S3yI3mxAgD/FfU 3ImW7oJe3W993TqJYxKUDPpQkH8SkptWe3GU5/2BQOECmZz6hTCNj8E4doXm9n8t7vZz pAM0MmU/+N8O0erZfRH2UpUgPbTnhlkcqPZ3UR+YqrpS2IusU3g51ENcCYL2NJ/qlKly zpnQ== X-Received: by 10.152.2.200 with SMTP id 8mr3530856law.115.1440086559951; Thu, 20 Aug 2015 09:02:39 -0700 (PDT) Received: from griffin.lan (85-76-182-202-nat.elisa-mobile.fi. [85.76.182.202]) by smtp.gmail.com with ESMTPSA id k9sm1348291lbp.13.2015.08.20.09.02.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Aug 2015 09:02:39 -0700 (PDT) From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= To: openwrt-devel@lists.openwrt.org Date: Thu, 20 Aug 2015 19:01:51 +0300 Message-Id: <1440086512-12772-4-git-send-email-a.seppala@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1440086512-12772-1-git-send-email-a.seppala@gmail.com> References: <1440086512-12772-1-git-send-email-a.seppala@gmail.com> MIME-Version: 1.0 Subject: [OpenWrt-Devel] [PATCH 3/4] lantiq: Add AR9 compatibility bits to DWC2 driver X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Add AR9 DTS definition to be recognized by the DWC2 driver. The same driver parameters can be mostly used except that some boards seem to erroneously report OTG HNP/SRP capability of the USB HCD. Forcing the HNP/SRP off allows these boards to work with the DWC2 as well. Signed-off-by: Antti Seppälä --- target/linux/lantiq/patches-3.18/0041-USB-DWC2-add-ltq-params.patch | 5 +++-- target/linux/lantiq/patches-4.1/0041-USB-DWC2-add-ltq-params.patch | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/linux/lantiq/patches-3.18/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-3.18/0041-USB-DWC2-add-ltq-params.patch index 396aa7d..a0af123 100644 --- a/target/linux/lantiq/patches-3.18/0041-USB-DWC2-add-ltq-params.patch +++ b/target/linux/lantiq/patches-3.18/0041-USB-DWC2-add-ltq-params.patch @@ -5,7 +5,7 @@ }; +static const struct dwc2_core_params params_ltq = { -+ .otg_cap = -1, ++ .otg_cap = 2, /* non-HNP/non-SRP */ + .otg_ver = -1, + .dma_enable = -1, + .dma_desc_enable = -1, @@ -35,10 +35,11 @@ /** * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the * DWC_otg driver -@@ -129,6 +157,7 @@ static int dwc2_driver_remove(struct pla +@@ -129,6 +157,8 @@ static int dwc2_driver_remove(struct pla static const struct of_device_id dwc2_of_match_table[] = { { .compatible = "brcm,bcm2835-usb", .data = ¶ms_bcm2835 }, { .compatible = "rockchip,rk3066-usb", .data = ¶ms_rk3066 }, ++ { .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = ¶ms_ltq }, + { .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = ¶ms_ltq }, { .compatible = "snps,dwc2", .data = NULL }, {}, diff --git a/target/linux/lantiq/patches-4.1/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.1/0041-USB-DWC2-add-ltq-params.patch index 850d7a8..c55f5b6 100644 --- a/target/linux/lantiq/patches-4.1/0041-USB-DWC2-add-ltq-params.patch +++ b/target/linux/lantiq/patches-4.1/0041-USB-DWC2-add-ltq-params.patch @@ -5,7 +5,7 @@ }; +static const struct dwc2_core_params params_ltq = { -+ .otg_cap = -1, ++ .otg_cap = 2, /* non-HNP/non-SRP */ + .otg_ver = -1, + .dma_enable = -1, + .dma_desc_enable = -1, @@ -35,10 +35,11 @@ /** * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the * DWC_otg driver -@@ -133,6 +161,7 @@ static int dwc2_driver_remove(struct pla +@@ -133,6 +161,8 @@ static int dwc2_driver_remove(struct pla static const struct of_device_id dwc2_of_match_table[] = { { .compatible = "brcm,bcm2835-usb", .data = ¶ms_bcm2835 }, { .compatible = "rockchip,rk3066-usb", .data = ¶ms_rk3066 }, ++ { .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = ¶ms_ltq }, + { .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = ¶ms_ltq }, { .compatible = "snps,dwc2", .data = NULL }, { .compatible = "samsung,s3c6400-hsotg", .data = NULL},