I2C4的引脚(SCL/SDA)能做普通GPIO用吗?
I2C4的引脚(SCL/SDA)要做普通GPIO用的话,是否直接在设备树种删除I2C4的配置,然后其他驱动重新建立设备树就可以了?DTS中把I2C4 disable掉,驱动中正常申请对应的IO口。 牛头 发表于 2016-3-29 09:17
DTS中把I2C4 disable掉,驱动中正常申请对应的IO口。
i2c4: i2c@ff160000 {
compatible = "rockchip,rk30-i2c";
reg = <0xff160000 0x1000>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&i2c4_sda &i2c4_scl>;
pinctrl-1 = <&i2c4_gpio>;
gpios = <&gpio7 GPIO_C1 GPIO_ACTIVE_LOW>, <&gpio7 GPIO_C2 GPIO_ACTIVE_LOW>;
clocks = <&clk_gates6 15>;
rockchip,check-idle = <1>;
status = "disabled";
};
i2c4在dts中的status = "disabled"的,但是为什么dev/下还有i2c4设备(crw-rw-rw- root root 89, 4 2011-01-01 12:00 i2c-4)?
我在自己的驱动中申请gpio是失败的啊!
resource.img有燒錄進去吧? ccwfvw junhai 发表于 2016-3-29 10:18
i2c4: i2c@ff160000 {
compatible = "rockchip,rk30-i2c";
reg = ;
在firefly-rk3288.dts里面把&i2c4 disabled就可以了,不过这样的话会把下面用到i2c4的vga等都禁止掉了
页:
[1]