2021-03-05 18:37:35 +00:00
|
|
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
|
|
|
%YAML 1.2
|
|
|
|
---
|
|
|
|
$id: http://devicetree.org/schemas/net/broadcom-bluetooth.yaml#
|
|
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
|
|
|
|
title: Broadcom Bluetooth Chips
|
|
|
|
|
|
|
|
maintainers:
|
|
|
|
- Linus Walleij <linus.walleij@linaro.org>
|
|
|
|
|
|
|
|
description:
|
|
|
|
This binding describes Broadcom UART-attached bluetooth chips.
|
|
|
|
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
enum:
|
|
|
|
- brcm,bcm20702a1
|
|
|
|
- brcm,bcm4329-bt
|
|
|
|
- brcm,bcm4330-bt
|
2021-03-18 08:43:08 +00:00
|
|
|
- brcm,bcm4334-bt
|
2022-09-24 14:21:55 +00:00
|
|
|
- brcm,bcm43430a0-bt
|
|
|
|
- brcm,bcm43430a1-bt
|
2021-03-05 18:37:35 +00:00
|
|
|
- brcm,bcm43438-bt
|
|
|
|
- brcm,bcm4345c5
|
|
|
|
- brcm,bcm43540-bt
|
|
|
|
- brcm,bcm4335a0
|
2022-05-24 05:56:40 +00:00
|
|
|
- brcm,bcm4349-bt
|
2022-11-02 16:47:04 +00:00
|
|
|
- cypress,cyw4373a0-bt
|
2022-06-30 12:45:20 +00:00
|
|
|
- infineon,cyw55572-bt
|
2021-03-05 18:37:35 +00:00
|
|
|
|
|
|
|
shutdown-gpios:
|
|
|
|
maxItems: 1
|
|
|
|
description: GPIO specifier for the line BT_REG_ON used to
|
|
|
|
power on the BT module
|
|
|
|
|
|
|
|
reset-gpios:
|
|
|
|
maxItems: 1
|
|
|
|
description: GPIO specifier for the line BT_RST_N used to
|
|
|
|
reset the BT module. This should be marked as
|
|
|
|
GPIO_ACTIVE_LOW.
|
|
|
|
|
|
|
|
device-wakeup-gpios:
|
|
|
|
maxItems: 1
|
|
|
|
description: GPIO specifier for the line BT_WAKE used to
|
|
|
|
wakeup the controller. This is using the BT_GPIO_0
|
|
|
|
pin on the chip when in use.
|
|
|
|
|
|
|
|
host-wakeup-gpios:
|
|
|
|
maxItems: 1
|
|
|
|
deprecated: true
|
|
|
|
description: GPIO specifier for the line HOST_WAKE used
|
|
|
|
to wakeup the host processor. This is using he BT_GPIO_1
|
|
|
|
pin on the chip when in use. This is deprecated and replaced
|
|
|
|
by interrupts and "host-wakeup" interrupt-names
|
|
|
|
|
|
|
|
clocks:
|
dt-bindings: bluetooth: broadcom: Fix clocks check
The original binding was mentioning that valid values for the clocks and
clock-names property were one or two clocks from extclk, txco and lpo,
with extclk being deprecated in favor of txco.
However, the current binding lists a valid array as extclk, txco and
lpo, with either one or two items.
While this looks similar, it actually enforces that all the device trees
use either ["extclk"], or ["extclk", "txco"]. That doesn't make much
sense, since the two clocks are said to be equivalent, with one
superseeding the other.
lpo is also not a valid clock anymore, and would be as the third clock
of the list, while we could have only this clock in the previous binding
(and in DTs).
Let's rework the clock clause to allow to have either:
- extclk, and mark it a deprecated
- txco alone
- lpo alone
- txco, lpo
While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device
tree so it's not an issue in practice.
Similarly, ["lpo", "txco"] is still considered invalid, but it's
generally considered as a best practice to fix the order of clocks.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210924072756.869731-1-maxime@cerno.tech
2021-09-24 07:27:53 +00:00
|
|
|
minItems: 1
|
2021-03-05 18:37:35 +00:00
|
|
|
maxItems: 2
|
|
|
|
description: 1 or 2 clocks as defined in clock-names below,
|
|
|
|
in that order
|
|
|
|
|
|
|
|
clock-names:
|
|
|
|
description: Names of the 1 to 2 supplied clocks
|
dt-bindings: bluetooth: broadcom: Fix clocks check
The original binding was mentioning that valid values for the clocks and
clock-names property were one or two clocks from extclk, txco and lpo,
with extclk being deprecated in favor of txco.
However, the current binding lists a valid array as extclk, txco and
lpo, with either one or two items.
While this looks similar, it actually enforces that all the device trees
use either ["extclk"], or ["extclk", "txco"]. That doesn't make much
sense, since the two clocks are said to be equivalent, with one
superseeding the other.
lpo is also not a valid clock anymore, and would be as the third clock
of the list, while we could have only this clock in the previous binding
(and in DTs).
Let's rework the clock clause to allow to have either:
- extclk, and mark it a deprecated
- txco alone
- lpo alone
- txco, lpo
While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device
tree so it's not an issue in practice.
Similarly, ["lpo", "txco"] is still considered invalid, but it's
generally considered as a best practice to fix the order of clocks.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210924072756.869731-1-maxime@cerno.tech
2021-09-24 07:27:53 +00:00
|
|
|
oneOf:
|
|
|
|
- const: extclk
|
|
|
|
deprecated: true
|
|
|
|
description: Deprecated in favor of txco
|
|
|
|
|
2021-03-05 18:37:35 +00:00
|
|
|
- const: txco
|
dt-bindings: bluetooth: broadcom: Fix clocks check
The original binding was mentioning that valid values for the clocks and
clock-names property were one or two clocks from extclk, txco and lpo,
with extclk being deprecated in favor of txco.
However, the current binding lists a valid array as extclk, txco and
lpo, with either one or two items.
While this looks similar, it actually enforces that all the device trees
use either ["extclk"], or ["extclk", "txco"]. That doesn't make much
sense, since the two clocks are said to be equivalent, with one
superseeding the other.
lpo is also not a valid clock anymore, and would be as the third clock
of the list, while we could have only this clock in the previous binding
(and in DTs).
Let's rework the clock clause to allow to have either:
- extclk, and mark it a deprecated
- txco alone
- lpo alone
- txco, lpo
While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device
tree so it's not an issue in practice.
Similarly, ["lpo", "txco"] is still considered invalid, but it's
generally considered as a best practice to fix the order of clocks.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210924072756.869731-1-maxime@cerno.tech
2021-09-24 07:27:53 +00:00
|
|
|
description: >
|
|
|
|
external reference clock (not a standalone crystal)
|
|
|
|
|
2021-03-05 18:37:35 +00:00
|
|
|
- const: lpo
|
dt-bindings: bluetooth: broadcom: Fix clocks check
The original binding was mentioning that valid values for the clocks and
clock-names property were one or two clocks from extclk, txco and lpo,
with extclk being deprecated in favor of txco.
However, the current binding lists a valid array as extclk, txco and
lpo, with either one or two items.
While this looks similar, it actually enforces that all the device trees
use either ["extclk"], or ["extclk", "txco"]. That doesn't make much
sense, since the two clocks are said to be equivalent, with one
superseeding the other.
lpo is also not a valid clock anymore, and would be as the third clock
of the list, while we could have only this clock in the previous binding
(and in DTs).
Let's rework the clock clause to allow to have either:
- extclk, and mark it a deprecated
- txco alone
- lpo alone
- txco, lpo
While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device
tree so it's not an issue in practice.
Similarly, ["lpo", "txco"] is still considered invalid, but it's
generally considered as a best practice to fix the order of clocks.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210924072756.869731-1-maxime@cerno.tech
2021-09-24 07:27:53 +00:00
|
|
|
description: >
|
|
|
|
external low power 32.768 kHz clock
|
|
|
|
|
|
|
|
- items:
|
|
|
|
- const: txco
|
|
|
|
- const: lpo
|
2021-03-05 18:37:35 +00:00
|
|
|
|
|
|
|
vbat-supply:
|
|
|
|
description: phandle to regulator supply for VBAT
|
|
|
|
|
|
|
|
vddio-supply:
|
|
|
|
description: phandle to regulator supply for VDDIO
|
|
|
|
|
|
|
|
brcm,bt-pcm-int-params:
|
|
|
|
$ref: /schemas/types.yaml#/definitions/uint8-array
|
|
|
|
minItems: 5
|
|
|
|
maxItems: 5
|
|
|
|
description: |-
|
|
|
|
configure PCM parameters via a 5-byte array:
|
|
|
|
sco-routing: 0 = PCM, 1 = Transport, 2 = Codec, 3 = I2S
|
|
|
|
pcm-interface-rate: 128KBps, 256KBps, 512KBps, 1024KBps, 2048KBps
|
|
|
|
pcm-frame-type: short, long
|
|
|
|
pcm-sync-mode: slave, master
|
|
|
|
pcm-clock-mode: slave, master
|
|
|
|
|
2022-05-30 15:02:17 +00:00
|
|
|
brcm,requires-autobaud-mode:
|
|
|
|
type: boolean
|
|
|
|
description:
|
|
|
|
Set this property if autobaud mode is required. Autobaud mode is required
|
|
|
|
if the device's initial baud rate in normal mode is not supported by the
|
|
|
|
host or if the device requires autobaud mode startup before loading FW.
|
|
|
|
|
2021-03-05 18:37:35 +00:00
|
|
|
interrupts:
|
|
|
|
items:
|
|
|
|
- description: Handle to the line HOST_WAKE used to wake
|
|
|
|
up the host processor. This uses the BT_GPIO_1 pin on
|
|
|
|
the chip when in use.
|
|
|
|
|
|
|
|
interrupt-names:
|
|
|
|
items:
|
|
|
|
- const: host-wakeup
|
|
|
|
|
|
|
|
max-speed: true
|
|
|
|
current-speed: true
|
|
|
|
|
|
|
|
required:
|
|
|
|
- compatible
|
|
|
|
|
dt-bindings: net: broadcom-bluetooth: Add conditional constraints
Add conditional constraint to make property "reset-gpios" available only
for compatible devices acually having the reset pin.
Make property "brcm,requires-autobaud-mode" depend on property
"shutdown-gpios" as the shutdown pin is required to enter autobaud mode.
I looked at all compatible devices and compiled the matrix below before
formulating the conditional constraint. This was a pure paper exercise and
no verification testing has been performed.
d
e
v h
i o
c s
s e t
h - -
u w w v
t r a a v d
d e k k b d
o s e e a i
w e u u t o
n t p p - -
- - - - s s
g g g g u u
p p p p t p p
i i i i x l p p
o o o o c p l l
s s s s o o y y
---------------------------------------
brcm,bcm20702a1 X X X X X X X X
brcm,bcm4329-bt X X X X X X X X
brcm,bcm4330-bt X X X X X X X X
brcm,bcm4334-bt X - X X X X X X
brcm,bcm43438-bt X - X X X X X X
brcm,bcm4345c5 X - X X X X X X
brcm,bcm43540-bt X - X X X X X X
brcm,bcm4335a0 X - X X X X X X
brcm,bcm4349-bt X - X X X X X X
infineon,cyw55572-bt X - X X X X X X
Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2022-06-30 12:45:21 +00:00
|
|
|
dependencies:
|
|
|
|
brcm,requires-autobaud-mode: [ 'shutdown-gpios' ]
|
|
|
|
|
|
|
|
if:
|
|
|
|
not:
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
contains:
|
|
|
|
enum:
|
|
|
|
- brcm,bcm20702a1
|
|
|
|
- brcm,bcm4329-bt
|
|
|
|
- brcm,bcm4330-bt
|
|
|
|
then:
|
|
|
|
properties:
|
|
|
|
reset-gpios: false
|
|
|
|
|
2021-03-05 18:37:35 +00:00
|
|
|
additionalProperties: false
|
|
|
|
|
|
|
|
examples:
|
|
|
|
- |
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/interrupt-controller/irq.h>
|
|
|
|
|
|
|
|
uart {
|
|
|
|
uart-has-rtscts;
|
|
|
|
|
|
|
|
bluetooth {
|
|
|
|
compatible = "brcm,bcm4330-bt";
|
|
|
|
max-speed = <921600>;
|
|
|
|
brcm,bt-pcm-int-params = [01 02 00 01 01];
|
|
|
|
shutdown-gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
|
|
|
|
device-wakeup-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
|
|
|
reset-gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
|
|
|
interrupt-parent = <&gpio>;
|
|
|
|
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
|
|
|
|
};
|
|
|
|
};
|