* Re: [PATCH 1/7] dt-bindings: nfc: nxp, nci: convert to dtschema
[not found] <1633894316.441793.3158669.nullmailer@robh.at.kernel.org>
@ 2021-10-10 20:52 ` Krzysztof Kozlowski
2021-10-10 20:58 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-10-10 20:52 UTC (permalink / raw)
To: linux-nfc
[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]
On 10/10/2021 21:31, Rob Herring wrote:
> On Sun, 10 Oct 2021 16:23:11 +0200, Krzysztof Kozlowski wrote:
>> Convert the NXP NCI NFC controller to DT schema format.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>> .../devicetree/bindings/net/nfc/nxp,nci.yaml | 61 +++++++++++++++++++
>> .../devicetree/bindings/net/nfc/nxp-nci.txt | 33 ----------
>> MAINTAINERS | 1 +
>> 3 files changed, 62 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
>>
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/patch/1539010
>
>
> nfc(a)28: 'clock-frequency' is a required property
> arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
>
> nfc(a)28: compatible:0: 'nxp,nxp-nci-i2c' was expected
> arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
>
> nfc(a)28: compatible: Additional items are not allowed ('nxp,nxp-nci-i2c' was unexpected)
> arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
>
> nfc(a)28: compatible: ['nxp,pn547', 'nxp,nxp-nci-i2c'] is too long
> arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
>
> nfc(a)30: 'clock-frequency' is a required property
> arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml
>
> nfc(a)30: compatible:0: 'nxp,nxp-nci-i2c' was expected
> arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml
>
> nfc(a)30: compatible: Additional items are not allowed ('nxp,nxp-nci-i2c' was unexpected)
> arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml
>
> nfc(a)30: compatible: ['nxp,pn547', 'nxp,nxp-nci-i2c'] is too long
> arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml
>
I missed that new compatible. I'll send a patch adding nxp,nxp-nci-i2c
and try to fix the DTS (missing clock-frequency).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/7] dt-bindings: nfc: nxp, nci: convert to dtschema
[not found] <1633894316.441793.3158669.nullmailer@robh.at.kernel.org>
2021-10-10 20:52 ` [PATCH 1/7] dt-bindings: nfc: nxp, nci: convert to dtschema Krzysztof Kozlowski
@ 2021-10-10 20:58 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-10-10 20:58 UTC (permalink / raw)
To: linux-nfc
[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]
On 10/10/2021 21:31, Rob Herring wrote:
> On Sun, 10 Oct 2021 16:23:11 +0200, Krzysztof Kozlowski wrote:
>> Convert the NXP NCI NFC controller to DT schema format.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>> .../devicetree/bindings/net/nfc/nxp,nci.yaml | 61 +++++++++++++++++++
>> .../devicetree/bindings/net/nfc/nxp-nci.txt | 33 ----------
>> MAINTAINERS | 1 +
>> 3 files changed, 62 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
>>
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/patch/1539010
>
>
> nfc(a)28: 'clock-frequency' is a required property
> arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
>
Hmm, this actually looks as mistake in bindings. First, clock-frequency
is a property of a I2C bus, not I2C child device. Second, it should not
be a required property anyway, as I2C will choose a default one matching
driver (e.g. standard speed of 100 kHz).
Except the trf7970a NFC driver, none of other NFC drivers parse the
clock-frequency.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/7] dt-bindings: nfc: nxp, nci: convert to dtschema
@ 2021-10-10 14:23 Krzysztof Kozlowski
0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-10-10 14:23 UTC (permalink / raw)
To: linux-nfc
[-- Attachment #1: Type: text/plain, Size: 3914 bytes --]
Convert the NXP NCI NFC controller to DT schema format.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
.../devicetree/bindings/net/nfc/nxp,nci.yaml | 61 +++++++++++++++++++
.../devicetree/bindings/net/nfc/nxp-nci.txt | 33 ----------
MAINTAINERS | 1 +
3 files changed, 62 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..f84e69775eb5
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
@@ -0,0 +1,61 @@
+# 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 <charles.gorand@effinnov.com>
+ - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+properties:
+ compatible:
+ const: nxp,nxp-nci-i2c
+
+ clock-frequency: true
+
+ 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
+ - clock-frequency
+ - enable-gpios
+ - interrupts
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc(a)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/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(a)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 <charles.gorand@effinnov.com>
L: linux-nfc(a)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
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-10 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1633894316.441793.3158669.nullmailer@robh.at.kernel.org>
2021-10-10 20:52 ` [PATCH 1/7] dt-bindings: nfc: nxp, nci: convert to dtschema Krzysztof Kozlowski
2021-10-10 20:58 ` Krzysztof Kozlowski
2021-10-10 14:23 Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).