Cannot put pin into High Impedance Input State

Recommended Posts


I'm trying to use PA18/PA19 for custom purposes. I need to put these pins to Input state without any pullups/pulldowns.


What I can achieve is: to put these pins to input state via the command:

gpio mode 30 in

gpio mode 31 in

("tri" instead of "in" does not work, it accepts the command, but a multimeter shows the input is still high, as well as gpio readall)


These pins are probably pulled high because they are I2C pins. I want to disable the I2C functionality but have not found any means to do so.

I have tried this dts script:



/ {
  compatible = "allwinner,sun8i-h3","allwinner,sun50i-h5","friendlyarm,nanopi-neo2";

  fragment@0 {
    target-path = "/soc/pinctrl@1c20800";

    __overlay__ {
        i2c1 {
          function = "gpio_in";



and had a look at the device tree after a reboot:

dtc -I fs -O dts -o ./extracted.dts /proc/device-tree


The values got inserted right, but pin behaviour did not change. What I also cannot do is to activate pulldown on those pins. It has no effect.

Also tried a python library - https://github.com/duxingkei33/orangepi_PC_gpio_pyH3 - to no avail.


Board is an Orange Pi Zero +2 with H3 processor.


To sum it up:

Input mode is working (with pullup still activated)

Pulldown is not working

Deactivating Pullup is not working

Setting Pin to output mode and switching high/low is working


Kernel: 4.19.38-sunxi

Edited by maracuja
added kernel

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.