linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add the mXT224S touchscreen to expressatt
@ 2024-01-30  2:43 Rudraksha Gupta via B4 Relay
  2024-01-30  2:43 ` [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node Rudraksha Gupta via B4 Relay
  2024-01-30  2:43 ` [PATCH 2/2] ARM: dts: qcom: msm8960: expressatt: Add mXT224S touchscreen Rudraksha Gupta via B4 Relay
  0 siblings, 2 replies; 4+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2024-01-30  2:43 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Rudraksha Gupta

Adds support for the Atmel touchscreen to the Samsung Galaxy Express 
SGH-I437. Copies the gsbi3 node from apq8064, which is a similar SoC,
and sets appropriate properties.

Applies successfully on top of my previous patch:
https://lkml.org/lkml/2024/1/20/56

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
Rudraksha Gupta (2):
      ARM: dts: qcom: msm8960: Add gsbi3 node
      ARM: dts: qcom: msm8960: expressatt: Add mXT224S touchscreen

 arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi      | 29 ++++++++++++++++++++
 .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 31 +++++++++++++++++++++-
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi           | 27 +++++++++++++++++++
 3 files changed, 86 insertions(+), 1 deletion(-)
---
base-commit: df2fa93a6956fcd03da4c251150aa9cc3c88c74d
change-id: 20240129-expressatt_mxt224s_touchscreen-f1f4dc01667c

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


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

