Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 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 | |
| 7 | title: Samsung S3FWRN5 NCI NFC Controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Krzysztof Kozlowski <krzk@kernel.org> |
| 11 | - Krzysztof Opasiak <k.opasiak@samsung.com> |
| 12 | |
| 13 | properties: |
| 14 | compatible: |
Bongsu Jeon | 36d0762 | 2020-12-02 20:47:38 +0900 | [diff] [blame] | 15 | enum: |
| 16 | - samsung,s3fwrn5-i2c |
| 17 | - samsung,s3fwrn82 |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 18 | |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 19 | en-gpios: |
| 20 | maxItems: 1 |
| 21 | description: |
| 22 | Output GPIO pin used for enabling/disabling the chip |
| 23 | |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 24 | interrupts: |
| 25 | maxItems: 1 |
| 26 | |
| 27 | reg: |
| 28 | maxItems: 1 |
| 29 | |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 30 | wake-gpios: |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 31 | maxItems: 1 |
| 32 | description: |
| 33 | Output GPIO pin used to enter firmware mode and sleep/wakeup control |
| 34 | |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 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 | |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 47 | additionalProperties: false |
| 48 | |
| 49 | required: |
| 50 | - compatible |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 51 | - en-gpios |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 52 | - wake-gpios |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 53 | |
Bongsu Jeon | 36d0762 | 2020-12-02 20:47:38 +0900 | [diff] [blame] | 54 | allOf: |
| 55 | - if: |
| 56 | properties: |
| 57 | compatible: |
| 58 | contains: |
| 59 | const: samsung,s3fwrn5-i2c |
| 60 | then: |
| 61 | required: |
| 62 | - interrupts |
| 63 | - reg |
| 64 | |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 65 | examples: |
| 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>; |
Bongsu Jeon | b783ff4 | 2020-12-08 23:10:11 +0900 | [diff] [blame] | 79 | interrupts = <3 IRQ_TYPE_EDGE_RISING>; |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 80 | |
Krzysztof Kozlowski | 3a9f89a | 2020-09-10 18:12:13 +0200 | [diff] [blame] | 81 | en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; |
| 82 | wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; |
Krzysztof Kozlowski | 07d20a6 | 2020-09-10 18:12:12 +0200 | [diff] [blame] | 83 | }; |
| 84 | }; |
Bongsu Jeon | 36d0762 | 2020-12-02 20:47:38 +0900 | [diff] [blame] | 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 | }; |