samsung,s3fwrn5.yaml 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/nfc/samsung,s3fwrn5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S3FWRN5 NCI NFC Controller

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>
  - Krzysztof Opasiak <k.opasiak@samsung.com>

properties:
  compatible:
15 16 17
    enum:
      - samsung,s3fwrn5-i2c
      - samsung,s3fwrn82
18

19 20 21 22 23
  en-gpios:
    maxItems: 1
    description:
      Output GPIO pin used for enabling/disabling the chip

24 25 26 27 28 29
  interrupts:
    maxItems: 1

  reg:
    maxItems: 1

30 31 32
  clocks:
    maxItems: 1

33 34 35 36 37
  wake-gpios:
    maxItems: 1
    description:
      Output GPIO pin used to enter firmware mode and sleep/wakeup control

38 39
  s3fwrn5,en-gpios:
    maxItems: 1
40
    deprecated: true
41
    description:
42
      Use en-gpios
43 44 45

  s3fwrn5,fw-gpios:
    maxItems: 1
46
    deprecated: true
47
    description:
48
      Use wake-gpios
49 50 51 52 53

additionalProperties: false

required:
  - compatible
54 55
  - en-gpios
  - wake-gpios
56

57 58 59 60 61 62 63 64 65 66 67
allOf:
  - if:
      properties:
        compatible:
          contains:
            const: samsung,s3fwrn5-i2c
    then:
      required:
        - interrupts
        - reg

68 69 70 71 72 73 74 75 76 77 78 79 80 81
examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c4 {
        #address-cells = <1>;
        #size-cells = <0>;

        s3fwrn5@27 {
            compatible = "samsung,s3fwrn5-i2c";
            reg = <0x27>;

            interrupt-parent = <&gpa1>;
82
            interrupts = <3 IRQ_TYPE_EDGE_RISING>;
83

84 85
            en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
            wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
86 87

            clocks = <&rpmcc 20>;
88 89
        };
    };
90 91 92 93 94 95 96 97 98 99 100
  # UART example on Raspberry Pi
  - |
    uart0 {
        nfc {
            compatible = "samsung,s3fwrn82";

            en-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
            wake-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;

        };
    };