public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
@ 2024-06-27  5:40 Rafał Miłecki
  2024-06-27  6:18 ` Rob Herring (Arm)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rafał Miłecki @ 2024-06-27  5:40 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Matthias Brugger,
	AngeloGioacchino Del Regno, Sean Wang, linux-bluetooth, netdev,
	devicetree, linux-arm-kernel, linux-mediatek,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

This helps validating DTS files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../bluetooth/mediatek,mt7622-bluetooth.yaml  | 61 +++++++++++++++++++
 .../bindings/net/mediatek-bluetooth.txt       | 36 -----------
 2 files changed, 61 insertions(+), 36 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml

diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
new file mode 100644
index 000000000000..cb8ff93c93eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7622-bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek SoC built-in Bluetooth
+
+description:
+  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.
+
+maintainers:
+  - Sean Wang <sean.wang@mediatek.com>
+
+allOf:
+  - $ref: bluetooth-controller.yaml#
+
+properties:
+  compatible:
+    const: mediatek,mt7622-bluetooth
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: ref
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - clocks
+  - clock-names
+  - power-domains
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/mt7622-clk.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/mt7622-power.h>
+
+    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";
+        };
+    };
diff --git a/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt b/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
index 9ef5bacda8c1..988c72685cbf 100644
--- a/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
@@ -1,39 +1,3 @@
-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
 ==================================
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
  2024-06-27  5:40 [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema Rafał Miłecki
@ 2024-06-27  6:18 ` Rob Herring (Arm)
  2024-06-27  6:45   ` Rafał Miłecki
  2024-06-27  6:39 ` bluez.test.bot
  2024-06-27 16:08 ` [PATCH] " Rob Herring
  2 siblings, 1 reply; 5+ messages in thread
From: Rob Herring (Arm) @ 2024-06-27  6:18 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-mediatek, Luiz Augusto von Dentz, linux-arm-kernel,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, Sean Wang,
	Conor Dooley, AngeloGioacchino Del Regno, Rafał Miłecki,
	devicetree, David S . Miller, Krzysztof Kozlowski, Eric Dumazet,
	linux-bluetooth, Marcel Holtmann, netdev


On Thu, 27 Jun 2024 07:40:11 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../bluetooth/mediatek,mt7622-bluetooth.yaml  | 61 +++++++++++++++++++
>  .../bindings/net/mediatek-bluetooth.txt       | 36 -----------
>  2 files changed, 61 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dtb: serial@1100c000: reg: [[0, 285261824], [0, 4096]] is too long
	from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dtb: serial@1100c000: Unevaluated properties are not allowed ('clock-names' was unexpected)
	from schema $id: http://devicetree.org/schemas/serial/8250.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240627054011.26621-1-zajec5@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
  2024-06-27  5:40 [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema Rafał Miłecki
  2024-06-27  6:18 ` Rob Herring (Arm)
@ 2024-06-27  6:39 ` bluez.test.bot
  2024-06-27 16:08 ` [PATCH] " Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2024-06-27  6:39 UTC (permalink / raw)
  To: linux-bluetooth, zajec5

