Skip to content

Commit 88b73fd

Browse files
Rafał MiłeckiVudentz
authored andcommitted
dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
This helps validating DTS files. Introduced changes: 1. Dropped serial details from example 2. Added required example include Signed-off-by: Rafał Miłecki <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 87be7b1 commit 88b73fd

File tree

2 files changed

+51
-36
lines changed

2 files changed

+51
-36
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7622-bluetooth.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek SoC built-in Bluetooth
8+
9+
description:
10+
This device is a serial attached device to BTIF device and thus it must be a
11+
child node of the serial node with BTIF. The dt-bindings details for BTIF
12+
device can be known via Documentation/devicetree/bindings/serial/8250.yaml.
13+
14+
maintainers:
15+
- Sean Wang <[email protected]>
16+
17+
allOf:
18+
- $ref: bluetooth-controller.yaml#
19+
20+
properties:
21+
compatible:
22+
const: mediatek,mt7622-bluetooth
23+
24+
clocks:
25+
maxItems: 1
26+
27+
clock-names:
28+
const: ref
29+
30+
power-domains:
31+
maxItems: 1
32+
33+
required:
34+
- clocks
35+
- clock-names
36+
- power-domains
37+
38+
unevaluatedProperties: false
39+
40+
examples:
41+
- |
42+
#include <dt-bindings/power/mt7622-power.h>
43+
44+
serial {
45+
bluetooth {
46+
compatible = "mediatek,mt7622-bluetooth";
47+
power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>;
48+
clocks = <&clk25m>;
49+
clock-names = "ref";
50+
};
51+
};

Documentation/devicetree/bindings/net/mediatek-bluetooth.txt

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
MediaTek SoC built-in Bluetooth Devices
2-
==================================
3-
4-
This device is a serial attached device to BTIF device and thus it must be a
5-
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.yaml.
7-
8-
Required properties:
9-
10-
- compatible: Must be
11-
"mediatek,mt7622-bluetooth": for MT7622 SoC
12-
- clocks: Should be the clock specifiers corresponding to the entry in
13-
clock-names property.
14-
- clock-names: Should contain "ref" entries.
15-
- power-domains: Phandle to the power domain that the device is part of
16-
17-
Example:
18-
19-
btif: serial@1100c000 {
20-
compatible = "mediatek,mt7622-btif",
21-
"mediatek,mtk-btif";
22-
reg = <0 0x1100c000 0 0x1000>;
23-
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_LOW>;
24-
clocks = <&pericfg CLK_PERI_BTIF_PD>;
25-
clock-names = "main";
26-
reg-shift = <2>;
27-
reg-io-width = <4>;
28-
29-
bluetooth {
30-
compatible = "mediatek,mt7622-bluetooth";
31-
power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>;
32-
clocks = <&clk25m>;
33-
clock-names = "ref";
34-
};
35-
};
36-
371
MediaTek UART based Bluetooth Devices
382
==================================
393

0 commit comments

Comments
 (0)