Hi,
(It seems that my previous post has been deleted)
I have an iMX6UL with 4.1.15 kernel.
I have few SPI slaves declared in dtsi file :
pinctrl_ecspi1: ecspi1grp { fsl,pins = < MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK 0x1b0b1 MX6UL_PAD_LCD_DATA22__ECSPI1_MOSI 0x1b0b1 MX6UL_PAD_LCD_DATA23__ECSPI1_MISO 0x1b0b1 >; }; pinctrl_ecspi1_cs: ecspi1csgrp { fsl,pins = < MX6UL_PAD_CSI_DATA05__GPIO4_IO26 0x17059 MX6UL_PAD_LCD_DATA05__GPIO3_IO10 0x17059 MX6UL_PAD_LCD_DATA06__GPIO3_IO11 0x17059 MX6UL_PAD_LCD_DATA07__GPIO3_IO12 0x17059 MX6UL_PAD_GPIO1_IO00__GPIO1_IO00 0x17059 >; }; &ecspi1 { fsl,spi-num-chipselects = <5>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>; cs-gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>, <&gpio3 10 GPIO_ACTIVE_HIGH>, <&gpio3 11 GPIO_ACTIVE_HIGH>, <&gpio3 12 GPIO_ACTIVE_HIGH> , <&gpio1 0 GPIO_ACTIVE_HIGH>; status = "okay"; /* spidev examlpe */ spidev@0 { compatible = "spidev"; spi-max-frequency = <30000000>; reg = <0>; }; spidev@1 { compatible = "spidev"; spi-max-frequency = <30000000>; reg = <1>; }; spidev@2 { compatible = "spidev"; spi-max-frequency = <30000000>; reg = <2>; }; spidev@3 { compatible = "spidev"; spi-max-frequency = <30000000>; reg = <3>; }; spidev@4 { compatible = "spidev"; spi-max-frequency = <30000000>; reg = <4>; }; };
All the SPI are working properly except "spidev@4"
spidev0.4 exist in /dev/ and when I "cat /sys/kernel/debug/gpio", I see this configuration for gpio-0 which seems correct:
gpio-0 (spi_imx ) out lo
Nevertheless, when I try a spi communication on spidev0.4, the program blocks and is in uninterruptible sleep whereas it correctly works on other spidev0.X.
I checked what's happening using an oscilloscope, I see the data sent on the SI and the clock works.
However, the CS (on gpio-0) is correctly set to 0 and stays at 0.
Did I forgot something in the dtsi file ?
Hi okwaj
one can try to add to "cs-gpios" GPIO1_IO00.
Best regards
igor