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