summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
blob: 9ef5bacda8c18ce4dca582547fada019f00fd794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
MediaTek SoC built-in Bluetooth Devices
==================================

This device is a serial attached device to BTIF device and thus it must be a
child node of the serial node with BTIF. The dt-bindings details for BTIF
device can be known via Documentation/devicetree/bindings/serial/8250.yaml.

Required properties:

- compatible:	Must be
		  "mediatek,mt7622-bluetooth": for MT7622 SoC
- clocks:	Should be the clock specifiers corresponding to the entry in
		clock-names property.
- clock-names:	Should contain "ref" entries.
- power-domains: Phandle to the power domain that the device is part of

Example:

	btif: serial@1100c000 {
		compatible = "mediatek,mt7622-btif",
			     "mediatek,mtk-btif";
		reg = <0 0x1100c000 0 0x1000>;
		interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_LOW>;
		clocks = <&pericfg CLK_PERI_BTIF_PD>;
		clock-names = "main";
		reg-shift = <2>;
		reg-io-width = <4>;

		bluetooth {
			compatible = "mediatek,mt7622-bluetooth";
			power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>;
			clocks = <&clk25m>;
			clock-names = "ref";
		};
	};

MediaTek UART based Bluetooth Devices
==================================

This device is a serial attached device to UART device and thus it must be a
child node of the serial node with UART.

Please refer to the following documents for generic properties:

	Documentation/devicetree/bindings/serial/serial.yaml

Required properties:

- compatible:	Must be
		  "mediatek,mt7663u-bluetooth": for MT7663U device
		  "mediatek,mt7668u-bluetooth": for MT7668U device
- vcc-supply:	Main voltage regulator

If the pin controller on the platform can support both pinmux and GPIO
control such as the most of MediaTek platform. Please use below properties.

- pinctrl-names: Should be "default", "runtime"
- pinctrl-0: Should contain UART RXD low when the device is powered up to
	     enter proper bootstrap mode.
- pinctrl-1: Should contain UART mode pin ctrl

Else, the pin controller on the platform only can support pinmux control and
the GPIO control still has to rely on the dedicated GPIO controller such as
a legacy MediaTek SoC, MT7621. Please use the below properties.

- boot-gpios:	GPIO same to the pin as UART RXD and used to keep LOW when
		the device is powered up to enter proper bootstrap mode when
- pinctrl-names: Should be "default"
- pinctrl-0: Should contain UART mode pin ctrl

Optional properties:

- reset-gpios:	GPIO used to reset the device whose initial state keeps low,
		if the GPIO is missing, then board-level design should be
		guaranteed.
- clocks:	Should be the clock specifiers corresponding to the entry in
		clock-names property. If the clock is missing, then board-level
		design should be guaranteed.
- clock-names:	Should contain "osc" entry for the external oscillator.
- current-speed:  Current baud rate of the device whose defaults to 921600

Example:

	uart1_pins_boot: uart1-default {
		pins-dat {
			pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
			output-low;
		};
	};

	uart1_pins_runtime: uart1-runtime {
		pins-dat {
			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
		};
	};

	uart1: serial@11003000 {
		compatible = "mediatek,mt7623-uart",
			     "mediatek,mt6577-uart";
		reg = <0 0x11003000 0 0x400>;
		interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
		clocks = <&pericfg CLK_PERI_UART1_SEL>,
			 <&pericfg CLK_PERI_UART1>;
		clock-names = "baud", "bus";

		bluetooth {
			compatible = "mediatek,mt7663u-bluetooth";
			vcc-supply = <&reg_5v>;
			reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
			pinctrl-names = "default", "runtime";
			pinctrl-0 = <&uart1_pins_boot>;
			pinctrl-1 = <&uart1_pins_runtime>;
			current-speed = <921600>;
		};
	};