From patchwork Mon Oct 11 07:39:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539148 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=I0mYu0D3; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0X4fYhz9sP7 for ; Mon, 11 Oct 2021 18:39:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234648AbhJKHlx (ORCPT ); Mon, 11 Oct 2021 03:41:53 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:57476 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234575AbhJKHlt (ORCPT ); Mon, 11 Oct 2021 03:41:49 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 714E240021 for ; Mon, 11 Oct 2021 07:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937987; bh=hrLA5o9OEIQ0nHS0Sc5B651Iz0OK3SR27lQhWVZgzKI=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=I0mYu0D31VuK4pRmlCnk7ZywwcaMk+gp0zhdWj8iXMgwQewfI9QG6qIU91Pwhh+c2 9wGMiTvyaksVArjqqY/f8gbxgAOX2sNvaPds7LVIL888LQLe3Pe9Mb+dg1fn/KvpzV E3sy0MKQDDQELkQMzsQ4E+RRWD8smZFiCX72yMd6n2+Mpi6+kOWIYPi/qC78Hlyzme jjHQvA831DH0+HtG4sOSbORbLOqWx2Dp9e0FJbg5spbKEFYoYEq28FJvt5b2RbBOF0 Uj0rABuoFsPV0tvCyVslMnu9goVjeZBN1Pey87RySvXFIahhr3HAy4xea+A3NNdxM6 yl5Mryw2TRQig== Received: by mail-ed1-f69.google.com with SMTP id r11-20020aa7cfcb000000b003d4fbd652b9so13035279edy.14 for ; Mon, 11 Oct 2021 00:39:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hrLA5o9OEIQ0nHS0Sc5B651Iz0OK3SR27lQhWVZgzKI=; b=d0rkpryq4V1bWq7fBt2pquKVUsm5UDh022U18BsNRWPCl+FGlfgv43+M4meBldFc75 r3X4w+Ncg8yVZMfMdl7DipfAycGd8Z3HXhPmZkA/ZUHNyLYHd9bUUIwGOGgqbPb3ky9L ugKi+Olha8BjRcvVDW087oO5yi5MkeUi1H+y7dhlVB5O9b1bxYt9uqAjSqgdTQJriQdp CdR0//OjUfOoVFhZPOw9caHJW7MZ8f3afEdMk1ctbFHQqqcNKBZdqFs8AOc3Iai1mVGf XQp8PTFuMu5gMUhoZwcxTRoZZ6tfNB2h5TkQ+GaOX8xfhoweUqZHgFcRQYGpeBj6JtJM 1GTA== X-Gm-Message-State: AOAM532KkmUy25Mun+Os4K976NshN0vM2QiU6knMAj0fXM8ss90zgrUC ZOpYM00g+H8QDnEyFPsqqZHRuaSP6GsLGNNGq1gQHVbWFX1XVAB5idSe+tmhPWwpNOV1xaJ+RkH HVNtWohUKkVSU/yINyINEksIq2l2h2xja3vum0/Q= X-Received: by 2002:a50:be81:: with SMTP id b1mr39180540edk.59.1633937986050; Mon, 11 Oct 2021 00:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRojHIPPzkKpzS+divt5D4CXRSkB9G3jbMbb2k4RwWF1y3DeZtH0vRHHfAbA51bv493rwOpQ== X-Received: by 2002:a50:be81:: with SMTP id b1mr39180520edk.59.1633937985884; Mon, 11 Oct 2021 00:39:45 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:45 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 1/8] dt-bindings: nfc: nxp,nci: convert to dtschema Date: Mon, 11 Oct 2021 09:39:27 +0200 Message-Id: <20211011073934.34340-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the NXP NCI 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 --- .../devicetree/bindings/net/nfc/nxp,nci.yaml | 57 +++++++++++++++++++ .../devicetree/bindings/net/nfc/nxp-nci.txt | 33 ----------- MAINTAINERS | 1 + 3 files changed, 58 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/nxp-nci.txt diff --git a/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml b/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml new file mode 100644 index 000000000000..70634d20d4d7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/nxp,nci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Semiconductors NCI NFC controller + +maintainers: + - Charles Gorand + - Krzysztof Kozlowski + +properties: + compatible: + const: nxp,nxp-nci-i2c + + enable-gpios: + description: Output GPIO pin used for enabling/disabling the controller + + firmware-gpios: + description: Output GPIO pin used to enter firmware download mode + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + +required: + - compatible + - enable-gpios + - interrupts + - reg + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@29 { + compatible = "nxp,nxp-nci-i2c"; + + reg = <0x29>; + + interrupt-parent = <&gpio1>; + interrupts = <29 IRQ_TYPE_LEVEL_HIGH>; + + enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; + firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt deleted file mode 100644 index 285a37c2f189..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt +++ /dev/null @@ -1,33 +0,0 @@ -* NXP Semiconductors NXP NCI NFC Controllers - -Required properties: -- compatible: Should be "nxp,nxp-nci-i2c". -- clock-frequency: I²C work frequency. -- reg: address on the bus -- interrupts: GPIO interrupt to which the chip is connected -- enable-gpios: Output GPIO pin used for enabling/disabling the chip - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- firmware-gpios: Output GPIO pin used to enter firmware download mode - -Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2): - -&i2c2 { - - - npc100: npc100@29 { - - compatible = "nxp,nxp-nci-i2c"; - - reg = <0x29>; - clock-frequency = <100000>; - - interrupt-parent = <&gpio1>; - interrupts = <29 IRQ_TYPE_LEVEL_HIGH>; - - enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; - firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; - }; -}; diff --git a/MAINTAINERS b/MAINTAINERS index 7cfd63ce7122..3294aaf5e56c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13632,6 +13632,7 @@ NXP-NCI NFC DRIVER R: Charles Gorand L: linux-nfc@lists.01.org (subscribers-only) S: Supported +F: Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml F: drivers/nfc/nxp-nci NXP i.MX 8QXP/8QM JPEG V4L2 DRIVER From patchwork Mon Oct 11 07:39:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539147 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=VcX+7spC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0T1TpVz9sPB for ; Mon, 11 Oct 2021 18:39:53 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234586AbhJKHlv (ORCPT ); Mon, 11 Oct 2021 03:41:51 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:43794 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234545AbhJKHls (ORCPT ); Mon, 11 Oct 2021 03:41:48 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 39DDE3FFF3 for ; Mon, 11 Oct 2021 07:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937988; bh=UgKOyYZwudZNcbOmLjHV2oxljhkCMf/FkAv9xZY25jk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VcX+7spCnd6U+Ae1SvJ6nByzv9umNK0MFTJqQhyyT6zUPS34NIgD/5QFP02Pz3YSz S9X/6sy8vogjKrIYEzC0w847WiYaJJ0ak9Zv69EygZTSAjTE6F1h7HHwzsJhcImej9 srYnfkUyZe9RajA0QNQW2rE3NSzdZ8TuxX/YZ5rgbpjpNyO7KQ6LauPo4ClpriR6fx Ip+v9mF6anCXRxVOptLhOU4HHXLeYUv8P9gdUD5SkA/w8EYLZCEF4cfYeShmTW13lQ /cKHZzjpE1AcSraO53f5zCTSA0Byxv1akTDS5Sv6guGY+hD9mzJFWAf1ydOuiiJcS8 vWgCiMYAgmlKg== Received: by mail-ed1-f70.google.com with SMTP id h19-20020aa7de13000000b003db6ad5245bso6464894edv.9 for ; Mon, 11 Oct 2021 00:39:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UgKOyYZwudZNcbOmLjHV2oxljhkCMf/FkAv9xZY25jk=; b=Oq2iwiINdkJtEwTFlPmgCbzo7cDIOdRPYqAk50XJnhlGCpp5pJwDDnRUt18c/jadZE ZZI2H8qsFw4GroiLYHbf74JRX5eFhjttDpd2sN1eQOsic+k923Jn5Z1OZ+XsqV1uy0Ev OHQVRObX8UjSyYIjLFhMyumFkWg9/PFoDw66eucbaGd/SOfi7KaAkgxfMldADbqJzKiE lYk3lyRItRTRlZFrh9HmbSteq0ch5g7cXrKe37JgxE4RuhMo3BhiOhWi5U79LLBHicT+ GKWIZFM2Fv5WK5n0MFjFTUpKCuSJSVaaMGymEQHtw6Wh0cThXXvdVIz43Jet1LCqXTy/ fjuQ== X-Gm-Message-State: AOAM533W41oBNLHDuntlAcTgrqMC0C7+C4T6Kd9GzHOWQ6OLqVqHn1xh ordMPQdSlwEsV/fvbIaxJ0GCAvH9SC9G/CPUNNFlBqnRXnQNQlERbgRBFObcGXkUIlVoi0fQb57 K1y9zHy5oOwArlm2PvWmRaki4Kdh1emFYzEFzpq0= X-Received: by 2002:a05:6402:90b:: with SMTP id g11mr285852edz.32.1633937987495; Mon, 11 Oct 2021 00:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpldaLH9a88wXudeyQvv2eytBFPukbJ2BYMZlSB5t8tpzJmcsqoMhbsiBWxgjJeaELLuFqBA== X-Received: by 2002:a05:6402:90b:: with SMTP id g11mr285836edz.32.1633937987365; Mon, 11 Oct 2021 00:39:47 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:46 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 2/8] dt-bindings: nfc: nxp,nci: document NXP PN547 binding Date: Mon, 11 Oct 2021 09:39:28 +0200 Message-Id: <20211011073934.34340-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org NXP PN547 NFC controller seems to be compatible with the NXP NCI and there already DTS files using two compatibles. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml b/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml index 70634d20d4d7..7465aea2e1c0 100644 --- a/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml +++ b/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml @@ -12,7 +12,11 @@ maintainers: properties: compatible: - const: nxp,nxp-nci-i2c + oneOf: + - const: nxp,nxp-nci-i2c + - items: + - const: nxp,pn547 + - const: nxp,nxp-nci-i2c enable-gpios: description: Output GPIO pin used for enabling/disabling the controller From patchwork Mon Oct 11 07:39:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539153 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Jb9dYUxh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW181w8Fz9sP7 for ; Mon, 11 Oct 2021 18:40:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234912AbhJKHmZ (ORCPT ); Mon, 11 Oct 2021 03:42:25 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:57522 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234579AbhJKHlt (ORCPT ); Mon, 11 Oct 2021 03:41:49 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 3FF6E40027 for ; Mon, 11 Oct 2021 07:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937989; bh=p7DB9CXnt9jgmm22VXqbPUHJTzgACaTPyFxSkRyfsXw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Jb9dYUxh7cJ1n/4ImLPAWmFpMHFm6OKrvHKEWTr7lox+lSpJOLKCQm0232c8n5qi7 XtrVQRQ9Sl34Lh8pmTbc+cg2tZDb86FzmwxOBCtgBZSRc4TyTAAtfDEQ18ejMb1m2I nIMfmEWyXVUL32f7UpqURqn1RVVpjp4boxf10kRUlllhBwEUOpDHSfijjJJWJ+yaQk yfeGnw7EJiiebT8O/kzRi9kWQeBrcw9/3muGeT059Dj52US9uEjA9DXHm4/Oev6n+P QXpiykZBzGv/s/ug2UrDxQmX1N9L+CNfcuYStN//2FONwKwye4SL2xivFVqwA+cbDg G+n5DyOeJZ/tQ== Received: by mail-ed1-f69.google.com with SMTP id c8-20020a50d648000000b003daa53c7518so15026251edj.21 for ; Mon, 11 Oct 2021 00:39:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p7DB9CXnt9jgmm22VXqbPUHJTzgACaTPyFxSkRyfsXw=; b=wEdCXi3WsPgWJCewCXGDlNwxg+UxsU9Wy1w8UVAY8lVwMVq/aLosIEyJ50orKh/BZH DR0idc5Ew1j8l+cvnqSx/2sz9gpwnNj7Q3OF9pdnI6FyI9vKydSkJb7WRZnDexP6nHmj xUutM0BiHaVi5unwl6vnnbVxKdKwpftoJ3SqZmQIBbIKfmogIe1ETB525nlRRHJu7yc+ k0waveXY72YLdXnQL8T4nA/MVf9p/AE8y/gmX9B7D9X92zh77S2OGIMMYysCDEvjHGxh y3vtr7n/rn5F/x702AM8BA0tgqqy6GudvvIf42bup4wMMXQmW3TXlHMuzYxldCehizoq 6Cfw== X-Gm-Message-State: AOAM5337xZgAppoqGkNE4sv/qSnLMb+kh8pOpKoZIdaJ1XGRtLJYtT58 AfKJlUQhqosx3qMHd5/y+AO5myJkulkdXpKC9XRYtlJ/nmi+Yf5sJXHhHyDFJRZSDRyKUCzxFqe UJXw8qwFBWNzq//biZpOvuy9hd2YYLZs3+evoeB4= X-Received: by 2002:a50:cf0d:: with SMTP id c13mr38438486edk.269.1633937988952; Mon, 11 Oct 2021 00:39:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtcAHNa5bqyvBP7uHLdC5fEGKfVXP1SsqWgMZIcsmIr3wnyRbIRzVESmj8E1CmPDnaMSvDJA== X-Received: by 2002:a50:cf0d:: with SMTP id c13mr38438472edk.269.1633937988744; Mon, 11 Oct 2021 00:39:48 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:48 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 3/8] dt-bindings: nfc: nxp,pn532: convert to dtschema Date: Mon, 11 Oct 2021 09:39:29 +0200 Message-Id: <20211011073934.34340-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- .../bindings/net/nfc/nxp,pn532.yaml | 65 +++++++++++++++++++ .../devicetree/bindings/net/nfc/pn532.txt | 46 ------------- 2 files changed, 65 insertions(+), 46 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/pn532.txt diff --git a/Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml b/Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml new file mode 100644 index 000000000000..d8ba5a18db98 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/nxp,pn532.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/nxp,pn532.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Semiconductors PN532 NFC controller + +maintainers: + - Krzysztof Kozlowski + +properties: + compatible: + oneOf: + - const: nxp,pn532 + - description: Deprecated bindings + enum: + - nxp,pn532-i2c + - nxp,pn533-i2c + deprecated: true + + interrupts: + description: Required if connected via I2C + maxItems: 1 + + reg: + description: Required if connected via I2C + maxItems: 1 + +required: + - compatible + +dependencies: + interrupts: [ 'reg' ] + +additionalProperties: false + +examples: + # PN532 on I2C bus + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@24 { + compatible = "nxp,pn532"; + + reg = <0x24>; + + interrupt-parent = <&gpio1>; + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + # PN532 connected via UART + - | + serial@49042000 { + reg = <0x49042000 0x400>; + + nfc { + compatible = "nxp,pn532"; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/pn532.txt b/Documentation/devicetree/bindings/net/nfc/pn532.txt deleted file mode 100644 index a5507dc499bc..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/pn532.txt +++ /dev/null @@ -1,46 +0,0 @@ -* NXP Semiconductors PN532 NFC Controller - -Required properties: -- compatible: Should be - - "nxp,pn532" Place a node with this inside the devicetree node of the bus - where the NFC chip is connected to. - Currently the kernel has phy bindings for uart and i2c. - - "nxp,pn532-i2c" (DEPRECATED) only works for the i2c binding. - - "nxp,pn533-i2c" (DEPRECATED) only works for the i2c binding. - -Required properties if connected on i2c: -- clock-frequency: I²C work frequency. -- reg: for the I²C bus address. This is fixed at 0x24 for the PN532. -- interrupts: GPIO interrupt to which the chip is connected - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. - -Example (for ARM-based BeagleBone with PN532 on I2C2): - -&i2c2 { - - - pn532: nfc@24 { - - compatible = "nxp,pn532"; - - reg = <0x24>; - clock-frequency = <400000>; - - interrupt-parent = <&gpio1>; - interrupts = <17 IRQ_TYPE_EDGE_FALLING>; - - }; -}; - -Example (for PN532 connected via uart): - -uart4: serial@49042000 { - compatible = "ti,omap3-uart"; - - pn532: nfc { - compatible = "nxp,pn532"; - }; -}; From patchwork Mon Oct 11 07:39:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539150 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ja5WBE17; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0d3YVmz9sPB for ; Mon, 11 Oct 2021 18:40:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234715AbhJKHl7 (ORCPT ); Mon, 11 Oct 2021 03:41:59 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:43838 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234609AbhJKHlw (ORCPT ); Mon, 11 Oct 2021 03:41:52 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 11E903FFFB for ; Mon, 11 Oct 2021 07:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937992; bh=rLmXqmzzo5GGghYT5vRh2TAaGHt8AG7Im5K0tL2thlE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ja5WBE17u4s1TPMO1UxMF7FeUudnnIHxfhPmbdC5BzkA8QlU7xBSnGBIk8aOaiQ8Z xXaUTupuisQXXxFlS1ooq0PVzeuBWYpo2UCL6wpzpKihsxhtx9mHalr7qZIfIHdR5j Ks7BkQW4iTBOrK916uEIUoUFKYvebLOk7fBhR5ZbbttPtCRhwnHggSnSHEtUsWKsH9 LMgw8imgjOzfAH7C0bx4Lu1xSwroM7zlwULf+OC79rcWPSas+ATNqfxcg4nxnmF5pc KJretmdhjt/rq057799uBoU+MWlvFV9oHqjUjdFsf5OzAKgwo+OMOvfXEoD31jsDe4 S/8SfBLrt8wAg== Received: by mail-ed1-f72.google.com with SMTP id c8-20020a50d648000000b003daa53c7518so15026331edj.21 for ; Mon, 11 Oct 2021 00:39:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLmXqmzzo5GGghYT5vRh2TAaGHt8AG7Im5K0tL2thlE=; b=OvCa1mLVWyzi6X0XbWk90r46YyhdEfCnjff6tSfWRTh7sWPTBAgZA0qMgjAp6hMIKW 6NwdKmXOOY/OVvzBbl0lWOACWUUaX2i+8lTnpRWFVOgAscLPM08duWQFpaWiQE0JgjgK QBH/J0kmbJyM8bsfNOBUu0gQOHq3ePOuXqA6HftizVjGBtCJ9NkK53j7wYhyZiUa1pGR ngC5yMW7RNwsjjMALtZrUnN0Gv2X5d/d4juO9QJi6abLchYkLOBYUdKPMpRpf2FWIer1 CL3D8NhXE1E5kgsvgdURlESjO616xHqTwRXQmv+qubl+ymZzl0ayTdflsJfkfXckpLY7 hLsA== X-Gm-Message-State: AOAM530EXqRLPF2YmXxg67WAF6S8VF44bmhbxqctoRHxyFAietCHKSYF sLF9ZcMxWnCYCxb7bfWD/cv4i00KRoVjoqRd16EX8VXY7k0s2uVdNxc3KcHVhiKyXpMUroo7THD R2iLGDVKVWfqf3RoMqBQhGDDjTKwE5/79PLo/iIA= X-Received: by 2002:a05:6402:348a:: with SMTP id v10mr16185659edc.0.1633937990458; Mon, 11 Oct 2021 00:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2Ucwh17SL6sj5EvOGVNYMDI+/+fXsfm0C96VKhvnPfPMpzHqS1gw2RJ59i7Z57suwl5vG/w== X-Received: by 2002:a05:6402:348a:: with SMTP id v10mr16185642edc.0.1633937990273; Mon, 11 Oct 2021 00:39:50 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:49 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 4/8] dt-bindings: nfc: st,st21nfca: convert to dtschema Date: Mon, 11 Oct 2021 09:39:30 +0200 Message-Id: <20211011073934.34340-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the ST ST21NFCA NFC controller to DT schema format. Changes during bindings conversion: 1. Add a new required "interrupts" property, because it was missing in the old bindings by mistake. 2. 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 --- .../bindings/net/nfc/st,st21nfca.yaml | 64 +++++++++++++++++++ .../devicetree/bindings/net/nfc/st21nfca.txt | 37 ----------- 2 files changed, 64 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/st21nfca.txt diff --git a/Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml b/Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml new file mode 100644 index 000000000000..4356eacde8aa --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/st,st21nfca.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/st,st21nfca.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics SAS ST21NFCA NFC controller + +maintainers: + - Krzysztof Kozlowski + +properties: + compatible: + const: st,st21nfca-i2c + + enable-gpios: + description: Output GPIO pin used for enabling/disabling the controller + + ese-present: + type: boolean + description: | + Specifies that an ese is physically connected to the controller + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + uicc-present: + type: boolean + description: | + Specifies that the uicc swp signal can be physically connected to the + controller + +required: + - compatible + - enable-gpios + - interrupts + - reg + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@1 { + compatible = "st,st21nfca-i2c"; + reg = <0x1>; + + interrupt-parent = <&gpio5>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + enable-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; + + ese-present; + uicc-present; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfca.txt b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt deleted file mode 100644 index b8bd90f80e12..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/st21nfca.txt +++ /dev/null @@ -1,37 +0,0 @@ -* STMicroelectronics SAS. ST21NFCA NFC Controller - -Required properties: -- compatible: Should be "st,st21nfca-i2c". -- clock-frequency: I²C work frequency. -- reg: address on the bus -- enable-gpios: Output GPIO pin used for enabling/disabling the ST21NFCA - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- ese-present: Specifies that an ese is physically connected to the nfc -controller. -- uicc-present: Specifies that the uicc swp signal can be physically -connected to the nfc controller. - -Example (for ARM-based BeagleBoard xM with ST21NFCA on I2C2): - -&i2c2 { - - - st21nfca: st21nfca@1 { - - compatible = "st,st21nfca-i2c"; - - reg = <0x01>; - clock-frequency = <400000>; - - interrupt-parent = <&gpio5>; - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; - - enable-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; - - ese-present; - uicc-present; - }; -}; From patchwork Mon Oct 11 07:39:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539149 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=cY5OPx40; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0c5vWVz9sP7 for ; Mon, 11 Oct 2021 18:40:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234664AbhJKHl5 (ORCPT ); Mon, 11 Oct 2021 03:41:57 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:57474 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234618AbhJKHlx (ORCPT ); Mon, 11 Oct 2021 03:41:53 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id ACBEC40019 for ; Mon, 11 Oct 2021 07:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937992; bh=I/dEoNLrdiZf46+osatVihop4LOFN9ipzJ5r/D9Ro0Y=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cY5OPx40B812009ZMYZM71Qen+/AecqpoxNVb6l1kgbzsVRuNdiY1JaMRn+Uvm7OU K7wpX4WLUmcJh7JtgFPf6ci+x+XWVfQR1g/4sctYtAtGGGuzwCCZw58mri//gQhJFS lCcdu0f4jJ0yrmCe94oJHuxRinyl234tnlPzyJnUJH0Fn8lSPZtfD7f4cWbbLzZY6P 2Zsh0ttptB1Ir3JWI/HN/hU4dIZz06Va46dWbxRkm9EXj3rPGbhfcCzTOEGQid39S3 9mKdU8QZRVVmWp10vQK6p6iY8jBgzbWX1SKOsQCJWRStOUtLr1WPojo/JMH1Jf67yl xsHAcxDFIR4tg== Received: by mail-ed1-f70.google.com with SMTP id u23-20020a50a417000000b003db23c7e5e2so15094750edb.8 for ; Mon, 11 Oct 2021 00:39:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I/dEoNLrdiZf46+osatVihop4LOFN9ipzJ5r/D9Ro0Y=; b=sjPD+jgenVFXiYsYoj+cn+r9a1eQrQbvCpZB5vCeRFygkSA7tMA8uCzDgEPe7Wpv8N muo3INQ4Yn2tm8maa5s1WpjXG7fhO1DqGsuJL+r7r3G4rPVMwN62UW2fSo+3iTViJHeK ecjgXRBt5uCjIAoJo9dG9l+FrIUW6u3mG0EyV+QR+Z6CDY44vxrFjKXA3t369QWwjhWi oIkGOndfFJnpjwZ64O0cTEDF4GQkOLpzglImsm2hKZE9keFTMzQNkNNTW/RxP8EkEwKM Nwiw+919c0f0v5OVijLm6C87k9qLnaUrBMdduolJQDOvp6iGxavY+LAWasvPj4e6rtmE 9frw== X-Gm-Message-State: AOAM531Q3piA+tF9TxkQlGHgX3kqdnzuS6PpayejRSNhRua+mr2V/79Z ZFGmZNWV0B/tZC462iADL0EqoovGiPk4kQSgC/G8aO8i5fNJ5sg5MkDQuLCwvUhqI9y+hLGylsy cgYKu+24mGxtow02cOIo3wRdeIRUWyl4T8Bgi9WU= X-Received: by 2002:a17:906:9554:: with SMTP id g20mr8822747ejy.173.1633937992234; Mon, 11 Oct 2021 00:39:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydlyHM++aNbPEbVBXtm8qPF7gijwoo4iTHGVhgZn6hnEZ1scPUrmmfXAyYaXgv6SZ59wa6HQ== X-Received: by 2002:a17:906:9554:: with SMTP id g20mr8822740ejy.173.1633937992070; Mon, 11 Oct 2021 00:39:52 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:51 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 5/8] dt-bindings: nfc: st,st95hf: convert to dtschema Date: Mon, 11 Oct 2021 09:39:31 +0200 Message-Id: <20211011073934.34340-6-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the ST ST95HF NFC controller to DT schema format. Signed-off-by: Krzysztof Kozlowski --- .../bindings/net/nfc/st,st95hf.yaml | 57 +++++++++++++++++++ .../devicetree/bindings/net/nfc/st95hf.txt | 45 --------------- 2 files changed, 57 insertions(+), 45 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/st95hf.txt diff --git a/Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml b/Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml new file mode 100644 index 000000000000..d3bca376039e --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/st,st95hf.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/st,st95hf.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics ST95HF NFC controller + +maintainers: + - Krzysztof Kozlowski + +properties: + compatible: + const: st,st95hf + + enable-gpio: + description: Output GPIO pin used for enabling/disabling the controller + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + st95hfvin-supply: + description: ST95HF transceiver's Vin regulator supply + + spi-max-frequency: true + +required: + - compatible + - enable-gpio + - interrupts + - reg + - spi-max-frequency + +additionalProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + nfc@0{ + compatible = "st,st95hf"; + reg = <0>; + + spi-max-frequency = <1000000>; + enable-gpio = <&pio4 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pio0>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/st95hf.txt b/Documentation/devicetree/bindings/net/nfc/st95hf.txt deleted file mode 100644 index 3f373a1e20ff..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/st95hf.txt +++ /dev/null @@ -1,45 +0,0 @@ -* STMicroelectronics : NFC Transceiver ST95HF - -ST NFC Transceiver is required to attach with SPI bus. -ST95HF node should be defined in DT as SPI slave device of SPI -master with which ST95HF transceiver is physically connected. -The properties defined below are required to be the part of DT -to include ST95HF transceiver into the platform. - -Required properties: -=================== -- reg: Address of SPI slave "ST95HF transceiver" on SPI master bus. - -- compatible: should be "st,st95hf" for ST95HF NFC transceiver - -- spi-max-frequency: Max. operating SPI frequency for ST95HF - transceiver. - -- enable-gpio: GPIO line to enable ST95HF transceiver. - -- interrupts : Standard way to define ST95HF transceiver's out - interrupt. - -Optional property: -================= -- st95hfvin-supply : This is an optional property. It contains a - phandle to ST95HF transceiver's regulator supply node in DT. - -Example: -======= -spi@9840000 { - reg = <0x9840000 0x110>; - #address-cells = <1>; - #size-cells = <0>; - cs-gpios = <&pio0 4>; - - st95hf@0{ - reg = <0>; - compatible = "st,st95hf"; - spi-max-frequency = <1000000>; - enable-gpio = <&pio4 0>; - interrupt-parent = <&pio0>; - interrupts = <7 IRQ_TYPE_EDGE_FALLING>; - }; - -}; From patchwork Mon Oct 11 07:39:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539154 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=va+ZpTcM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW184FkCz9sPB for ; Mon, 11 Oct 2021 18:40:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234746AbhJKHm0 (ORCPT ); Mon, 11 Oct 2021 03:42:26 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:43920 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234666AbhJKHl6 (ORCPT ); Mon, 11 Oct 2021 03:41:58 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 862803FFFA for ; Mon, 11 Oct 2021 07:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937996; bh=/XeYfendRIFkvRSIer1TvzFUH2i0JBuqjZibDPlwRDM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=va+ZpTcM47+BdWqsCXjNNXyG5ldnlRV4dmKKn+2MMoNZzx+cY9jFEoCg0D6w5HYCH DPlWLtjA8iNnZj8j66X4WZ/yVo1U6Wp3qiJbtX8QY6goZqse6wYAbNVHszsX54xeN3 6siGTqNUuChuT5gFoS3dDwTtWcb+ZutSEA6QRrPI+UnqPqQqv4r72IfKTamhVW0JMA Vkw1woIc3ESuPcQVUlwL3i3VTGWek1UE2+c51HBoEyr7njAmXKXLB3ywDdUzWhZqxE Hkw8YcxMha9DHRm2yPRBNiVHnUTLLUvHLiiYvGdiPIzkjCPE43uqobUeVv8P0fUtIv 8gqp/TGBhnPCQ== Received: by mail-ed1-f69.google.com with SMTP id u24-20020aa7db98000000b003db57b1688aso9693432edt.6 for ; Mon, 11 Oct 2021 00:39:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/XeYfendRIFkvRSIer1TvzFUH2i0JBuqjZibDPlwRDM=; b=zFFWYq77ScrmJKsqzuzSVysgOMflCW+RppttgmHXiHWUPbwY+70bdgA+T2pXfTLGtb mmEfGEDx8DpCTb+RvIU++4csvTAVooee6qdMcVDuRWndqnXF4Sp44bOVmiQD+U+MsHAZ PvY6XoHf2xoJwM+hNHv236B4/UVVZfyp/wuQFJV9QA9JV/owHTirQvQU0KkdSIH7/wmg DZyMMTMKyepkvp6m01yr8WsCLkmhOsMs+IQFf6ie9accf8TAcGSOg462K4rNDRXpSWOg BWxmtLlhzNN12qlJrzIDWeZ/gjhCgFJtC9ZJNNv9tIxk6pAZQSb0na/x80mn2CSLv7dV LlQw== X-Gm-Message-State: AOAM530H4Xz14DxK7cytB6wRiTuFEtMUS3oIakknWNUbaj1i3MFgdtx9 v3C2jh+BIfs20NTHpZICOH2zQQYD49QURCJm0XqWxv/NQPJDnMzZaeo1bID1buTzgKRUb3ow1ur SstFLkypC0Fj2a/jP2+uqyLf9tjG20pxhNoeI4yU= X-Received: by 2002:a17:907:7646:: with SMTP id kj6mr8875524ejc.152.1633937993536; Mon, 11 Oct 2021 00:39:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9iqe6eRX8bi+xuljjGbOC/sGTF2/LP6nad/H8ICj05RanR/nyRcOA/0y3B69U5ovTpKatFg== X-Received: by 2002:a17:907:7646:: with SMTP id kj6mr8875504ejc.152.1633937993356; Mon, 11 Oct 2021 00:39:53 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:52 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 6/8] dt-bindings: nfc: st,nci: convert to dtschema Date: Mon, 11 Oct 2021 09:39:32 +0200 Message-Id: <20211011073934.34340-7-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the ST NCI (ST21NFCB) NFC controller to DT schema format. Changes during bindings conversion: 1. Add a new required "reg" property for SPI binding, because SPI child devices use it as chip-select. 2. 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 --- .../bindings/net/nfc/st,st-nci.yaml | 106 ++++++++++++++++++ .../bindings/net/nfc/st-nci-i2c.txt | 38 ------- .../bindings/net/nfc/st-nci-spi.txt | 36 ------ 3 files changed, 106 insertions(+), 74 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt delete mode 100644 Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt diff --git a/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml new file mode 100644 index 000000000000..a6a1bc788d29 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/st,st-nci.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/st,st-nci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics ST NCI NFC controller + +maintainers: + - Krzysztof Kozlowski + +properties: + compatible: + enum: + - st,st21nfcb-i2c + - st,st21nfcb-spi + - st,st21nfcc-i2c + + reset-gpios: + description: Output GPIO pin used for resetting the controller + + ese-present: + type: boolean + description: | + Specifies that an ese is physically connected to the controller + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + spi-max-frequency: true + + uicc-present: + type: boolean + description: | + Specifies that the uicc swp signal can be physically connected to the + controller + +required: + - compatible + - interrupts + - reg + - reset-gpios + +if: + properties: + compatible: + contains: + enum: + - st,st21nfcb-i2c + - st,st21nfcc-i2c +then: + properties: + spi-max-frequency: false +else: + required: + - spi-max-frequency + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@8 { + compatible = "st,st21nfcb-i2c"; + reg = <0x08>; + + interrupt-parent = <&gpio5>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; + + ese-present; + uicc-present; + }; + }; + + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + nfc@0 { + compatible = "st,st21nfcb-spi"; + reg = <0>; + + spi-max-frequency = <4000000>; + + interrupt-parent = <&gpio5>; + interrupts = <2 IRQ_TYPE_EDGE_RISING>; + reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; + + ese-present; + uicc-present; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt deleted file mode 100644 index baa8f8133d19..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt +++ /dev/null @@ -1,38 +0,0 @@ -* STMicroelectronics SAS. ST NCI NFC Controller - -Required properties: -- compatible: Should be "st,st21nfcb-i2c" or "st,st21nfcc-i2c". -- clock-frequency: I²C work frequency. -- reg: address on the bus -- interrupts: GPIO interrupt to which the chip is connected -- reset-gpios: Output GPIO pin used to reset the ST21NFCB - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- ese-present: Specifies that an ese is physically connected to the nfc -controller. -- uicc-present: Specifies that the uicc swp signal can be physically -connected to the nfc controller. - -Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2): - -&i2c2 { - - - st21nfcb: st21nfcb@8 { - - compatible = "st,st21nfcb-i2c"; - - reg = <0x08>; - clock-frequency = <400000>; - - interrupt-parent = <&gpio5>; - interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; - - reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; - - ese-present; - uicc-present; - }; -}; diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt deleted file mode 100644 index d33343330b94..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt +++ /dev/null @@ -1,36 +0,0 @@ -* STMicroelectronics SAS. ST NCI NFC Controller - -Required properties: -- compatible: Should be "st,st21nfcb-spi" -- spi-max-frequency: Maximum SPI frequency (<= 4000000). -- interrupts: GPIO interrupt to which the chip is connected -- reset-gpios: Output GPIO pin used to reset the ST21NFCB - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- ese-present: Specifies that an ese is physically connected to the nfc -controller. -- uicc-present: Specifies that the uicc swp signal can be physically -connected to the nfc controller. - -Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4): - -&mcspi4 { - - - st21nfcb: st21nfcb@0 { - - compatible = "st,st21nfcb-spi"; - - clock-frequency = <4000000>; - - interrupt-parent = <&gpio5>; - interrupts = <2 IRQ_TYPE_EDGE_RISING>; - - reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; - - ese-present; - uicc-present; - }; -}; From patchwork Mon Oct 11 07:39:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539151 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=c+HxeL6a; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0n6B3fz9sP7 for ; Mon, 11 Oct 2021 18:40:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234805AbhJKHmF (ORCPT ); Mon, 11 Oct 2021 03:42:05 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:43910 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234698AbhJKHl5 (ORCPT ); Mon, 11 Oct 2021 03:41:57 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 89E8E3FFFB for ; Mon, 11 Oct 2021 07:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937996; bh=CPCA02s/SUPanw77EF1mmKLV8dt3hzeoEjW66M7WKxY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c+HxeL6aCF39m5s1l9LNrgKSE7jFLYoLsD+ETj/PukJXLph9mga5ho+vvj40U0QQQ tIgY6mwzP9WeTsq2w99i1kLI2cNbC1SBrSsuUk7+6BXptDdGpDdg0ryRHzg86wB6l6 /6f317Qaeuof1y4ne+VMPIgfT43GVI9nPdnwK+Nksb0nXdKY9W7lrxj7FskDyFe0ws tSiJ8Z+J4oNIC8YEyK/aEwgQFKsVyyZCz1ooYmJGb/1odTzcVCTmmrmDuqr0UA6Oyu ksFhXmkoG52/emH/CRPkN3HQ7+SI4B8tTG5Wgc4HMZPGsQtcOHW4U3GrPmsZd+IJKG FtgCcYmMQ7IIw== Received: by mail-ed1-f71.google.com with SMTP id p20-20020a50cd94000000b003db23619472so15090253edi.19 for ; Mon, 11 Oct 2021 00:39:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CPCA02s/SUPanw77EF1mmKLV8dt3hzeoEjW66M7WKxY=; b=tgcygKTFn0XBMuhI4/Q1160LGi3hppMYqVfSxosOy/Ds5d6xgkXvvbqvlTho592dX/ ZvmlZrYOPY41g+dnbsKAaDoCRH8dQCTmDpyvFEESZC/rpPwmHJ2magnOZqH1VN7/5rXc W5iRhzKEDqtR1Law7J+Nqpist6IxRJ8IowuAw1O7XO/vd6azqTGrHOvWLEkqmp0flUTt 0e/C98Xr1rBJJHADKTNcrWXevrGMtSy6mrhTWaZ/CAy3q9FKvN72xcNuzJr+jeUrD7OX 9ZKVbDlhUu8KF5/DMM2MNOGeU6UiA0EEbW3fykZPk21Ge5debyGYeR1thULmy4CHazGz TO2Q== X-Gm-Message-State: AOAM530q8VajTtfWKaQ9ra85xiL+vp6qx+iNA/sAttXxDO5YlQvyLFrK AOj0FoxZa+tfewnavWUGENSUrTCPMsgb3OdSIMX9NuNfIH6wey0StHH2K8rXyuGDydi4CDXYYWc 1jNuCWN7oBwfgQh3X6rpUk4iDtOGFxBUXOwIWQA0= X-Received: by 2002:a17:906:230c:: with SMTP id l12mr23244323eja.52.1633937995143; Mon, 11 Oct 2021 00:39:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDgu2s/kdqZCsNvJNxGCM7mQ2fU1eUh5c5DKqfhDLv5ziZmkE96bmMk35GtCjsqqCLbd1gDQ== X-Received: by 2002:a17:906:230c:: with SMTP id l12mr23244306eja.52.1633937994905; Mon, 11 Oct 2021 00:39:54 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:54 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 7/8] dt-bindings: nfc: ti,trf7970a: convert to dtschema Date: Mon, 11 Oct 2021 09:39:33 +0200 Message-Id: <20211011073934.34340-8-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the TI TRF7970A NFC to DT schema format. Signed-off-by: Krzysztof Kozlowski --- .../bindings/net/nfc/ti,trf7970a.yaml | 98 +++++++++++++++++++ .../devicetree/bindings/net/nfc/trf7970a.txt | 43 -------- MAINTAINERS | 2 +- 3 files changed, 99 insertions(+), 44 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/trf7970a.txt diff --git a/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml b/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml new file mode 100644 index 000000000000..40da2ac98978 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/ti,trf7970a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TRF7970A RFID/NFC/15693 Transceiver + +maintainers: + - Krzysztof Kozlowski + - Mark Greer + +properties: + compatible: + const: ti,trf7970a + + autosuspend-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Specify autosuspend delay in milliseconds. + + clock-frequency: + description: | + Set to specify that the input frequency to the trf7970a is 13560000Hz or + 27120000Hz + + en2-rf-quirk: + type: boolean + description: | + Specify that the trf7970a being used has the "EN2 RF" erratum + + interrupts: + maxItems: 1 + + irq-status-read-quirk: + type: boolean + description: | + Specify that the trf7970a being used has the "IRQ Status Read" erratum + + reg: + maxItems: 1 + + spi-max-frequency: true + + ti,enable-gpios: + minItems: 1 + maxItems: 2 + description: | + One or two GPIO entries used for 'EN' and 'EN2' pins on the TRF7970A. EN2 + is optional. + + vdd-io-supply: + description: | + Regulator specifying voltage for VDD-IO + + vin-supply: + description: | + Regulator for supply voltage to VIN pin + +required: + - compatible + - interrupts + - reg + - spi-max-frequency + - ti,enable-gpios + - vin-supply + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@0 { + compatible = "ti,trf7970a"; + reg = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&trf7970a_default>; + spi-max-frequency = <2000000>; + interrupt-parent = <&gpio2>; + interrupts = <14 0>; + + ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>, + <&gpio2 5 GPIO_ACTIVE_HIGH>; + vin-supply = <&ldo3_reg>; + vdd-io-supply = <&ldo2_reg>; + autosuspend-delay = <30000>; + irq-status-read-quirk; + en2-rf-quirk; + clock-frequency = <27120000>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt deleted file mode 100644 index ba1934b950e5..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt +++ /dev/null @@ -1,43 +0,0 @@ -* Texas Instruments TRF7970A RFID/NFC/15693 Transceiver - -Required properties: -- compatible: Should be "ti,trf7970a". -- spi-max-frequency: Maximum SPI frequency (<= 2000000). -- interrupts: A single interrupt specifier. -- ti,enable-gpios: One or two GPIO entries used for 'EN' and 'EN2' pins on the - TRF7970A. EN2 is optional. -- vin-supply: Regulator for supply voltage to VIN pin - -Optional SoC Specific Properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- autosuspend-delay: Specify autosuspend delay in milliseconds. -- irq-status-read-quirk: Specify that the trf7970a being used has the - "IRQ Status Read" erratum. -- en2-rf-quirk: Specify that the trf7970a being used has the "EN2 RF" - erratum. -- vdd-io-supply: Regulator specifying voltage for vdd-io -- clock-frequency: Set to specify that the input frequency to the trf7970a is 13560000Hz or 27120000Hz - -Example (for ARM-based BeagleBone with TRF7970A on SPI1): - -&spi1 { - - nfc@0 { - compatible = "ti,trf7970a"; - reg = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&trf7970a_default>; - spi-max-frequency = <2000000>; - interrupt-parent = <&gpio2>; - interrupts = <14 0>; - ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>, - <&gpio2 5 GPIO_ACTIVE_HIGH>; - vin-supply = <&ldo3_reg>; - vdd-io-supply = <&ldo2_reg>; - autosuspend-delay = <30000>; - irq-status-read-quirk; - en2-rf-quirk; - clock-frequency = <27120000>; - }; -}; diff --git a/MAINTAINERS b/MAINTAINERS index 3294aaf5e56c..23dd7aac38a0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18916,7 +18916,7 @@ M: Mark Greer L: linux-wireless@vger.kernel.org L: linux-nfc@lists.01.org (subscribers-only) S: Supported -F: Documentation/devicetree/bindings/net/nfc/trf7970a.txt +F: Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml F: drivers/nfc/trf7970a.c TI TSC2046 ADC DRIVER From patchwork Mon Oct 11 07:39:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1539152 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=aXk3vr02; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HSW0v6Llrz9sP7 for ; Mon, 11 Oct 2021 18:40:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234851AbhJKHmN (ORCPT ); Mon, 11 Oct 2021 03:42:13 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:57622 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234656AbhJKHl6 (ORCPT ); Mon, 11 Oct 2021 03:41:58 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id DEE2E4001E for ; Mon, 11 Oct 2021 07:39:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633937997; bh=sEh5KUYuxEm3bzH5hsUc+ps6L/VdQWx+zLSKJvPfz9w=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aXk3vr02i9kK+jRKHuRBMyfsIsxmaYpVM4pkOH0gomK6ikRt7RdetGfkIesL3HySH gwpRoN1ApFSG3y+AhnUMP7S7mtfVDQ8JubJpQ9U7GTz5RtMEVkjwMaXDvZgBHX4H/o D+hnVn4eK/doE3PeVYcqHuYZoZNn3hZePF1/x2KpTSUgFsnAIRVnbYwYsy2PV3Y8sj VmYsu7aJCudEduglpVO17OF5JvsGwBcrnvRryU8RoujR4GpTwCJTcgSYKzuwuR4nLb /hO87EWehLGeuG1Bqm0myuWDoASx0F7RpLcw8uilUcuaFL6pyuf8Wth2owJMCvwhy9 ig8ZiCjBAmcOw== Received: by mail-ed1-f70.google.com with SMTP id v9-20020a50d849000000b003db459aa3f5so12473648edj.15 for ; Mon, 11 Oct 2021 00:39:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sEh5KUYuxEm3bzH5hsUc+ps6L/VdQWx+zLSKJvPfz9w=; b=eWEy5Mhn4h/4i7tj8KZtNnzHe4iEKDCmSGqd4GnLM3ZJ0RucRdBqVDaIkwIDf35iVF xO/he1fFk0gDcZB2/eNcpoE13uLUTtdFwN8Xdr51yHF1CU2g6EaKsWaWPhB/A+PNApE+ EGyvuysP45+Qzox3S+9xwfEH0n++WZjeXaZO97n/y+NcD9JZvzngGSG6h15rJrREN0nn lfRHiiip0Z0yh6rkq0owZGkueAdAIV1wH6TnXyzl3ml8DfNPuaqqyMIyKseBmgIP6shv URvpopmPpc7rAoWPDisobAkPJoRj2uQc07JFfzl/WdS9uRubsKWf2HgibqDmqdP+Dv21 yr9A== X-Gm-Message-State: AOAM531t62zsVldMAXgliuogCsD8Oj9H+fpstrfK5p1E4CjG7BnlOzWY EUDNPnLqYWd1GrEjej5gTF+PQlXafKnYIYztNCjuMaNZPU2Oj61a2UrEZsAHmYqN/iDtNRHTZ8+ ambSLsmI75y9DAaFB0TfAEMrWuboidkV/sZUXn8k= X-Received: by 2002:a17:906:7805:: with SMTP id u5mr23831453ejm.26.1633937996673; Mon, 11 Oct 2021 00:39:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAEg2SKbUYUgI5xLf79tbap6qzVlxVcbZCZgmYQ4c9v9F4kzNOwk0ZNgfo1iwPZTfpks2bOg== X-Received: by 2002:a17:906:7805:: with SMTP id u5mr23831438ejm.26.1633937996497; Mon, 11 Oct 2021 00:39:56 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id y8sm3023965ejm.104.2021.10.11.00.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:39:55 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , "David S. Miller" , Jakub Kicinski , Rob Herring , Charles Gorand , Mark Greer , linux-nfc@lists.01.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 8/8] dt-bindings: nfc: marvell,nci: convert to dtschema Date: Mon, 11 Oct 2021 09:39:34 +0200 Message-Id: <20211011073934.34340-9-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> References: <20211011073934.34340-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the Marvell NCI NFC controller to DT schema format. Signed-off-by: Krzysztof Kozlowski --- .../bindings/net/nfc/marvell,nci.yaml | 170 ++++++++++++++++++ .../devicetree/bindings/net/nfc/nfcmrvl.txt | 84 --------- 2 files changed, 170 insertions(+), 84 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml delete mode 100644 Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt diff --git a/Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml b/Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml new file mode 100644 index 000000000000..15a45db3899a --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/marvell,nci.yaml @@ -0,0 +1,170 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/marvell,nci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell International Ltd. NCI NFC controller + +maintainers: + - Krzysztof Kozlowski + +properties: + compatible: + enum: + - marvell,nfc-i2c + - marvell,nfc-spi + - marvell,nfc-uart + + hci-muxed: + type: boolean + description: | + Specifies that the chip is muxing NCI over HCI frames + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + reset-n-io: + $ref: "/schemas/types.yaml#/definitions/phandle-array" + maxItems: 1 + description: | + Output GPIO pin used to reset the chip (active low) + + i2c-int-falling: + type: boolean + description: | + For I2C type of connection. Specifies that the chip read event shall be + trigged on falling edge. + + i2c-int-rising: + type: boolean + description: | + For I2C type of connection. Specifies that the chip read event shall be + trigged on rising edge. + + break-control: + type: boolean + description: | + For UART type of connection. Specifies that the chip needs specific break + management. + + flow-control: + type: boolean + description: | + For UART type of connection. Specifies that the chip is using RTS/CTS. + + spi-cpha: true + spi-cpol: true + spi-max-frequency: true + +required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + const: marvell,nfc-i2c + then: + properties: + break-control: false + flow-control: false + spi-cpha: false + spi-cpol: false + spi-max-frequency: false + required: + - reg + + - if: + properties: + compatible: + contains: + const: marvell,nfc-spi + then: + properties: + break-control: false + flow-control: false + i2c-int-falling: false + i2c-int-rising: false + required: + - reg + + - if: + properties: + compatible: + contains: + const: marvell,nfc-uart + then: + properties: + i2c-int-falling: false + i2c-int-rising: false + interrupts: false + spi-cpha: false + spi-cpol: false + spi-max-frequency: false + reg: false + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + nfc@8 { + compatible = "marvell,nfc-i2c"; + reg = <0x8>; + + interrupt-parent = <&gpio3>; + interrupts = <21 IRQ_TYPE_EDGE_RISING>; + + i2c-int-rising; + + reset-n-io = <&gpio3 19 GPIO_ACTIVE_HIGH>; + }; + }; + + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + nfc@0 { + compatible = "marvell,nfc-spi"; + reg = <0>; + + spi-max-frequency = <3000000>; + spi-cpha; + spi-cpol; + + interrupt-parent = <&gpio1>; + interrupts = <17 IRQ_TYPE_EDGE_RISING>; + + reset-n-io = <&gpio3 19 GPIO_ACTIVE_HIGH>; + }; + }; + + - | + #include + + uart { + nfc { + compatible = "marvell,nfc-uart"; + + reset-n-io = <&gpio3 16 GPIO_ACTIVE_HIGH>; + + hci-muxed; + flow-control; + }; + }; diff --git a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt deleted file mode 100644 index c9b35251bb20..000000000000 --- a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt +++ /dev/null @@ -1,84 +0,0 @@ -* Marvell International Ltd. NCI NFC Controller - -Required properties: -- compatible: Should be: - - "marvell,nfc-uart" or "mrvl,nfc-uart" for UART devices - - "marvell,nfc-i2c" for I2C devices - - "marvell,nfc-spi" for SPI devices - -Optional SoC specific properties: -- pinctrl-names: Contains only one value - "default". -- pintctrl-0: Specifies the pin control groups used for this controller. -- reset-n-io: Output GPIO pin used to reset the chip (active low). -- hci-muxed: Specifies that the chip is muxing NCI over HCI frames. - -Optional UART-based chip specific properties: -- flow-control: Specifies that the chip is using RTS/CTS. -- break-control: Specifies that the chip needs specific break management. - -Optional I2C-based chip specific properties: -- i2c-int-falling: Specifies that the chip read event shall be trigged on - falling edge. -- i2c-int-rising: Specifies that the chip read event shall be trigged on - rising edge. - -Example (for ARM-based BeagleBoard Black with 88W8887 on UART5): - -&uart5 { - - nfcmrvluart: nfcmrvluart@5 { - compatible = "marvell,nfc-uart"; - - reset-n-io = <&gpio3 16 0>; - - hci-muxed; - flow-control; - } -}; - - -Example (for ARM-based BeagleBoard Black with 88W8887 on I2C1): - -&i2c1 { - clock-frequency = <400000>; - - nfcmrvli2c0: i2c@1 { - compatible = "marvell,nfc-i2c"; - - reg = <0x8>; - - /* I2C INT configuration */ - interrupt-parent = <&gpio3>; - interrupts = <21 0>; - - /* I2C INT trigger configuration */ - i2c-int-rising; - - /* Reset IO */ - reset-n-io = <&gpio3 19 0>; - }; -}; - - -Example (for ARM-based BeagleBoard Black on SPI0): - -&spi0 { - - mrvlnfcspi0: spi@0 { - compatible = "marvell,nfc-spi"; - - reg = <0>; - - /* SPI Bus configuration */ - spi-max-frequency = <3000000>; - spi-cpha; - spi-cpol; - - /* SPI INT configuration */ - interrupt-parent = <&gpio1>; - interrupts = <17 0>; - - /* Reset IO */ - reset-n-io = <&gpio3 19 0>; - }; -};