* [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding
@ 2022-10-31 20:48 Marek Vasut
2022-10-31 20:48 ` [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marek Vasut @ 2022-10-31 20:48 UTC (permalink / raw)
To: linux-bluetooth
Cc: Marek Vasut, Hakan Jansson, Krzysztof Kozlowski, Linus Walleij,
Luiz Augusto von Dentz, Marcel Holtmann, Rob Herring, devicetree
CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress.
This chip is present e.g. on muRata 2AE module. Extend the
binding with its DT compatible.
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Hakan Jansson <hakan.jansson@infineon.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
To: linux-bluetooth@vger.kernel.org
---
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 445b2a5536259..e0c8abc274134 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
+ - cypress,cyw4373a0-bt
- infineon,cyw55572-bt
shutdown-gpios:
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support 2022-10-31 20:48 [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Marek Vasut @ 2022-10-31 20:48 ` Marek Vasut 2022-11-01 22:24 ` Linus Walleij 2022-11-01 22:20 ` [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Linus Walleij 2022-11-02 16:36 ` Rob Herring 2 siblings, 1 reply; 7+ messages in thread From: Marek Vasut @ 2022-10-31 20:48 UTC (permalink / raw) To: linux-bluetooth Cc: Marek Vasut, Hakan Jansson, Krzysztof Kozlowski, Linus Walleij, Luiz Augusto von Dentz, Marcel Holtmann, Rob Herring, devicetree CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. This chip is present e.g. on muRata 2AE module. This chip has additional quirk where the HCI command 0xfc45, used on older chips to switch UART clock from 24 MHz to 48 MHz, to support baudrates over 3 Mbdps, is no longer recognized by this newer chip. This newer chip can configure the 4 Mbdps baudrate without the need to issue HCI command 0xfc45, so add flag to indicate this and do not issue the command on this chip to avoid failure to set 4 Mbdps baud rate. It is not clear whether there is a way to determine which chip does and which chip does not support the HCI command 0xfc45, other than trial and error. Signed-off-by: Marek Vasut <marex@denx.de> --- Cc: Hakan Jansson <hakan.jansson@infineon.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: devicetree@vger.kernel.org To: linux-bluetooth@vger.kernel.org --- drivers/bluetooth/hci_bcm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index d7e0b75db8a60..29da04815763f 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -53,11 +53,13 @@ * 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 + * @no_uart_clock_set: UART clock set command for >3Mbps mode is unavailable * @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; + bool no_uart_clock_set; u32 max_autobaud_speed; }; @@ -100,6 +102,7 @@ struct bcm_device_data { * @is_suspended: whether flow control is currently disabled * @no_early_set_baudrate: don't set_baudrate before setup() * @drive_rts_on_open: drive RTS signal on ->open() when platform requires it + * @no_uart_clock_set: UART clock set command for >3Mbps mode is unavailable * @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 @@ -140,6 +143,7 @@ struct bcm_device { #endif bool no_early_set_baudrate; bool drive_rts_on_open; + bool no_uart_clock_set; bool use_autobaud_mode; u8 pcm_int_params[5]; u32 max_autobaud_speed; @@ -172,10 +176,11 @@ static inline void host_set_baudrate(struct hci_uart *hu, unsigned int speed) static int bcm_set_baudrate(struct hci_uart *hu, unsigned int speed) { struct hci_dev *hdev = hu->hdev; + struct bcm_data *bcm = hu->priv; struct sk_buff *skb; struct bcm_update_uart_baud_rate param; - if (speed > 3000000) { + if (speed > 3000000 && !bcm->dev->no_uart_clock_set) { struct bcm_write_uart_clock_setting clock; clock.type = BCM_UART_CLOCK_48MHZ; @@ -1529,6 +1534,7 @@ static int bcm_serdev_probe(struct serdev_device *serdev) 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; + bcmdev->no_uart_clock_set = data->no_uart_clock_set; } return hci_uart_register_device(&bcmdev->serdev_hu, &bcm_proto); @@ -1550,6 +1556,10 @@ static struct bcm_device_data bcm43438_device_data = { .drive_rts_on_open = true, }; +static struct bcm_device_data bcm4373a0_device_data = { + .no_uart_clock_set = true, +}; + static struct bcm_device_data cyw55572_device_data = { .max_autobaud_speed = 921600, }; @@ -1566,6 +1576,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 = "cypress,cyw4373a0-bt", .data = &bcm4373a0_device_data }, { .compatible = "infineon,cyw55572-bt", .data = &cyw55572_device_data }, { }, }; -- 2.35.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support 2022-10-31 20:48 ` [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support Marek Vasut @ 2022-11-01 22:24 ` Linus Walleij 0 siblings, 0 replies; 7+ messages in thread From: Linus Walleij @ 2022-11-01 22:24 UTC (permalink / raw) To: Marek Vasut Cc: linux-bluetooth, Hakan Jansson, Krzysztof Kozlowski, Luiz Augusto von Dentz, Marcel Holtmann, Rob Herring, devicetree On Mon, Oct 31, 2022 at 9:48 PM Marek Vasut <marex@denx.de> wrote: > CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. > This chip is present e.g. on muRata 2AE module. > > This chip has additional quirk where the HCI command 0xfc45, used on > older chips to switch UART clock from 24 MHz to 48 MHz, to support > baudrates over 3 Mbdps, is no longer recognized by this newer chip. > This newer chip can configure the 4 Mbdps baudrate without the need > to issue HCI command 0xfc45, so add flag to indicate this and do not > issue the command on this chip to avoid failure to set 4 Mbdps baud > rate. > > It is not clear whether there is a way to determine which chip does > and which chip does not support the HCI command 0xfc45, other than > trial and error. > > Signed-off-by: Marek Vasut <marex@denx.de> (...) > +static struct bcm_device_data bcm4373a0_device_data = { > + .no_uart_clock_set = true, > +}; Shouldn't this be named cyw4373a0_device_data like the compatible string and the device below it? With that fixed: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding 2022-10-31 20:48 [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Marek Vasut 2022-10-31 20:48 ` [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support Marek Vasut @ 2022-11-01 22:20 ` Linus Walleij 2022-11-01 22:39 ` Luiz Augusto von Dentz 2022-11-02 16:36 ` Rob Herring 2 siblings, 1 reply; 7+ messages in thread From: Linus Walleij @ 2022-11-01 22:20 UTC (permalink / raw) To: Marek Vasut Cc: linux-bluetooth, Hakan Jansson, Krzysztof Kozlowski, Luiz Augusto von Dentz, Marcel Holtmann, Rob Herring, devicetree On Mon, Oct 31, 2022 at 9:48 PM Marek Vasut <marex@denx.de> wrote: > CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. > This chip is present e.g. on muRata 2AE module. Extend the > binding with its DT compatible. > > Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding 2022-11-01 22:20 ` [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Linus Walleij @ 2022-11-01 22:39 ` Luiz Augusto von Dentz 2022-11-02 16:36 ` Rob Herring 0 siblings, 1 reply; 7+ messages in thread From: Luiz Augusto von Dentz @ 2022-11-01 22:39 UTC (permalink / raw) To: Linus Walleij Cc: Marek Vasut, linux-bluetooth, Hakan Jansson, Krzysztof Kozlowski, Luiz Augusto von Dentz, Marcel Holtmann, Rob Herring, devicetree Hi Linus, On Tue, Nov 1, 2022 at 3:30 PM Linus Walleij <linus.walleij@linaro.org> wrote: > > On Mon, Oct 31, 2022 at 9:48 PM Marek Vasut <marex@denx.de> wrote: > > > CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. > > This chip is present e.g. on muRata 2AE module. Extend the > > binding with its DT compatible. > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Should we have these changes in bluetooth-next or dt has a dedicated tree? -- Luiz Augusto von Dentz ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding 2022-11-01 22:39 ` Luiz Augusto von Dentz @ 2022-11-02 16:36 ` Rob Herring 0 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2022-11-02 16:36 UTC (permalink / raw) To: Luiz Augusto von Dentz Cc: Linus Walleij, Marek Vasut, linux-bluetooth, Hakan Jansson, Krzysztof Kozlowski, Luiz Augusto von Dentz, Marcel Holtmann, devicetree On Tue, Nov 01, 2022 at 03:39:21PM -0700, Luiz Augusto von Dentz wrote: > Hi Linus, > > On Tue, Nov 1, 2022 at 3:30 PM Linus Walleij <linus.walleij@linaro.org> wrote: > > > > On Mon, Oct 31, 2022 at 9:48 PM Marek Vasut <marex@denx.de> wrote: > > > > > CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. > > > This chip is present e.g. on muRata 2AE module. Extend the > > > binding with its DT compatible. > > > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > > Should we have these changes in bluetooth-next or dt has a dedicated tree? Most of the time, they go thru the subsystem trees like bluetooth-next. Rob ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding 2022-10-31 20:48 [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Marek Vasut 2022-10-31 20:48 ` [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support Marek Vasut 2022-11-01 22:20 ` [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Linus Walleij @ 2022-11-02 16:36 ` Rob Herring 2 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2022-11-02 16:36 UTC (permalink / raw) To: Marek Vasut Cc: devicetree, Rob Herring, Krzysztof Kozlowski, Luiz Augusto von Dentz, linux-bluetooth, Marcel Holtmann, Linus Walleij, Hakan Jansson On Mon, 31 Oct 2022 21:48:03 +0100, Marek Vasut wrote: > CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. > This chip is present e.g. on muRata 2AE module. Extend the > binding with its DT compatible. > > Signed-off-by: Marek Vasut <marex@denx.de> > --- > Cc: Hakan Jansson <hakan.jansson@infineon.com> > Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > Cc: Marcel Holtmann <marcel@holtmann.org> > Cc: Rob Herring <robh+dt@kernel.org> > Cc: devicetree@vger.kernel.org > To: linux-bluetooth@vger.kernel.org > --- > Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-02 16:42 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-10-31 20:48 [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Marek Vasut 2022-10-31 20:48 ` [PATCH 2/2] Bluetooth: hci_bcm: Add CYW4373A0 support Marek Vasut 2022-11-01 22:24 ` Linus Walleij 2022-11-01 22:20 ` [PATCH 1/2] dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding Linus Walleij 2022-11-01 22:39 ` Luiz Augusto von Dentz 2022-11-02 16:36 ` Rob Herring 2022-11-02 16:36 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).