Skip to contentSkip to conversation

dt-bindings: spi: conversion of spi-st-ssc into DT schema YAML

PATCH In review Alain Volmat 2 participants 2 messages Feb 10, 2023 – Feb 13, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: spi: conversion of spi-st-ssc into DT schema YAML

File st,ssc-spi.yaml replaces spi-st-ssc.txt for the ST Microelectronics SSC SPI driver.

---
 .../devicetree/bindings/spi/spi-st-ssc.txt    | 40 ------------
 .../devicetree/bindings/spi/st,ssc-spi.yaml   | 61 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 3 files changed, 62 insertions(+), 40 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-st-ssc.txt
 create mode 100644 Documentation/devicetree/bindings/spi/st,ssc-spi.yaml
Documentation/devicetree/bindings/spi/spi-st-ssc.txt deleted +0 -40
deleted file mode 100644
index 1bdc4709e474..000000000000
@@ -1,40 +0,0 @@
-STMicroelectronics SSC (SPI) Controller
----------------------------------------
-
-Required properties:
-- compatible	: "st,comms-ssc4-spi"
-- reg		: Offset and length of the device's register set
-- interrupts	: The interrupt specifier
-- clock-names	: Must contain "ssc"
-- clocks	: Must contain an entry for each name in clock-names
-		    See ../clk/*
-- pinctrl-names	: Uses "default", can use "sleep" if provided
-		    See ../pinctrl/pinctrl-bindings.txt
-
-Optional properties:
-- cs-gpios	: List of GPIO chip selects
-		    See ../spi/spi-bus.txt
-
-Child nodes represent devices on the SPI bus
-  See ../spi/spi-bus.txt
-
-Example:
-	spi@9840000 {
-		compatible	= "st,comms-ssc4-spi";
-		reg		= <0x9840000 0x110>;
-		interrupts	= <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
-		clocks		= <&clk_s_c0_flexgen CLK_EXT2F_A9>;
-		clock-names	= "ssc";
-		pinctrl-0	= <&pinctrl_spi0_default>;
-		pinctrl-names	= "default";
-		cs-gpios	= <&pio17 5 0>;
-		#address-cells	= <1>;
-		#size-cells	= <0>;
-
-		st95hf@0{
-			compatible		= "st,st95hf";
-			reg			= <0>;
-			spi-max-frequency	= <1000000>;
-			interrupts		= <2 IRQ_TYPE_EDGE_FALLING>;
-		};
-	};
Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file +61 -0

61 lines not on this page · raw message

MAINTAINERS +1 -0
index 2e32eb8d44f5..0fc3e4c6c1e5 100644
@@ -2926,6 +2926,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://www.stlinux.com
 F:	Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
+F:	Documentation/devicetree/bindings/spi/st,ssc-spi.yaml
 F:	arch/arm/boot/dts/sti*
 F:	arch/arm/mach-sti/
 F:	drivers/ata/ahci_st.c
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Alain Volmat

File st,ssc-spi.yaml replaces spi-st-ssc.txt for the ST Microelectronics SSC SPI driver.

subject: spi: dt-bindings: spi-st-ssc: convert to DT schema

YAML is redundant, "conversion" of too long

Quoted 70 lines
---
 .../devicetree/bindings/spi/spi-st-ssc.txt    | 40 ------------
 .../devicetree/bindings/spi/st,ssc-spi.yaml   | 61 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 3 files changed, 62 insertions(+), 40 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-st-ssc.txt
 create mode 100644 Documentation/devicetree/bindings/spi/st,ssc-spi.yaml
Documentation/devicetree/bindings/spi/spi-st-ssc.txt deleted +0 -40
deleted file mode 100644
index 1bdc4709e474..000000000000
@@ -1,40 +0,0 @@
-STMicroelectronics SSC (SPI) Controller
----------------------------------------
-
-Required properties:
-- compatible	: "st,comms-ssc4-spi"
-- reg		: Offset and length of the device's register set
-- interrupts	: The interrupt specifier
-- clock-names	: Must contain "ssc"
-- clocks	: Must contain an entry for each name in clock-names
-		    See ../clk/*
-- pinctrl-names	: Uses "default", can use "sleep" if provided
-		    See ../pinctrl/pinctrl-bindings.txt
-
-Optional properties:
-- cs-gpios	: List of GPIO chip selects
-		    See ../spi/spi-bus.txt
-
-Child nodes represent devices on the SPI bus
-  See ../spi/spi-bus.txt
-
-Example:
-	spi@9840000 {
-		compatible	= "st,comms-ssc4-spi";
-		reg		= <0x9840000 0x110>;
-		interrupts	= <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
-		clocks		= <&clk_s_c0_flexgen CLK_EXT2F_A9>;
-		clock-names	= "ssc";
-		pinctrl-0	= <&pinctrl_spi0_default>;
-		pinctrl-names	= "default";
-		cs-gpios	= <&pio17 5 0>;
-		#address-cells	= <1>;
-		#size-cells	= <0>;
-
-		st95hf@0{
-			compatible		= "st,st95hf";
-			reg			= <0>;
-			spi-max-frequency	= <1000000>;
-			interrupts		= <2 IRQ_TYPE_EDGE_FALLING>;
-		};
-	};
Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file +8 -0
new file mode 100644
index 000000000000..496118df3a1b
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/st,ssc-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics SSC SPI Controller
+

Documentation/devicetree/bindings/spi/st,ssc-spi.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file +10 -0
+description: |
+  The STMicroelectronics SSC SPI controller can be found on STi platforms
+  and it used to communicate with external devices using the
+  Serial Peripheral Interface.
+
+maintainers:
+  - Patrice Chotard <[email protected]>
+
+allOf:
+  - $ref: "spi-controller.yaml#"

Drop quotes.

Quoted 30 lines
Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file +30 -0
+
+properties:
+  compatible:
+    const: st,comms-ssc4-spi
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: ssc
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stih407-clks.h>

Documentation/devicetree/bindings/spi/st,ssc-spi.yaml line 58

Quoted 10 lines
Documentation/devicetree/bindings/spi/st,ssc-spi.yaml new file +10 -0
+    spi@9840000 {
+      compatible        = "st,comms-ssc4-spi";
+      reg               = <0x9840000 0x110>;
+      interrupts	= <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+      clocks		= <&clk_s_c0_flexgen CLK_EXT2F_A9>;
+      clock-names	= "ssc";
+      pinctrl-0         = <&pinctrl_spi0_default>;
+      pinctrl-names	= "default";
+      #address-cells	= <1>;
+      #size-cells	= <0>;

Messed coding style. Only one space before =.

Best regards,
Krzysztof