From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Charles Gorand <charles.gorand@effinnov.com>,
Mark Greer <mgreer@animalcreek.com>,
linux-nfc@lists.01.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org
Subject: [PATCH v2 6/8] dt-bindings: nfc: st,nci: convert to dtschema
Date: Mon, 11 Oct 2021 09:39:32 +0200 [thread overview]
Message-ID: <20211011073934.34340-7-krzysztof.kozlowski@canonical.com> (raw)
In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com>
Convert the ST NCI (ST21NFCB) NFC controller to DT schema format.
Changes during bindings conversion:
1. Add a new required "reg" property for SPI binding, because SPI child
devices use it as chip-select.
2. Drop the "clock-frequency" property during conversion because it is a
property of I2C bus controller, not I2C slave device. It was also
never used by the driver.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
.../bindings/net/nfc/st,st-nci.yaml | 106 ++++++++++++++++++
.../bindings/net/nfc/st-nci-i2c.txt | 38 -------
.../bindings/net/nfc/st-nci-spi.txt | 36 ------
3 files changed, 106 insertions(+), 74 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
delete mode 100644 Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
delete mode 100644 Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
diff --git a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
new file mode 100644
index 000000000000..a6a1bc788d29
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/nfc/st,st-nci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics ST NCI NFC controller
+
+maintainers:
+ - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+properties:
+ compatible:
+ enum:
+ - st,st21nfcb-i2c
+ - st,st21nfcb-spi
+ - st,st21nfcc-i2c
+
+ reset-gpios:
+ description: Output GPIO pin used for resetting the controller
+
+ ese-present:
+ type: boolean
+ description: |
+ Specifies that an ese is physically connected to the controller
+
+ interrupts:
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency: true
+
+ uicc-present:
+ type: boolean
+ description: |
+ Specifies that the uicc swp signal can be physically connected to the
+ controller
+
+required:
+ - compatible
+ - interrupts
+ - reg
+ - reset-gpios
+
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,st21nfcb-i2c
+ - st,st21nfcc-i2c
+then:
+ properties:
+ spi-max-frequency: false
+else:
+ required:
+ - spi-max-frequency
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc@8 {
+ compatible = "st,st21nfcb-i2c";
+ reg = <0x08>;
+
+ interrupt-parent = <&gpio5>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
+
+ ese-present;
+ uicc-present;
+ };
+ };
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc@0 {
+ compatible = "st,st21nfcb-spi";
+ reg = <0>;
+
+ spi-max-frequency = <4000000>;
+
+ interrupt-parent = <&gpio5>;
+ interrupts = <2 IRQ_TYPE_EDGE_RISING>;
+ reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
+
+ ese-present;
+ uicc-present;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
deleted file mode 100644
index baa8f8133d19..000000000000
--- a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-* STMicroelectronics SAS. ST NCI NFC Controller
-
-Required properties:
-- compatible: Should be "st,st21nfcb-i2c" or "st,st21nfcc-i2c".
-- clock-frequency: I²C work frequency.
-- reg: address on the bus
-- interrupts: GPIO interrupt to which the chip is connected
-- reset-gpios: Output GPIO pin used to reset the ST21NFCB
-
-Optional SoC Specific Properties:
-- pinctrl-names: Contains only one value - "default".
-- pintctrl-0: Specifies the pin control groups used for this controller.
-- ese-present: Specifies that an ese is physically connected to the nfc
-controller.
-- uicc-present: Specifies that the uicc swp signal can be physically
-connected to the nfc controller.
-
-Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):
-
-&i2c2 {
-
-
- st21nfcb: st21nfcb@8 {
-
- compatible = "st,st21nfcb-i2c";
-
- reg = <0x08>;
- clock-frequency = <400000>;
-
- interrupt-parent = <&gpio5>;
- interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
-
- reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
-
- ese-present;
- uicc-present;
- };
-};
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
deleted file mode 100644
index d33343330b94..000000000000
--- a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* STMicroelectronics SAS. ST NCI NFC Controller
-
-Required properties:
-- compatible: Should be "st,st21nfcb-spi"
-- spi-max-frequency: Maximum SPI frequency (<= 4000000).
-- interrupts: GPIO interrupt to which the chip is connected
-- reset-gpios: Output GPIO pin used to reset the ST21NFCB
-
-Optional SoC Specific Properties:
-- pinctrl-names: Contains only one value - "default".
-- pintctrl-0: Specifies the pin control groups used for this controller.
-- ese-present: Specifies that an ese is physically connected to the nfc
-controller.
-- uicc-present: Specifies that the uicc swp signal can be physically
-connected to the nfc controller.
-
-Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4):
-
-&mcspi4 {
-
-
- st21nfcb: st21nfcb@0 {
-
- compatible = "st,st21nfcb-spi";
-
- clock-frequency = <4000000>;
-
- interrupt-parent = <&gpio5>;
- interrupts = <2 IRQ_TYPE_EDGE_RISING>;
-
- reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
-
- ese-present;
- uicc-present;
- };
-};
--
2.30.2
next prev parent reply other threads:[~2021-10-11 7:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 7:39 [PATCH v2 0/8] nfc: dt-bindings: convert to dt-schema Krzysztof Kozlowski
2021-10-11 7:39 ` [PATCH v2 1/8] dt-bindings: nfc: nxp,nci: convert to dtschema Krzysztof Kozlowski
2021-10-18 20:16 ` Rob Herring
2021-10-11 7:39 ` [PATCH v2 2/8] dt-bindings: nfc: nxp,nci: document NXP PN547 binding Krzysztof Kozlowski
2021-10-18 20:16 ` Rob Herring
2021-10-11 7:39 ` [PATCH v2 3/8] dt-bindings: nfc: nxp,pn532: convert to dtschema Krzysztof Kozlowski
2021-10-18 20:16 ` Rob Herring
2021-10-11 7:39 ` [PATCH v2 4/8] dt-bindings: nfc: st,st21nfca: " Krzysztof Kozlowski
2021-10-18 20:16 ` Rob Herring
2021-10-11 7:39 ` [PATCH v2 5/8] dt-bindings: nfc: st,st95hf: " Krzysztof Kozlowski
2021-10-18 20:16 ` Rob Herring
2021-10-11 7:39 ` Krzysztof Kozlowski [this message]
2021-10-18 20:17 ` [PATCH v2 6/8] dt-bindings: nfc: st,nci: " Rob Herring
2021-10-11 7:39 ` [PATCH v2 7/8] dt-bindings: nfc: ti,trf7970a: " Krzysztof Kozlowski
2021-10-18 20:17 ` Rob Herring
2021-10-11 7:39 ` [PATCH v2 8/8] dt-bindings: nfc: marvell,nci: " Krzysztof Kozlowski
2021-10-18 20:17 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211011073934.34340-7-krzysztof.kozlowski@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=charles.gorand@effinnov.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfc@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).