Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moto G5 Plus (XT1683): touchscreen doesn't work #220

Open
NickRMD opened this issue Dec 13, 2024 · 2 comments
Open

Moto G5 Plus (XT1683): touchscreen doesn't work #220

NickRMD opened this issue Dec 13, 2024 · 2 comments

Comments

@NickRMD
Copy link

NickRMD commented Dec 13, 2024

I have noticed that after installing postmarketOS on my G5 Plus the touchscreen won't work. The display works normally and displays the DE (Plasma-mobile, wayland) correctly, the sound works, the wifi and bluetooth and battery gauge, but the touchscreen don't work.

The possible reason seems to be a misconfigured dts file for the device:
After installing I went to the postmarketOS and postmarketOS Mainline Matrix room and started asking what could be the problem, it seems like the dts file for the G5 Plus has some misconfigured regulators as from the original dts.
You could see from the logs (dmesg files) attached that the touchscreen don't seen to initialize (as from the error -6 No such device or address).

TWRP dmesg full log: initializes correctly;
postmarketOS dmesg full log: doesn't initialize.

I would be grateful if anyone could help and I'm willing to help with anything if needed since I have the phone in hand and can help with testing and such.

@barni2000
Copy link
Member

barni2000 commented Dec 15, 2024

I have tried to correct it but still not works.

diff --git a/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts b/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts
index 689d5d451c63..b306a049fe0c 100644
--- a/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts
+++ b/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts
@@ -160,15 +160,17 @@ &hsusb_phy {
 &i2c_3 {
        status = "okay";

+       clock-frequency = <400000>;
+
        touchscreen@20 {
                reg = <0x20>;
                compatible = "syna,rmi4-i2c";

-               interrupt-parent = <&tlmm>;
-               interrupts = <65 IRQ_TYPE_EDGE_FALLING>;
+               interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;

+               reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&ts_reset>;
+               pinctrl-0 = <&ts_int_reset>;

                vdd-supply = <&pm8953_l22>;
                vio-supply = <&pm8953_l6>;
@@ -282,7 +284,6 @@ pm8953_l5: l5 {
                pm8953_l6: l6 {
                        regulator-min-microvolt = <1800000>;
                        regulator-max-microvolt = <1800000>;
-                       regulator-always-on;
                };

                pm8953_l7: l7 {
@@ -341,8 +342,7 @@ pm8953_l19: l19 {
                };

                pm8953_l22: l22 {
-                       regulator-always-on;
-                       regulator-min-microvolt = <2800000>;
+                       regulator-min-microvolt = <2850000>;
                        regulator-max-microvolt = <2850000>;
                };

@@ -386,8 +386,8 @@ &sound_card {
 &tlmm {
        gpio-reserved-ranges = <1 2>, <96 4>, <111 1>, <126 1>;

-       ts_reset: ts-reset-state {
-               pins = "gpio64";
+       ts_int_reset: ts-int-reset-state {
+               pins = "gpio64", "gpio65";
                function = "gpio";
                drive-strength = <2>;
                bias-pull-up;

@barni2000
Copy link
Member

I have find out issue is with missing reset handling from the driver.
Adding a "fake" node with other touchscreen driver what handling reset makes it work,
so synaptics driver should be modified to handle reset-gpios

touchscreen@19 {
               compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
               reg = <0x19>;

               reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;

               status = "okay";
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants