Hi,
Currently iam working on imx6sololite ad7877 Touch screen Interfacing with SPI Communcation in kernel 3.10.
iam working on YOCTO Project and I did some modifications in device tree as mentioned in Below.
This is my DTSI FILE
ecspi2: ecspi@0200c000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
reg = <0x0200c000 0x4000>;
interrupts = <0 32 0x04>;
clocks = <&clks IMX6SL_CLK_ECSPI2>,
<&clks IMX6SL_CLK_ECSPI2>;
clock-names = "ipg", "per";
status = "disabled";
};
ecspi2 {
pinctrl_ecspi2_2:ecspi3grp-1 {
fsl,pins = <
MX6SL_PAD_ECSPI2_MISO__ECSPI2_MISO 0x100b1
MX6SL_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x100b1
MX6SL_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x100b1
>;
};
};
Here iam configured as SPI2 communication with MOSI and MISO and clk pins.
This is my DTS file.
&ecspi2 {
fsl,spi-num-chipselects = <2>;
cs-gpios =<&gpio4 15 0>;
status = "okay";
spidev0: spidev@0{
compatible="spidev";
spi-max-frequency = <500000>;
reg = <0>;
};
spidev1:spidev@1{
compatible = "fsl,ad7877";
cs-gpios = <&gpio1 27 0>;
pinctrl-0 = <&pinctrl_ecspi2_2>;
spi-max-frequency = <500000>;
reg = <1>;
interrupt-parent = <&gpio5>;
interrupts = <7 2>;
adi,swap-xy-axis-enable = <0>;
adi,x-plate-ohms = <620>;
adi,pressure-min = <0>;
adi,pressure-max = <1000>;
adi,x-min = <0>;
adi,x-max = <800>;
adi,y-min = <0>;
adi,y.max = <600>;
adi,first-conversion-delay = <3>;
adi,acquisition-time = <1>;
adi,averaging = <3>;
adi,pen-down-acquisition-interval = <1>;
adi,median = <2>;
};
};
IN SPI communication iam using two devices one is lcd and second one is ad7877 Touch controller.
Iam New to SPI Communication.Please clarify my doubts.
First Let me know few things ??
Please clarify my doubts.
Hi kondaveeti
please check
AD7877 Linux Driver Support. | EngineerZone
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------