带设备树的sunxi-h3 pinctrl上拉

问题描述

我想将引脚PG6配置为启用了上拉的GPIO输入。我的董事会是Orangepi零,拥有sunxi H3 allwinner soc。

使用devmem我可以配置引脚

devmem 0x1C208D8
=> 0x70222222
=> 0111 0000 0010 0010 0010 0010 0010 0010
# yes [26:24] is 000 aka INPUT
devmem 0x1C208F4 16 0x000001555
devmem 0x1C208F4
=> 0x00001555
=> 0000 0000 0000 0000 0001 0101 0101 0101
# yes [13:12] is 01 aka PULLUP

我查看了sun8i-h2-plus-orangepi-zero.dts,然后搜索了pinctrl定义或其他内容。但是什么也没发现,我必须为基本0x01C20800定义pinctrl吗?

我找到了一个nanopi的示例,并对其进行了一些调整,没有运气

/dts-v1/;
/plugin/;

/ {
  compatible = "allwinner,sun8i-h3";

  /*
   * This fragment is needed only for the internal pull-up activation,* external pull-up resistor is highly recommended if using long wires
   */
  fragment@0 {
    target = <&pio>;
    __overlay__ {
      input_0: input_0 {
        pins = "PG6";
        function = "gpio_in";
        bias-pull-up;
      };
    };
  };
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)