mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals
@ 2025-11-21 11:44 Rudraksha Gupta via B4 Relay
  2025-11-21 11:44 ` [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Rudraksha Gupta via B4 Relay
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

Intro:
=================
The following is now working on the Samsung Galaxy Express SGH-I437, an
old 2012 Android phone:
- Light Sensor
    - Proximity is currently giving bogus values
- NFC
- Magnetometer
    - Maybe need to update the mount matrix?
- Accelerometer
    - Maybe need to update the mount matrix?

Tests:
=================
Light Sensor
=================
/sys/bus/iio/devices/iio:device2 # cat in_intensity0_raw && cat in_intensity1_raw
0
0
/sys/bus/iio/devices/iio:device2 # cat in_intensity0_raw && cat in_intensity1_raw
163
28

=================
NFC
=================
nfc0:
          Tags: [ ]
          Devices: [ ]
          Protocols: [ Felica MIFARE Jewel ISO-DEP NFC-DEP ]
          Powered: Yes
          RF Mode: None
          lto: 150
          rw: 15
          miux: 2047

Start polling on nfc0 as initiator

Targets found for nfc0
  Tags: [ tag4 ]
  Devices: [ ]

=================
Magnetometer
=================
/sys/bus/iio/devices/iio:device1 # cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw
-441672
1223706
3275580
/sys/bus/iio/devices/iio:device1 # cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw
-364650
1206172
3248674
/sys/bus/iio/devices/iio:device1 # cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw
-439362
1214092
3180892

=================
Accelerometer
=================
/sys/bus/iio/devices/iio:device0 # cat in_accel_x_raw && cat in_accel_y_raw && cat in_accel_z_raw
16
484
-48
/sys/bus/iio/devices/iio:device0 # cat in_accel_x_raw && cat in_accel_y_raw && cat in_accel_z_raw
13
489
469
/sys/bus/iio/devices/iio:device0 # cat in_accel_x_raw && cat in_accel_y_raw && cat in_accel_z_raw
433
106
48

More Information:
=================
- Device page:
https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Express_SGH-I437_(samsung-expressatt)
- Downstream kernel (uses board files):
https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm-12.0-YNG4N/arch/arm/mach-msm/board-express.c

Note: These patches were assisted with AI (specifically Claude) as it
was easily able to translate the old board file into a DTS format that
mainline understands.

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
Changes in v2:
- Fixed formatting issues
- Use GSBI instead of i2c-gpio
- Remove regulator-always-on
- Link to v1: https://lore.kernel.org/r/20251119-expressatt_nfc_accel_magn_light-v1-0-636f16f05cf4@gmail.com

---
Rudraksha Gupta (5):
      ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7
      ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor
      ARM: dts: qcom: msm8960: expressatt: Add NFC
      ARM: dts: qcom: msm8960: expressatt: Add Magnetometer
      ARM: dts: qcom: msm8960: expressatt: Add Accelerometer

 .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 110 +++++++++++++++++++++
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi           |  96 ++++++++++++++++++
 2 files changed, 206 insertions(+)
---
base-commit: a771210bab42017434c91411e16694ac4fd7afc2
change-id: 20251119-expressatt_nfc_accel_magn_light-f78e02897186
prerequisite-message-id: <176210698639.937813.643585209118839199.b4-ty@kernel.org>
prerequisite-patch-id: befdfe1948c2fbfb867597a6de917c8067fd57be
prerequisite-patch-id: 70a2b0837b9846d8a775f464295da73ca8ff26b4
prerequisite-patch-id: 20e005aa4312c3525e1b90f33a398189b9e2b3b7
prerequisite-patch-id: 970e0eb8af1736e4565fc37830576a67bf7b3227
prerequisite-patch-id: babd3b55d9ff28f19dbc3f7978742c58ef436aee

Best regards,
-- 
Rudraksha Gupta <guptarud@gmail.com>



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

* [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
@ 2025-11-21 11:44 ` Rudraksha Gupta via B4 Relay
  2025-11-21 14:38   ` Konrad Dybcio
  2025-11-21 11:44 ` [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor Rudraksha Gupta via B4 Relay
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

From: Rudraksha Gupta <guptarud@gmail.com>

Add the GSBI2 & GSBI7 Node, which is similar to the
other GSBI nodes in this file.

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 96 ++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
index 38bd4fd8dda5..fd28401cebb5 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
@@ -149,6 +149,24 @@ i2c1-pins {
 				};
 			};
 
