Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: nfc: nxp,pn532: convert to dtschema

Convert the NXP PN532 NFC controller to DT schema format.

Drop the "clock-frequency" property during conversion because it is a
property of I2C bus controller, not I2C slave device. It was also never
used by the driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211011073934.34340-4-krzysztof.kozlowski@canonical.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring
4cc0246c 54aed10d

+65 -46
+65
Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml
··· 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/nxp,pn532.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP Semiconductors PN532 NFC controller 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - const: nxp,pn532 16 + - description: Deprecated bindings 17 + enum: 18 + - nxp,pn532-i2c 19 + - nxp,pn533-i2c 20 + deprecated: true 21 + 22 + interrupts: 23 + description: Required if connected via I2C 24 + maxItems: 1 25 + 26 + reg: 27 + description: Required if connected via I2C 28 + maxItems: 1 29 + 30 + required: 31 + - compatible 32 + 33 + dependencies: 34 + interrupts: [ 'reg' ] 35 + 36 + additionalProperties: false 37 + 38 + examples: 39 + # PN532 on I2C bus 40 + - | 41 + #include <dt-bindings/interrupt-controller/irq.h> 42 + 43 + i2c { 44 + #address-cells = <1>; 45 + #size-cells = <0>; 46 + 47 + nfc@24 { 48 + compatible = "nxp,pn532"; 49 + 50 + reg = <0x24>; 51 + 52 + interrupt-parent = <&gpio1>; 53 + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; 54 + }; 55 + }; 56 + 57 + # PN532 connected via UART 58 + - | 59 + serial@49042000 { 60 + reg = <0x49042000 0x400>; 61 + 62 + nfc { 63 + compatible = "nxp,pn532"; 64 + }; 65 + };
-46
Documentation/devicetree/bindings/net/nfc/pn532.txt
··· 1 - * NXP Semiconductors PN532 NFC Controller 2 - 3 - Required properties: 4 - - compatible: Should be 5 - - "nxp,pn532" Place a node with this inside the devicetree node of the bus 6 - where the NFC chip is connected to. 7 - Currently the kernel has phy bindings for uart and i2c. 8 - - "nxp,pn532-i2c" (DEPRECATED) only works for the i2c binding. 9 - - "nxp,pn533-i2c" (DEPRECATED) only works for the i2c binding. 10 - 11 - Required properties if connected on i2c: 12 - - clock-frequency: I²C work frequency. 13 - - reg: for the I²C bus address. This is fixed at 0x24 for the PN532. 14 - - interrupts: GPIO interrupt to which the chip is connected 15 - 16 - Optional SoC Specific Properties: 17 - - pinctrl-names: Contains only one value - "default". 18 - - pintctrl-0: Specifies the pin control groups used for this controller. 19 - 20 - Example (for ARM-based BeagleBone with PN532 on I2C2): 21 - 22 - &i2c2 { 23 - 24 - 25 - pn532: nfc@24 { 26 - 27 - compatible = "nxp,pn532"; 28 - 29 - reg = <0x24>; 30 - clock-frequency = <400000>; 31 - 32 - interrupt-parent = <&gpio1>; 33 - interrupts = <17 IRQ_TYPE_EDGE_FALLING>; 34 - 35 - }; 36 - }; 37 - 38 - Example (for PN532 connected via uart): 39 - 40 - uart4: serial@49042000 { 41 - compatible = "ti,omap3-uart"; 42 - 43 - pn532: nfc { 44 - compatible = "nxp,pn532"; 45 - }; 46 - };