arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
PATCH v2 1/1 arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
From: Joe Mason <[email protected]>
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
---
v2: Add &touchscreen. Keep i2c5 enabled
--- .../qcom/msm8916-samsung-fortuna-common.dtsi | 49 +++++++++++++++++++ .../qcom/msm8916-samsung-rossa-common.dtsi | 3 ++ 2 files changed, 52 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +49 -0
@@ -66,6 +66,19 @@ reg_motor_vdd: regulator-motor-vdd { pinctrl-0 = <&motor_en_default>; pinctrl-names = "default"; }; + + reg_vdd_tsp_a: regulator-vdd-tsp-a { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp_a"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_en_default>; + pinctrl-names = "default"; + }; }; &blsp_i2c1 {
@@ -94,6 +107,28 @@ fuel-gauge@35 { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen: touchscreen@20 { + compatible = "zinitix,bt541"; + reg = <0x20>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <540>; + touchscreen-size-y = <960>; + + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + + linux,keycodes = <KEY_APPSELECT KEY_BACK>; + }; +}; + &blsp_uart2 { status = "okay"; };
@@ -200,4 +235,18 @@ sdc2_cd_default: sdc2-cd-default-state { drive-strength = <2>; bias-disable; }; + + tsp_en_default: tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; };
arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi +3 -0
@@ -5,6 +5,9 @@ /* SM5504 MUIC instead of SM5502 */ /delete-node/ &muic; +/* Touchscreen varies depending on model variant */ +/delete-node/ &touchscreen; + &blsp_i2c1 { muic: extcon@14 { compatible = "siliconmitus,sm5504-muic";
Signature · 1 line
2.39.2
Quoted 10 lines · Raymond Hackley
From: Joe Mason <[email protected]>
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
Signed-off-by Joe Mason <[email protected]>[Raymond: Move to fortuna-common. Use interrupts-extended]Signed-off-by Raymond Hackley <[email protected]>---
Konrad
Bjorn Andersson
maintainerQuoted 1 line · Raymond Hackley
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +0
-0
[..]
Quoted 9 lines
+&blsp_i2c5 {
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +8
-0+ status = "okay"; + + touchscreen: touchscreen@20 { + compatible = "zinitix,bt541"; + reg = <0x20>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; +
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi fuel-gauge@35 { · line 128
Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +10
-0+ touchscreen-size-x = <540>; + touchscreen-size-y = <960>; + + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + + linux,keycodes = <KEY_APPSELECT KEY_BACK>;
linux,keycodes is not a valid property of zinitix,bt541 according to the DeviceTree binding. Is there a binding update for this somewhere?
Regards,
Bjorn
Bjorn Andersson писал(а) 03.04.2024 23:49:
Quoted 17 lines · Raymond Hackley
Quoted 1 line
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +0
-0[..]
Quoted 14 lines
+&blsp_i2c5 {
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +13
-0+ status = "okay"; + + touchscreen: touchscreen@20 { + compatible = "zinitix,bt541"; + reg = <0x20>; + + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <540>; + touchscreen-size-y = <960>; + + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>;
Quoted 9 lines
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi fuel-gauge@35 { · line 128
Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +5
-0+ + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + + linux,keycodes = <KEY_APPSELECT KEY_BACK>;linux,keycodes is not a valid property of zinitix,bt541 according to the DeviceTree binding. Is there a binding update for this somewhere?
There is a series for this [1] that Dmitry seems to have no time to pick up for a long while now, which we carry downstream. Without correct touchkey definition the touch controller reassigns the tkey lanes to the screen surface and display calibration breaks a bit, but since we don't have the changes upstream for now, probably want to drop this line from the submission so we don't introduce more dtbs_check warnings.
Nikita
[1] https://lore.kernel.org/r/[email protected]/
Quoted 2 lines
Regards,
Bjorn
Quoted 5 lines · Raymond Hackley
Like msm8916-samsung-a3u-eur, the Grand Prime uses a Zinitix BT541 touchscreen. Add it together with the necessary fixed-regulator to the device tree.
Applied, thanks!
[1/1] arm64: dts: qcom: msm8916-samsung-fortuna: Add touchscreen
commit: f8dddefcb90eaa339c77b2cb3f5a87dec8b1e3b5
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>