[PATCH 1/3] dt-bindings: net: nfc: add st,st21nfcd-i2c

Kristian Brox <[email protected]>
Newsgroups dev.linux.lists.oe-linux-nfc,org.kernel.vger.linux-arm-msm
Message-ID <[email protected]>
The ST21NFCD (e.g. Fairphone 5) speaks raw NCI on I2C. Existing
st,st21nfcb-* and st,st21nfcc-i2c compatibles stay NDLC. Add a
separate compatible so those boards are not switched to the wrong
framing.

Also document the difference and add an I2C example without
ese-present / uicc-present.

Signed-off-by: Kristian Brox <[email protected]>
---
diff --git a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
index 1dcbddbc5..3523a8df0 100644
--- a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
+++ b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml
@@ -11,10 +11,14 @@ maintainers:
 
 properties:
   compatible:
+    description: |
+      st,st21nfcb-* and st,st21nfcc-i2c use NDLC on the wire.
+      st,st21nfcd-i2c is ST21NFCD with raw NCI (no NDLC PCB).
     enum:
       - st,st21nfcb-i2c
       - st,st21nfcb-spi
       - st,st21nfcc-i2c
+      - st,st21nfcd-i2c
 
   reset-
gpios:
     description: Output GPIO pin used for resetting the controller
@@ -49,6 +53,7 @@ if:
         enum:
           - st,st21nfcb-i2c
           - st,st21nfcc-i2c
+          - st,st21nfcd-i2c
 then:
   properties:
     spi-max-frequency: false
@@ -81,6 +86,24 @@ 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,st21nfcd-i2c";
+            reg = <0x08>;
+
+            interrupt-parent = <&gpio5>;
+            interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+            reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
+        };
+    };
+
   - |
     #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/interrupt-controller/irq.h>
publickey - [email protected] - 0x99222460.asc (application/pgp-keys, 905 B)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: https://gopenpgp.org
Version: GopenPGP 2.10.0

xjMEajGU4RYJKwYBBAHaRw8BAQdARdhTl87MRrY6Rl8/EyHQvbcUkjYpDrjmrfAG
175yv4vNNWlzeW91cmJyYWluZm9zc0Bwcm90b24ubWUgPGlzeW91cmJyYWluZm9z
c0Bwcm90b24ubWU+wsARBBMWCgCDBYJqMZThAwsJBwkQqQe6CH3jwqhFFAAAAAAA
HAAgc2FsdEBub3RhdGlvbnMub3BlbnBncGpzLm9yZ6m90fcNgd4qZz5agWNNNj+o
rN9+8w6MEQgBx0IjGCOqAxUKCAQWAAIBAhkBApsDAh4BFiEEmSIkYNMj9vElRKBr
qQe6CH3jwqgAABpuAQCbRh1ouQ1EaBiGXkXyXRn6dY3ZV53uy+XtQXhm9kiHRAD9
FLQ9kstbrVlwXikRIy9ZH5D4GUWKoverHvZVo7yDZg3OOARqMZThEgorBgEEAZdV
AQUBAQdAGGd8U2rrjWq1PZbhlAAOPMJjrDy5dJ7Lnt7dq5CmUQgDAQgHwr4EGBYK
AHAFgmoxlOEJEKkHugh948KoRRQAAAAAABwAIHNhbHRAbm90YXRpb25zLm9wZW5w
Z3Bqcy5vcmcUo1P4XSdLr4JsFTAi8SqECHDCkkau0mNkaJNZiacSjwKbDBYhBJki
JGDTI/bxJUSga6kHugh948KoAAD+fwD+IKq+jmAJg+XneWOOX4p8y1W+GX7qSC1B
q8iAXQbikeMBAKtw4i+OgeGMc29LGJsHzYWmRaEOgKBo8G+RIa+FTkoF
=knak
-----END PGP PUBLIC KEY BLOCK-----
signature.asc (application/pgp-signature, 322 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wqsEARYIAF0FgmqEx8wJEKkHugh948KoNRQAAAAAABwAEHNhbHRAbm90YXRp
b25zLm9wZW5wZ3Bqcy5vcmcBweDJ4Odqv8PWqj4zPufbFiEEmSIkYNMj9vEl
RKBrqQe6CH3jwqgAAEk5AQCVYJPy1a46Rl+0t/RSDbNQwilDnppi/c1Ek3EA
9hHBuAD9Ek73UoIqeFYN5M58t9IKwHM4TgsBizmHTV4hvbYhhQ0=
=sxVY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.