From patchwork Mon Jun 20 12:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hakan Jansson X-Patchwork-Id: 584266 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 892CECCA481 for ; Mon, 20 Jun 2022 12:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242220AbiFTMCu (ORCPT ); Mon, 20 Jun 2022 08:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241814AbiFTMCh (ORCPT ); Mon, 20 Jun 2022 08:02:37 -0400 Received: from smtp14.infineon.com (smtp14.infineon.com [IPv6:2a00:18f0:1e00:4::6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07721183A4; Mon, 20 Jun 2022 05:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1655726556; x=1687262556; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EUlfWDYhfjvTPtdZgPPr1MGyKFAsywxPwiiOjWR4jRs=; b=qLC9Hj0ry9515fV8RF3qWO+cq1vUlSMxg95JyPUndJczvMKeu81vZhHJ U9+T9ZbUwUwIOdgB1yzd77v/vXwZY7RsQK6TK4KXUeqddGT1c+uyIk5AS LKKmIjjuKGz4GklBMljmYJ0QFUsy+8qa93lwEOwnJvO2km4uS6BxwpX8h k=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="127184362" X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="127184362" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp14.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 14:02:33 +0200 Received: from MUCSE805.infineon.com (MUCSE805.infineon.com [172.23.29.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS; Mon, 20 Jun 2022 14:02:33 +0200 (CEST) Received: from MUCSE807.infineon.com (172.23.29.33) by MUCSE805.infineon.com (172.23.29.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:32 +0200 Received: from ISCNPF0RJXQS.infineon.com (172.23.8.247) by MUCSE807.infineon.com (172.23.29.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:31 +0200 From: Hakan Jansson CC: Hakan Jansson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Linus Walleij , , , , Marcel Holtmann , Johan Hedberg , "Luiz Augusto von Dentz" , Subject: [PATCH 1/4] dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding Date: Mon, 20 Jun 2022 14:01:26 +0200 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE805.infineon.com (172.23.29.31) To MUCSE807.infineon.com (172.23.29.33) To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon. Extend the binding with its DT compatible. Signed-off-by: Hakan Jansson --- Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml index df59575840fe..71fe9b17f8f1 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml @@ -24,6 +24,7 @@ properties: - brcm,bcm43540-bt - brcm,bcm4335a0 - brcm,bcm4349-bt + - infineon,cyw55572-bt shutdown-gpios: maxItems: 1 From patchwork Mon Jun 20 12:01:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hakan Jansson X-Patchwork-Id: 583373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7746CCA480 for ; Mon, 20 Jun 2022 12:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242230AbiFTMCw (ORCPT ); Mon, 20 Jun 2022 08:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242052AbiFTMCh (ORCPT ); Mon, 20 Jun 2022 08:02:37 -0400 Received: from smtp11.infineon.com (smtp11.infineon.com [IPv6:2a00:18f0:1e00:4::5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD68718B10; Mon, 20 Jun 2022 05:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1655726557; x=1687262557; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NL06rcosqN3GSd/3W97hrwd/bGoUybLQu/XsjjGQzbg=; b=ebDzrDYwcL6iA+ta0leOu3qyOTknqjcny+d/GJoakbFBfiYaatqcVoUL UMI+qGD85WR7ojzBE8IA4PyyExYCvJ3FB18ITUhnng5lJ7hUzJiKtoK7R YzfX1zLopD8vPApuCJ/F2o7zKlP2IPZEyjJtiJaD3iqjaZnFqJh60RFBI U=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="301894353" X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="301894353" Received: from unknown (HELO mucxv002.muc.infineon.com) ([172.23.11.17]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 14:02:35 +0200 Received: from MUCSE803.infineon.com (MUCSE803.infineon.com [172.23.29.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv002.muc.infineon.com (Postfix) with ESMTPS; Mon, 20 Jun 2022 14:02:34 +0200 (CEST) Received: from MUCSE807.infineon.com (172.23.29.33) by MUCSE803.infineon.com (172.23.29.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:33 +0200 Received: from ISCNPF0RJXQS.infineon.com (172.23.8.247) by MUCSE807.infineon.com (172.23.29.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:32 +0200 From: Hakan Jansson CC: Hakan Jansson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Linus Walleij , , , , Marcel Holtmann , Johan Hedberg , "Luiz Augusto von Dentz" , Subject: [PATCH 2/4] Bluetooth: hci_bcm: Add DT compatible for CYW55572 Date: Mon, 20 Jun 2022 14:01:27 +0200 Message-ID: <814d9e73bdf784cb29b0976c7fea227c4740ea3b.1655723462.git.hakan.jansson@infineon.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE805.infineon.com (172.23.29.31) To MUCSE807.infineon.com (172.23.29.33) To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon. Signed-off-by: Hakan Jansson --- drivers/bluetooth/hci_bcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 6f834ff1b44b..9a129867a4c0 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -1557,6 +1557,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = { { .compatible = "brcm,bcm4349-bt", .data = &bcm43438_device_data }, { .compatible = "brcm,bcm43540-bt", .data = &bcm4354_device_data }, { .compatible = "brcm,bcm4335a0" }, + { .compatible = "infineon,cyw55572-bt" }, { }, }; MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match); From patchwork Mon Jun 20 12:01:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hakan Jansson X-Patchwork-Id: 584265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B79DCCA485 for ; Mon, 20 Jun 2022 12:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242261AbiFTMCx (ORCPT ); Mon, 20 Jun 2022 08:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242064AbiFTMCi (ORCPT ); Mon, 20 Jun 2022 08:02:38 -0400 Received: from smtp2.infineon.com (smtp2.infineon.com [IPv6:2a00:18f0:1e00:4::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25281186E9; Mon, 20 Jun 2022 05:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1655726557; x=1687262557; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DO0GysfnOu/T2g2F1GH31syJUmR4jep8XCV00kA/ms=; b=OE8Rz1ZoM659Z/SGX2oVr+xLbD9y20j9h6QSIGMVR9i5RSyuYuB9mB9b EheAzaO5vpbGJI1GshKZotbdc2RMNlfZuooY7WgZHXycAiO1hDfdzO3du GEY9jvK+Vx2zrW+aliqkJb8k5l3I5zWGAJ0WZU0EVDxqKVC9M8h53hJHa 0=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="184450174" X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="184450174" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 14:02:34 +0200 Received: from MUCSE822.infineon.com (MUCSE822.infineon.com [172.23.29.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS; Mon, 20 Jun 2022 14:02:34 +0200 (CEST) Received: from MUCSE807.infineon.com (172.23.29.33) by MUCSE822.infineon.com (172.23.29.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:34 +0200 Received: from ISCNPF0RJXQS.infineon.com (172.23.8.247) by MUCSE807.infineon.com (172.23.29.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:33 +0200 From: Hakan Jansson CC: Hakan Jansson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Linus Walleij , , , , Marcel Holtmann , Johan Hedberg , "Luiz Augusto von Dentz" , Subject: [PATCH 3/4] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode Date: Mon, 20 Jun 2022 14:01:28 +0200 Message-ID: <0e3c48f0f38b167d83feb102284eaf24caa8c500.1655723462.git.hakan.jansson@infineon.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE805.infineon.com (172.23.29.31) To MUCSE807.infineon.com (172.23.29.33) To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Always prevent trying to set device baudrate before calling setup() when using autobaud mode. This was previously happening for devices which had device specific data with member no_early_set_baudrate set to 0. Signed-off-by: Hakan Jansson Reviewed-by: Linus Walleij --- drivers/bluetooth/hci_bcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 9a129867a4c0..0ae627c293c5 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu) /* If oper_speed is set, ldisc/serdev will set the baudrate * before calling setup() */ - if (!bcm->dev->no_early_set_baudrate) + if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode) hu->oper_speed = bcm->dev->oper_speed; err = bcm_gpio_set_power(bcm->dev, true); @@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev) { bdev->use_autobaud_mode = device_property_read_bool(bdev->dev, "brcm,requires-autobaud-mode"); - if (bdev->use_autobaud_mode) - bdev->no_early_set_baudrate = true; - device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed); device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params", bdev->pcm_int_params, 5); From patchwork Mon Jun 20 12:01:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hakan Jansson X-Patchwork-Id: 583372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13920CCA47C for ; Mon, 20 Jun 2022 12:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241484AbiFTMDE (ORCPT ); Mon, 20 Jun 2022 08:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242089AbiFTMCl (ORCPT ); Mon, 20 Jun 2022 08:02:41 -0400 Received: from smtp2.infineon.com (smtp2.infineon.com [IPv6:2a00:18f0:1e00:4::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A72D18380; Mon, 20 Jun 2022 05:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1655726560; x=1687262560; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mcU2zd605tdGXObukOV2l4wgt38ac82d1qr3NR5XZ4s=; b=Z7UDaHXgELPH/zR4+23dq3dPylvSdCLLvZULsOjkrxhe1drLZhXtgCm4 yu65OeCcCVnrKDw8xDL93w7rwBDsRV+0G6jE/xSoUXdqzyGswgIggptlk nm+Bs6eHXga0f/K9FgTIsNxWQTAfc5FH4NlxYu6Wf/9K5TfeDhmxK5gRF k=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="184450176" X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="184450176" Received: from unknown (HELO mucxv002.muc.infineon.com) ([172.23.11.17]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 14:02:35 +0200 Received: from MUCSE819.infineon.com (MUCSE819.infineon.com [172.23.29.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv002.muc.infineon.com (Postfix) with ESMTPS; Mon, 20 Jun 2022 14:02:35 +0200 (CEST) Received: from MUCSE807.infineon.com (172.23.29.33) by MUCSE819.infineon.com (172.23.29.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:35 +0200 Received: from ISCNPF0RJXQS.infineon.com (172.23.8.247) by MUCSE807.infineon.com (172.23.29.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 20 Jun 2022 14:02:34 +0200 From: Hakan Jansson CC: Hakan Jansson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Linus Walleij , , , , Marcel Holtmann , Johan Hedberg , "Luiz Augusto von Dentz" , Subject: [PATCH 4/4] Bluetooth: hci_bcm: Increase host baudrate for CYW55572 in autobaud mode Date: Mon, 20 Jun 2022 14:01:29 +0200 Message-ID: <386b205422099c795272ad8b792091b692def3cd.1655723462.git.hakan.jansson@infineon.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE805.infineon.com (172.23.29.31) To MUCSE807.infineon.com (172.23.29.33) To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add device specific data for max baudrate in autobaud mode. This allows the host to use a baudrate higher than "init speed" when loading FW in autobaud mode. Signed-off-by: Hakan Jansson --- drivers/bluetooth/hci_bcm.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 0ae627c293c5..d7e0b75db8a6 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -53,10 +53,12 @@ * struct bcm_device_data - device specific data * @no_early_set_baudrate: Disallow set baudrate before driver setup() * @drive_rts_on_open: drive RTS signal on ->open() when platform requires it + * @max_autobaud_speed: max baudrate supported by device in autobaud mode */ struct bcm_device_data { bool no_early_set_baudrate; bool drive_rts_on_open; + u32 max_autobaud_speed; }; /** @@ -100,6 +102,7 @@ struct bcm_device_data { * @drive_rts_on_open: drive RTS signal on ->open() when platform requires it * @pcm_int_params: keep the initial PCM configuration * @use_autobaud_mode: start Bluetooth device in autobaud mode + * @max_autobaud_speed: max baudrate supported by device in autobaud mode */ struct bcm_device { /* Must be the first member, hci_serdev.c expects this. */ @@ -139,6 +142,7 @@ struct bcm_device { bool drive_rts_on_open; bool use_autobaud_mode; u8 pcm_int_params[5]; + u32 max_autobaud_speed; }; /* generic bcm uart resources */ @@ -479,7 +483,10 @@ static int bcm_open(struct hci_uart *hu) else if (bcm->dev->drive_rts_on_open) hci_uart_set_flow_control(hu, true); - hu->init_speed = bcm->dev->init_speed; + if (bcm->dev->use_autobaud_mode && bcm->dev->max_autobaud_speed) + hu->init_speed = min(bcm->dev->oper_speed, bcm->dev->max_autobaud_speed); + else + hu->init_speed = bcm->dev->init_speed; /* If oper_speed is set, ldisc/serdev will set the baudrate * before calling setup() @@ -585,8 +592,8 @@ static int bcm_setup(struct hci_uart *hu) return 0; /* Init speed if any */ - if (hu->init_speed) - speed = hu->init_speed; + if (bcm->dev && bcm->dev->init_speed) + speed = bcm->dev->init_speed; else if (hu->proto->init_speed) speed = hu->proto->init_speed; else @@ -1519,6 +1526,7 @@ static int bcm_serdev_probe(struct serdev_device *serdev) data = device_get_match_data(bcmdev->dev); if (data) { + bcmdev->max_autobaud_speed = data->max_autobaud_speed; bcmdev->no_early_set_baudrate = data->no_early_set_baudrate; bcmdev->drive_rts_on_open = data->drive_rts_on_open; } @@ -1542,6 +1550,10 @@ static struct bcm_device_data bcm43438_device_data = { .drive_rts_on_open = true, }; +static struct bcm_device_data cyw55572_device_data = { + .max_autobaud_speed = 921600, +}; + static const struct of_device_id bcm_bluetooth_of_match[] = { { .compatible = "brcm,bcm20702a1" }, { .compatible = "brcm,bcm4329-bt" }, @@ -1554,7 +1566,7 @@ static const struct of_device_id bcm_bluetooth_of_match[] = { { .compatible = "brcm,bcm4349-bt", .data = &bcm43438_device_data }, { .compatible = "brcm,bcm43540-bt", .data = &bcm4354_device_data }, { .compatible = "brcm,bcm4335a0" }, - { .compatible = "infineon,cyw55572-bt" }, + { .compatible = "infineon,cyw55572-bt", .data = &cyw55572_device_data }, { }, }; MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);