diff mbox series

[1/1] spi: dt-bindings: convert spi-sc18is602.txt to yaml format

Message ID 20240812203004.3831481-1-Frank.Li@nxp.com (mailing list archive)
State Superseded
Headers show
Series [1/1] spi: dt-bindings: convert spi-sc18is602.txt to yaml format | expand

Commit Message

Frank Li Aug. 12, 2024, 8:30 p.m. UTC
Convert binding doc spi-sc18is602.txt (I2C to SPI bridge) to yaml.

Additional change:
- ref spi-controller.yaml

Fix below warning:
arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb:
/soc/i2c@2000000/i2c-mux@77/i2c@7/i2c-mux@75/i2c@0/spi@28: failed to match any schema with compatible: ['nxp,sc18is602b']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../devicetree/bindings/spi/nxp,sc18is.yaml   | 52 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-sc18is602.txt | 23 --------
 2 files changed, 52 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-sc18is602.txt

Comments

Rob Herring Aug. 13, 2024, 2:24 p.m. UTC | #1
On Mon, Aug 12, 2024 at 2:30 PM Frank Li <Frank.Li@nxp.com> wrote:
>
> Convert binding doc spi-sc18is602.txt (I2C to SPI bridge) to yaml.
>
> Additional change:
> - ref spi-controller.yaml
>
> Fix below warning:
> arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb:
> /soc/i2c@2000000/i2c-mux@77/i2c@7/i2c-mux@75/i2c@0/spi@28: failed to match any schema with compatible: ['nxp,sc18is602b']
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../devicetree/bindings/spi/nxp,sc18is.yaml   | 52 +++++++++++++++++++
>  .../devicetree/bindings/spi/spi-sc18is602.txt | 23 --------
>  2 files changed, 52 insertions(+), 23 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
>  delete mode 100644 Documentation/devicetree/bindings/spi/spi-sc18is602.txt
>
> diff --git a/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml b/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
> new file mode 100644
> index 0000000000000..8a5d45d976984
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/nxp,sc18is.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP SC18IS602/SCIS603 I2C to SPI bridge

SCIS603 or SC18IS603?

> +
> +maintainers:
> +  - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nxp,sc18is602
> +      - nxp,sc18is602b
> +      - nxp,sc18is603
> +
> +  reg:
> +    maxItems: 1
> +
> +  clock-frequency:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 7372000
> +    description:
> +      external oscillator clock frequency. If not specified, the SC18IS602
> +      default frequency (7372000) will be used.

Drop prose that the schema says already.

With those fixes,

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

> The clock-frequency
> +      property is relevant and needed only if the chip has an external
> +      oscillator (SC18IS603).
> +
> +allOf:
> +  - $ref: spi-controller.yaml#
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        spi@28 {
> +            compatible = "nxp,sc18is603";
> +            reg = <0x28>;
> +            clock-frequency = <14744000>;
> +        };
> +    };
> +
> diff --git a/Documentation/devicetree/bindings/spi/spi-sc18is602.txt b/Documentation/devicetree/bindings/spi/spi-sc18is602.txt
> deleted file mode 100644
> index 02f9033270a24..0000000000000
> --- a/Documentation/devicetree/bindings/spi/spi-sc18is602.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -NXP SC18IS602/SCIS603
> -
> -Required properties:
> -       - compatible : Should be one of
> -               "nxp,sc18is602"
> -               "nxp,sc18is602b"
> -               "nxp,sc18is603"
> -       - reg: I2C bus address
> -
> -Optional properties:
> -       - clock-frequency : external oscillator clock frequency. If not
> -         specified, the SC18IS602 default frequency (7372000) will be used.
> -
> -The clock-frequency property is relevant and needed only if the chip has an
> -external oscillator (SC18IS603).
> -
> -Example:
> -
> -       sc18is603@28 {
> -               compatible = "nxp,sc18is603";
> -               reg = <0x28>;
> -               clock-frequency = <14744000>;
> -       }
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml b/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
new file mode 100644
index 0000000000000..8a5d45d976984
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/nxp,sc18is.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/nxp,sc18is.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP SC18IS602/SCIS603 I2C to SPI bridge
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - nxp,sc18is602
+      - nxp,sc18is602b
+      - nxp,sc18is603
+
+  reg:
+    maxItems: 1
+
+  clock-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 7372000
+    description:
+      external oscillator clock frequency. If not specified, the SC18IS602
+      default frequency (7372000) will be used. The clock-frequency
+      property is relevant and needed only if the chip has an external
+      oscillator (SC18IS603).
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        spi@28 {
+            compatible = "nxp,sc18is603";
+            reg = <0x28>;
+            clock-frequency = <14744000>;
+        };
+    };
+
diff --git a/Documentation/devicetree/bindings/spi/spi-sc18is602.txt b/Documentation/devicetree/bindings/spi/spi-sc18is602.txt
deleted file mode 100644
index 02f9033270a24..0000000000000
--- a/Documentation/devicetree/bindings/spi/spi-sc18is602.txt
+++ /dev/null
@@ -1,23 +0,0 @@ 
-NXP SC18IS602/SCIS603
-
-Required properties:
-	- compatible : Should be one of
-		"nxp,sc18is602"
-		"nxp,sc18is602b"
-		"nxp,sc18is603"
-	- reg: I2C bus address
-
-Optional properties:
-	- clock-frequency : external oscillator clock frequency. If not
-	  specified, the SC18IS602 default frequency (7372000) will be used.
-
-The clock-frequency property is relevant and needed only if the chip has an
-external oscillator (SC18IS603).
-
-Example:
-
-	sc18is603@28 {
-		compatible = "nxp,sc18is603";
-		reg = <0x28>;
-		clock-frequency = <14744000>;
-	}