xref: /freebsd/sys/contrib/device-tree/Bindings/net/bluetooth/mediatek,bluetooth.txt (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel VadotMediaTek UART based Bluetooth Devices
2*b2d2a78aSEmmanuel Vadot==================================
3*b2d2a78aSEmmanuel Vadot
4*b2d2a78aSEmmanuel VadotThis device is a serial attached device to UART device and thus it must be a
5*b2d2a78aSEmmanuel Vadotchild node of the serial node with UART.
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel VadotPlease refer to the following documents for generic properties:
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadot	Documentation/devicetree/bindings/serial/serial.yaml
10*b2d2a78aSEmmanuel Vadot
11*b2d2a78aSEmmanuel VadotRequired properties:
12*b2d2a78aSEmmanuel Vadot
13*b2d2a78aSEmmanuel Vadot- compatible:	Must be
14*b2d2a78aSEmmanuel Vadot		  "mediatek,mt7663u-bluetooth": for MT7663U device
15*b2d2a78aSEmmanuel Vadot		  "mediatek,mt7668u-bluetooth": for MT7668U device
16*b2d2a78aSEmmanuel Vadot- vcc-supply:	Main voltage regulator
17*b2d2a78aSEmmanuel Vadot
18*b2d2a78aSEmmanuel VadotIf the pin controller on the platform can support both pinmux and GPIO
19*b2d2a78aSEmmanuel Vadotcontrol such as the most of MediaTek platform. Please use below properties.
20*b2d2a78aSEmmanuel Vadot
21*b2d2a78aSEmmanuel Vadot- pinctrl-names: Should be "default", "runtime"
22*b2d2a78aSEmmanuel Vadot- pinctrl-0: Should contain UART RXD low when the device is powered up to
23*b2d2a78aSEmmanuel Vadot	     enter proper bootstrap mode.
24*b2d2a78aSEmmanuel Vadot- pinctrl-1: Should contain UART mode pin ctrl
25*b2d2a78aSEmmanuel Vadot
26*b2d2a78aSEmmanuel VadotElse, the pin controller on the platform only can support pinmux control and
27*b2d2a78aSEmmanuel Vadotthe GPIO control still has to rely on the dedicated GPIO controller such as
28*b2d2a78aSEmmanuel Vadota legacy MediaTek SoC, MT7621. Please use the below properties.
29*b2d2a78aSEmmanuel Vadot
30*b2d2a78aSEmmanuel Vadot- boot-gpios:	GPIO same to the pin as UART RXD and used to keep LOW when
31*b2d2a78aSEmmanuel Vadot		the device is powered up to enter proper bootstrap mode when
32*b2d2a78aSEmmanuel Vadot- pinctrl-names: Should be "default"
33*b2d2a78aSEmmanuel Vadot- pinctrl-0: Should contain UART mode pin ctrl
34*b2d2a78aSEmmanuel Vadot
35*b2d2a78aSEmmanuel VadotOptional properties:
36*b2d2a78aSEmmanuel Vadot
37*b2d2a78aSEmmanuel Vadot- reset-gpios:	GPIO used to reset the device whose initial state keeps low,
38*b2d2a78aSEmmanuel Vadot		if the GPIO is missing, then board-level design should be
39*b2d2a78aSEmmanuel Vadot		guaranteed.
40*b2d2a78aSEmmanuel Vadot- clocks:	Should be the clock specifiers corresponding to the entry in
41*b2d2a78aSEmmanuel Vadot		clock-names property. If the clock is missing, then board-level
42*b2d2a78aSEmmanuel Vadot		design should be guaranteed.
43*b2d2a78aSEmmanuel Vadot- clock-names:	Should contain "osc" entry for the external oscillator.
44*b2d2a78aSEmmanuel Vadot- current-speed:  Current baud rate of the device whose defaults to 921600
45*b2d2a78aSEmmanuel Vadot
46*b2d2a78aSEmmanuel VadotExample:
47*b2d2a78aSEmmanuel Vadot
48*b2d2a78aSEmmanuel Vadot	uart1_pins_boot: uart1-default {
49*b2d2a78aSEmmanuel Vadot		pins-dat {
50*b2d2a78aSEmmanuel Vadot			pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
51*b2d2a78aSEmmanuel Vadot			output-low;
52*b2d2a78aSEmmanuel Vadot		};
53*b2d2a78aSEmmanuel Vadot	};
54*b2d2a78aSEmmanuel Vadot
55*b2d2a78aSEmmanuel Vadot	uart1_pins_runtime: uart1-runtime {
56*b2d2a78aSEmmanuel Vadot		pins-dat {
57*b2d2a78aSEmmanuel Vadot			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
58*b2d2a78aSEmmanuel Vadot				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
59*b2d2a78aSEmmanuel Vadot		};
60*b2d2a78aSEmmanuel Vadot	};
61*b2d2a78aSEmmanuel Vadot
62*b2d2a78aSEmmanuel Vadot	uart1: serial@11003000 {
63*b2d2a78aSEmmanuel Vadot		compatible = "mediatek,mt7623-uart",
64*b2d2a78aSEmmanuel Vadot			     "mediatek,mt6577-uart";
65*b2d2a78aSEmmanuel Vadot		reg = <0 0x11003000 0 0x400>;
66*b2d2a78aSEmmanuel Vadot		interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
67*b2d2a78aSEmmanuel Vadot		clocks = <&pericfg CLK_PERI_UART1_SEL>,
68*b2d2a78aSEmmanuel Vadot			 <&pericfg CLK_PERI_UART1>;
69*b2d2a78aSEmmanuel Vadot		clock-names = "baud", "bus";
70*b2d2a78aSEmmanuel Vadot
71*b2d2a78aSEmmanuel Vadot		bluetooth {
72*b2d2a78aSEmmanuel Vadot			compatible = "mediatek,mt7663u-bluetooth";
73*b2d2a78aSEmmanuel Vadot			vcc-supply = <&reg_5v>;
74*b2d2a78aSEmmanuel Vadot			reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
75*b2d2a78aSEmmanuel Vadot			pinctrl-names = "default", "runtime";
76*b2d2a78aSEmmanuel Vadot			pinctrl-0 = <&uart1_pins_boot>;
77*b2d2a78aSEmmanuel Vadot			pinctrl-1 = <&uart1_pins_runtime>;
78*b2d2a78aSEmmanuel Vadot			current-speed = <921600>;
79*b2d2a78aSEmmanuel Vadot		};
80*b2d2a78aSEmmanuel Vadot	};
81