All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix
@ 2021-10-19 12:43 Geert Uytterhoeven
  2021-10-19 12:43 ` [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 12:43 UTC (permalink / raw)
  To: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel
  Cc: devicetree, netdev, linux-wireless, linux-omap,
	linux-renesas-soc, Geert Uytterhoeven

	Hi all,

This patch series converts the Device Tree bindings for the Texas
Instruments Wilink Wireless LAN and Bluetooth Controllers to
json-schema, after fixing an issue in a Device Tree source file.

Thanks for your comments!

Geert Uytterhoeven (3):
  ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
  dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
  dt-bindings: net: ti,bluetooth: Convert to json-schema

 .../devicetree/bindings/net/ti,bluetooth.yaml |  91 ++++++++++++
 .../devicetree/bindings/net/ti-bluetooth.txt  |  60 --------
 .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
 .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
 .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
 .../boot/dts/motorola-mapphone-common.dtsi    |   2 +-
 arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
 7 files changed, 227 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
 delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
 delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml

-- 
2.25.1

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

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

* [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
  2021-10-19 12:43 [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Geert Uytterhoeven
@ 2021-10-19 12:43 ` Geert Uytterhoeven
  2021-10-19 22:23   ` Sebastian Reichel
  2021-10-19 12:43 ` [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema Geert Uytterhoeven
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 12:43 UTC (permalink / raw)
  To: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel
  Cc: devicetree, netdev, linux-wireless, linux-omap,
	linux-renesas-soc, Geert Uytterhoeven

The TI wlcore DT bindings specify using a single compatible value for
each variant, and the Linux kernel driver matches against the first
compatible value since commit 078b30da3f074f2e ("wlcore: add wl1285
compatible") in v4.13.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/motorola-mapphone-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/motorola-mapphone-common.dtsi b/arch/arm/boot/dts/motorola-mapphone-common.dtsi
index a4423ff0df39264b..c7a1f3ffc48ca58e 100644
--- a/arch/arm/boot/dts/motorola-mapphone-common.dtsi
+++ b/arch/arm/boot/dts/motorola-mapphone-common.dtsi
@@ -310,7 +310,7 @@ &mmc3 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	wlcore: wlcore@2 {
-		compatible = "ti,wl1285", "ti,wl1283";
+		compatible = "ti,wl1285";
 		reg = <2>;
 		/* gpio_100 with gpmc_wait2 pad as wakeirq */
 		interrupts-extended = <&gpio4 4 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.25.1


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

* [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
  2021-10-19 12:43 [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Geert Uytterhoeven
  2021-10-19 12:43 ` [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value Geert Uytterhoeven
@ 2021-10-19 12:43 ` Geert Uytterhoeven
  2021-10-19 21:05   ` Rob Herring
  2021-10-20 14:21   ` Rob Herring
  2021-10-19 12:43 ` [PATCH 3/3] dt-bindings: net: ti,bluetooth: " Geert Uytterhoeven
  2021-10-19 13:33 ` [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Kalle Valo
  3 siblings, 2 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 12:43 UTC (permalink / raw)
  To: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel
  Cc: devicetree, netdev, linux-wireless, linux-omap,
	linux-renesas-soc, Geert Uytterhoeven

The Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN
Controllers can be connected via SPI or via SDIO.
Convert the two Device Tree binding documents to json-schema, and merge
them into a single document.

Add missing ti,wl1285 compatible value.
Add missing interrupt-names property.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
  - The wlcore driver is marked orphan in MAINTAINERS.  Both Tony and
    Russell made recent bugfixes, and my not-so-random coin picked Tony
    as a suitable maintainer.  Please scream if not appropriate.
  - How to express if a property is required when connected to a
    specific bus type?
---
 .../devicetree/bindings/net/ti-bluetooth.txt  |   2 +-
 .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
 .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
 .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
 arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
 5 files changed, 136 insertions(+), 104 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
 delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml

diff --git a/Documentation/devicetree/bindings/net/ti-bluetooth.txt b/Documentation/devicetree/bindings/net/ti-bluetooth.txt
index f48c17b38f5851de..3c01cfc1e12dc132 100644
--- a/Documentation/devicetree/bindings/net/ti-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/ti-bluetooth.txt
@@ -13,7 +13,7 @@ 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.txt.
+wireless/ti,wlcore.yaml.
 
 This bindings follows the UART slave device binding in ../serial/serial.yaml.
 
diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
deleted file mode 100644
index cb5c9e1569ca5300..0000000000000000
--- a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-* Texas Instruments wl12xx/wl18xx wireless lan controller
-
-The wl12xx/wl18xx chips can be connected via SPI or via SDIO. This
-document describes the binding for the SPI connected chip.
-
-Required properties:
-- compatible :          Should be one of the following:
-    * "ti,wl1271"
-    * "ti,wl1273"
-    * "ti,wl1281"
-    * "ti,wl1283"
-    * "ti,wl1801"
-    * "ti,wl1805"
-    * "ti,wl1807"
-    * "ti,wl1831"
-    * "ti,wl1835"
-    * "ti,wl1837"
-- reg :                 Chip select address of device
-- spi-max-frequency :   Maximum SPI clocking speed of device in Hz
-- interrupts :          Should contain parameters for 1 interrupt line.
-- vwlan-supply :        Point the node of the regulator that powers/enable the
-                        wl12xx/wl18xx chip
-
-Optional properties:
-- ref-clock-frequency : Reference clock frequency (should be set for wl12xx)
-- clock-xtal :          boolean, clock is generated from XTAL
-
-- Please consult Documentation/devicetree/bindings/spi/spi-bus.txt
-  for optional SPI connection related properties,
-
-Examples:
-
-For wl12xx family:
-&spi1 {
-	wlcore: wlcore@1 {
-		compatible = "ti,wl1271";
-		reg = <1>;
-		spi-max-frequency = <48000000>;
-		interrupt-parent = <&gpio3>;
-		interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
-		vwlan-supply = <&vwlan_fixed>;
-		clock-xtal;
-		ref-clock-frequency = <38400000>;
-	};
-};
-
-For wl18xx family:
-&spi0 {
-	wlcore: wlcore@0 {
-		compatible = "ti,wl1835";
-		reg = <0>;
-		spi-max-frequency = <48000000>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <27 IRQ_TYPE_EDGE_RISING>;
-		vwlan-supply = <&vwlan_fixed>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
deleted file mode 100644
index 9306c4dadd46aea7..0000000000000000
--- a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-TI Wilink 6/7/8 (wl12xx/wl18xx) SDIO devices
-
-This node provides properties for controlling the wilink wireless device. The
-node is expected to be specified as a child node to the SDIO controller that
-connects the device to the system.
-
-Required properties:
- - compatible: should be one of the following:
-    * "ti,wl1271"
-    * "ti,wl1273"
-    * "ti,wl1281"
-    * "ti,wl1283"
-    * "ti,wl1285"
-    * "ti,wl1801"
-    * "ti,wl1805"
-    * "ti,wl1807"
-    * "ti,wl1831"
-    * "ti,wl1835"
-    * "ti,wl1837"
- - interrupts : specifies attributes for the out-of-band interrupt.
-
-Optional properties:
- - ref-clock-frequency : ref clock frequency in Hz
- - tcxo-clock-frequency : tcxo clock frequency in Hz
-
-Note: the *-clock-frequency properties assume internal clocks. In case of external
-clock, new bindings (for parsing the clock nodes) have to be added.
-
-Example:
-
-&mmc3 {
-	vmmc-supply = <&wlan_en_reg>;
-	bus-width = <4>;
-	cap-power-off-card;
-	keep-power-in-suspend;
-
-	#address-cells = <1>;
-	#size-cells = <0>;
-	wlcore: wlcore@2 {
-		compatible = "ti,wl1835";
-		reg = <2>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
new file mode 100644
index 0000000000000000..8dd164d10290082a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/ti,wlcore.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN Controller
+
+maintainers:
+  - Tony Lindgren <tony@atomide.com>
+
+description:
+  The wl12xx/wl18xx chips can be connected via SPI or via SDIO.
+  Note that the *-clock-frequency properties assume internal clocks.  In case
+  of external clocks, new bindings (for parsing the clock nodes) have to be
+  added.
+
+properties:
+  compatible:
+    enum:
+      - ti,wl1271
+      - ti,wl1273
+      - ti,wl1281
+      - ti,wl1283
+      - ti,wl1285
+      - ti,wl1801
+      - ti,wl1805
+      - ti,wl1807
+      - ti,wl1831
+      - ti,wl1835
+      - ti,wl1837
+
+  reg:
+    maxItems: 1
+    description:
+      This is required when connected via SPI, and optional when connected via
+      SDIO.
+
+  spi-max-frequency: true
+
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: irq
+      - const: wakeup
+
+  vwlan-supply:
+    description:
+      Points to the node of the regulator that powers/enable the wl12xx/wl18xx
+      chip.  This is required when connected via SPI.
+
+
+  ref-clock-frequency:
+    description: Reference clock frequency.
+
+  tcxo-clock-frequency:
+    description: TCXO clock frequency.
+
+  clock-xtal:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Indicates that the clock is generated from XTAL.
+
+required:
+  - compatible
+  - interrupts
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - ti,wl1271
+          - ti,wl1273
+          - ti,wl1281
+          - ti,wl1283
+then:
+  required:
+    - ref-clock-frequency
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    // For wl12xx family:
+    spi1 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            wlcore1: wlcore@1 {
+                    compatible = "ti,wl1271";
+                    reg = <1>;
+                    spi-max-frequency = <48000000>;
+                    interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+                    vwlan-supply = <&vwlan_fixed>;
+                    clock-xtal;
+                    ref-clock-frequency = <38400000>;
+            };
+    };
+
+    // For wl18xx family:
+    spi2 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            wlcore2: wlcore@0 {
+                    compatible = "ti,wl1835";
+                    reg = <0>;
+                    spi-max-frequency = <48000000>;
+                    interrupts = <27 IRQ_TYPE_EDGE_RISING>;
+                    vwlan-supply = <&vwlan_fixed>;
+            };
+    };
+
+    // SDIO example:
+    mmc3 {
+            vmmc-supply = <&wlan_en_reg>;
+            bus-width = <4>;
+            cap-power-off-card;
+            keep-power-in-suspend;
+
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            wlcore3: wlcore@2 {
+                    compatible = "ti,wl1835";
+                    reg = <2>;
+                    interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+            };
+    };
diff --git a/arch/arm/boot/dts/omap3-gta04a5.dts b/arch/arm/boot/dts/omap3-gta04a5.dts
index a2ba4030cf279683..0b5bd73888771438 100644
--- a/arch/arm/boot/dts/omap3-gta04a5.dts
+++ b/arch/arm/boot/dts/omap3-gta04a5.dts
@@ -79,7 +79,7 @@ OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
 
 /*
  * for WL183x module see
- * Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
+ * Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
  */
 
 &wifi_pwrseq {
-- 
2.25.1


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

* [PATCH 3/3] dt-bindings: net: ti,bluetooth: Convert to json-schema
  2021-10-19 12:43 [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Geert Uytterhoeven
  2021-10-19 12:43 ` [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value Geert Uytterhoeven
  2021-10-19 12:43 ` [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema Geert Uytterhoeven
@ 2021-10-19 12:43 ` Geert Uytterhoeven
  2021-10-19 15:41   ` David Lechner
  2021-10-20 14:22   ` Rob Herring
  2021-10-19 13:33 ` [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Kalle Valo
  3 siblings, 2 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 12:43 UTC (permalink / raw)
  To: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel
  Cc: devicetree, netdev, linux-wireless, linux-omap,
	linux-renesas-soc, Geert Uytterhoeven

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

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";
-	};
-};
-- 
2.25.1


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

* Re: [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix
  2021-10-19 12:43 [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2021-10-19 12:43 ` [PATCH 3/3] dt-bindings: net: ti,bluetooth: " Geert Uytterhoeven
@ 2021-10-19 13:33 ` Kalle Valo
  2021-10-19 13:48   ` Geert Uytterhoeven
  3 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2021-10-19 13:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, David S . Miller, Jakub Kicinski,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel, devicetree, netdev, linux-wireless,
	linux-omap, linux-renesas-soc

Geert Uytterhoeven <geert+renesas@glider.be> writes:

> 	Hi all,
>
> This patch series converts the Device Tree bindings for the Texas
> Instruments Wilink Wireless LAN and Bluetooth Controllers to
> json-schema, after fixing an issue in a Device Tree source file.
>
> Thanks for your comments!
>
> Geert Uytterhoeven (3):
>   ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
>   dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
>   dt-bindings: net: ti,bluetooth: Convert to json-schema
>
>  .../devicetree/bindings/net/ti,bluetooth.yaml |  91 ++++++++++++
>  .../devicetree/bindings/net/ti-bluetooth.txt  |  60 --------
>  .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
>  .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
>  .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
>  .../boot/dts/motorola-mapphone-common.dtsi    |   2 +-
>  arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
>  7 files changed, 227 insertions(+), 164 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml

Via which tree should these go?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix
  2021-10-19 13:33 ` [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Kalle Valo
@ 2021-10-19 13:48   ` Geert Uytterhoeven
  2021-10-19 14:05     ` Kalle Valo
  0 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 13:48 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Rob Herring, David S . Miller, Jakub Kicinski,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	netdev, linux-wireless,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linux-Renesas

Hi Kalle,

On Tue, Oct 19, 2021 at 3:33 PM Kalle Valo <kvalo@codeaurora.org> wrote:
> Geert Uytterhoeven <geert+renesas@glider.be> writes:
> > This patch series converts the Device Tree bindings for the Texas
> > Instruments Wilink Wireless LAN and Bluetooth Controllers to
> > json-schema, after fixing an issue in a Device Tree source file.
> >
> > Thanks for your comments!
> >
> > Geert Uytterhoeven (3):
> >   ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
> >   dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
> >   dt-bindings: net: ti,bluetooth: Convert to json-schema
> >
> >  .../devicetree/bindings/net/ti,bluetooth.yaml |  91 ++++++++++++
> >  .../devicetree/bindings/net/ti-bluetooth.txt  |  60 --------
> >  .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
> >  .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
> >  .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
> >  .../boot/dts/motorola-mapphone-common.dtsi    |   2 +-
> >  arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
> >  7 files changed, 227 insertions(+), 164 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
> >  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
> >  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
> >  create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
>
> Via which tree should these go?

The DTS change should go through the OMAP tree.
The binding changes through the net or DT trees.

I kept everything together for an improved overview.

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

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

* Re: [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix
  2021-10-19 13:48   ` Geert Uytterhoeven
@ 2021-10-19 14:05     ` Kalle Valo
  0 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2021-10-19 14:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, David S . Miller, Jakub Kicinski,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	netdev, linux-wireless,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linux-Renesas

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> On Tue, Oct 19, 2021 at 3:33 PM Kalle Valo <kvalo@codeaurora.org> wrote:
>> Geert Uytterhoeven <geert+renesas@glider.be> writes:
>> > This patch series converts the Device Tree bindings for the Texas
>> > Instruments Wilink Wireless LAN and Bluetooth Controllers to
>> > json-schema, after fixing an issue in a Device Tree source file.
>> >
>> > Thanks for your comments!
>> >
>> > Geert Uytterhoeven (3):
>> >   ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
>> >   dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
>> >   dt-bindings: net: ti,bluetooth: Convert to json-schema
>> >
>> >  .../devicetree/bindings/net/ti,bluetooth.yaml |  91 ++++++++++++
>> >  .../devicetree/bindings/net/ti-bluetooth.txt  |  60 --------
>> >  .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
>> >  .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
>> >  .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
>> >  .../boot/dts/motorola-mapphone-common.dtsi    |   2 +-
>> >  arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
>> >  7 files changed, 227 insertions(+), 164 deletions(-)
>> >  create mode 100644 Documentation/devicetree/bindings/net/ti,bluetooth.yaml
>> >  delete mode 100644 Documentation/devicetree/bindings/net/ti-bluetooth.txt
>> >  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
>> >  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
>> >  create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
>>
>> Via which tree should these go?
>
> The DTS change should go through the OMAP tree.
> The binding changes through the net or DT trees.
>
> I kept everything together for an improved overview.

Good, thanks. I'll then drop these from my queue.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 3/3] dt-bindings: net: ti,bluetooth: Convert to json-schema
  2021-10-19 12:43 ` [PATCH 3/3] dt-bindings: net: ti,bluetooth: " Geert Uytterhoeven
@ 2021-10-19 15:41   ` David Lechner
  2021-10-19 15:48     ` Geert Uytterhoeven
  2021-10-20 14:22   ` Rob Herring
  1 sibling, 1 reply; 13+ messages in thread
From: David Lechner @ 2021-10-19 15:41 UTC (permalink / raw)
  To: Geert Uytterhoeven, Rob Herring, David S . Miller,
	Jakub Kicinski, Kalle Valo, Benoît Cousson, Tony Lindgren,
	Russell King, Sebastian Reichel
  Cc: devicetree, netdev, linux-wireless, linux-omap, linux-renesas-soc

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
> +

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

* Re: [PATCH 3/3] dt-bindings: net: ti,bluetooth: Convert to json-schema
  2021-10-19 15:41   ` David Lechner
@ 2021-10-19 15:48     ` Geert Uytterhoeven
  0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2021-10-19 15:48 UTC (permalink / raw)
  To: David Lechner
  Cc: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King,
	Sebastian Reichel,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	netdev, linux-wireless,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linux-Renesas

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

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

* Re: [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
  2021-10-19 12:43 ` [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema Geert Uytterhoeven
@ 2021-10-19 21:05   ` Rob Herring
  2021-10-20 14:21   ` Rob Herring
  1 sibling, 0 replies; 13+ messages in thread
From: Rob Herring @ 2021-10-19 21:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	Sebastian Reichel, devicetree, netdev, linux-wireless,
	linux-omap, linux-renesas-soc

On Tue, Oct 19, 2021 at 02:43:12PM +0200, Geert Uytterhoeven wrote:
> The Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN
> Controllers can be connected via SPI or via SDIO.
> Convert the two Device Tree binding documents to json-schema, and merge
> them into a single document.
> 
> Add missing ti,wl1285 compatible value.
> Add missing interrupt-names property.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>   - The wlcore driver is marked orphan in MAINTAINERS.  Both Tony and
>     Russell made recent bugfixes, and my not-so-random coin picked Tony
>     as a suitable maintainer.  Please scream if not appropriate.
>   - How to express if a property is required when connected to a
>     specific bus type?

There isn't a (simple) way within this schema, but IIRC the spi bus 
schema already requires 'reg' in child nodes.

Otherwise, looks good and I'll queue.

> ---
>  .../devicetree/bindings/net/ti-bluetooth.txt  |   2 +-
>  .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
>  .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
>  .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
>  arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
>  5 files changed, 136 insertions(+), 104 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/ti-bluetooth.txt b/Documentation/devicetree/bindings/net/ti-bluetooth.txt
> index f48c17b38f5851de..3c01cfc1e12dc132 100644
> --- a/Documentation/devicetree/bindings/net/ti-bluetooth.txt
> +++ b/Documentation/devicetree/bindings/net/ti-bluetooth.txt
> @@ -13,7 +13,7 @@ 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.txt.
> +wireless/ti,wlcore.yaml.
>  
>  This bindings follows the UART slave device binding in ../serial/serial.yaml.
>  
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
> deleted file mode 100644
> index cb5c9e1569ca5300..0000000000000000
> --- a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -* Texas Instruments wl12xx/wl18xx wireless lan controller
> -
> -The wl12xx/wl18xx chips can be connected via SPI or via SDIO. This
> -document describes the binding for the SPI connected chip.
> -
> -Required properties:
> -- compatible :          Should be one of the following:
> -    * "ti,wl1271"
> -    * "ti,wl1273"
> -    * "ti,wl1281"
> -    * "ti,wl1283"
> -    * "ti,wl1801"
> -    * "ti,wl1805"
> -    * "ti,wl1807"
> -    * "ti,wl1831"
> -    * "ti,wl1835"
> -    * "ti,wl1837"
> -- reg :                 Chip select address of device
> -- spi-max-frequency :   Maximum SPI clocking speed of device in Hz
> -- interrupts :          Should contain parameters for 1 interrupt line.
> -- vwlan-supply :        Point the node of the regulator that powers/enable the
> -                        wl12xx/wl18xx chip
> -
> -Optional properties:
> -- ref-clock-frequency : Reference clock frequency (should be set for wl12xx)
> -- clock-xtal :          boolean, clock is generated from XTAL
> -
> -- Please consult Documentation/devicetree/bindings/spi/spi-bus.txt
> -  for optional SPI connection related properties,
> -
> -Examples:
> -
> -For wl12xx family:
> -&spi1 {
> -	wlcore: wlcore@1 {
> -		compatible = "ti,wl1271";
> -		reg = <1>;
> -		spi-max-frequency = <48000000>;
> -		interrupt-parent = <&gpio3>;
> -		interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
> -		vwlan-supply = <&vwlan_fixed>;
> -		clock-xtal;
> -		ref-clock-frequency = <38400000>;
> -	};
> -};
> -
> -For wl18xx family:
> -&spi0 {
> -	wlcore: wlcore@0 {
> -		compatible = "ti,wl1835";
> -		reg = <0>;
> -		spi-max-frequency = <48000000>;
> -		interrupt-parent = <&gpio0>;
> -		interrupts = <27 IRQ_TYPE_EDGE_RISING>;
> -		vwlan-supply = <&vwlan_fixed>;
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
> deleted file mode 100644
> index 9306c4dadd46aea7..0000000000000000
> --- a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -TI Wilink 6/7/8 (wl12xx/wl18xx) SDIO devices
> -
> -This node provides properties for controlling the wilink wireless device. The
> -node is expected to be specified as a child node to the SDIO controller that
> -connects the device to the system.
> -
> -Required properties:
> - - compatible: should be one of the following:
> -    * "ti,wl1271"
> -    * "ti,wl1273"
> -    * "ti,wl1281"
> -    * "ti,wl1283"
> -    * "ti,wl1285"
> -    * "ti,wl1801"
> -    * "ti,wl1805"
> -    * "ti,wl1807"
> -    * "ti,wl1831"
> -    * "ti,wl1835"
> -    * "ti,wl1837"
> - - interrupts : specifies attributes for the out-of-band interrupt.
> -
> -Optional properties:
> - - ref-clock-frequency : ref clock frequency in Hz
> - - tcxo-clock-frequency : tcxo clock frequency in Hz
> -
> -Note: the *-clock-frequency properties assume internal clocks. In case of external
> -clock, new bindings (for parsing the clock nodes) have to be added.
> -
> -Example:
> -
> -&mmc3 {
> -	vmmc-supply = <&wlan_en_reg>;
> -	bus-width = <4>;
> -	cap-power-off-card;
> -	keep-power-in-suspend;
> -
> -	#address-cells = <1>;
> -	#size-cells = <0>;
> -	wlcore: wlcore@2 {
> -		compatible = "ti,wl1835";
> -		reg = <2>;
> -		interrupt-parent = <&gpio0>;
> -		interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
> new file mode 100644
> index 0000000000000000..8dd164d10290082a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
> @@ -0,0 +1,134 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/wireless/ti,wlcore.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN Controller
> +
> +maintainers:
> +  - Tony Lindgren <tony@atomide.com>
> +
> +description:
> +  The wl12xx/wl18xx chips can be connected via SPI or via SDIO.
> +  Note that the *-clock-frequency properties assume internal clocks.  In case
> +  of external clocks, new bindings (for parsing the clock nodes) have to be
> +  added.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,wl1271
> +      - ti,wl1273
> +      - ti,wl1281
> +      - ti,wl1283
> +      - ti,wl1285
> +      - ti,wl1801
> +      - ti,wl1805
> +      - ti,wl1807
> +      - ti,wl1831
> +      - ti,wl1835
> +      - ti,wl1837
> +
> +  reg:
> +    maxItems: 1
> +    description:
> +      This is required when connected via SPI, and optional when connected via
> +      SDIO.
> +
> +  spi-max-frequency: true
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupt-names:
> +    items:
> +      - const: irq
> +      - const: wakeup
> +
> +  vwlan-supply:
> +    description:
> +      Points to the node of the regulator that powers/enable the wl12xx/wl18xx
> +      chip.  This is required when connected via SPI.
> +
> +
> +  ref-clock-frequency:
> +    description: Reference clock frequency.
> +
> +  tcxo-clock-frequency:
> +    description: TCXO clock frequency.
> +
> +  clock-xtal:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: Indicates that the clock is generated from XTAL.
> +
> +required:
> +  - compatible
> +  - interrupts
> +
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        enum:
> +          - ti,wl1271
> +          - ti,wl1273
> +          - ti,wl1281
> +          - ti,wl1283
> +then:
> +  required:
> +    - ref-clock-frequency
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    // For wl12xx family:
> +    spi1 {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            wlcore1: wlcore@1 {
> +                    compatible = "ti,wl1271";
> +                    reg = <1>;
> +                    spi-max-frequency = <48000000>;
> +                    interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
> +                    vwlan-supply = <&vwlan_fixed>;
> +                    clock-xtal;
> +                    ref-clock-frequency = <38400000>;
> +            };
> +    };
> +
> +    // For wl18xx family:
> +    spi2 {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            wlcore2: wlcore@0 {
> +                    compatible = "ti,wl1835";
> +                    reg = <0>;
> +                    spi-max-frequency = <48000000>;
> +                    interrupts = <27 IRQ_TYPE_EDGE_RISING>;
> +                    vwlan-supply = <&vwlan_fixed>;
> +            };
> +    };
> +
> +    // SDIO example:
> +    mmc3 {
> +            vmmc-supply = <&wlan_en_reg>;
> +            bus-width = <4>;
> +            cap-power-off-card;
> +            keep-power-in-suspend;
> +
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            wlcore3: wlcore@2 {
> +                    compatible = "ti,wl1835";
> +                    reg = <2>;
> +                    interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
> +            };
> +    };
> diff --git a/arch/arm/boot/dts/omap3-gta04a5.dts b/arch/arm/boot/dts/omap3-gta04a5.dts
> index a2ba4030cf279683..0b5bd73888771438 100644
> --- a/arch/arm/boot/dts/omap3-gta04a5.dts
> +++ b/arch/arm/boot/dts/omap3-gta04a5.dts
> @@ -79,7 +79,7 @@ OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
>  
>  /*
>   * for WL183x module see
> - * Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
> + * Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
>   */
>  
>  &wifi_pwrseq {
> -- 
> 2.25.1
> 
> 

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

* Re: [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value
  2021-10-19 12:43 ` [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value Geert Uytterhoeven
@ 2021-10-19 22:23   ` Sebastian Reichel
  0 siblings, 0 replies; 13+ messages in thread
From: Sebastian Reichel @ 2021-10-19 22:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, David S . Miller, Jakub Kicinski, Kalle Valo,
	Benoît Cousson, Tony Lindgren, Russell King, David Lechner,
	devicetree, netdev, linux-wireless, linux-omap,
	linux-renesas-soc

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

Hi,

On Tue, Oct 19, 2021 at 02:43:11PM +0200, Geert Uytterhoeven wrote:
> The TI wlcore DT bindings specify using a single compatible value for
> each variant, and the Linux kernel driver matches against the first
> compatible value since commit 078b30da3f074f2e ("wlcore: add wl1285
> compatible") in v4.13.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  arch/arm/boot/dts/motorola-mapphone-common.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/motorola-mapphone-common.dtsi b/arch/arm/boot/dts/motorola-mapphone-common.dtsi
> index a4423ff0df39264b..c7a1f3ffc48ca58e 100644
> --- a/arch/arm/boot/dts/motorola-mapphone-common.dtsi
> +++ b/arch/arm/boot/dts/motorola-mapphone-common.dtsi
> @@ -310,7 +310,7 @@ &mmc3 {
>  	#address-cells = <1>;
>  	#size-cells = <0>;
>  	wlcore: wlcore@2 {
> -		compatible = "ti,wl1285", "ti,wl1283";
> +		compatible = "ti,wl1285";
>  		reg = <2>;
>  		/* gpio_100 with gpmc_wait2 pad as wakeirq */
>  		interrupts-extended = <&gpio4 4 IRQ_TYPE_LEVEL_HIGH>,
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema
  2021-10-19 12:43 ` [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema Geert Uytterhoeven
  2021-10-19 21:05   ` Rob Herring
@ 2021-10-20 14:21   ` Rob Herring
  1 sibling, 0 replies; 13+ messages in thread
From: Rob Herring @ 2021-10-20 14:21 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: devicetree, linux-omap, Russell King, Sebastian Reichel,
	Kalle Valo, Rob Herring, linux-renesas-soc, Tony Lindgren,
	linux-wireless, netdev, David Lechner, David S . Miller,
	Benoît Cousson, Jakub Kicinski

On Tue, 19 Oct 2021 14:43:12 +0200, Geert Uytterhoeven wrote:
> The Texas Instruments Wilink 6/7/8 (wl12xx/wl18xx) Wireless LAN
> Controllers can be connected via SPI or via SDIO.
> Convert the two Device Tree binding documents to json-schema, and merge
> them into a single document.
> 
> Add missing ti,wl1285 compatible value.
> Add missing interrupt-names property.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>   - The wlcore driver is marked orphan in MAINTAINERS.  Both Tony and
>     Russell made recent bugfixes, and my not-so-random coin picked Tony
>     as a suitable maintainer.  Please scream if not appropriate.
>   - How to express if a property is required when connected to a
>     specific bus type?
> ---
>  .../devicetree/bindings/net/ti-bluetooth.txt  |   2 +-
>  .../bindings/net/wireless/ti,wlcore,spi.txt   |  57 --------
>  .../bindings/net/wireless/ti,wlcore.txt       |  45 ------
>  .../bindings/net/wireless/ti,wlcore.yaml      | 134 ++++++++++++++++++
>  arch/arm/boot/dts/omap3-gta04a5.dts           |   2 +-
>  5 files changed, 136 insertions(+), 104 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
> 

Applied, thanks!

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

* Re: [PATCH 3/3] dt-bindings: net: ti,bluetooth: Convert to json-schema
  2021-10-19 12:43 ` [PATCH 3/3] dt-bindings: net: ti,bluetooth: " Geert Uytterhoeven
  2021-10-19 15:41   ` David Lechner
@ 2021-10-20 14:22   ` Rob Herring
  1 sibling, 0 replies; 13+ messages in thread
From: Rob Herring @ 2021-10-20 14:22 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-renesas-soc, linux-wireless, Rob Herring, linux-omap,
	Sebastian Reichel, devicetree, David S . Miller, Tony Lindgren,
	David Lechner, netdev, Benoît Cousson, Russell King,
	Kalle Valo, Jakub Kicinski

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!

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

end of thread, other threads:[~2021-10-20 14:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 12:43 [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Geert Uytterhoeven
2021-10-19 12:43 ` [PATCH 1/3] ARM: dts: motorola-mapphone: Drop second ti,wlcore compatible value Geert Uytterhoeven
2021-10-19 22:23   ` Sebastian Reichel
2021-10-19 12:43 ` [PATCH 2/3] dt-bindings: net: wireless: ti,wlcore: Convert to json-schema Geert Uytterhoeven
2021-10-19 21:05   ` Rob Herring
2021-10-20 14:21   ` Rob Herring
2021-10-19 12:43 ` [PATCH 3/3] dt-bindings: net: ti,bluetooth: " Geert Uytterhoeven
2021-10-19 15:41   ` David Lechner
2021-10-19 15:48     ` Geert Uytterhoeven
2021-10-20 14:22   ` Rob Herring
2021-10-19 13:33 ` [PATCH 0/3] dt-bindings: net: TI wlcore json schema conversion and fix Kalle Valo
2021-10-19 13:48   ` Geert Uytterhoeven
2021-10-19 14:05     ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.