Message ID | 1528379966-16768-1-git-send-email-koen.vandeputte@ncentric.com |
---|---|
State | Accepted |
Delegated to: | John Crispin |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ncentric.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KrcfE7Gl"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="F2ZVylh7"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="DtaNgtcK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 411p1F3qPyz9s2t for <incoming@patchwork.ozlabs.org>; Fri, 8 Jun 2018 00:33:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=L9svhJsLFl2FzmwtuVxcJj5BR1x6x3lZeh9L+GAQQQ0=; b=KrcfE7GlkEf8ux /2rlFLSKUK8gKJuDNLF+aMxxnfWqyeL3jiN9E3Gtzk2LsXQvbzCrlMkcdFEXT/9Zznf4QC3yC4C4W UWsOyHbAa/vvW3peaK8kGOu2BQPOA56qi34r+k6gAB21WMXHxWDUDEekW/2J37RqF3fWbly0xOC+k IVOxLmjRZg17XgJB+RwFev0U3mNa5N1l7vbKMxQ3/vGQA3+IVAYxEcXZkUGrXbjExdm1ju9okBMTT Kh2mjAAx8A1S0Y58co2CrGBN0FCvMeF+nuGGDtFwVSfFw3c5CiMY1+QBZ/NHbm4k7FYhgoG+r1Aw1 yBzzVih1h5YKfx6HuLIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQvxz-0008Vj-NP; Thu, 07 Jun 2018 14:32:43 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQvuZ-00054S-5V for openwrt-devel@bombadil.infradead.org; Thu, 07 Jun 2018 14:29:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZHUi1iv6TTW1nbbPbvQAg1glvBtXOQcjMv95kjFO1Y8=; b=F2ZVylh77hf59jomtrXzHp+u0 ovaRbHxsb5vDY6bZ3369z8fDiW5ctoOZENTmqq8OBxo+Y8VB1+ecu1hhjGmJP5WJdfmTR/kz5Uu6w b96Qn0WzYxO0awRYRgzIgWOfRbDwTFzxloxa1LWmfolHIAS8VQBQsOr54SUGOj/ojhDPeqKVBSHni sryHx4y0nEmaCsGRBxlOZqEBamajGMKPKBgqB5oA/Et54ALMVdoHgS86cO12yN5ZWWbc7NLligsqa Pse8nQycej4M+LOoQ7bq37qqfhgbOwHmMS3GiFK/FVSZE0ewNwVN0BDQyS/F/9dAoSJKjDy/mgFWl 84K3tZjIA==; Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQvS9-0008QS-L3 for openwrt-devel@lists.openwrt.org; Thu, 07 Jun 2018 13:59:51 +0000 Received: by mail-wm0-x244.google.com with SMTP id v16-v6so18322527wmh.5 for <openwrt-devel@lists.openwrt.org>; Thu, 07 Jun 2018 06:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id; bh=ZHUi1iv6TTW1nbbPbvQAg1glvBtXOQcjMv95kjFO1Y8=; b=DtaNgtcKBOW2+T1oag1xPzipMAyF14gbJ5JDuAQw7TJhE8cpsQU7QuE6KO98B5tcI9 CWOjN+o4mpzwh1h4X3ZvJJK6j8FpAQdwnJZ5Zh2aVdv8RwJ8pFoZna4chwlf8RRMDPE7 ZWkQsSTI3OpSUZ7I+e6o5H9hYv20Q+N/SaRSQ= 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; bh=ZHUi1iv6TTW1nbbPbvQAg1glvBtXOQcjMv95kjFO1Y8=; b=GvRfHAl8Cm055nRIAWEXefMM/cy49HAYzlHsW0dI3P0pMlL8mG0cYH8d6/d+YlYRcl fUbcXOL/BO4FXVKoC41nAE+RFZ5hTtlbnkcsq1Kw0LSJvnPYNSmjQ0ayNGWu8XTkCfCk oonIbNRnJ7K9iMlag6v75paoKBMri5f3aSR/r04tYDISbxgSfcZ+BZwM5saaQloeY43i cr4tjNpfihe4wMcyzfdT0hkhe0bMD/PfLGw2Pf0fZhjMV4zcntPIQqzo/m6QO2JY34B/ npitic+WHApYE2z1neEm6W4838F77MUXWw+wziz/dMB2T5n9HHDGm0LMjWjaY531ROxd GdGQ== X-Gm-Message-State: APt69E2WIbert0PpPj7Gyrk57Z40/67v3gbPZ4rnrs0HixOHe7p09tdt FY0g2jLup/H47wyoJFNsHOa7ViM/l2g= X-Google-Smtp-Source: ADUXVKIQEfEmVyKH77JCjwM2JDYr/9TLu0KTCMQee7OXuIkJ8nSppEGP9EKONoqrwR0e8UyyBDi/SQ== X-Received: by 2002:aa7:d30c:: with SMTP id p12-v6mr2717127edq.181.1528379977869; Thu, 07 Jun 2018 06:59:37 -0700 (PDT) Received: from kvdp-BRIX.cmb.citymesh.com (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id s2-v6sm15052016edm.13.2018.06.07.06.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jun 2018 06:59:37 -0700 (PDT) From: Koen Vandeputte <koen.vandeputte@ncentric.com> To: openwrt-devel@lists.openwrt.org Date: Thu, 7 Jun 2018 15:59:26 +0200 Message-Id: <1528379966-16768-1-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180607_145949_729778_B9A76524 X-CRM114-Status: GOOD ( 17.53 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH] ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boards X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Cc: Robin Leblon <robin.leblon@ncentric.com>, Koen Vandeputte <koen.vandeputte@ncentric.com>, Felix Fietkau <nbd@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
[OpenWrt-Devel] ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boards
|
expand
|
diff --git a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches index 199a6ac08d79..3bb2f635a3f6 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches @@ -24,7 +24,7 @@ nanostation-m-xw) ;; rb-912uag-2hpnd|\ rb-912uag-5hpnd) - ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "1" + ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "61" "1" ;; rb-750up-r2|\ rb-951ui-2nd|\
Some devices like the Mikrotik RB912 only have 1 USB port which is shared between an USB A type port, and the mini PCIe socket. Toggling a gpio selects the output to which USB is connected. Since kernel 4.9, gpio base is rounded up to a value of 32. Commit 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") accounts correctly for that. In this commit, rb912 sees it's value changed from AR934X_GPIO_COUNT (23) to 32 This means that the USB toggle gpio number actually also changes from 52 to 61. But .. Some of these GPIO numbers are also used in other locations, like the boardfile. The author forgot to also change them over there. Switching the USB port to mPCIe now shows my modem is correctly discovered again: [ 2863.864471] usb 1-1: new high-speed USB device number 4 using ehci-platform [ 2864.055303] usb 1-1: config 1 has an invalid interface number: 8 but max is 3 [ 2864.062728] usb 1-1: config 1 has no interface number 1 [ 2864.074567] qcserial 1-1:1.0: Qualcomm USB modem converter detected [ 2864.081474] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0 [ 2864.111960] qcserial 1-1:1.2: Qualcomm USB modem converter detected [ 2864.118976] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1 [ 2864.139808] qcserial 1-1:1.3: Qualcomm USB modem converter detected [ 2864.146777] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2 [ 2864.165276] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device [ 2864.171879] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-ehci-platform-1, WWAN/QMI device, 02:00:44:ed:3b:11 Fixes: 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Cc: Robin Leblon <robin.leblon@ncentric.com> Cc: Felix Fietkau <nbd@nbd.name> --- Please also cherrypick for 18.06 branch Branch 17.01 is not affected, as kernel 4.4 is used over there Other targets besides this board, referred in the initial commit are probably also affected by the same issue. I'm not changing them here .. as I dont have to hardware to verify it. target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)