linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip
@ 2022-09-29  1:15 Dmitry Torokhov
  2022-09-29  1:15 ` [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: " Dmitry Torokhov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-29  1:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson
  Cc: Krzysztof Opasiak, Alim Akhtar, Andy Gross, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, linux-kernel

According to s3fwrn5 driver code the "enable" GPIO line is driven "high"
when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low"
when chip is in use.

s3fwrn5_phy_power_ctrl():

	...
	gpio_set_value(phy->gpio_en, 1);
	...
	if (mode != S3FWRN5_MODE_COLD) {
		msleep(S3FWRN5_EN_WAIT_TIME);
		gpio_set_value(phy->gpio_en, 0);
		msleep(S3FWRN5_EN_WAIT_TIME);
	}

Therefore the line described by "en-gpios" property should be annotated
as "active low".

The wakeup gpio appears to have correct polarity (active high).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index 91c9bd1b47dd..bde6a6bb8dfc 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -795,7 +795,7 @@ s3fwrn5: nfc@27 {
 		reg = <0x27>;
 		interrupt-parent = <&gpa1>;
 		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
-		en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
+		en-gpios = <&gpf1 4 GPIO_ACTIVE_LOW>;
 		wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
 	};
 };
-- 
2.38.0.rc1.362.ged0d419d3c-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: fix polarity of "enable" line of NFC chip
  2022-09-29  1:15 [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Dmitry Torokhov
@ 2022-09-29  1:15 ` Dmitry Torokhov
  2022-09-29  1:15 ` [PATCH 3/3] dt-bindings: net: nfc: s3fwrn5: " Dmitry Torokhov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-29  1:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson
  Cc: Krzysztof Opasiak, Alim Akhtar, Andy Gross, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, linux-kernel

According to s3fwrn5 driver code the "enable" GPIO line is driven "high"
when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low"
when chip is in use.

s3fwrn5_phy_power_ctrl():

	...
	gpio_set_value(phy->gpio_en, 1);
	...
	if (mode != S3FWRN5_MODE_COLD) {
		msleep(S3FWRN5_EN_WAIT_TIME);
		gpio_set_value(phy->gpio_en, 0);
		msleep(S3FWRN5_EN_WAIT_TIME);
	}

Therefore the line described by "en-gpios" property should be annotated
as "active low".

The wakeup gpio appears to have correct polarity (active high).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 3255bd3fcb55..5f7cec347a4f 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -144,7 +144,7 @@ nfc@27 {
 			interrupt-parent = <&msmgpio>;
 			interrupts = <21 IRQ_TYPE_EDGE_RISING>;
 
-			en-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
+			en-gpios = <&msmgpio 20 GPIO_ACTIVE_LOW>;
 			wake-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>;
 
 			clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>;
-- 
2.38.0.rc1.362.ged0d419d3c-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] dt-bindings: net: nfc: s3fwrn5: fix polarity of "enable" line of NFC chip
  2022-09-29  1:15 [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Dmitry Torokhov
  2022-09-29  1:15 ` [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: " Dmitry Torokhov
@ 2022-09-29  1:15 ` Dmitry Torokhov
  2022-09-30 12:25 ` (subset) [PATCH 1/3] arm64: dts: exynos: " Krzysztof Kozlowski
  2022-10-18  3:05 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-29  1:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson
  Cc: Krzysztof Opasiak, Alim Akhtar, Andy Gross, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, linux-kernel

According to s3fwrn5 driver code the "enable" GPIO line is driven "high"
when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low"
when chip is in use.

s3fwrn5_phy_power_ctrl():

	...
	gpio_set_value(phy->gpio_en, 1);
	...
	if (mode != S3FWRN5_MODE_COLD) {
		msleep(S3FWRN5_EN_WAIT_TIME);
		gpio_set_value(phy->gpio_en, 0);
		msleep(S3FWRN5_EN_WAIT_TIME);
	}

Therefore the line described by "en-gpios" property should be annotated
as "active low".

The wakeup gpio appears to have correct polarity (active high).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 .../devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
index 64995cbb0f97..78e3c13f1acb 100644
--- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
+++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
@@ -81,7 +81,7 @@ examples:
             interrupt-parent = <&gpa1>;
             interrupts = <3 IRQ_TYPE_EDGE_RISING>;
 
-            en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
+            en-gpios = <&gpf1 4 GPIO_ACTIVE_LOW>;
             wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
 
             clocks = <&rpmcc 20>;
@@ -93,7 +93,7 @@ examples:
         nfc {
             compatible = "samsung,s3fwrn82";
 
-            en-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
+            en-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
             wake-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
 
         };
-- 
2.38.0.rc1.362.ged0d419d3c-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip
  2022-09-29  1:15 [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Dmitry Torokhov
  2022-09-29  1:15 ` [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: " Dmitry Torokhov
  2022-09-29  1:15 ` [PATCH 3/3] dt-bindings: net: nfc: s3fwrn5: " Dmitry Torokhov
@ 2022-09-30 12:25 ` Krzysztof Kozlowski
  2022-10-18  3:05 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-30 12:25 UTC (permalink / raw)
  To: Bjorn Andersson, Dmitry Torokhov
  Cc: Krzysztof Kozlowski, linux-arm-msm, Krzysztof Opasiak,
	Andy Gross, linux-kernel, linux-samsung-soc, linux-arm-kernel,
	Alim Akhtar

On Wed, 28 Sep 2022 18:15:55 -0700, Dmitry Torokhov wrote:
> According to s3fwrn5 driver code the "enable" GPIO line is driven "high"
> when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low"
> when chip is in use.
> 
> s3fwrn5_phy_power_ctrl():
> 
> 	...
> 	gpio_set_value(phy->gpio_en, 1);
> 	...
> 	if (mode != S3FWRN5_MODE_COLD) {
> 		msleep(S3FWRN5_EN_WAIT_TIME);
> 		gpio_set_value(phy->gpio_en, 0);
> 		msleep(S3FWRN5_EN_WAIT_TIME);
> 	}
> 
> [...]

Applied, thanks!

[1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip
      https://git.kernel.org/krzk/linux/c/bd1a665a01b4d65fd8dc6fece4b376fa5c8c55bb

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip
  2022-09-29  1:15 [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Dmitry Torokhov
                   ` (2 preceding siblings ...)
  2022-09-30 12:25 ` (subset) [PATCH 1/3] arm64: dts: exynos: " Krzysztof Kozlowski
@ 2022-10-18  3:05 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2022-10-18  3:05 UTC (permalink / raw)
  To: krzysztof.kozlowski, dmitry.torokhov
  Cc: linux-arm-kernel, alim.akhtar, k.opasiak, linux-kernel, agross,
	linux-samsung-soc, linux-arm-msm

On Wed, 28 Sep 2022 18:15:55 -0700, Dmitry Torokhov wrote:
> According to s3fwrn5 driver code the "enable" GPIO line is driven "high"
> when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low"
> when chip is in use.
> 
> s3fwrn5_phy_power_ctrl():
> 
> 	...
> 	gpio_set_value(phy->gpio_en, 1);
> 	...
> 	if (mode != S3FWRN5_MODE_COLD) {
> 		msleep(S3FWRN5_EN_WAIT_TIME);
> 		gpio_set_value(phy->gpio_en, 0);
> 		msleep(S3FWRN5_EN_WAIT_TIME);
> 	}
> 
> [...]

Applied, thanks!

[2/3] arm64: dts: qcom: msm8916-samsung-a2015: fix polarity of "enable" line of NFC chip
      commit: 978bc4c578a6d7baffc5646b0f327da036b3051b

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-18  3:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29  1:15 [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Dmitry Torokhov
2022-09-29  1:15 ` [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: " Dmitry Torokhov
2022-09-29  1:15 ` [PATCH 3/3] dt-bindings: net: nfc: s3fwrn5: " Dmitry Torokhov
2022-09-30 12:25 ` (subset) [PATCH 1/3] arm64: dts: exynos: " Krzysztof Kozlowski
2022-10-18  3:05 ` Bjorn Andersson

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).