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