Jump to content

Cannot put pin into High Impedance Input State


maracuja

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:

#####

/dts-v1/;

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

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

    __overlay__ {
        i2c1 {
          function = "gpio_in";
          bias-high-impedance;
        };
    };
  };
};

######

 

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
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines