i2c-gpio,sda-open-drain: 它表示其他驱动、其他系统已经把SDA设置为open drain了 在驱动里不需要在设置为open drain 如果需要驱动代码自己去设置SDA为open drain,就不要提供这个属性 i2c-gpio,scl-open-drain: 它表示其他驱动、其他系统已经把SCL设置为open drain了 在驱动里不需要在设置为open drain 如果需要驱动...
compatible = "i2c-gpio"; gpios = <&pioA 23 GPIO_ACTIVE_HIGH>, /* sda */ <&pioA 24 GPIO_ACTIVE_HIGH>; /* scl */ i2c-gpio,sda-open-drain; i2c-gpio,scl-open-drain; i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; pinctrl-names =...
i2c-gpio,sda-open-drain; i2c-gpio,scl-open-drain; 表示SDA引脚已经被设置为为开极、开漏不需要驱动程序再次设置 表示SCL引脚已经被设置为为开极、开漏不需要驱动程序再次设置 两者如果存在则表示gpio已经被设置为开极、开漏(例如pinctl已经实现)。如果不存在则驱动程序会去将引脚再次设置为开极、开漏。所以此时...
- gpios: sda and scl gpio, alternative for {sda,scl}-gpios - i2c-gpio,sda-open-drain: this means that something outside of our control has put the GPIO line used for SDA into open drain mode, and that something is not the GPIO chip. It is essentially an inconsistency flag. - i2c...
这个结构体主要描述gpio模拟i2c总线,sda_pin和scl_pin表示使用哪两个IO管脚来模拟I2C总线,udelay和timeout分别为它的时钟频率和超时时间,sda_is_open_drain和scl_is_open_drain表示sda、scl这两个管脚是否是开漏(opendrain)电路,如果是设置为1,scl_is_output_only表示scl这个管脚是否只是作为输出,如果是设置为1。
第一个结构体中sda_pin和scl_pin是开发板上对应的gpio口(data线和clock线),udelay是与具体芯片时钟相关的参数,需要参考具体的datasheet。下面的两个open_drain是表明两个管脚是否是开漏电路,如果是则填1,否则填0。下面一个机构体中需要注意name应该填写i2c-gpio,另外id要注意设定为2,因为系统当中已经有两个I2C设...
Board_I2C0_SCL0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_OPENDRAIN, 但是并没有能打通,采集不了数据,请问一下,我该怎么做? Hi WBJ 是这样的,按照官方提供的例子,I2C是可以调通的,但是我不想用官方的那种方式,我想直接控制GPIO来模拟I2C,我想问一下这个时候I2C的SDA和SCL管脚配置如下 ...
sda_od (bool) - SDA is configured as open drain scl_od (bool) - SCL is configured as open drain scl_oo (bool) - SCL output drivers cannot be turned of (no clock stretching)You can add additional i2c-gpio busses or remove existing ones with sysfs interface:/...
GPIO输出模式寄存器(0x44) REGISTER BIT DESCRIPTION D7 PORT7 D6 PORT6 D5 PORT5 D4 PORT4 D3 PORT3 D2 PORT2 D1 PORT1 D0 PORT0 VALUE 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 FUNCTION Port is a constant-current open-drain output Port is a non-constant-current open-drain output ...
Texas Instruments Incorporated www.ti.com.cn TPS22993 ZHCSBU6A – NOVEMBER 2013 – REVISED MARCH 2014 10.1.1.2 SDA/SCL Terminal Configuration The SDA and SCL terminals of the device operate use an open-drain configuration, and therefore, need pull up resistors to communicate on the I2C bus. ...