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.

AM335X如何配置PCA95xx devicetree

Other Parts Discussed in Thread: AM3354, PCA9535

各位工程师大家好,

我这边用AM3354做一个国网的费控产品,我现在在I2C上增加了两片pca9535zz作为I/O口的扩展芯片,一片为全部是输出另外一个是输入,之前是在应用程序里处理,现在发现这样比较麻烦,而且Linux3.14内核有这个芯片的驱动。内核配置如下

<*>   PCA953x, PCA955x, PCA957x, TCA64xx, and MAX7310 I/O ports  │ │ 
  │ │    [*]     Interrupt controller support for PCA953x                 │ │ 
  │ │    <*>   PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders现在的问题是不知道如何增加设备树,如果是按照常规的设备树配置那么输入输出方向该如何描述呢,在网上找了一下也没有这个设备树的介绍,麻烦TI的工程师给看看,有个参考什么的。

  • &i2c1 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c1_pins>;

    status = "okay";
    clock-frequency = <100000>;
    /*
    pca9535_in: pca9535@21 {
    compatible = "nxp,pca9535";
    pinctrl-names = "default";
    pinctrl-0 = <&pca_pins_irq>;
    interrupt-parent = <&gpio0>;
    interrupts = <20 0x0>;
    gpio-controller;
    #gpio-cells = <2>;
    interrupt-controller;
    #interrupt-cells = <2>;
    reg = <0x21>;
    };*/
    pca9535_out: pca9535@20 {
    compatible = "nxp,pca9535";
    gpio-controller;
    #gpio-cells = <2>;
    reg = <0x20>;
    };


    };
    以上是添加带中断的i2c扩展芯片驱动
  • 感谢分享!