xref: /linux/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml (revision ec8a42e7343234802b9054874fe01810880289ce)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/nfc/samsung,s3fwrn5.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung S3FWRN5 NCI NFC Controller
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11  - Krzysztof Opasiak <k.opasiak@samsung.com>
12
13properties:
14  compatible:
15    enum:
16      - samsung,s3fwrn5-i2c
17      - samsung,s3fwrn82
18
19  en-gpios:
20    maxItems: 1
21    description:
22      Output GPIO pin used for enabling/disabling the chip
23
24  interrupts:
25    maxItems: 1
26
27  reg:
28    maxItems: 1
29
30  wake-gpios:
31    maxItems: 1
32    description:
33      Output GPIO pin used to enter firmware mode and sleep/wakeup control
34
35  s3fwrn5,en-gpios:
36    maxItems: 1
37    deprecated: true
38    description:
39      Use en-gpios
40
41  s3fwrn5,fw-gpios:
42    maxItems: 1
43    deprecated: true
44    description:
45      Use wake-gpios
46
47additionalProperties: false
48
49required:
50  - compatible
51  - en-gpios
52  - wake-gpios
53
54allOf:
55  - if:
56      properties:
57        compatible:
58          contains:
59            const: samsung,s3fwrn5-i2c
60    then:
61      required:
62        - interrupts
63        - reg
64
65examples:
66  - |
67    #include <dt-bindings/gpio/gpio.h>
68    #include <dt-bindings/interrupt-controller/irq.h>
69
70    i2c4 {
71        #address-cells = <1>;
72        #size-cells = <0>;
73
74        s3fwrn5@27 {
75            compatible = "samsung,s3fwrn5-i2c";
76            reg = <0x27>;
77
78            interrupt-parent = <&gpa1>;
79            interrupts = <3 IRQ_TYPE_EDGE_RISING>;
80
81            en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
82            wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
83        };
84    };
85  # UART example on Raspberry Pi
86  - |
87    uart0 {
88        status = "okay";
89
90        nfc {
91            compatible = "samsung,s3fwrn82";
92
93            en-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
94            wake-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
95
96            status = "okay";
97        };
98    };
99