0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/net/nfc/st,st-nci.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: STMicroelectronics ST NCI NFC controller
0008
0009 maintainers:
0010 - Krzysztof Kozlowski <krzk@kernel.org>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - st,st21nfcb-i2c
0016 - st,st21nfcb-spi
0017 - st,st21nfcc-i2c
0018
0019 reset-gpios:
0020 description: Output GPIO pin used for resetting the controller
0021
0022 ese-present:
0023 type: boolean
0024 description: |
0025 Specifies that an ese is physically connected to the controller
0026
0027 interrupts:
0028 maxItems: 1
0029
0030 reg:
0031 maxItems: 1
0032
0033 uicc-present:
0034 type: boolean
0035 description: |
0036 Specifies that the uicc swp signal can be physically connected to the
0037 controller
0038
0039 required:
0040 - compatible
0041 - interrupts
0042 - reg
0043 - reset-gpios
0044
0045 if:
0046 properties:
0047 compatible:
0048 contains:
0049 enum:
0050 - st,st21nfcb-i2c
0051 - st,st21nfcc-i2c
0052 then:
0053 properties:
0054 spi-max-frequency: false
0055 else:
0056 $ref: /schemas/spi/spi-peripheral-props.yaml#
0057 required:
0058 - spi-max-frequency
0059
0060 unevaluatedProperties: false
0061
0062 examples:
0063 - |
0064 #include <dt-bindings/gpio/gpio.h>
0065 #include <dt-bindings/interrupt-controller/irq.h>
0066
0067 i2c {
0068 #address-cells = <1>;
0069 #size-cells = <0>;
0070
0071 nfc@8 {
0072 compatible = "st,st21nfcb-i2c";
0073 reg = <0x08>;
0074
0075 interrupt-parent = <&gpio5>;
0076 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
0077 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
0078
0079 ese-present;
0080 uicc-present;
0081 };
0082 };
0083
0084 - |
0085 #include <dt-bindings/gpio/gpio.h>
0086 #include <dt-bindings/interrupt-controller/irq.h>
0087
0088 spi {
0089 #address-cells = <1>;
0090 #size-cells = <0>;
0091
0092 nfc@0 {
0093 compatible = "st,st21nfcb-spi";
0094 reg = <0>;
0095
0096 spi-max-frequency = <4000000>;
0097
0098 interrupt-parent = <&gpio5>;
0099 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
0100 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
0101
0102 ese-present;
0103 uicc-present;
0104 };
0105 };