[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250708060150.27375-3-ot_zhangchao.zhang@mediatek.com>
Date: Tue, 8 Jul 2025 14:01:49 +0800
From: Zhangchao Zhang <ot_zhangchao.zhang@...iatek.com>
To: Marcel Holtmann <marcel@...tmann.org>, Matthias Brugger
<matthias.bgg@...il.com>, Luiz Von Dentz <luiz.dentz@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, "Rob
Herring" <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, "Conor
Dooley" <conor+dt@...nel.org>
CC: Sean Wang <sean.wang@...iatek.com>, Jiande Lu <jiande.lu@...iatek.com>,
Deren Wu <deren.Wu@...iatek.com>, Chris Lu <chris.lu@...iatek.com>, Hao Qin
<Hao.qin@...iatek.com>, Wallace Yu <Wallace.Yu@...iatek.com>, linux-bluetooth
<linux-bluetooth@...r.kernel.org>, linux-kernel
<linux-kernel@...r.kernel.org>, linux-arm-kernel
<linux-arm-kernel@...ts.infradead.org>, linux-mediatek
<linux-mediatek@...ts.infradead.org>, devicetree
<devicetree@...r.kernel.org>, Zhangchao Zhang
<ot_zhangchao.zhang@...iatek.com>
Subject: [PATCH v6] dt-bindings: net: mediatek,mt7925-bluetooth.yaml
Reset BT via BT_KILL_1V2_L hardware pin.
On the M.2 standard hardware pin interface, the MTK chip
has a pin called BT_KILL_1V2_L or W_DISABLE#2, it uses
function-level device reset (FLDR) to reset Bluetooth.
When it is pulled low, it can external shut down the BT
function, it is defined as 5 on the MT7925 chip, and is
defined as 248 on the device tree pio controller.
Signed-off-by: Zhangchao Zhang <ot_zhangchao.zhang@...iatek.com>
---
.../bluetooth/mediatek,mt7925-bluetooth.yaml | 55 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7925-bluetooth.yaml
diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7925-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7925-bluetooth.yaml
new file mode 100644
index 000000000000..636b8b3d6a14
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7925-bluetooth.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7925-bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bluetooth mediatek use BT_KILL_1V2_L hardware pin to reset BT
+
+maintainers:
+ - Sean Wang <sean.wang@...iatek.com>
+
+description:
+ MT7925 chip uses the USB bus to communicate with the host.
+ Two methods are used to reset Bluetooth. It provide hardware
+ pin, when an exception occurs, resetting Bluetooth by hardware
+ pin is more stable than resetting Bluetooth by software. If the
+ corresponding pin is not found in dts, bluetooth can also be
+ reset successfully.
+
+allOf:
+ - $ref: bluetooth-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt7925-bluetooth
+
+ "#gpio-cells":
+ const: 2
+
+ reset-gpios:
+ maxItems: 1
+ description:
+ Default high level, this pin can external shut down the BT function
+ when this pin is pull low, at the same time, USB interface will be also
+ disabled. When this function is not required, external pull high is not
+ required. After 200ms, it is pulled high to 3.3v and the next probe is
+ performed. On typical M.2 key E modules this is the W_DISABLE2# pin.
+
+required:
+ - compatible
+ - "#gpio-cells"
+ - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ bluetooth {
+ compatible = "mediatek,mt7925-bluetooth";
+ #gpio-cells = <2>;
+ reset-gpios = <&pio 248 GPIO_ACTIVE_LOW>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 5959513a7359..d104a5821f20 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14676,6 +14676,7 @@ L: linux-mediatek@...ts.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/net/bluetooth/mediatek,bluetooth.txt
F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml
+F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7925-bluetooth.yaml
F: drivers/bluetooth/btmtkuart.c
MEDIATEK BOARD LEVEL SHUTDOWN DRIVERS
--
2.46.0
Powered by blists - more mailing lists