I had an idea to find out which CTPM is attached, but it is not working.
It should take longer to reset when REG_TOUCH_CONFIG is set to 0x0380 for Focaltech but a Goodix CTPM is connected.
EVE_memWrite8(REG_CPURESET, 2U); /* reset touch controller */
// EVE_memWrite16(REG_TOUCH_CONFIG, 0x05d0U); /* switch to Goodix CTPM */
EVE_memWrite16(REG_TOUCH_CONFIG, 0x0380); /* switch to Focaltech CTPM */
EVE_memWrite8(REG_CPURESET, 0U); /* clear all resets */
EVE_memRead8(REG_CPURESET);
Checking back with the logic-analyzer, this first read results in 0x00 already.
At 400kHz it takes at least 25µs to get the first ACK from an I2C chip.
From writing REG_CPURESET to reading it back my code needs less than 10µs,
so the touch controller is not actually resetting.
Well, I noticed that the touch-controller takes longer to come out of reset on power-up.
I modified my startup code to immediately read REG_CPURESET after REG_ID returned 0x7c
and to read REG_CPURESET with no pause over and over again untill it reads 0x00.
RVT50HQBNWC00-B with ILI2132A: ~50µs
EVE3-50G with GT911: ~9ms (touch controller not found on power-up)
So that really looks like a way to check if the expected CTPM is connected.
But how is the touch controller convinced to actually do a reset if writing 0x02 to REG_CPURESET does not work?