xref: /linux/Documentation/devicetree/bindings/net/bluetooth/brcm,bluetooth.yaml (revision 3ea5eb68b9d624935108b5e696859304edfac202)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/bluetooth/brcm,bluetooth.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom Bluetooth Chips
8
9maintainers:
10  - Linus Walleij <linus.walleij@linaro.org>
11
12description:
13  This binding describes Broadcom UART-attached bluetooth chips.
14
15properties:
16  compatible:
17    oneOf:
18      - items:
19          - enum:
20              - infineon,cyw43439-bt
21          - const: brcm,bcm4329-bt
22      - enum:
23          - brcm,bcm20702a1
24          - brcm,bcm4329-bt
25          - brcm,bcm4330-bt
26          - brcm,bcm4334-bt
27          - brcm,bcm43430a0-bt
28          - brcm,bcm43430a1-bt
29          - brcm,bcm43438-bt
30          - brcm,bcm4345c5
31          - brcm,bcm43540-bt
32          - brcm,bcm4335a0
33          - brcm,bcm4349-bt
34          - cypress,cyw4373a0-bt
35          - infineon,cyw55572-bt
36
37  shutdown-gpios:
38    maxItems: 1
39    description: GPIO specifier for the line BT_REG_ON used to
40      power on the BT module
41
42  reset-gpios:
43    maxItems: 1
44    description: GPIO specifier for the line BT_RST_N used to
45      reset the BT module. This should be marked as
46      GPIO_ACTIVE_LOW.
47
48  device-wakeup-gpios:
49    maxItems: 1
50    description: GPIO specifier for the line BT_WAKE used to
51      wakeup the controller. This is using the BT_GPIO_0
52      pin on the chip when in use.
53
54  host-wakeup-gpios:
55    maxItems: 1
56    deprecated: true
57    description: GPIO specifier for the line HOST_WAKE used
58      to wakeup the host processor. This is using he BT_GPIO_1
59      pin on the chip when in use. This is deprecated and replaced
60      by interrupts and "host-wakeup" interrupt-names
61
62  clocks:
63    minItems: 1
64    maxItems: 2
65    description: 1 or 2 clocks as defined in clock-names below,
66      in that order
67
68  clock-names:
69    description: Names of the 1 to 2 supplied clocks
70    oneOf:
71      - const: extclk
72        deprecated: true
73        description: Deprecated in favor of txco
74
75      - const: txco
76        description: >
77          external reference clock (not a standalone crystal)
78
79      - const: lpo
80        description: >
81          external low power 32.768 kHz clock
82
83      - items:
84          - const: txco
85          - const: lpo
86
87  vbat-supply:
88    description: phandle to regulator supply for VBAT
89
90  vddio-supply:
91    description: phandle to regulator supply for VDDIO
92
93  brcm,bt-pcm-int-params:
94    $ref: /schemas/types.yaml#/definitions/uint8-array
95    minItems: 5
96    maxItems: 5
97    description: |-
98      configure PCM parameters via a 5-byte array:
99       sco-routing: 0 = PCM, 1 = Transport, 2 = Codec, 3 = I2S
100       pcm-interface-rate: 128KBps, 256KBps, 512KBps, 1024KBps, 2048KBps
101       pcm-frame-type: short, long
102       pcm-sync-mode: slave, master
103       pcm-clock-mode: slave, master
104
105  brcm,requires-autobaud-mode:
106    type: boolean
107    description:
108      Set this property if autobaud mode is required. Autobaud mode is required
109      if the device's initial baud rate in normal mode is not supported by the
110      host or if the device requires autobaud mode startup before loading FW.
111
112  interrupts:
113    items:
114      - description: Handle to the line HOST_WAKE used to wake
115          up the host processor. This uses the BT_GPIO_1 pin on
116          the chip when in use.
117
118  interrupt-names:
119    items:
120      - const: host-wakeup
121
122required:
123  - compatible
124
125dependencies:
126  brcm,requires-autobaud-mode: [ shutdown-gpios ]
127
128allOf:
129  - $ref: /schemas/serial/serial-peripheral-props.yaml#
130  - if:
131      not:
132        properties:
133          compatible:
134            contains:
135              enum:
136                - brcm,bcm20702a1
137                - brcm,bcm4329-bt
138                - brcm,bcm4330-bt
139    then:
140      properties:
141        reset-gpios: false
142
143unevaluatedProperties: false
144
145examples:
146  - |
147    #include <dt-bindings/gpio/gpio.h>
148    #include <dt-bindings/interrupt-controller/irq.h>
149
150    uart {
151        uart-has-rtscts;
152
153        bluetooth {
154            compatible = "brcm,bcm4330-bt";
155            max-speed = <921600>;
156            brcm,bt-pcm-int-params = [01 02 00 01 01];
157            shutdown-gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
158            device-wakeup-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
159            reset-gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
160            interrupt-parent = <&gpio>;
161            interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
162        };
163    };
164