dt-bindings: net: nfc: s3fwrn5: Convert to dtschema
Subsystems (6)
Krzysztof Kozlowski
maintainerPATCH 1/4 dt-bindings: net: nfc: s3fwrn5: Convert to dtschema
Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema. This is conversion only so it includes properties with invalid prefixes (s3fwrn5,en-gpios) which should be addressed later.
--- .../devicetree/bindings/net/nfc/s3fwrn5.txt | 25 -------- .../devicetree/bindings/net/nfc/s3fwrn5.yaml | 59 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 60 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml
Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt deleted +0 -25
@@ -1,25 +0,0 @@ -* Samsung S3FWRN5 NCI NFC Controller - -Required properties: -- compatible: Should be "samsung,s3fwrn5-i2c". -- reg: address on the bus -- interrupts: GPIO interrupt to which the chip is connected -- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip -- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and - sleep/wakeup control - -Example: - -&hsi2c_4 { - s3fwrn5@27 { - compatible = "samsung,s3fwrn5-i2c"; - - reg = <0x27>; - - interrupt-parent = <&gpa1>; - interrupts = <3 0 0>; - - s3fwrn5,en-gpios = <&gpf1 4 0>; - s3fwrn5,fw-gpios = <&gpj0 2 0>; - }; -};
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +59 -0
59 lines not on this page · raw message
MAINTAINERS +1 -0
@@ -15273,6 +15273,7 @@ M: Robert Baldyga <[email protected]> M: Krzysztof Opasiak <[email protected]> L: [email protected] (moderated for non-subscribers) S: Supported +F: Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml F: drivers/nfc/s3fwrn5 SAMSUNG S5C73M3 CAMERA DRIVER
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 2/4 dt-bindings: net: nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs
The device tree property prefix describes the vendor, which in case of S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios" and "fw-gpios" is not correct and should be deprecated. Introduce properly named properties for these GPIOs and rename the fw-gpios" to "wake-gpios" to better describe its purpose.
--- .../devicetree/bindings/net/nfc/s3fwrn5.yaml | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml +18 -6
@@ -14,28 +14,40 @@ properties: compatible: const: samsung,s3fwrn5-i2c + en-gpios: + maxItems: 1 + description: + Output GPIO pin used for enabling/disabling the chip + interrupts: maxItems: 1 reg: maxItems: 1 + wake-gpios: + maxItems: 1 + description: + Output GPIO pin used to enter firmware mode and sleep/wakeup control + s3fwrn5,en-gpios: maxItems: 1 + deprecated: true description: - Output GPIO pin used for enabling/disabling the chip + Use en-gpios s3fwrn5,fw-gpios: maxItems: 1 + deprecated: true description: - Output GPIO pin used to enter firmware mode and sleep/wakeup control + Use wake-gpios required: - compatible + - en-gpios - interrupts - reg - - s3fwrn5,en-gpios - - s3fwrn5,fw-gpios + - wake-gpios examples: - |
@@ -53,7 +65,7 @@ examples: interrupt-parent = <&gpa1>; interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; - s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; - s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 3/4 nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs
In reply to Krzysztof KozlowskiThe device tree property prefix describes the vendor, which in case of S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios" and "fw-gpios" is not correct and should be deprecated. Introduce properly named properties for these GPIOs but still support deprecated ones.
--- drivers/nfc/s3fwrn5/i2c.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/nfc/s3fwrn5/i2c.c +14 -6
@@ -200,13 +200,21 @@ static int s3fwrn5_i2c_parse_dt(struct i2c_client *client)if (!np)return -ENODEV ; - phy->gpio_en =of_get_named_gpio (np,"s3fwrn5,en-gpios" ,0 ); -if (!gpio_is_valid (phy->gpio_en)) -return -ENODEV ; + phy->gpio_en =of_get_named_gpio (np,"en-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_en)) { +/* Support also deprecated property */ + phy->gpio_en =of_get_named_gpio (np,"s3fwrn5,en-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_en)) +return -ENODEV ; + } - phy->gpio_fw_wake =of_get_named_gpio (np,"s3fwrn5,fw-gpios" ,0 ); -if (!gpio_is_valid (phy->gpio_fw_wake)) -return -ENODEV ; + phy->gpio_fw_wake =of_get_named_gpio (np,"wake-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_fw_wake)) { +/* Support also deprecated property */ + phy->gpio_fw_wake =of_get_named_gpio (np,"s3fwrn5,fw-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_fw_wake)) +return -ENODEV ; + }return 0 ; }
Signature · 1 line
2.17.1
Re: [RFT 3/4] nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs
Quoted 7 lines · Krzysztof Kozlowski
The device tree property prefix describes the vendor, which in case of S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios" and "fw-gpios" is not correct and should be deprecated. Introduce properly named properties for these GPIOs but still support deprecated ones.
Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 26 lines
--- drivers/nfc/s3fwrn5/i2c.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)drivers/nfc/s3fwrn5/i2c.c +7
-6@@ -200,13 +200,21 @@ static int s3fwrn5_i2c_parse_dt(struct i2c_client *client)if (!np)return -ENODEV ; - phy->gpio_en =of_get_named_gpio (np,"s3fwrn5,en-gpios" ,0 ); -if (!gpio_is_valid (phy->gpio_en)) -return -ENODEV ; + phy->gpio_en =of_get_named_gpio (np,"en-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_en)) { +/* Support also deprecated property */ + phy->gpio_en =of_get_named_gpio (np,"s3fwrn5,en-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_en)) +return -ENODEV ; + } - phy->gpio_fw_wake =of_get_named_gpio (np,"s3fwrn5,fw-gpios" ,0 ); -if (!gpio_is_valid (phy->gpio_fw_wake)) -return -ENODEV ;
drivers/nfc/s3fwrn5/i2c.c static int s3fwrn5_i2c_parse_dt(struct i2c_client *client) · line 220
Quoted 10 lines
drivers/nfc/s3fwrn5/i2c.c +7
-0+ phy->gpio_fw_wake =of_get_named_gpio (np,"wake-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_fw_wake)) { +/* Support also deprecated property */ + phy->gpio_fw_wake =of_get_named_gpio (np,"s3fwrn5,fw-gpios" ,0 ); +if (!gpio_is_valid (phy->gpio_fw_wake)) +return -ENODEV ; + }return 0 ; }
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Krzysztof Kozlowski
maintainerPATCH 4/4 arm64: dts: exynos: Use newer S3FWRN5 GPIO properties in Exynos5433 TM2
In reply to Krzysztof KozlowskiSince "s3fwrn5" is not a valid vendor prefix, use new GPIO properties instead of the deprecated.
--- arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +2 -2
@@ -795,8 +795,8 @@ reg = <0x27>; interrupt-parent = <&gpa1>; interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; - s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; - s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
2.17.1
Re: [PATCH 4/4] arm64: dts: exynos: Use newer S3FWRN5 GPIO properties in Exynos5433 TM2
Quoted 4 lines · Krzysztof Kozlowski
Since "s3fwrn5" is not a valid vendor prefix, use new GPIO properties instead of the deprecated.
Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 9 lines
--- arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +0
-0
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi line 802
Quoted 10 lines
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +2
-2@@ -795,8 +795,8 @@ reg = <0x27>; interrupt-parent = <&gpa1>; interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; - s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; - s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; }; };
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Krzysztof Kozlowski
maintainerRe: [PATCH 4/4] arm64: dts: exynos: Use newer S3FWRN5 GPIO properties in Exynos5433 TM2
Quoted 8 lines · Marek Szyprowski
Quoted 4 lines · Krzysztof Kozlowski
Since "s3fwrn5" is not a valid vendor prefix, use new GPIO properties instead of the deprecated.
Signed-off-by Krzysztof Kozlowski <[email protected]>Tested-by Marek Szyprowski <[email protected]>
Thanks for testing this and others in the series. Much appreciated!
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 8 lines · Krzysztof Kozlowski
Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema. This is conversion only so it includes properties with invalid prefixes (s3fwrn5,en-gpios) which should be addressed later.
Signed-off-by Krzysztof Kozlowski <[email protected]>--- .../devicetree/bindings/net/nfc/s3fwrn5.txt | 25 -------- .../devicetree/bindings/net/nfc/s3fwrn5.yaml | 59 +++++++++++++++++++
Please rename to samsung,s3fwrn5-i2c.yaml.
Quoted 70 lines
MAINTAINERS | 1 + 3 files changed, 60 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yamlDocumentation/devicetree/bindings/net/nfc/s3fwrn5.txt deleted +0
-25@@ -1,25 +0,0 @@ -* Samsung S3FWRN5 NCI NFC Controller - -Required properties: -- compatible: Should be "samsung,s3fwrn5-i2c". -- reg: address on the bus -- interrupts: GPIO interrupt to which the chip is connected -- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip -- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and - sleep/wakeup control - -Example: - -&hsi2c_4 { - s3fwrn5@27 { - compatible = "samsung,s3fwrn5-i2c"; - - reg = <0x27>; - - interrupt-parent = <&gpa1>; - interrupts = <3 0 0>; - - s3fwrn5,en-gpios = <&gpf1 4 0>; - s3fwrn5,fw-gpios = <&gpj0 2 0>; - }; -};Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +28
-0@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/s3fwrn5.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S3FWRN5 NCI NFC Controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Krzysztof Opasiak <[email protected]> + +properties: + compatible: + const: samsung,s3fwrn5-i2c + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + s3fwrn5,en-gpios: + maxItems: 1 + description: + Output GPIO pin used for enabling/disabling the chip + + s3fwrn5,fw-gpios:
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml line 38
Quoted 10 lines
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +10
-0+ maxItems: 1 + description: + Output GPIO pin used to enter firmware mode and sleep/wakeup control + +required: + - compatible + - interrupts + - reg + - s3fwrn5,en-gpios + - s3fwrn5,fw-gpios
additionalProperties: false
Quoted 36 lines
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +21
-0+ +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>; + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; + + s3fwrn5,en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + s3fwrn5,fw-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; + }; + };MAINTAINERS +1
-0@@ -15273,6 +15273,7 @@ M: Robert Baldyga <[email protected]> M: Krzysztof Opasiak <[email protected]> L: [email protected] (moderated for non-subscribers) S: Supported +F: Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml F: drivers/nfc/s3fwrn5 SAMSUNG S5C73M3 CAMERA DRIVERSignature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerQuoted 87 lines · Rob Herring
Quoted 8 lines · Krzysztof Kozlowski
Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema. This is conversion only so it includes properties with invalid prefixes (s3fwrn5,en-gpios) which should be addressed later.
Signed-off-by Krzysztof Kozlowski <[email protected]>--- .../devicetree/bindings/net/nfc/s3fwrn5.txt | 25 -------- .../devicetree/bindings/net/nfc/s3fwrn5.yaml | 59 +++++++++++++++++++Please rename to samsung,s3fwrn5-i2c.yaml.
Quoted 74 lines
MAINTAINERS | 1 + 3 files changed, 60 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.txt create mode 100644 Documentation/devicetree/bindings/net/nfc/s3fwrn5.yamlDocumentation/devicetree/bindings/net/nfc/s3fwrn5.txt deleted +0
-25@@ -1,25 +0,0 @@ -* Samsung S3FWRN5 NCI NFC Controller - -Required properties: -- compatible: Should be "samsung,s3fwrn5-i2c". -- reg: address on the bus -- interrupts: GPIO interrupt to which the chip is connected -- s3fwrn5,en-gpios: Output GPIO pin used for enabling/disabling the chip -- s3fwrn5,fw-gpios: Output GPIO pin used to enter firmware mode and - sleep/wakeup control - -Example: - -&hsi2c_4 { - s3fwrn5@27 { - compatible = "samsung,s3fwrn5-i2c"; - - reg = <0x27>; - - interrupt-parent = <&gpa1>; - interrupts = <3 0 0>; - - s3fwrn5,en-gpios = <&gpf1 4 0>; - s3fwrn5,fw-gpios = <&gpj0 2 0>; - }; -};Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +32
-0@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/s3fwrn5.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S3FWRN5 NCI NFC Controller + +maintainers: + - Krzysztof Kozlowski <[email protected]> + - Krzysztof Opasiak <[email protected]> + +properties: + compatible: + const: samsung,s3fwrn5-i2c + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + s3fwrn5,en-gpios: + maxItems: 1 + description: + Output GPIO pin used for enabling/disabling the chip + + s3fwrn5,fw-gpios: + maxItems: 1 + description: + Output GPIO pin used to enter firmware mode and sleep/wakeup control +
Quoted 8 lines
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml line 38
Quoted 6 lines
Documentation/devicetree/bindings/net/nfc/s3fwrn5.yaml new file +6
-0+required: + - compatible + - interrupts + - reg + - s3fwrn5,en-gpios + - s3fwrn5,fw-gpiosadditionalProperties: false
Sure, I'll fix both issues.
Best regards,
Krzysztof