From patchwork Fri Feb 22 00:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10825025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82767922 for ; Fri, 22 Feb 2019 00:34:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E19830592 for ; Fri, 22 Feb 2019 00:34:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61768305FF; Fri, 22 Feb 2019 00:34:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0DB6930592 for ; Fri, 22 Feb 2019 00:34:21 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=ubR9sIHwZtdm4J/yh3Hl9Hqzb1bcnAzO9Ll2eqeamEs=; b=J5wBVhlBpN1I/M g0oyiErfaQwo0qt09tOvFly+NiKGWMkEjN2esqHggCdZfAUR11VM0HsVkfxC81Ty8EhDzMVSYDTb6 He51KYRMtEkREUEhP+Oe9pZ4wwkqhkOY/0VWdz7Xxk7rhQ8EZfDRfcwKvEfLFojVRKG96hpYKWEoZ /R4B+E5GrLKGw4oxRFRSGa/Es43K7xqayEUlgPuNw/yw5F112uONjf+u1KE67veVqamEMs+Dgsj1P VNYjuP5b/HiAAMCYYlB27NfITWFo2eJ/N94au7iVZuuTxEg0FmYvDzwgqdwxCBvf0ZwxQecuydVBF UGMBS57NsznIGaOUYFvA==; 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 1gwynC-00077k-Ss; Fri, 22 Feb 2019 00:34:18 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwyn9-00075Z-FP for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 00:34:17 +0000 Received: by mail-pl1-x641.google.com with SMTP id s1so225245plp.9 for ; Thu, 21 Feb 2019 16:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zY2jb25QAq1g/TE6DFipzC1VS/FPvRjbhYIqEGjdavA=; b=CZMR79TEp6okgbitRKUrx/zE6k1bvOTpS/MJdf4JgULsf7t8svMY7HCb5syEO4GOEw B/zo7Iztup8iB5CN2rh/IeFUIjF94xXCHiJVPZ7+6sLxqxhqVkbWUE/bEz6fM2aU+ZSv UuOkwX3OYX5UmrWRhNAdIBt1Zuq2nko3J0gts= 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:mime-version :content-transfer-encoding; bh=zY2jb25QAq1g/TE6DFipzC1VS/FPvRjbhYIqEGjdavA=; b=XVivRk7rbQOThGi4Hroe1xBhM2CfTjRI2e8l7jD2CvoASR7ve7Lro+ecuQ8j5L6TzP 8l+4lFi0wojljWFzl8pByOdNjlwCrFhnX5XniQ6GqXmUc1Hxn94iOREpB7lwmsMzkaJX rf0cZPa485YHYavcK1jo64PB3eGQ8V0hlGPPHS5iYtJZW3LxhVFt77iaueNtWKah4kiG B8rwnv0VJSISDPOWKEruCYA2nwe+vKajs3uFWupsYbBxym9SMWFRhY6VzVnfk3Bf1Oh0 cjEZfj5okpVj1aFfiXdtsMlQWA95T3QK2ytR0Me5k1aSYnixUqcUoSacdXaCZeM67wpl rh3g== X-Gm-Message-State: AHQUAuaJ6tEe6Jj2JQ28WCPr8cIksO0Pvo07hxYaqeQeg7GyeoSQGFW6 J25Mn8jLwUcYhLhyrkE+aeYjvQ== X-Google-Smtp-Source: AHgI3Ib0CD3XpdWcv9QpJUjgdjW+aFVX0c54CH4gaJNQ02kxILdUJXAW0fFC8DTGWsMsGfuPCO2ylg== X-Received: by 2002:a17:902:33c1:: with SMTP id b59mr1345131plc.220.1550795650564; Thu, 21 Feb 2019 16:34:10 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:1:534:b7c0:a63c:460c]) by smtp.gmail.com with ESMTPSA id c3sm269830pfg.53.2019.02.21.16.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 16:34:09 -0800 (PST) From: Brian Norris To: Heiko Stuebner , Marcel Holtmann , Johan Hedberg Subject: [PATCH 1/3] Bluetooth: btusb: add QCA6174A compatible properties Date: Thu, 21 Feb 2019 16:34:01 -0800 Message-Id: <20190222003403.128243-1-briannorris@chromium.org> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190221_163415_519475_D0621B3C X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, Brian Norris , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , Enric Balletbo i Serra , Rajat Jain , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We may need to specify a GPIO wake pin for this device, so add a compatible property for it. There are at least to USB PID/VID variations of this chip: one with a Lite-On ID and one with an Atheros ID. Signed-off-by: Brian Norris Reviewed-by: Matthias Kaehlcke --- drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 470ee68555d9..380e6f38c607 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2862,6 +2862,8 @@ static irqreturn_t btusb_oob_wake_handler(int irq, void *priv) static const struct of_device_id btusb_match_table[] = { { .compatible = "usb1286,204e" }, + { .compatible = "usb0cf3,e300" }, /* QCA6174A */ + { .compatible = "usb04ca,301a" }, /* QCA6174A (Lite-On) */ { } }; MODULE_DEVICE_TABLE(of, btusb_match_table); From patchwork Fri Feb 22 00:34:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10825031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A882F922 for ; Fri, 22 Feb 2019 00:34:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94ECF305FF for ; Fri, 22 Feb 2019 00:34:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88650306AA; Fri, 22 Feb 2019 00:34:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4149B305FF for ; Fri, 22 Feb 2019 00:34:35 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=THAiiZVeW5MVe1t0EbuLcM4XWp14DX8gGKAE5Ej0jyo=; b=I9nxBcIe1oMyF1 ku471zV9TwhamkE0d7yWhOLwdVwlHIg1kbgJqymPAB4cU2s2BwS5GWvtoaQ+DStko9Dft/oybuI83 fMccgeztDMi7sVByOhd/zSH0cKFsD+bSloxrIO4RWyFiR82UNEn42UBLocX4nt1RA89a0k+RBXOwe 03+c/I4p05ccyGGwjiiWbniG27/aBjU0++SWGSGEuFCQjOWG6iAAW5jjw/jt5dH8ckJETpegjyGIx lWqp9kc91GiDxHOb2P40D0WOjweQRDmbJMvppWcIoqWLy0vyTFzrWoByadNEbfndbdNVDcKqNmQhG tOM4vH562fqUEcfmjlmg==; 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 1gwynR-0007Q6-Q2; Fri, 22 Feb 2019 00:34:33 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwyn9-00075e-Ue for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 00:34:18 +0000 Received: by mail-pf1-x441.google.com with SMTP id g6so219386pfh.13 for ; Thu, 21 Feb 2019 16:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OBVnoqXuO6HFOZ085kg+BDnfHXIhy9OmFMZxP4tCxpw=; b=EfnqGPOXB+Uhq1/DNgFMPxIVt3T3GMCie9YVOIrnCRIlVx3XOSiSvyj2HCPFtVOlQP 1mh9XqgjQnMQTy3kMk4IR4CbmdabuKi3QUub2B4kB9rowmtLAYzKjXJLn8Oqx7b0AYyE yMntsAzKhhAdRDaEuFyxnJQ8w8oN/QDj0rXqk= 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:mime-version:content-transfer-encoding; bh=OBVnoqXuO6HFOZ085kg+BDnfHXIhy9OmFMZxP4tCxpw=; b=GyOhhnkS/XUj8xMzKjpqd9RmyYgRq/NudM9t5OJbCxN1i7pLW9PKPUEiPTRxTl4ngA EMaZ40Ln6wKu08zsigNgoKeWmRFnrmQxslv33N3sF4TeFv1ruEVUC0sQE3rs29JLZtVj QCJUhKPALDjKoNdhtPTS/u6RwCKFxsHevQjtVvPts1F/cZWOl//UMmM1hcQoa66y1tdn 7WCJ3bEp3dK1+gQnHsHj8q9hsIBQp2iH74zbzuyDPs7qBzDX1V5NxfKlV/tG/0TAuGeO mCZAjE/vVU8WDkc0zG5OF5eziFVY7J0QZs43B10TTu3f1T7Z+VpToPpuwFlN/kexHkuZ 7sIA== X-Gm-Message-State: AHQUAuag6I1SAwUVA78KjVLgrIX1VXmHaKb3pfmbBLwePiTU/e8mHEhs VBm0mMlU4w88YyoN5m6moBx9wA== X-Google-Smtp-Source: AHgI3IbGOJeo1tMct7+tFWXD7jLSXbSNtxVZdnkGfxrjSW81ok1QIOiXQPjcBYhWfdhBjDo0Ual3WA== X-Received: by 2002:a62:7086:: with SMTP id l128mr1333899pfc.68.1550795652021; Thu, 21 Feb 2019 16:34:12 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:1:534:b7c0:a63c:460c]) by smtp.gmail.com with ESMTPSA id c3sm269830pfg.53.2019.02.21.16.34.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 16:34:11 -0800 (PST) From: Brian Norris To: Heiko Stuebner , Marcel Holtmann , Johan Hedberg Subject: [PATCH 2/3] dt-bindings: net: btusb: add QCA6174A IDs Date: Thu, 21 Feb 2019 16:34:02 -0800 Message-Id: <20190222003403.128243-2-briannorris@chromium.org> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: <20190222003403.128243-1-briannorris@chromium.org> References: <20190222003403.128243-1-briannorris@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190221_163416_136118_F9315E73 X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, Brian Norris , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , Enric Balletbo i Serra , Rajat Jain , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are two USB PID/VID variations I've seen for this chip, and I want to utilize the 'interrupts' property defined here already. Signed-off-by: Brian Norris Reviewed-by: Matthias Kaehlcke --- Documentation/devicetree/bindings/net/btusb.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/btusb.txt b/Documentation/devicetree/bindings/net/btusb.txt index 37d67926dd6d..43c96c3380a6 100644 --- a/Documentation/devicetree/bindings/net/btusb.txt +++ b/Documentation/devicetree/bindings/net/btusb.txt @@ -9,6 +9,9 @@ Required properties: (more may be added later) are: "usb1286,204e" (Marvell 8997) + "usb0cf3,e300" (Qualcomm QCA6174A) + "usb04ca,301a" (Qualcomm QCA6174A (Lite-On)) + Also, vendors that use btusb may have device additional properties, e.g: Documentation/devicetree/bindings/net/marvell-bt-8xxx.txt From patchwork Fri Feb 22 00:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10825035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF1B11390 for ; Fri, 22 Feb 2019 00:34:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC9BD305FF for ; Fri, 22 Feb 2019 00:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0A36306AA; Fri, 22 Feb 2019 00:34:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 34B3B305FF for ; Fri, 22 Feb 2019 00:34:52 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TOHjZP3OW7ydIBdhXxzzEMnpd5Y5UUhdI3xGmT/IlpE=; b=Eo953ynqx5cC7e 6VD956VxFywr8it2+TgQByi8Bq1hYi1g9hil/22ZzrOLF15jROSyRcRThVEkx7tQbluHmzwjGjInK DYMpfLSG0piZ+nF7gRvKjX0cFBzdEVHQ51XyKv99gGjosbi4xkLIzJKlO1owhFM2QZtJMhi6IQ3RN xu94a6zt1CT9X2p11jEdxLqXShA80XR4qeOXy3yg4lIw4sOTW9i3iyEc6R5zRJcYsFqT4YyyRU+SZ KzyMeFXWjsT9df4dxoI0gz1ITGhU7arVfccq7coysACTJmaW8MVDFxsbSPe6C+wbf4HXBDUKyF+CI qOjj7sGgSONh8ySuy+Vw==; 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 1gwynd-0007eZ-1m; Fri, 22 Feb 2019 00:34:45 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwyn9-00075b-Fk for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 00:34:19 +0000 Received: by mail-pf1-x443.google.com with SMTP id q17so228653pfh.10 for ; Thu, 21 Feb 2019 16:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RR7eeTc5evmNysGncoSTvgraRGvki7PHizg2IrrqAno=; b=lNiHCA9jEGDfOnBWLjteJsSGpKbT9OoEUAQ/tUgxTgvzm2xQsZDCGyGv19fdPOGCQQ KH/ce28Lu26d6ScU7Sgy+r0Z+3wz4qWjYKMDH9Shu+06vPfccRuITkW5PT50IgZM4xd2 73FUTUUX14iiOaazpXJmd8Osg1ZdhuaFAZltI= 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:mime-version:content-transfer-encoding; bh=RR7eeTc5evmNysGncoSTvgraRGvki7PHizg2IrrqAno=; b=T14jCyG/+9VNfXJAjFqjGtCg/XgrN2Cxg5ZbguS2AxPiK0GvVeUidShg3sQGcwOtjw /GU2MAYcXRdqFli7JFbYTk6hmwV5BhNid3Xi3zIwUtRGmXUpx5ZK2klG+ctFLtGU1BdV QiQ67MXRnrpWrdZ10vWZc4Tdzw2x4S85rlLFa6fbRGyCKPzAj88kIS/icKC7meSnPjgL un6yPWVdJngM7AY0IiWg8laOtwAUJ4GZk+8WbJGEUDDCiuW6Ar9XLE6NMyDwQKEMJ2/C w+sh/UTuf3oAF2THcljcU85+balke9IaGUJPSh/2OGt1D7qTkRMhsm/0HRTPczdH64r2 Z84Q== X-Gm-Message-State: AHQUAuZ/bnMf/mMOUrXIOaYueCSLGhazWpgwTprhq3QLkyba5je9lIXR zNA3/EK+wLsXq6+pbd4PusZAgQ== X-Google-Smtp-Source: AHgI3IbCtnM2qcA6AOxb+Ppo9HLPiQkuBDM0wJ6iE8J31zCdd5IcDff5ZHPf/002z3h3kfbvW7tEVQ== X-Received: by 2002:a62:ee13:: with SMTP id e19mr1315978pfi.224.1550795653788; Thu, 21 Feb 2019 16:34:13 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:1:534:b7c0:a63c:460c]) by smtp.gmail.com with ESMTPSA id c3sm269830pfg.53.2019.02.21.16.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 16:34:12 -0800 (PST) From: Brian Norris To: Heiko Stuebner , Marcel Holtmann , Johan Hedberg Subject: [PATCH 3/3] arm64: dts: rockchip: move QCA6174A wakeup pin into its USB node Date: Thu, 21 Feb 2019 16:34:03 -0800 Message-Id: <20190222003403.128243-3-briannorris@chromium.org> X-Mailer: git-send-email 2.21.0.rc0.258.g878e2cd30e-goog In-Reply-To: <20190222003403.128243-1-briannorris@chromium.org> References: <20190222003403.128243-1-briannorris@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190221_163415_536960_749F685E X-CRM114-Status: GOOD ( 17.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, Brian Norris , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , Enric Balletbo i Serra , Rajat Jain , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, we don't coordinate BT USB activity with our handling of the BT out-of-band wake pin, and instead just use gpio-keys. That causes problems because we have no way of distinguishing wake activity due to a BT device (e.g., mouse) vs. the BT controller (e.g., re-configuring wake mask before suspend). This can cause spurious wake events just because we, for instance, try to reconfigure the host controller's event mask before suspending. We can avoid these synchronization problems by handling the BT wake pin directly in the btusb driver -- for all activity up until BT controller suspend(), we simply listen to normal USB activity (e.g., to know the difference between device and host activity); once we're really ready to suspend the host controller, there should be no more host activity, and only *then* do we unmask the GPIO interrupt. This is already supported by btusb; we just need to describe the wake pin in the right node. We list 2 compatible properties, since both PID/VID pairs show up on Scarlet devices, and they're both essentially identical QCA6174A-based modules. Also note that the polarity was wrong before: Qualcomm implemented WAKE as active high, not active low. We only got away with this because gpio-keys always reconfigured us as bi-directional edge-triggered. Finally, we have an external pull-up and a level-shifter on this line (we didn't notice Qualcomm's polarity in the initial design), so we can't do pull-down. Switch to pull-none. Signed-off-by: Brian Norris Reviewed-by: Matthias Kaehlcke Reviewed-by: Rajat Jain --- This patch is also required to make this stable, but since it's not really tied to the device tree, and it's an existing bug, I sent it separately: https://lore.kernel.org/patchwork/patch/1044896/ Subject: Bluetooth: btusb: request wake pin with NOAUTOEN .../dts/rockchip/rk3399-gru-chromebook.dtsi | 13 ++++++ .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 46 ++++++++++++------- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 13 ------ 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi index c400be64170e..931640e9aed4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi @@ -200,6 +200,19 @@ pinctrl-0 = <&bl_en>; pwm-delay-us = <10000>; }; + + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_l>; + + wake_on_bt: wake-on-bt { + label = "Wake-on-Bluetooth"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + }; + }; }; &ppvar_bigcpu { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi index fc50b3ef758c..3e2196c08473 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi @@ -175,6 +175,21 @@ pinctrl-0 = <&dmic_en>; wakeup-delay-ms = <250>; }; + + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pen_eject_odl>; + + pen-insert { + label = "Pen Insert"; + /* Insert = low, eject = high */ + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + wakeup-source; + }; + }; }; /* pp900_s0 aliases */ @@ -328,20 +343,6 @@ camera: &i2c7 { <400000000>; }; -&gpio_keys { - pinctrl-names = "default"; - pinctrl-0 = <&bt_host_wake_l>, <&pen_eject_odl>; - - pen-insert { - label = "Pen Insert"; - /* Insert = low, eject = high */ - gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; - linux,code = ; - linux,input-type = ; - wakeup-source; - }; -}; - &i2c_tunnel { google,remote-bus = <0>; }; @@ -437,8 +438,19 @@ camera: &i2c7 { status = "okay"; }; -&wake_on_bt { - gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; +&usb_host0_ohci { + #address-cells = <1>; + #size-cells = <0>; + + qca_bt: bt@1 { + compatible = "usb0cf3,e300", "usb04ca,301a"; + reg = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_l>; + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "wakeup"; + }; }; /* PINCTRL OVERRIDES */ @@ -455,7 +467,7 @@ camera: &i2c7 { }; &bt_host_wake_l { - rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>; + rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_none>; }; &ec_ap_int_l { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index ea607a601a86..da03fa9c5662 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -269,19 +269,6 @@ #clock-cells = <0>; }; - gpio_keys: gpio-keys { - compatible = "gpio-keys"; - pinctrl-names = "default"; - pinctrl-0 = <&bt_host_wake_l>; - - wake_on_bt: wake-on-bt { - label = "Wake-on-Bluetooth"; - gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; - linux,code = ; - wakeup-source; - }; - }; - max98357a: max98357a { compatible = "maxim,max98357a"; pinctrl-names = "default";