diff mbox series

[3/3] dt-bindings: net: ti,bluetooth: Convert to json-schema

Message ID c1814db9aff7f09ea41b562a2da305312d8df2dd.1634646975.git.geert+renesas@glider.be (mailing list archive)
State New, archived
Headers show
Series dt-bindings: net: TI wlcore json schema conversion and fix | expand

Commit Message

Geert Uytterhoeven Oct. 19, 2021, 12:43 p.m. UTC
Convert the Texas Instruments serial-attached bluetooth Device Tree
binding documentation to json-schema.

Add missing max-speed property.
Update the example.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
I listed David as maintainer, as he wrote the original bindings.
Please scream if not appropriate.
---
 .../devicetree/bindings/net/ti,bluetooth.yaml | 91 +++++++++++++++++++
 .../devicetree/bindings/net/ti-bluetooth.txt  | 60 ------------
 2 files changed, 91 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt

Comments

David Lechner Oct. 19, 2021, 3:41 p.m. UTC | #1
On 10/19/21 7:43 AM, Geert Uytterhoeven wrote:
> Convert the Texas Instruments serial-attached bluetooth Device Tree
> binding documentation to json-schema.
> 
> Add missing max-speed property.
> Update the example.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> I listed David as maintainer, as he wrote the original bindings.
> Please scream if not appropriate.

I'm not affiliated with TI in any way, so if someone from TI
wants to take responsibility, that would probably be better.

For for the time being...

Acked-by: David Lechner <david@lechnology.com>


> ---
>   .../devicetree/bindings/net/ti,bluetooth.yaml | 91 +++++++++++++++++++
>   .../devicetree/bindings/net/ti-bluetooth.txt  | 60 ------------
>   2 files changed, 91 insertions(+), 60 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
>   delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/ti,bluetooth.yaml b/Documentation/devicetree/bindings/net/ti,bluetooth.yaml
> new file mode 100644
> index 0000000000000000..9f6102977c9732d2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/ti,bluetooth.yaml
> @@ -0,0 +1,91 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/ti,bluetooth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments Bluetooth Chips
> +
> +maintainers:
> +  - David Lechner <david@lechnology.com>
> +
> +description: |
> +  This documents the binding structure and common properties for serial
> +  attached TI Bluetooth devices. The following chips are included in this
> +  binding:
> +
> +  * TI CC256x Bluetooth devices
> +  * TI WiLink 7/8 (wl12xx/wl18xx) Shared Transport BT/FM/GPS devices
> +
> +  TI WiLink devices have a UART interface for providing Bluetooth, FM radio,
> +  and GPS over what's called "shared transport". The shared transport is
> +  standard BT HCI protocol with additional channels for the other functions.
> +
> +  TI WiLink devices also have a separate WiFi interface as described in
> +  wireless/ti,wlcore.yaml.
> +
> +  This bindings follows the UART slave device binding in ../serial/serial.yaml.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,cc2560
> +      - ti,wl1271-st
> +      - ti,wl1273-st
> +      - ti,wl1281-st
> +      - ti,wl1283-st
> +      - ti,wl1285-st
> +      - ti,wl1801-st
> +      - ti,wl1805-st
> +      - ti,wl1807-st
> +      - ti,wl1831-st
> +      - ti,wl1835-st
> +      - ti,wl1837-st
> +
> +  enable-gpios:
> +    maxItems: 1
> +
> +  vio-supply:
> +    description: Vio input supply (1.8V)
> +
> +  vbat-supply:
> +    description: Vbat input supply (2.9-4.8V)
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: ext_clock
> +
> +  max-speed: true

Does this mean that max-speed from serial.yaml is supported
but current-speed is not?

> +
> +  nvmem-cells:
> +    maxItems: 1
> +    description:
> +      Nvmem data cell that contains a 6 byte BD address with the most
> +      significant byte first (big-endian).
> +
> +  nvmem-cell-names:
> +    items:
> +      - const: bd-address
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
Geert Uytterhoeven Oct. 19, 2021, 3:48 p.m. UTC | #2
Hi David,

