forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
....@@ -3,7 +3,7 @@
33
44 This device is a serial attached device to BTIF device and thus it must be a
55 child node of the serial node with BTIF. The dt-bindings details for BTIF
6
-device can be known via Documentation/devicetree/bindings/serial/8250.txt.
6
+device can be known via Documentation/devicetree/bindings/serial/8250.yaml.
77
88 Required properties:
99
....@@ -33,3 +33,84 @@
3333 clock-names = "ref";
3434 };
3535 };
36
+
37
+MediaTek UART based Bluetooth Devices
38
+==================================
39
+
40
+This device is a serial attached device to UART device and thus it must be a
41
+child node of the serial node with UART.
42
+
43
+Please refer to the following documents for generic properties:
44
+
45
+ Documentation/devicetree/bindings/serial/serial.yaml
46
+
47
+Required properties:
48
+
49
+- compatible: Must be
50
+ "mediatek,mt7663u-bluetooth": for MT7663U device
51
+ "mediatek,mt7668u-bluetooth": for MT7668U device
52
+- vcc-supply: Main voltage regulator
53
+
54
+If the pin controller on the platform can support both pinmux and GPIO
55
+control such as the most of MediaTek platform. Please use below properties.
56
+
57
+- pinctrl-names: Should be "default", "runtime"
58
+- pinctrl-0: Should contain UART RXD low when the device is powered up to
59
+ enter proper bootstrap mode.
60
+- pinctrl-1: Should contain UART mode pin ctrl
61
+
62
+Else, the pin controller on the platform only can support pinmux control and
63
+the GPIO control still has to rely on the dedicated GPIO controller such as
64
+a legacy MediaTek SoC, MT7621. Please use the below properties.
65
+
66
+- boot-gpios: GPIO same to the pin as UART RXD and used to keep LOW when
67
+ the device is powered up to enter proper bootstrap mode when
68
+- pinctrl-names: Should be "default"
69
+- pinctrl-0: Should contain UART mode pin ctrl
70
+
71
+Optional properties:
72
+
73
+- reset-gpios: GPIO used to reset the device whose initial state keeps low,
74
+ if the GPIO is missing, then board-level design should be
75
+ guaranteed.
76
+- clocks: Should be the clock specifiers corresponding to the entry in
77
+ clock-names property. If the clock is missing, then board-level
78
+ design should be guaranteed.
79
+- clock-names: Should contain "osc" entry for the external oscillator.
80
+- current-speed: Current baud rate of the device whose defaults to 921600
81
+
82
+Example:
83
+
84
+ uart1_pins_boot: uart1-default {
85
+ pins-dat {
86
+ pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
87
+ output-low;
88
+ };
89
+ };
90
+
91
+ uart1_pins_runtime: uart1-runtime {
92
+ pins-dat {
93
+ pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
94
+ <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
95
+ };
96
+ };
97
+
98
+ uart1: serial@11003000 {
99
+ compatible = "mediatek,mt7623-uart",
100
+ "mediatek,mt6577-uart";
101
+ reg = <0 0x11003000 0 0x400>;
102
+ interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
103
+ clocks = <&pericfg CLK_PERI_UART1_SEL>,
104
+ <&pericfg CLK_PERI_UART1>;
105
+ clock-names = "baud", "bus";
106
+
107
+ bluetooth {
108
+ compatible = "mediatek,mt7663u-bluetooth";
109
+ vcc-supply = <&reg_5v>;
110
+ reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
111
+ pinctrl-names = "default", "runtime";
112
+ pinctrl-0 = <&uart1_pins_boot>;
113
+ pinctrl-1 = <&uart1_pins_runtime>;
114
+ current-speed = <921600>;
115
+ };
116
+ };