Switch to i2c-gpio driver for smbus compatibility.

This commit is contained in:
Sorgelig
2018-02-10 22:05:30 +08:00
parent 24edd52ad7
commit b795ddc232

View File

@@ -15,6 +15,7 @@
*/
#include "socfpga_cyclone5.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Terasic DE10-nano";
@@ -50,7 +51,7 @@
linux,default-trigger = "mmc0";
};
};
/*
ltcmode {
compatible = "gpio-leds";
ltcsw {
@@ -59,6 +60,25 @@
default-state = "off";
};
};
*/
i2c_gpio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "i2c-gpio";
gpios = <&portb 22 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
&portb 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
rtc_at_68 {
compatible = "m41t81";
reg = <0x68>;
};
rtc_at_6F {
compatible = "mcp7941x";
reg = <0x6F>;
};
};
};
&gmac1 {
@@ -106,18 +126,6 @@
};
};
&i2c1 {
status = "okay";
rtc_at_68 {
compatible = "m41t81";
reg = <0x68>;
};
rtc_at_6F {
compatible = "mcp7941x";
reg = <0x6F>;
};
};
&spi1 {
status = "okay";
timeouts = <3>;