xref: /freebsd/sys/contrib/device-tree/Bindings/net/nfc/st,st-nci.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/net/nfc/st,st-nci.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78cc087a1SEmmanuel Vadottitle: STMicroelectronics ST NCI NFC controller
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotproperties:
138cc087a1SEmmanuel Vadot  compatible:
148cc087a1SEmmanuel Vadot    enum:
158cc087a1SEmmanuel Vadot      - st,st21nfcb-i2c
168cc087a1SEmmanuel Vadot      - st,st21nfcb-spi
178cc087a1SEmmanuel Vadot      - st,st21nfcc-i2c
188cc087a1SEmmanuel Vadot
198cc087a1SEmmanuel Vadot  reset-gpios:
208cc087a1SEmmanuel Vadot    description: Output GPIO pin used for resetting the controller
218cc087a1SEmmanuel Vadot
228cc087a1SEmmanuel Vadot  ese-present:
238cc087a1SEmmanuel Vadot    type: boolean
248cc087a1SEmmanuel Vadot    description: |
258cc087a1SEmmanuel Vadot      Specifies that an ese is physically connected to the controller
268cc087a1SEmmanuel Vadot
278cc087a1SEmmanuel Vadot  interrupts:
288cc087a1SEmmanuel Vadot    maxItems: 1
298cc087a1SEmmanuel Vadot
308cc087a1SEmmanuel Vadot  reg:
318cc087a1SEmmanuel Vadot    maxItems: 1
328cc087a1SEmmanuel Vadot
338cc087a1SEmmanuel Vadot  uicc-present:
348cc087a1SEmmanuel Vadot    type: boolean
358cc087a1SEmmanuel Vadot    description: |
368cc087a1SEmmanuel Vadot      Specifies that the uicc swp signal can be physically connected to the
378cc087a1SEmmanuel Vadot      controller
388cc087a1SEmmanuel Vadot
398cc087a1SEmmanuel Vadotrequired:
408cc087a1SEmmanuel Vadot  - compatible
418cc087a1SEmmanuel Vadot  - interrupts
428cc087a1SEmmanuel Vadot  - reg
438cc087a1SEmmanuel Vadot  - reset-gpios
448cc087a1SEmmanuel Vadot
458cc087a1SEmmanuel Vadotif:
468cc087a1SEmmanuel Vadot  properties:
478cc087a1SEmmanuel Vadot    compatible:
488cc087a1SEmmanuel Vadot      contains:
498cc087a1SEmmanuel Vadot        enum:
508cc087a1SEmmanuel Vadot          - st,st21nfcb-i2c
518cc087a1SEmmanuel Vadot          - st,st21nfcc-i2c
528cc087a1SEmmanuel Vadotthen:
538cc087a1SEmmanuel Vadot  properties:
548cc087a1SEmmanuel Vadot    spi-max-frequency: false
558cc087a1SEmmanuel Vadotelse:
56*b97ee269SEmmanuel Vadot  $ref: /schemas/spi/spi-peripheral-props.yaml#
578cc087a1SEmmanuel Vadot  required:
588cc087a1SEmmanuel Vadot    - spi-max-frequency
598cc087a1SEmmanuel Vadot
60*b97ee269SEmmanuel VadotunevaluatedProperties: false
618cc087a1SEmmanuel Vadot
628cc087a1SEmmanuel Vadotexamples:
638cc087a1SEmmanuel Vadot  - |
648cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
658cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
668cc087a1SEmmanuel Vadot
678cc087a1SEmmanuel Vadot    i2c {
688cc087a1SEmmanuel Vadot        #address-cells = <1>;
698cc087a1SEmmanuel Vadot        #size-cells = <0>;
708cc087a1SEmmanuel Vadot
718cc087a1SEmmanuel Vadot        nfc@8 {
728cc087a1SEmmanuel Vadot            compatible = "st,st21nfcb-i2c";
738cc087a1SEmmanuel Vadot            reg = <0x08>;
748cc087a1SEmmanuel Vadot
758cc087a1SEmmanuel Vadot            interrupt-parent = <&gpio5>;
768cc087a1SEmmanuel Vadot            interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
778cc087a1SEmmanuel Vadot            reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
788cc087a1SEmmanuel Vadot
798cc087a1SEmmanuel Vadot            ese-present;
808cc087a1SEmmanuel Vadot            uicc-present;
818cc087a1SEmmanuel Vadot        };
828cc087a1SEmmanuel Vadot    };
838cc087a1SEmmanuel Vadot
848cc087a1SEmmanuel Vadot  - |
858cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
868cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
878cc087a1SEmmanuel Vadot
888cc087a1SEmmanuel Vadot    spi {
898cc087a1SEmmanuel Vadot        #address-cells = <1>;
908cc087a1SEmmanuel Vadot        #size-cells = <0>;
918cc087a1SEmmanuel Vadot
928cc087a1SEmmanuel Vadot        nfc@0 {
938cc087a1SEmmanuel Vadot            compatible = "st,st21nfcb-spi";
948cc087a1SEmmanuel Vadot            reg = <0>;
958cc087a1SEmmanuel Vadot
968cc087a1SEmmanuel Vadot            spi-max-frequency = <4000000>;
978cc087a1SEmmanuel Vadot
988cc087a1SEmmanuel Vadot            interrupt-parent = <&gpio5>;
998cc087a1SEmmanuel Vadot            interrupts = <2 IRQ_TYPE_EDGE_RISING>;
1008cc087a1SEmmanuel Vadot            reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
1018cc087a1SEmmanuel Vadot
1028cc087a1SEmmanuel Vadot            ese-present;
1038cc087a1SEmmanuel Vadot            uicc-present;
1048cc087a1SEmmanuel Vadot        };
1058cc087a1SEmmanuel Vadot    };
106