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