On Tue, Oct 19, 2021 at 5:41 PM David Lechner <david@lechnology.com> wrote:
> On 10/19/21 7:43 AM, Geert Uytterhoeven wrote:
> > Convert the Texas Instruments serial-attached bluetooth Device Tree
> > binding documentation to json-schema.
> >
> > Add missing max-speed property.
> > Update the example.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > I listed David as maintainer, as he wrote the original bindings.
> > Please scream if not appropriate.
>
> I'm not affiliated with TI in any way, so if someone from TI
> wants to take responsibility, that would probably be better.
>
> For for the time being...
>
> Acked-by: David Lechner <david@lechnology.com>

Thanks!

> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/ti,bluetooth.yaml
> > @@ -0,0 +1,91 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/ti,bluetooth.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Texas Instruments Bluetooth Chips
> > +
> > +maintainers:
> > +  - David Lechner <david@lechnology.com>
> > +
> > +description: |
> > +  This documents the binding structure and common properties for serial
> > +  attached TI Bluetooth devices. The following chips are included in this
> > +  binding:
> > +
> > +  * TI CC256x Bluetooth devices
> > +  * TI WiLink 7/8 (wl12xx/wl18xx) Shared Transport BT/FM/GPS devices
> > +
> > +  TI WiLink devices have a UART interface for providing Bluetooth, FM radio,
> > +  and GPS over what's called "shared transport". The shared transport is
> > +  standard BT HCI protocol with additional channels for the other functions.
> > +
> > +  TI WiLink devices also have a separate WiFi interface as described in
> > +  wireless/ti,wlcore.yaml.
> > +
> > +  This bindings follows the UART slave device binding in ../serial/serial.yaml.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,cc2560
> > +      - ti,wl1271-st
> > +      - ti,wl1273-st
> > +      - ti,wl1281-st
> > +      - ti,wl1283-st
> > +      - ti,wl1285-st
> > +      - ti,wl1801-st
> > +      - ti,wl1805-st
> > +      - ti,wl1807-st
> > +      - ti,wl1831-st
> > +      - ti,wl1835-st
> > +      - ti,wl1837-st
> > +
> > +  enable-gpios:
> > +    maxItems: 1
> > +
> > +  vio-supply:
> > +    description: Vio input supply (1.8V)
> > +
> > +  vbat-supply:
> > +    description: Vbat input supply (2.9-4.8V)
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    items:
> > +      - const: ext_clock
> > +
> > +  max-speed: true
>
> Does this mean that max-speed from serial.yaml is supported
> but current-speed is not?

I added it because one DTS uses "max-speed", and the driver
supports it.
The driver does not support "current-speed", but seems to ask for
an initial speed of 115200, and an operational speed of max-speed
(default 3000000, perhaps that should be documented in the bindings):

        hci_uart_set_speeds(hu, 115200, max_speed);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Rob Herring Oct. 20, 2021, 2:22 p.m. UTC | #3
