This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM437x的GPIO0_22引脚复用



你好,

我用gpio0_22作为我板子的供电Hold引脚,我发现这个引脚在Linux kernel启动的时候会被kernel给强制修改,具体现象如下:

在uboot起来的时候,我把gpio0_22强制拉高了,但是在启动linux kernel的时候,这个引脚会被强制拉低。我目前判断是因为我们的device tree里面将gpio0_22按照spi2_clk的方式给重新配置了一遍。我要如何修改DTB文件才能是Linux内核启动的时候不要初始化这个spi2_clk(gpio0_22)的引脚呢?

按照TI官方的demo配置。spi2是用作ti默认的电阻屏驱动的。

  • 1.在device tree删除spi2_clk这个引脚的pinmux 配置 

    2.在device tree 文件最后面加上

    &gpio0 {

    ti,no-reset-on-init;
    ti,no-idle-on-init;

    p22{
    gpio-hog;
    gpios = <22 GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "FET_SWITCH_CTRL";
    };
    };