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