[PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC

Rudraksha Gupta via B4 Relay posted 5 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC
Posted by Rudraksha Gupta via B4 Relay 1 week, 3 days ago
From: Rudraksha Gupta <guptarud@gmail.com>

Add pn544 NFC chip

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
index b68da548a985..0d6d38b57f00 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -183,6 +183,22 @@ touchscreen: touchscreen-int-state {
 		bias-disable;
 		drive-strength = <2>;
 	};
+
+	nfc_default: nfc-default-state {
+		irq-pins {
+			pins = "gpio106";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-down;
+		};
+
+		firmware-pins {
+			pins = "gpio92";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
+	};
 };
 
 &pm8921 {
@@ -196,6 +212,15 @@ prox_sensor_int: prox-sensor-int-state {
 		input-enable;
 		bias-disable;
 	};
+
+	nfc_enable: nfc-enable-state {
+		pins = "gpio21";
+		function = "normal";
+		output-low;
+		bias-disable;
+		qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+		power-source = <PM8921_GPIO_S4>;
+	};
 };
 
 &rpm {
@@ -443,3 +468,25 @@ &usb1 {
 	dr_mode = "otg";
 	status = "okay";
 };
+
+&gsbi7 {
+	qcom,mode = <GSBI_PROT_I2C>;
+
+	status = "okay";
+};
+
+&gsbi7_i2c {
+	status = "okay";
+
+	nfc@2b {
+		compatible = "nxp,pn544-i2c";
+		reg = <0x2b>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <106 IRQ_TYPE_EDGE_RISING>;
+		enable-gpios = <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>;
+		firmware-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&nfc_default &nfc_enable>;
+	};
+};

-- 
2.51.2
Re: [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC
Posted by Konrad Dybcio 1 week, 3 days ago
On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Add pn544 NFC chip
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---

[...]

> +	nfc_enable: nfc-enable-state {
> +		pins = "gpio21";
> +		function = "normal";
> +		output-low;

output-low should be unnecessary, since there's a gpio reference
on the consumer node and one would expect the direction/state to
be configured through that

> +&gsbi7_i2c {
> +	status = "okay";
> +
> +	nfc@2b {
> +		compatible = "nxp,pn544-i2c";
> +		reg = <0x2b>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <106 IRQ_TYPE_EDGE_RISING>;

Sorry for not catching this earlier - interrupts-extended would be
"neater" in all cases

Konrad

> +		enable-gpios = <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>;
> +		firmware-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&nfc_default &nfc_enable>;

property-n
property-names

in this order, please

Konrad