xref: /freebsd/sys/contrib/device-tree/Bindings/net/marvell-bt-8xxx.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotMarvell 8897/8997 (sd8897/sd8997) bluetooth devices (SDIO or USB based)
2*c66ec88fSEmmanuel Vadot------
3*c66ec88fSEmmanuel VadotThe 8997 devices supports multiple interfaces. When used on SDIO interfaces,
4*c66ec88fSEmmanuel Vadotthe btmrvl driver is used and when used on USB interface, the btusb driver is
5*c66ec88fSEmmanuel Vadotused.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired properties:
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadot  - compatible : should be one of the following:
10*c66ec88fSEmmanuel Vadot	* "marvell,sd8897-bt" (for SDIO)
11*c66ec88fSEmmanuel Vadot	* "marvell,sd8997-bt" (for SDIO)
12*c66ec88fSEmmanuel Vadot	* "usb1286,204e"      (for USB)
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotOptional properties:
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel Vadot  - marvell,cal-data: Calibration data downloaded to the device during
17*c66ec88fSEmmanuel Vadot		      initialization. This is an array of 28 values(u8).
18*c66ec88fSEmmanuel Vadot		      This is only applicable to SDIO devices.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot  - marvell,wakeup-pin: It represents wakeup pin number of the bluetooth chip.
21*c66ec88fSEmmanuel Vadot		        firmware will use the pin to wakeup host system (u16).
22*c66ec88fSEmmanuel Vadot  - marvell,wakeup-gap-ms: wakeup gap represents wakeup latency of the host
23*c66ec88fSEmmanuel Vadot		      platform. The value will be configured to firmware. This
24*c66ec88fSEmmanuel Vadot		      is needed to work chip's sleep feature as expected (u16).
25*c66ec88fSEmmanuel Vadot  - interrupt-names: Used only for USB based devices (See below)
26*c66ec88fSEmmanuel Vadot  - interrupts : specifies the interrupt pin number to the cpu. For SDIO, the
27*c66ec88fSEmmanuel Vadot		 driver will use the first interrupt specified in the interrupt
28*c66ec88fSEmmanuel Vadot		 array. For USB based devices, the driver will use the interrupt
29*c66ec88fSEmmanuel Vadot		 named "wakeup" from the interrupt-names and interrupt arrays.
30*c66ec88fSEmmanuel Vadot		 The driver will request an irq based on this interrupt number.
31*c66ec88fSEmmanuel Vadot		 During system suspend, the irq will be enabled so that the
32*c66ec88fSEmmanuel Vadot		 bluetooth chip can wakeup host platform under certain
33*c66ec88fSEmmanuel Vadot		 conditions. During system resume, the irq will be disabled
34*c66ec88fSEmmanuel Vadot		 to make sure unnecessary interrupt is not received.
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel VadotExample:
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel VadotIRQ pin 119 is used as system wakeup source interrupt.
39*c66ec88fSEmmanuel Vadotwakeup pin 13 and gap 100ms are configured so that firmware can wakeup host
40*c66ec88fSEmmanuel Vadotusing this device side pin and wakeup latency.
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotExample for SDIO device follows (calibration data is also available in
43*c66ec88fSEmmanuel Vadotbelow example).
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot&mmc3 {
46*c66ec88fSEmmanuel Vadot	vmmc-supply = <&wlan_en_reg>;
47*c66ec88fSEmmanuel Vadot	bus-width = <4>;
48*c66ec88fSEmmanuel Vadot	cap-power-off-card;
49*c66ec88fSEmmanuel Vadot	keep-power-in-suspend;
50*c66ec88fSEmmanuel Vadot
51*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
52*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
53*c66ec88fSEmmanuel Vadot	btmrvl: bluetooth@2 {
54*c66ec88fSEmmanuel Vadot		compatible = "marvell,sd8897-bt";
55*c66ec88fSEmmanuel Vadot		reg = <2>;
56*c66ec88fSEmmanuel Vadot		interrupt-parent = <&pio>;
57*c66ec88fSEmmanuel Vadot		interrupts = <119 IRQ_TYPE_LEVEL_LOW>;
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel Vadot		marvell,cal-data = /bits/ 8 <
60*c66ec88fSEmmanuel Vadot			0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02
61*c66ec88fSEmmanuel Vadot			0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00
62*c66ec88fSEmmanuel Vadot			0x00 0x00 0xf0 0x00>;
63*c66ec88fSEmmanuel Vadot		marvell,wakeup-pin = /bits/ 16 <0x0d>;
64*c66ec88fSEmmanuel Vadot		marvell,wakeup-gap-ms = /bits/ 16 <0x64>;
65*c66ec88fSEmmanuel Vadot	};
66*c66ec88fSEmmanuel Vadot};
67*c66ec88fSEmmanuel Vadot
68*c66ec88fSEmmanuel VadotExample for USB device:
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot&usb_host1_ohci {
71*c66ec88fSEmmanuel Vadot    #address-cells = <1>;
72*c66ec88fSEmmanuel Vadot    #size-cells = <0>;
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadot    mvl_bt1: bt@1 {
75*c66ec88fSEmmanuel Vadot	compatible = "usb1286,204e";
76*c66ec88fSEmmanuel Vadot	reg = <1>;
77*c66ec88fSEmmanuel Vadot	interrupt-parent = <&gpio0>;
78*c66ec88fSEmmanuel Vadot	interrupt-names = "wakeup";
79*c66ec88fSEmmanuel Vadot	interrupts = <119 IRQ_TYPE_LEVEL_LOW>;
80*c66ec88fSEmmanuel Vadot	marvell,wakeup-pin = /bits/ 16 <0x0d>;
81*c66ec88fSEmmanuel Vadot	marvell,wakeup-gap-ms = /bits/ 16 <0x64>;
82*c66ec88fSEmmanuel Vadot    };
83*c66ec88fSEmmanuel Vadot};
84