+			i2c2_default_state: i2c2-default-state {
+				i2c2-pins {
+					pins = "gpio12", "gpio13";
+					function = "gsbi2";
+					drive-strength = <8>;
+					bias-disable;
+				};
+			};
+
+			i2c2_sleep_state: i2c2-sleep-state {
+				i2c2-pins {
+					pins = "gpio12", "gpio13";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-bus-hold;
+				};
+			};
+
 			i2c3_default_state: i2c3-default-state {
 				i2c3-pins {
 					pins = "gpio16", "gpio17";
@@ -167,6 +185,24 @@ i2c3-pins {
 				};
 			};
 
+			i2c7_default_state: i2c7-default-state {
+				i2c7-pins {
+					pins = "gpio32", "gpio33";
+					function = "gsbi7";
+					drive-strength = <8>;
+					bias-disable;
+				};
+			};
+
+			i2c7_sleep_state: i2c7-sleep-state {
+				i2c7-pins {
+					pins = "gpio32", "gpio33";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-bus-hold;
+				};
+			};
+
 			i2c8_default_state: i2c8-default-state {
 				i2c8-pins {
 					pins = "gpio36", "gpio37";
@@ -543,6 +579,36 @@ gsbi1_spi: spi@16080000 {
 			};
 		};
 
+		gsbi2: gsbi@16100000 {
+			compatible = "qcom,gsbi-v1.0.0";
+			reg = <0x16100000 0x100>;
+			ranges;
+			cell-index = <2>;
+			clocks = <&gcc GSBI2_H_CLK>;
+			clock-names = "iface";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			status = "disabled";
+
+			gsbi2_i2c: i2c@16180000 {
+				compatible = "qcom,i2c-qup-v1.1.1";
+				reg = <0x16180000 0x1000>;
+				pinctrl-0 = <&i2c2_default_state>;
+				pinctrl-1 = <&i2c2_sleep_state>;
+				pinctrl-names = "default", "sleep";
+				interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&gcc GSBI2_QUP_CLK>,
+					 <&gcc GSBI2_H_CLK>;
+				clock-names = "core",
+					      "iface";
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				status = "disabled";
+			};
+		};
+
 		gsbi3: gsbi@16200000 {
 			compatible = "qcom,gsbi-v1.0.0";
 			reg = <0x16200000 0x100>;
@@ -600,6 +666,36 @@ gsbi5_serial: serial@16440000 {
 			};
 		};
 
+		gsbi7: gsbi@16600000 {
+			compatible = "qcom,gsbi-v1.0.0";
+			reg = <0x16600000 0x100>;
+			ranges;
+			cell-index = <7>;
+			clocks = <&gcc GSBI7_H_CLK>;
+			clock-names = "iface";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			status = "disabled";
+
+			gsbi7_i2c: i2c@16680000 {
+				compatible = "qcom,i2c-qup-v1.1.1";
+				reg = <0x16680000 0x1000>;
+				pinctrl-0 = <&i2c7_default_state>;
+				pinctrl-1 = <&i2c7_sleep_state>;
+				pinctrl-names = "default", "sleep";
+				interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&gcc GSBI7_QUP_CLK>,
+					 <&gcc GSBI7_H_CLK>;
+				clock-names = "core",
+					      "iface";
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				status = "disabled";
+			};
+		};
+
 		gsbi8: gsbi@1a000000 {
 			compatible = "qcom,gsbi-v1.0.0";
 			reg = <0x1a000000 0x100>;

-- 
2.51.2



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

* [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
  2025-11-21 11:44 ` [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Rudraksha Gupta via B4 Relay
@ 2025-11-21 11:44 ` Rudraksha Gupta via B4 Relay
  2025-11-21 14:38   ` Konrad Dybcio
  2025-11-21 11:44 ` [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC Rudraksha Gupta via B4 Relay
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

From: Rudraksha Gupta <guptarud@gmail.com>

Currently the Proximity Sensor doesn't work, but light sensor does.
Left the proximity sensor as a TODO for later.

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 35 ++++++++++++++++++++++
 1 file changed, 35 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 5ee919dce75b..b68da548a985 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -54,6 +54,32 @@ key-volume-down {
 	};
 };
 
+&gsbi2 {
+	qcom,mode = <GSBI_PROT_I2C>;
+
+	status = "okay";
+};
+
+&gsbi2_i2c {
+	status = "okay";
+
+	light-sensor@39 {
+		compatible = "amstaos,tmd2772";
+		reg = <0x39>;
+		interrupt-parent = <&pm8921_gpio>;
+		interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
+		vdd-supply = <&pm8921_l9>;
+		vddio-supply = <&pm8921_lvs4>;
+
+		/* TODO: Proximity doesn't work */
+		amstaos,proximity-diodes = <0>;
+		led-max-microamp = <100000>;
+
+		pinctrl-0 = <&prox_sensor_int>;
+		pinctrl-names = "default";
+	};
+};
+
 &gsbi5 {
 	qcom,mode = <GSBI_PROT_I2C_UART>;
 	status = "okay";
@@ -163,6 +189,15 @@ &pm8921 {
 	interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
 };
 
+&pm8921_gpio {
+	prox_sensor_int: prox-sensor-int-state {
+		pins = "gpio6";
+		function = "normal";
+		input-enable;
+		bias-disable;
+	};
+};
+
 &rpm {
 	regulators {
 		compatible = "qcom,rpm-pm8921-regulators";

-- 
2.51.2



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

* [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
  2025-11-21 11:44 ` [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Rudraksha Gupta via B4 Relay
  2025-11-21 11:44 ` [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor Rudraksha Gupta via B4 Relay
@ 2025-11-21 11:44 ` Rudraksha Gupta via B4 Relay
  2025-11-21 14:27   ` Konrad Dybcio
  2025-11-21 11:44 ` [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer Rudraksha Gupta via B4 Relay
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

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



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

* [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
                   ` (2 preceding siblings ...)
  2025-11-21 11:44 ` [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC Rudraksha Gupta via B4 Relay
@ 2025-11-21 11:44 ` Rudraksha Gupta via B4 Relay
  2025-11-21 14:28   ` Konrad Dybcio
  2025-11-21 11:44 ` [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer Rudraksha Gupta via B4 Relay
  2025-11-21 14:39 ` [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Konrad Dybcio
  5 siblings, 1 reply; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

From: Rudraksha Gupta <guptarud@gmail.com>

Add the Yamaha magnetometer. Mount Matrix is left as a TODO.

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 .../boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts | 19 +++++++++++++++++++
 1 file changed, 19 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 0d6d38b57f00..a5aaaeb8b041 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -490,3 +490,22 @@ nfc@2b {
 		pinctrl-0 = <&nfc_default &nfc_enable>;
 	};
 };
+
+&gsbi12 {
+	qcom,mode = <GSBI_PROT_I2C>;
+
+	status = "okay";
+};
+
+&gsbi12_i2c {
+	status = "okay";
+
+	magnetometer@2e {
+		compatible = "yamaha,yas532";
+		reg = <0x2e>;
+		vdd-supply = <&pm8921_l9>;
+		iovdd-supply = <&pm8921_lvs4>;
+
+		/* TODO: Figure out Mount Matrix */
+	};
+};

-- 
2.51.2



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

* [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
                   ` (3 preceding siblings ...)
  2025-11-21 11:44 ` [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer Rudraksha Gupta via B4 Relay
@ 2025-11-21 11:44 ` Rudraksha Gupta via B4 Relay
  2025-11-21 14:28   ` Konrad Dybcio
  2025-11-21 14:39 ` [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Konrad Dybcio
  5 siblings, 1 reply; 13+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2025-11-21 11:44 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

From: Rudraksha Gupta <guptarud@gmail.com>

Add the Bosch Accelerometer. Mount Matrix is left as a TODO.

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts | 9 +++++++++
 1 file changed, 9 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 a5aaaeb8b041..f18fc5d7d150 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -500,6 +500,15 @@ &gsbi12 {
 &gsbi12_i2c {
 	status = "okay";
 
+	accelerometer@18 {
+		compatible = "bosch,bma254";
+		reg = <0x18>;
+		vdd-supply = <&pm8921_l9>;
+		vddio-supply = <&pm8921_lvs4>;
+
+		/* TODO: Figure out Mount Matrix */
+	};
+
 	magnetometer@2e {
 		compatible = "yamaha,yas532";
 		reg = <0x2e>;

-- 
2.51.2



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

* Re: [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC
  2025-11-21 11:44 ` [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:27   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:27 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

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

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

* Re: [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer
  2025-11-21 11:44 ` [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:28   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:28 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Add the Yamaha magnetometer. Mount Matrix is left as a TODO.
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer
  2025-11-21 11:44 ` [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:28   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:28 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Add the Bosch Accelerometer. Mount Matrix is left as a TODO.
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7
  2025-11-21 11:44 ` [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:38   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:38 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Add the GSBI2 & GSBI7 Node, which is similar to the
> other GSBI nodes in this file.
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---

With a combination of some docs I was able to track down and some
downstream kernel reading:

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor
  2025-11-21 11:44 ` [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:38   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:38 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Currently the Proximity Sensor doesn't work, but light sensor does.
> Left the proximity sensor as a TODO for later.
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---
>  .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 35 ++++++++++++++++++++++
>  1 file changed, 35 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 5ee919dce75b..b68da548a985 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
> @@ -54,6 +54,32 @@ key-volume-down {
>  	};
>  };
>  
> +&gsbi2 {
> +	qcom,mode = <GSBI_PROT_I2C>;
> +
> +	status = "okay";
> +};
> +
> +&gsbi2_i2c {
> +	status = "okay";
> +
> +	light-sensor@39 {
> +		compatible = "amstaos,tmd2772";
> +		reg = <0x39>;
> +		interrupt-parent = <&pm8921_gpio>;
> +		interrupts = <6 IRQ_TYPE_EDGE_FALLING>;

interrupts-extended = <&pm8921_gpio 6 IRQ_TYPE_EDGE_FALLING>;

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals
  2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
                   ` (4 preceding siblings ...)
  2025-11-21 11:44 ` [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer Rudraksha Gupta via B4 Relay
@ 2025-11-21 14:39 ` Konrad Dybcio
  2025-11-22 21:51   ` Rudraksha Gupta
  5 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2025-11-21 14:39 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/21/25 12:44 PM, Rudraksha Gupta via B4 Relay wrote:
> Intro:
> =================
> The following is now working on the Samsung Galaxy Express SGH-I437, an
> old 2012 Android phone:
> - Light Sensor
>     - Proximity is currently giving bogus values
> - NFC
> - Magnetometer
>     - Maybe need to update the mount matrix?
> - Accelerometer
>     - Maybe need to update the mount matrix?

[...]

> ---
> Changes in v2:
> - Fixed formatting issues
> - Use GSBI instead of i2c-gpio

I'm assuming this worked out fine for you and the devices are still
fully responsive?

Konrad

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

* Re: [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals
  2025-11-21 14:39 ` [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Konrad Dybcio
@ 2025-11-22 21:51   ` Rudraksha Gupta
  0 siblings, 0 replies; 13+ messages in thread
From: Rudraksha Gupta @ 2025-11-22 21:51 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

>> ---
>> Changes in v2:
>> - Fixed formatting issues
>> - Use GSBI instead of i2c-gpio
> I'm assuming this worked out fine for you and the devices are still
> fully responsive?

Yep! Working splendidly, thanks again for the review :)


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

end of thread, other threads:[~2025-11-22 21:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-21 11:44 [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
2025-11-21 11:44 ` [PATCH v2 1/5] ARM: dts: qcom: msm8960: Add GSBI2 & GSBI7 Rudraksha Gupta via B4 Relay
2025-11-21 14:38   ` Konrad Dybcio
2025-11-21 11:44 ` [PATCH v2 2/5] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor Rudraksha Gupta via B4 Relay
2025-11-21 14:38   ` Konrad Dybcio
2025-11-21 11:44 ` [PATCH v2 3/5] ARM: dts: qcom: msm8960: expressatt: Add NFC Rudraksha Gupta via B4 Relay
2025-11-21 14:27   ` Konrad Dybcio
2025-11-21 11:44 ` [PATCH v2 4/5] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer Rudraksha Gupta via B4 Relay
2025-11-21 14:28   ` Konrad Dybcio
2025-11-21 11:44 ` [PATCH v2 5/5] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer Rudraksha Gupta via B4 Relay
2025-11-21 14:28   ` Konrad Dybcio
2025-11-21 14:39 ` [PATCH v2 0/5] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Konrad Dybcio
2025-11-22 21:51   ` Rudraksha Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®