Dear olimex,
I need to enable internal pullups of A13 on pins
pin 49 (PB17): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB17
pin 50 (PB18): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB18
I want to do this with dts, any help is appreciated.
What shloud be added to sun5i-a13-i2c2.dts to achieve the task.
thank you
If you need them for I2C - internal pull up are too weak. Like 30k. Just add external.
Maybe first test via the sysfs before doing it in the DTS, refer to this python package that had internal pull up control:
https://pypi.org/project/pyA13/
Hello,
thanks for info,
i have tested it allready With externall pullups, and it's working.
But I really want to try it with internall pullups. I need that the operating system it self recognize the connected device. Pyhton doesn not help in this situation.
So is it possible to enable the pullups with dts?
I believe you just add "bias-pull-up;" in the dts under the pin you want. However, not every pin has internal pull up you need to check the user manual or datasheet of A13 chip. You will find it is like 5 pins and it is not guaranteed all 5 are free of other peripherals. Check here:
https://linux-sunxi.org/images/e/e6/A13_datasheet_V1.4_20150320.pdf
Also check here:
https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/allwinner%2Csunxi-pinctrl.txt