Internal Pullups via device tree

  • Good day,


    I am currently trying to add internal pullups to some of my GPIOs on the PicoMODA9.


    As far as I have gathered, the device tree seems the way to go.

    But how would I, for example set a pullup on GPIO1 (J1 connector, pin 41)?


    I did find a device tree example for the raspberryPI and internal pullups, but I am not putting much trust in an example for another board, when I have little understanding for how to work with the device tree itself.


    On that note are there some documents that further explain working with the device tree itself?


    best regards

  • Good day,


    after some tests with the GPIOs I have also noticed that trying to export GPIO5 (Pin29 J1 connector) fails.

    For reference I also tried to export GPIO1, 0 and 2, which all work.


    The hardware documentation does not indictate that GPIO5 would be used for any other kind of hardware.

    The kernel that I used is the new fsimx6-B2019.08.

    Any ideas what I might be doing wrong? Might the GPIO be set for another hardware device in the device tree? (No changes where made, but configuring the display as LCD)


    best regards

  • Hi,


    the pin is normally set to GPIO with a PullDown. The Following line is:


    Code
    1. MX6QDL_PAD_EIM_A21__GPIO2_IO17    0x400030b0


    To use as PullUp you have to change the line:


    Code
    1. MX6QDL_PAD_EIM_A21__GPIO2_IO17    0x4000b0b0


    If you want to use this pin in linux you have to export this pin. You can see in the Code the GPIO is GPIO2_IO17 that means you have to export Pin 49.


    Code
    1. echo 49 > /sys/class/gpio/export


    Did you do that and it doesn´t work?



    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    thanks for the reply on the pullUps, I'll try that as soon is I am able to.


    As for the Pin29 (J1): No I tried GPIO 5 in Linux, in accordance with the Reference Card in the download directory for the PicoModA9.

    I am gonna try pin 49 ASAP.


    Best regards

  • Hi,


    I have checked the Reference Card and there is a small mistake in it. So the name GPIO5 relys to GPIO2_IO17, therefore you have to export GPIO 49. I have updated the Reference Card and also add the new PicoModA9 revision. You can find it here:

    https://www.fs-net.de/de/produkte/picomod/picomoda9/


    Sorry for inconvenience.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thank, I appreciate the help.


    But are you sure the new reference card is the correct one? I am having a hard time seeing any differences to the old reference card.

    For example Pin 29 is still GPIO1_IO05 and /sys/class/gpio/gpio5.


    Or am I checking the wrong file? It should be under Documents --> PicoMODA9 - Linux yes?


    best regards

  • Hi,


    the current GPIO Reference Card has changed, maybe your browser shows the old one. If you are opening the document in the browser, please press shift + F5 to get the current one. In attachment you find also the current one.


    Edit:

    The name GPIO5 has nothing to do with the real GPIO number, the real GPIO is in column GPIO and the number which you have to export is in column /sys/class/gpio/gpio#


    Your F&S Support Team

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.