Vancouver Posted September 23, 2018 Posted September 23, 2018 I am sorry but even after long searching I could not find out how to enable internal pull up resistors in an A20. I am on a BananaPro with Bionic, kernel 4.14.70. I want to use the pull ups on I2C-1. Presumably it is quite easy. I know that internal pull resistors are usually too weak for I2C, but the I2C is only connected to an external level shifter since all connected I2C devices have 5V lines. So the internal resistors should be sufficient, and the expansion board is working reliably on an old Rapsberry model B with internal pull ups. So, how can I enable internal pullups? The I2C-1 overlay seems not to have an option for that. Can it be done via device tree or writing to /sys/class? Thanks for suggestions. Best Regards
martinayotte Posted September 23, 2018 Posted September 23, 2018 If I remember correctly, internal pullups are only active when the pins are in gpio input mode, therefore when switched to i2c mode, I don't think the pullups remains. Why don't you add some directly on your level shifter module, and some of those level shifter maybe have them already ? ...
Vancouver Posted September 24, 2018 Author Posted September 24, 2018 Ok... thats a bit strange. And it is not possible to turn on the pullups again after configuring for I2C? The problem is that the expansion board is already finished (it was designed for and used on a RPi). The level shifter is made of two MOSFETs as described in here (pdf, see page 4). Inserting pullups requires a hardware patch. But it seems there is no way around. Thanks for your reply. Regards
martinayotte Posted September 25, 2018 Posted September 25, 2018 Maybe I'm wrong, but the logic is that GPIO_PULLUP mode as nothing with I2C ...
Recommended Posts