msm8953-mainline / linux

Linux mainline kernel with WIP patches for msm8953 devices
Other
111 stars 59 forks source link

Add Goodix GT917D touchscreen support for Xiaomi Daisy #128

Closed ntonnaett closed 8 months ago

ntonnaett commented 1 year ago

Depends on https://github.com/msm8953-mainline/lk2nd/pull/57 for enabling the correct touchscreen according to the display.

Fixes #33

barni2000 commented 1 year ago

@ntonnaett I think you don't need to overwrite the ft5406_ts node you can enable both because they are using different i2c id 0x5d and 0x30. There are devices with two touchscreen node enabled check msm8953-xiaomi-vince.dts

ntonnaett commented 1 year ago

@ntonnaett I think you don't need to overwrite the ft5406_ts node you can enable both because they are using different i2c id 0x5d and 0x30. There are devices with two touchscreen node enabled check msm8953-xiaomi-vince.dts

Added it as a separate node, but I only saw one _ts for vince. Should I do this differently?

The error might be a connection problem with i2c.

barni2000 commented 1 year ago

@ntonnaett I think you don't need to overwrite the ft5406_ts node you can enable both because they are using different i2c id 0x5d and 0x30. There are devices with two touchscreen node enabled check msm8953-xiaomi-vince.dts

Added it as a separate node, but I only saw one _ts for vince. Should I do this differently?

My fault, but there are i2c nodes at the sensors for same stuff accelerometer bmi120 and lsm6dsl, and it is handling multiple variants of the device, so two node should be fine. They has different i2c address.

The error might be a connection problem with i2c.

Idk

ntonnaett commented 1 year ago

It seems I can't do this, because both use gpio pin-64...

[    7.790776] msm8953-pinctrl 1000000.pinctrl: pin GPIO_64 already requested by 2-0038; cannot claim for 2-005d
[    7.790786] msm8953-pinctrl 1000000.pinctrl: pin-64 (2-005d) status -22
[    7.790791] msm8953-pinctrl 1000000.pinctrl: could not request pin 64 (GPIO_64) from group gpio64  on device 1000000.pinctrl
[    7.790795] Goodix-TS 2-005d: Error applying setting, reverse things back
alikates commented 1 year ago

IIRC you can set a gpio flag to allow it to be shared between multiple nodes

alikates commented 1 year ago

Indeed https://elixir.bootlin.com/linux/latest/source/include/linux/interrupt.h#L71

I think IRQF_PROBE_SHARED is more appropriate though.

ntonnaett commented 10 months ago

Be aware that this depends on the lk2nd patch. We should merge this PR afterwards.

barni2000 commented 8 months ago

@ntonnaett Are you going to send the driver change to upstream?

ntonnaett commented 8 months ago

Eventually I wanted to send this to upstream. But as this depends on the lk2nd patch, I thought I should wait until that one is merged.

barni2000 commented 8 months ago

Eventually I wanted to send this to upstream. But as this depends on the lk2nd patch, I thought I should wait until that one is merged.

I mean changes in goodix.c not chnages in the dts.

faveoled commented 8 months ago

But as this depends on the lk2nd patch, I thought I should wait until that one is merged.

It seems to be merged now? Any updates?

umeiko commented 8 months ago

Xiaomi mido also have the gt917d touchscreen , maybe should be fixed together !

barni2000 commented 8 months ago

Xiaomi mido also have the gt917d touchscreen , maybe should be fixed together !

are you sure?

umeiko commented 8 months ago

P8RQ9{35(RNX( X18LZ(J81 Yep, mine mido's touchpanel can't word on kernel 6.5.3, then I took my phone apart and saw this.

barni2000 commented 8 months ago

Which panel do you have?

umeiko commented 8 months ago

WSCQX@BEIH5R`DF9P@U0T81 This is my mido.

barni2000 commented 8 months ago

I can add support for it but first we need to find out is it related to panel or there is and ebbg panel which comes with focaltech, eg.: markw could use different touch for same display panel.

umeiko commented 8 months ago

My machine is original and has not been disassembled, but there is someone in our community who has the same model of screen, and his touch is available. It looks like there is a mix between the touch-IC and the screen panel.

barni2000 commented 8 months ago

My machine is original and has not been disassembled, but there is someone in our community who has the same model of screen, and his touch is available. It looks like there is a mix between the touch-IC and the screen panel.

than the only solution at the moment split the device tree or implement i2c probing in lk2nd, or i can add the touch screen node as disabled in dts and you need to enable manually.

umeiko commented 8 months ago

okey, I'll try it. is that means *mido*.dtb for gt917d and others will be different? Like a special *mido_gt917d*.dtb ?

barni2000 commented 8 months ago

okey, I'll try it. is that means *mido*.dtb for gt917d and others will be different? Like a special *mido_gt917d*.dtb ?

spliting dt means like this, yes.

umeiko commented 8 months ago

Add gt917d node there as enabled and change the ft5406 to disabled? https://github.com/msm8953-mainline/linux/blob/7d22f7199f12f02452dc7929ed3e4c96b2d36f5a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-mido.dts#L121