-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Reset on Init polarity incorrect for FT5336 driver #86816
Comments
Hi @jwoolston! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Not a bug imo you just have to add the appropriate flags (ACTIVE_LOW) to your reset-gpios phandle, then the sequence is as the datasheet wants it. |
Yeah as @faxe1008 pointed out "active" and "inactive" refer to the logical value of the pin, in this case "active" refer to "reset" so you would read In your devicetree In general, I recommend avoiding using |
Same for |
@fabiobaltieri Thank you for the explanation. Given that the snippet was taken from a repo provided STM32 board (providing the |
I'll keep this open as a reminder for myself to check that out, clearly those aren't being tested, probably just ran in polling mode. |
Describe the bug
The FT5336 input driver appears to have a bug in the reset sequence it uses during init. Per the data sheet of the 5336 and similar family devices, a power on reset should be accomplished by bringing the reset line low, holding for 5ms and then taking the line high.
The existing code contains documentation which appears to indicate that this sequence is known. However, the actual implementation is the inverse - it is brought high for 5ms then returned low, effectively holding the FT5336 in reset.
This is confirmed by a scan of the I2C bus via the I2C shell showing no devices on the bus (in my case there was only the one device), as well as a logic analyzer on boot. This of course prevents the device from being available to the input subsystem.
To Reproduce
i2c scan i2c@40005c00
shows no devices connected <---Note of course I2C device may varyExpected behavior
Impact
Minimal/annoyance. Lost a few hours of work trying to diagnose why it was not working and discovered the simple logic bug
Logs and console output
Happy to provide logs or logic analyzer output but I don't think they are necessary. Simple inspection of the code should reveal the necessary changes. I was able to get the driver working with the following patch:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: