6 Replies Latest reply on Apr 1, 2016 6:19 PM by Intel Corporation

    Problem with LCD ILI9341 connected via SPI to GP111 chip-select pin.

    repu1sion

      Hi.

       

      I have an LCD with a ILI9341 controller connected to Intel Edison Breakout Board. Both based on custom PCB. Pins used to connect display are:

      MRAA 9 (GP111, SPI_2_FS1)

      MRAA 45 (GP45)

      MRAA 32 (GP46)

      MRAA 33 (GP48)

       

      It runs on default Yocto with 3.10.17

      UPM/MRAA example ili9341.cxx (https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/ili9341.cxx) doesn't work, saying pin GP111 is already busy.

      It is really busy:

      cat /sys/kernel/debug/gpio                                                                                                                                                                                

      GPIOs 0-191, pci/0000:00:0c.0, 0000:00:0c.0:

      gpio-41  (sysfs           ) in  lo
      gpio-45  (sysfs           ) out hi
      gpio-46  (sysfs           ) out hi
      gpio-48  (sysfs           ) out hi
      gpio-49  (sysfs           ) out lo
      gpio-61  (SW1UI4          ) in  hi
      gpio-64  (bcm43xx_irq     ) in  hi
      gpio-71  (bcm_bt_lpm      ) out lo
      gpio-77  (sd_cd           ) in  hi
      gpio-96  (vwlan           ) out hi

      gpio-111 (Arduino Shield SS   ) out hi                     <-------- busy pin

      gpio-124 (hsu             ) in  hi
      gpio-125 (hsu             ) in  hi
      gpio-126 (hsu             ) in  hi
      gpio-127 (hsu             ) in  hi
      gpio-128 (hsu             ) in  lo
      gpio-129 (hsu             ) in  hi
      gpio-130 (hsu             ) in  hi
      gpio-131 (hsu             ) in  hi
      gpio-132 (hsu             ) in  lo
      gpio-133 (hsu             ) out lo
      gpio-134 (hsu             ) in  hi
      gpio-184 (bcm_bt_lpm      ) out lo
      gpio-185 (bcm_bt_lpm      ) in  lo

       

      Then I found who uses it in kernel. Here it is:

      linux/arch/x86/platform/intel-mid/device_libs/platform_spidev.c
      in menuconfig its CONFIG_SPI_INTEL_MID_SSP

      Description from menuconfig:

      This is the unified SSP SPI slave controller driver for the Intel                                                                                                                                                                 
        │ MID platforms (Moorestown, Medfield, Clovertrial and                                                                                                                                                                              
        │ Merrifield), primarily used to implement a SPI host controller                                                                                                                                                                    

        │ driver over a SSP host controller

       

      If I disable this driver -  I can't find any spi device in kernel then.

      And upm/mraa example says:

      root@edison:~/upm/examples/c++# ./ili9341

      terminate called after throwing an instance of 'std::invalid_argument'

        what():  Error initialising SPI bus

      Aborted

       

      So how to handle this issue?

      Should I connect LCD to another chip-select, GP110? Would it help? Or there is some way to use chip-select pin GP111?

       

      Regards.