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