On Tue, 19 Oct 2021 14:43:13 +0200, Geert Uytterhoeven wrote:
> Convert the Texas Instruments serial-attached bluetooth Device Tree
> binding documentation to json-schema.
> 
> Add missing max-speed property.
> Update the example.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> I listed David as maintainer, as he wrote the original bindings.
> Please scream if not appropriate.
> ---
>  .../devicetree/bindings/net/ti,bluetooth.yaml | 91 +++++++++++++++++++
>  .../devicetree/bindings/net/ti-bluetooth.txt  | 60 ------------
>  2 files changed, 91 insertions(+), 60 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ti,bluetooth.yaml b/Documentation/devicetree/bindings/net/ti,bluetooth.yaml
new file mode 100644
index 0000000000000000..9f6102977c9732d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ti,bluetooth.yaml
@@ -0,0 +1,91 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Bluetooth Chips
+
+maintainers:
+  - David Lechner <david@lechnology.com>
+
+description: |
+  This documents the binding structure and common properties for serial
+  attached TI Bluetooth devices. The following chips are included in this
+  binding:
+
+  * TI CC256x Bluetooth devices
+  * TI WiLink 7/8 (wl12xx/wl18xx) Shared Transport BT/FM/GPS devices
+
+  TI WiLink devices have a UART interface for providing Bluetooth, FM radio,
+  and GPS over what's called "shared transport". The shared transport is
+  standard BT HCI protocol with additional channels for the other functions.
+
+  TI WiLink devices also have a separate WiFi interface as described in
+  wireless/ti,wlcore.yaml.
+
+  This bindings follows the UART slave device binding in ../serial/serial.yaml.
+
+properties:
+  compatible:
+    enum:
+      - ti,cc2560
+      - ti,wl1271-st
+      - ti,wl1273-st
+      - ti,wl1281-st
+      - ti,wl1283-st
+      - ti,wl1285-st
+      - ti,wl1801-st
+      - ti,wl1805-st
+      - ti,wl1807-st
+      - ti,wl1831-st
+      - ti,wl1835-st
+      - ti,wl1837-st
+
+  enable-gpios:
+    maxItems: 1
+
+  vio-supply:
+    description: Vio input supply (1.8V)
+
+  vbat-supply:
+    description: Vbat input supply (2.9-4.8V)
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ext_clock
+
+  max-speed: true
+
+  nvmem-cells:
+    maxItems: 1
+    description:
+      Nvmem data cell that contains a 6 byte BD address with the most
+      significant byte first (big-endian).
+
+  nvmem-cell-names:
+    items:
+      - const: bd-address
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    serial {
+            bluetooth {
+                    compatible = "ti,wl1835-st";
+                    enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+                    clocks = <&clk32k_wl18xx>;
+                    clock-names = "ext_clock";
+                    nvmem-cells = <&bd_address>;
+                    nvmem-cell-names = "bd-address";
+            };
+    };
diff --git a/Documentation/devicetree/bindings/net/ti-bluetooth.txt b/Documentation/devicetree/bindings/net/ti-bluetooth.txt
deleted file mode 100644
index 3c01cfc1e12dc132..0000000000000000
--- a/Documentation/devicetree/bindings/net/ti-bluetooth.txt
+++ /dev/null
@@ -1,60 +0,0 @@ 
-Texas Instruments Bluetooth Chips
----------------------------------
-
-This documents the binding structure and common properties for serial
-attached TI Bluetooth devices. The following chips are included in this
-binding:
-
-* TI CC256x Bluetooth devices
-* TI WiLink 7/8 (wl12xx/wl18xx) Shared Transport BT/FM/GPS devices
-
-TI WiLink devices have a UART interface for providing Bluetooth, FM radio,
-and GPS over what's called "shared transport". The shared transport is
-standard BT HCI protocol with additional channels for the other functions.
-
-TI WiLink devices also have a separate WiFi interface as described in
-wireless/ti,wlcore.yaml.
-
-This bindings follows the UART slave device binding in ../serial/serial.yaml.
-
-Required properties:
- - compatible: should be one of the following:
-    "ti,cc2560"
-    "ti,wl1271-st"
-    "ti,wl1273-st"
-    "ti,wl1281-st"
-    "ti,wl1283-st"
-    "ti,wl1285-st"
-    "ti,wl1801-st"
-    "ti,wl1805-st"
-    "ti,wl1807-st"
-    "ti,wl1831-st"
-    "ti,wl1835-st"
-    "ti,wl1837-st"
-
-Optional properties:
- - enable-gpios : GPIO signal controlling enabling of BT. Active high.
- - vio-supply : Vio input supply (1.8V)
- - vbat-supply : Vbat input supply (2.9-4.8V)
- - clocks : Must contain an entry, for each entry in clock-names.
-   See ../clocks/clock-bindings.txt for details.
- - clock-names : Must include the following entry:
-   "ext_clock" (External clock provided to the TI combo chip).
- - nvmem-cells: phandle to nvmem data cell that contains a 6 byte BD address
-   with the most significant byte first (big-endian).
- - nvmem-cell-names: "bd-address" (required when nvmem-cells is specified)
-
-Example:
-
-&serial0 {
-	compatible = "ns16550a";
-	...
-	bluetooth {
-		compatible = "ti,wl1835-st";
-		enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
-		clocks = <&clk32k_wl18xx>;
-		clock-names = "ext_clock";
-		nvmem-cells = <&bd_address>;
-		nvmem-cell-names = "bd-address";
-	};
-};