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/samsung,s3fwrn5.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Samsung S3FWRN5 NCI NFC Controller
0008
0009 maintainers:
0010 - Krzysztof Kozlowski <krzk@kernel.org>
0011 - Krzysztof Opasiak <k.opasiak@samsung.com>
0012
0013 properties:
0014 compatible:
0015 enum:
0016 - samsung,s3fwrn5-i2c
0017 - samsung,s3fwrn82
0018
0019 en-gpios:
0020 maxItems: 1
0021 description:
0022 Output GPIO pin used for enabling/disabling the chip
0023
0024 interrupts:
0025 maxItems: 1
0026
0027 reg:
0028 maxItems: 1
0029
0030 clocks:
0031 maxItems: 1
0032
0033 wake-gpios:
0034 maxItems: 1
0035 description:
0036 Output GPIO pin used to enter firmware mode and sleep/wakeup control
0037
0038 s3fwrn5,en-gpios:
0039 maxItems: 1
0040 deprecated: true
0041 description:
0042 Use en-gpios
0043
0044 s3fwrn5,fw-gpios:
0045 maxItems: 1
0046 deprecated: true
0047 description:
0048 Use wake-gpios
0049
0050 additionalProperties: false
0051
0052 required:
0053 - compatible
0054 - en-gpios
0055 - wake-gpios
0056
0057 allOf:
0058 - if:
0059 properties:
0060 compatible:
0061 contains:
0062 const: samsung,s3fwrn5-i2c
0063 then:
0064 required:
0065 - interrupts
0066 - reg
0067
0068 examples:
0069 - |
0070 #include <dt-bindings/gpio/gpio.h>
0071 #include <dt-bindings/interrupt-controller/irq.h>
0072
0073 i2c4 {
0074 #address-cells = <1>;
0075 #size-cells = <0>;
0076
0077 s3fwrn5@27 {
0078 compatible = "samsung,s3fwrn5-i2c";
0079 reg = <0x27>;
0080
0081 interrupt-parent = <&gpa1>;
0082 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
0083
0084 en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
0085 wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
0086
0087 clocks = <&rpmcc 20>;
0088 };
0089 };
0090 # UART example on Raspberry Pi
0091 - |
0092 uart0 {
0093 nfc {
0094 compatible = "samsung,s3fwrn82";
0095
0096 en-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
0097 wake-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
0098
0099 };
0100 };