Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1639453rwl; Fri, 31 Mar 2023 14:24:35 -0700 (PDT) X-Google-Smtp-Source: AKy350Ykz7YXAznRMRstkdBDYdcRm/UG8c2GlBMvlQwBTlyMogk9FpbigBdYvHNlK1G95E0azbKr X-Received: by 2002:a62:5216:0:b0:62d:e95c:d8c5 with SMTP id g22-20020a625216000000b0062de95cd8c5mr3144472pfb.24.1680297875642; Fri, 31 Mar 2023 14:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680297875; cv=none; d=google.com; s=arc-20160816; b=TMGZoRw1e6DKIdk72uySjgZP6e1h0slVfTJ0q/TGTjx7IcqwCkXW1oBoAmHjhPm+Xv +I5uAHYiYBUAMulHtO0suF8DrVNTeHIz1AdhWUNqWos4Y1ztZGXTDZGO4VfqpiRlqjBH /+X/YmUXe7nTsioEi0xZNsQsMAPVlNPk3IOVkVtURrK3CnuW/Ndd8niMzyBsZCiJWaya YJwbTR8n03MAIi0MwC/LFovC1els8XW8+RnFhF4bYKKTR8lVDn0bPMLiyxPfALf6424b ovKHICT+GasUlC+CWcMRV6RHg5vaJok5kZ62i+gRIKD0UwkrdXbX1JYdX2vJdu0bshBr SAvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yemG7U4n0SREemlPoqtXQXCCdOnV3oRU7zN02g4tpYY=; b=f0pbZrJO0WRNxDFV7bFjNVMs4+SL0esBOpzN7gCM4cJuVEssHwMY82TPXfY4trfXqu qj6tHMyvD+8a7TJXvABN7BNnvQDqxbWWZjsckL9b9yMAHEnELHoL0YVuLD6Vbv8HbHuI 25xpjZGSLL0u5wPP1nR6ugJ6ieg65lJXJR7DPG99SdlOy/RCj19nwmNcshM2VIfKcqX/ 9IXWBMpDJgxL+v8vSNO18yv3BoF9ig4WJxhojVIhG8o7z/7wQ5eqOZAVrNZ+K4o5XzEN WXr7pIp4KkMwVAAbgsq8jUbuyfutcRoXa5a0Imzm24sgwgTEikB6LeOUB7WnAn7OhY1a cpwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SvSOVkEf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a624d03000000b0060d7d3b2777si3491658pfb.176.2023.03.31.14.24.23; Fri, 31 Mar 2023 14:24:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SvSOVkEf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbjCaVM1 (ORCPT + 99 others); Fri, 31 Mar 2023 17:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbjCaVM1 (ORCPT ); Fri, 31 Mar 2023 17:12:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BACD20312 for ; Fri, 31 Mar 2023 14:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680297100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yemG7U4n0SREemlPoqtXQXCCdOnV3oRU7zN02g4tpYY=; b=SvSOVkEfD9eTpibwc+OpAl4b4XP0Otu66k8Ex6JGG9n488k0BN2GVXnpC2eJEe3/rh+lHl hx0dy7QkAYJewNftd6UvMI6QkQw7Nug9/odeRffNbZg/zH97IsbnN+gvUAUuV4XnfuRwzy ZIRNNFaH9Y3XeSvlTOhq08m+S9+DRj8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-6-3yd2duNxMLuhbyYM0fqq7Q-1; Fri, 31 Mar 2023 17:11:37 -0400 X-MC-Unique: 3yd2duNxMLuhbyYM0fqq7Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B11E185A588; Fri, 31 Mar 2023 21:11:36 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDE5B492B00; Fri, 31 Mar 2023 21:11:35 +0000 (UTC) From: Hans de Goede To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: Hans de Goede , linux-bluetooth@vger.kernel.org Subject: [PATCH 3/4] Bluetooth: hci_bcm: Add Lenovo Yoga Tablet 2 830 / 1050 to the bcm_broken_irq_dmi_table Date: Fri, 31 Mar 2023 23:11:23 +0200 Message-Id: <20230331211124.463003-4-hdegoede@redhat.com> In-Reply-To: <20230331211124.463003-1-hdegoede@redhat.com> References: <20230331211124.463003-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The DSDT for the Lenovo Yoga Tablet 2 830 / 1050 models (which share the same mainboard) specifies a IOAPIC IRQ for the HCI -> host IRQ but this is not correct. Like the Asus TF103C these tablets use pin 17 of the INT33FC:02 GPIO controller for the IRQ and this pin is _not_ configured in direct IRQ mode by the firmware. Add a DMI match for this, re-using the Asus TF103C gpiod_lookup_table, to fix bluetooth not working on these tablets. Signed-off-by: Hans de Goede --- drivers/bluetooth/hci_bcm.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 4a3ef844df5d..eb9e1c858e91 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -890,7 +890,7 @@ static int bcm_resume(struct device *dev) #endif /* Some firmware reports an IRQ which does not work (wrong pin in fw table?) */ -static struct gpiod_lookup_table asus_tf103c_irq_gpios = { +static struct gpiod_lookup_table irq_on_int33fc02_pin17_gpios = { .dev_id = "serial0-0", .table = { GPIO_LOOKUP("INT33FC:02", 17, "host-wakeup-alt", GPIO_ACTIVE_HIGH), @@ -905,7 +905,18 @@ static const struct dmi_system_id bcm_broken_irq_dmi_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"), }, - .driver_data = &asus_tf103c_irq_gpios, + .driver_data = &irq_on_int33fc02_pin17_gpios, + }, + { + .ident = "Lenovo Yoga Tablet 2 830F/L / 1050F/L", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."), + DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"), + DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"), + /* Partial match on beginning of BIOS version */ + DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"), + }, + .driver_data = &irq_on_int33fc02_pin17_gpios, }, { .ident = "Meegopad T08", -- 2.39.1