[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240423-sc18is606-v1-1-094ef37d5a59@bang-olufsen.dk>
Date: Tue, 23 Apr 2024 13:35:30 +0200
From: Alvin Šipraga <alvin@...s.dk>
To: Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alvin Šipraga <alsi@...g-olufsen.dk>
Subject: [PATCH 1/3] spi: dt-bindings: nxp,sc18is602: convert binding to
YAML
From: Alvin Šipraga <alsi@...g-olufsen.dk>
Convert the txt binding to YAML. In the example, the node name was
changed from sc18is603@28 to spi@28 to conform with the standard
$nodename property in the spi-controller.yaml schema.
Make myself maintainer of this binding, since nobody else has
volunteered themselves.
Signed-off-by: Alvin Šipraga <alsi@...g-olufsen.dk>
---
.../devicetree/bindings/spi/nxp,sc18is602.yaml | 59 ++++++++++++++++++++++
.../devicetree/bindings/spi/spi-sc18is602.txt | 23 ---------
2 files changed, 59 insertions(+), 23 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/nxp,sc18is602.yaml b/Documentation/devicetree/bindings/spi/nxp,sc18is602.yaml
new file mode 100644
index 000000000000..5b34fdf6148a
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/nxp,sc18is602.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/nxp,sc18is602.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP SC18IS602/602B/603 I2C to SPI bridge
+
+maintainers:
+ - Alvin Šipraga <alsi@...g-olufsen.dk>
+
+properties:
+ compatible:
+ enum:
+ - nxp,sc18is602
+ - nxp,sc18is602b
+ - nxp,sc18is603
+
+ reg:
+ maxItems: 1
+
+ clock-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ External oscillator clock frequency. Only relevant if the chip has an
+ external oscillator (SC18IS603).
+ default: 7372000
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: spi-controller.yaml#
+ - if:
+ not:
+ properties:
+ comptaible:
+ contains:
+ enum:
+ - nxp,sc18is603
+ then:
+ properties:
+ clock-frequency: false
+
+unevaluatedProperties: false
+
+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 02f9033270a2..000000000000
--- 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.44.0
Powered by blists - more mailing lists