[PATCH v2 1/3] dt-bindings: net: nfc: add st,st21nfcd
Kristian Brox <[email protected]>
| Newsgroups | dev.linux.lists.oe-linux-nfc,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.netdev |
|---|---|
| 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 optional SYS_CLK (clocks) and VPS_IO (vdd-io-supply) used on Fairphone 5, and add an I2C example. 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 1dcbddb..4bdbb36 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 is ST21NFCD with raw NCI (no NDLC PCB). enum: - st,st21nfcb-i2c - st,st21nfcb-spi - st,st21nfcc-i2c + - st,st21nfcd reset-gpios: description: Output GPIO pin used for resetting the controller @@ -36,6 +40,15 @@ properties: Specifies that the uicc swp signal can be physically connected to the controller + clocks: + maxItems: 1 + description: + External reference clock connected to SYS_CLK. + + vdd-io-supply: + description: + Digital I/O supply (VPS_IO). + required: - compatible - interrupts @@ -49,6 +62,7 @@ if: enum: - st,st21nfcb-i2c - st,st21nfcc-i2c + - st,st21nfcd then: properties: spi-max-frequency: false @@ -81,6 +95,27 @@ 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"; + reg = <0x08>; + + interrupt-parent = <&gpio5>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; + + clocks = <&clk>; + vdd-io-supply = <&vdd_io>; + }; + }; + - | #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h>