* [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node
  2024-01-30  2:43 [PATCH 0/2] Add the mXT224S touchscreen to expressatt Rudraksha Gupta via B4 Relay
@ 2024-01-30  2:43 ` Rudraksha Gupta via B4 Relay
  2024-01-30  7:49   ` Krzysztof Kozlowski
  2024-01-30  2:43 ` [PATCH 2/2] ARM: dts: qcom: msm8960: expressatt: Add mXT224S touchscreen Rudraksha Gupta via B4 Relay
  1 sibling, 1 reply; 4+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2024-01-30  2:43 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>

Copy gsbi3 node from qcom-apq8064.dtsi and set appropriate properties

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
 arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi | 29 +++++++++++++++++++++++++++
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi      | 27 +++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi
new file mode 100644
index 000000000000..c74c6625d276
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+&msmgpio {
+	i2c3_pins: i2c3 {
+		mux {
+			pins = "gpio16", "gpio17";
+			function = "gsbi3";
+		};
+
+		pinconf {
+			pins = "gpio16", "gpio17";
+			drive-strength = <8>;
+			bias-disable;
+		};
+	};
+
+	i2c3_pins_sleep: i2c3_pins_sleep {
+		mux {
+			pins = "gpio16", "gpio17";
+			function = "gpio";
+		};
+
+		pinconf {
+			pins = "gpio16", "gpio17";
+			drive-strength = <2>;
+			bias-bus-hold;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
index f420740e068e..62a5a9622e82 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
@@ -359,5 +359,32 @@ usb_hs1_phy: phy {
 				};
 			};
 		};
+
+		gsbi3: gsbi@16200000 {
+			status = "disabled";
+			compatible = "qcom,gsbi-v1.0.0";
+			cell-index = <3>;
+			reg = <0x16200000 0x100>;
+			clocks = <&gcc GSBI3_H_CLK>;
+			clock-names = "iface";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			gsbi3_i2c: i2c@16280000 {
+				compatible = "qcom,i2c-qup-v1.1.1";
+				pinctrl-0 = <&i2c3_pins>;
+				pinctrl-1 = <&i2c3_pins_sleep>;
+				pinctrl-names = "default", "sleep";
+				reg = <0x16280000 0x1000>;
+				interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&gcc GSBI3_QUP_CLK>,
+					 <&gcc GSBI3_H_CLK>;
+				clock-names = "core", "iface";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "disabled";
+			};
+		};
 	};
 };
+#include "qcom-msm8960-pins.dtsi"

-- 
2.43.0


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

* [PATCH 2/2] ARM: dts: qcom: msm8960: expressatt: Add mXT224S touchscreen
  2024-01-30  2:43 [PATCH 0/2] Add the mXT224S touchscreen to expressatt Rudraksha Gupta via B4 Relay
  2024-01-30  2:43 ` [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node Rudraksha Gupta via B4 Relay
@ 2024-01-30  2:43 ` Rudraksha Gupta via B4 Relay
  1 sibling, 0 replies; 4+ messages in thread
From: Rudraksha Gupta via B4 Relay @ 2024-01-30  2:43 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 mXT224S touchscreen

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

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 47e0e26ad9f0..af6cc6393d74 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -85,6 +85,27 @@ &gsbi1_spi {
 	status = "okay";
 };
 
+&gsbi3 {
+	qcom,mode = <GSBI_PROT_I2C>;
+	status = "okay";
+};
+
+&gsbi3_i2c {
+	status = "okay";
+
+	// Atmel mXT224S touchscreen
+	touchscreen@4a {
+		compatible = "atmel,maxtouch";
+		reg = <0x4a>;
+		interrupt-parent = <&msmgpio>;
+		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+		vdda-supply = <&pm8921_lvs6>;
+		vdd-supply = <&pm8921_l17>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&touchscreen>;
+	};
+};
+
 &msmgpio {
 	spi1_default: spi1-default-state {
 		mosi-pins {
@@ -123,6 +144,14 @@ gpio_keys_pin_a: gpio-keys-active-state {
 		drive-strength = <8>;
 		bias-disable;
 	};
+
+	touchscreen: touchscreen-int-state {
+		pins = "gpio11";
+		function = "gpio";
+		output-enable;
+		bias-disable;
+		drive-strength = <2>;
+	};
 };
 
 &pm8921 {
@@ -285,7 +314,7 @@ pm8921_l16: l16 {
 		};
 
 		pm8921_l17: l17 {
-			regulator-min-microvolt = <1800000>;
+			regulator-min-microvolt = <3300000>;
 			regulator-max-microvolt = <3300000>;
 			bias-pull-down;
 		};

-- 
2.43.0


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

* Re: [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node
  2024-01-30  2:43 ` [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node Rudraksha Gupta via B4 Relay
@ 2024-01-30  7:49   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-30  7:49 UTC (permalink / raw)
  To: guptarud, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 30/01/2024 03:43, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Copy gsbi3 node from qcom-apq8064.dtsi and set appropriate properties
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---
>  arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi | 29 +++++++++++++++++++++++++++
>  arch/arm/boot/dts/qcom/qcom-msm8960.dtsi      | 27 +++++++++++++++++++++++++
>  2 files changed, 56 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi
> new file mode 100644
> index 000000000000..c74c6625d276
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-pins.dtsi
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +&msmgpio {
> +	i2c3_pins: i2c3 {
> +		mux {
> +			pins = "gpio16", "gpio17";
> +			function = "gsbi3";
> +		};
> +
> +		pinconf {
> +			pins = "gpio16", "gpio17";
> +			drive-strength = <8>;
> +			bias-disable;
> +		};
> +	};
> +
> +	i2c3_pins_sleep: i2c3_pins_sleep {


No underscores in node names.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).


> +		mux {
> +			pins = "gpio16", "gpio17";
> +			function = "gpio";
> +		};
> +
> +		pinconf {
> +			pins = "gpio16", "gpio17";
> +			drive-strength = <2>;
> +			bias-bus-hold;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
> index f420740e068e..62a5a9622e82 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
> @@ -359,5 +359,32 @@ usb_hs1_phy: phy {
>  				};
>  			};
>  		};
> +
> +		gsbi3: gsbi@16200000 {
> +			status = "disabled";

Please order the properties according to DTS coding style:
https://www.kernel.org/doc/html/latest/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node


Best regards,
Krzysztof


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

end of thread, other threads:[~2024-01-30  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30  2:43 [PATCH 0/2] Add the mXT224S touchscreen to expressatt Rudraksha Gupta via B4 Relay
2024-01-30  2:43 ` [PATCH 1/2] ARM: dts: qcom: msm8960: Add gsbi3 node Rudraksha Gupta via B4 Relay
2024-01-30  7:49   ` Krzysztof Kozlowski
2024-01-30  2:43 ` [PATCH 2/2] ARM: dts: qcom: msm8960: expressatt: Add mXT224S touchscreen Rudraksha Gupta via B4 Relay

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