ramips: use i2c-gpio driver for EX400
Configure the i2c pins as GPIO outputs and use the i2c-gpio driver to control the Semtech SX9512 touch controller. This fixes spurious errors in i2c transactions even at 1kHz with the native i2c driver. leds green:wan: Setting an LED's brightness failed (-6) Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
parent
49a1781d74
commit
f828be4d10
2 changed files with 16 additions and 5 deletions
|
@ -41,6 +41,18 @@
|
||||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c_gpio: i2c-gpio {
|
||||||
|
compatible = "i2c-gpio";
|
||||||
|
|
||||||
|
sda-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
|
||||||
|
scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
i2c-gpio,delay-us = <50>;
|
||||||
|
i2c-gpio,timeout-ms = <100>;
|
||||||
|
|
||||||
|
/* Semtech SX9512 */
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie {
|
&pcie {
|
||||||
|
@ -92,7 +104,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c {
|
&i2c {
|
||||||
status = "okay";
|
/* Uses i2c-gpio */
|
||||||
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
ðphy0 {
|
ðphy0 {
|
||||||
|
@ -101,7 +114,7 @@
|
||||||
|
|
||||||
&state_default {
|
&state_default {
|
||||||
gpio {
|
gpio {
|
||||||
groups = "uart2", "uart3";
|
groups = "i2c", "uart2", "uart3";
|
||||||
function = "gpio";
|
function = "gpio";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c {
|
&i2c_gpio {
|
||||||
clock-frequency = <1000>;
|
|
||||||
|
|
||||||
touch@2b {
|
touch@2b {
|
||||||
compatible = "semtech,sx9512";
|
compatible = "semtech,sx9512";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue