Sdcard becomes read-only after waking up from suspend

Software I2C recovery is definitely disabled in Librem5 as far as the related GPIO pins are not configured. This is my patch to activate it. I believe @dos could examine and push it to upstream.

This is dmesg output after applying the patch:

$ sudo dmesg | grep i2c | grep sda
[    1.259563] imx-i2c 30a20000.i2c: using DT '/soc@0/bus@30800000/i2c@30a20000' for 'sda' GPIO lookup
[    1.259605] of_get_named_gpiod_flags: parsed 'sda-gpios' property of node '/soc@0/bus@30800000/i2c@30a20000[0]' - status (0)
[    1.276907] imx-i2c 30a30000.i2c: using DT '/soc@0/bus@30800000/i2c@30a30000' for 'sda' GPIO lookup
[    1.276956] of_get_named_gpiod_flags: parsed 'sda-gpios' property of node '/soc@0/bus@30800000/i2c@30a30000[0]' - status (0)
[    1.279998] imx-i2c 30a40000.i2c: using DT '/soc@0/bus@30800000/i2c@30a40000' for 'sda' GPIO lookup
[    1.280039] of_get_named_gpiod_flags: parsed 'sda-gpios' property of node '/soc@0/bus@30800000/i2c@30a40000[0]' - status (0)
[    1.283571] imx-i2c 30a50000.i2c: using DT '/soc@0/bus@30800000/i2c@30a50000' for 'sda' GPIO lookup
[    1.283615] of_get_named_gpiod_flags: parsed 'sda-gpios' property of node '/soc@0/bus@30800000/i2c@30a50000[0]' - status (0)

Finally, it is some kind of ESD protection. I have an oscilloscope but it wont help as far the issue occurs unpredictably during a day. But that is more interesting - I do not observed the display hangup anymore throughout the last three days! I’ve checked the logs. Sometimes a few messages about edt_ft5x06 error occurred in a row, but the phone remains fully functional.

2 Likes