[-- Attachment #1: Type: text/plain, Size: 3309 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=865996

---Test result---

Test Summary:
CheckPatch                    FAIL      1.30 seconds
GitLint                       FAIL      0.46 seconds
SubjectPrefix                 FAIL      0.30 seconds
BuildKernel                   PASS      30.01 seconds
CheckAllWarning               PASS      31.85 seconds
CheckSparse                   PASS      50.82 seconds
CheckSmatch                   PASS      103.34 seconds
BuildKernel32                 PASS      28.50 seconds
TestRunnerSetup               PASS      528.92 seconds
TestRunner_l2cap-tester       PASS      20.54 seconds
TestRunner_iso-tester         FAIL      51.84 seconds
TestRunner_bnep-tester        PASS      4.86 seconds
TestRunner_mgmt-tester        PASS      114.07 seconds
TestRunner_rfcomm-tester      PASS      7.52 seconds
TestRunner_sco-tester         PASS      15.10 seconds
TestRunner_ioctl-tester       PASS      7.95 seconds
TestRunner_mesh-tester        PASS      5.98 seconds
TestRunner_smp-tester         PASS      10.68 seconds
TestRunner_userchan-tester    PASS      5.58 seconds
IncrementalBuild              PASS      28.40 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#117: 
new file mode 100644

total: 0 errors, 1 warnings, 100 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13713830.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
12: B1 Line exceeds max length (98>80): " create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml"
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 116 (95.1%), Failed: 2, Not Run: 4

Failed Test Cases
ISO Connect Suspend - Success                        Failed       8.231 seconds
ISO Connect2 Suspend - Success                       Failed       6.252 seconds


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
  2024-06-27  6:18 ` Rob Herring (Arm)
@ 2024-06-27  6:45   ` Rafał Miłecki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2024-06-27  6:45 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: linux-mediatek, Luiz Augusto von Dentz, linux-arm-kernel,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, Sean Wang,
	Conor Dooley, AngeloGioacchino Del Regno, Rafał Miłecki,
	devicetree, David S . Miller, Krzysztof Kozlowski, Eric Dumazet,
	linux-bluetooth, Marcel Holtmann, netdev

On 27.06.2024 08:18, Rob Herring (Arm) wrote:> On Thu, 27 Jun 2024 07:40:11 +0200, Rafał Miłecki wrote:
 >> From: Rafał Miłecki <rafal@milecki.pl>
 >>
 >> This helps validating DTS files.
 >>
 >> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
 >> ---
 >>   .../bluetooth/mediatek,mt7622-bluetooth.yaml  | 61 +++++++++++++++++++
 >>   .../bindings/net/mediatek-bluetooth.txt       | 36 -----------
 >>   2 files changed, 61 insertions(+), 36 deletions(-)
 >>   create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
 >>
 >
 > My bot found errors running 'make dt_binding_check' on your patch:
 >
 > yamllint warnings/errors:
 >
 > dtschema/dtc warnings/errors:
 > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dtb: serial@1100c000: reg: [[0, 285261824], [0, 4096]] is too long
 > 	from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
 > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dtb: serial@1100c000: Unevaluated properties are not allowed ('clock-names' was unexpected)
 > 	from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
Oops, I really need to fix my yamllint

$ make ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=net/bluetooth/mediatek,mt7622-bluetooth.yaml
   SCHEMA  Documentation/devicetree/bindings/processed-schema.json
   CHKDT   Documentation/devicetree/bindings
   DTEX    Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dts
   DTC_CHK Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.example.dtb
   LINT    Documentation/devicetree/bindings
invalid config: unknown option "extra-allowed" for rule "quoted-strings"
xargs: /usr/bin/yamllint: exited with status 255; aborting


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema
  2024-06-27  5:40 [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema Rafał Miłecki
  2024-06-27  6:18 ` Rob Herring (Arm)
  2024-06-27  6:39 ` bluez.test.bot
@ 2024-06-27 16:08 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2024-06-27 16:08 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Krzysztof Kozlowski, Conor Dooley, Marcel Holtmann,
	Luiz Augusto von Dentz, Matthias Brugger,
	AngeloGioacchino Del Regno, Sean Wang, linux-bluetooth, netdev,
	devicetree, linux-arm-kernel, linux-mediatek,
	Rafał Miłecki

On Thu, Jun 27, 2024 at 07:40:11AM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../bluetooth/mediatek,mt7622-bluetooth.yaml  | 61 +++++++++++++++++++
>  .../bindings/net/mediatek-bluetooth.txt       | 36 -----------
>  2 files changed, 61 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
> new file mode 100644
> index 000000000000..cb8ff93c93eb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7622-bluetooth.yaml
> @@ -0,0 +1,61 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7622-bluetooth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek SoC built-in Bluetooth
> +
> +description:
> +  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.
> +
> +maintainers:
> +  - Sean Wang <sean.wang@mediatek.com>
> +
> +allOf:
> +  - $ref: bluetooth-controller.yaml#
> +
> +properties:
> +  compatible:
> +    const: mediatek,mt7622-bluetooth
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: ref
> +
> +  power-domains:
> +    maxItems: 1
> +
> +required:
> +  - clocks
> +  - clock-names
> +  - power-domains
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/mt7622-clk.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/power/mt7622-power.h>
> +
> +    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>;

Just drop all this. Not relevant to *this* example.

You just need:

serial {

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-27 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27  5:40 [PATCH] dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema Rafał Miłecki
2024-06-27  6:18 ` Rob Herring (Arm)
2024-06-27  6:45   ` Rafał Miłecki
2024-06-27  6:39 ` bluez.test.bot
2024-06-27 16:08 ` [PATCH] " Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox