<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6627</bug_id>
          
          <creation_ts>2014-08-12 21:00:48 +0000</creation_ts>
          <short_desc>Minnowboard Max fails to load the SPI device</short_desc>
          <delta_ts>2019-04-04 14:33:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>1.6.1</version>
          <rep_platform>MinnowBoard Max</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bryan Smith">bryan</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>dvhart</cc>
    
    <cc>sjolley.yp.pm</cc>
    
    <cc>tom.zanussi</cc>
    
    <cc>warthog9</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45098</commentid>
    <comment_count>0</comment_count>
    <who name="Bryan Smith">bryan</who>
    <bug_when>2014-08-12 21:00:48 +0000</bug_when>
    <thetext>Upon boot two spi modules are loaded but no SPI device is found at /dev/spidev.*
spi_pxa2xx_pci          2317  0 
spi_pxa2xx_platform    15607  0 

When I manually rmmod spi-pxa2xx-pci then reload it I get the following error:
[  597.682946] pxa2xx_spi_pci: probe of 0000:00:1e.5 failed with error -17

I&apos;m using the core-image-sato-intel-corei7-64.hddimg image from the link below

http://downloads.yoctoproject.org/releases/yocto/yocto-1.6.1/machines/intel-corei7-64/intel-corei7-64-1.0-daisy-1.6.1.tar.bz2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45099</commentid>
    <comment_count>1</comment_count>
    <who name="John &apos;Warthog9&apos; Hawley">warthog9</who>
    <bug_when>2014-08-12 21:33:30 +0000</bug_when>
    <thetext>Fixing the filing status</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45100</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-08-12 21:46:54 +0000</bug_when>
    <thetext>The pxa2xx_spi* driver is for the master bus device, the bus should show up under:

/sys/class/spi_master/spi0

spidev devices are typically enumerated via boardfiles, or a firmware description, such as Device Tree or ACPI _DSD (new this month). For example boardfiles, see:

https://github.com/MinnowBoard/minnow-max-extras/blob/master/modules/calamari/calamari.c

And for a spidev boardfile see:
https://github.com/MinnowBoard/minnow-max-extras/blob/master/modules/low-speed-spidev/low-speed-spidev.c

All that said, the error you reported should not occur when configured in PCI mode with the SPI device enabled in firmware. We need to attempt to reproduce with the image you provided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45101</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-08-12 22:39:54 +0000</bug_when>
    <thetext>Using the image from the opening comment, with the firmware configured in PCI mode, with SPI enabled:

root@intel-corei7-64:~# lspci | grep SPI
00:1e.5 Serial bus controller [0c80]: Intel Corporation ValleyView LPIO1 SPI Controller (rev 0c)

root@intel-corei7-64:~# uname -r
3.14.4-yocto-standard

root@intel-corei7-64:~# lsmod | grep pxa
spi_pxa2xx_pci          2317  0
spi_pxa2xx_platform    15607  0

root@intel-corei7-64:~# ls /sys/class/spi_master/
spi0

Everything is working as expected on boot.

However, if I unload the to modules listed above and attempt to load the pci alone:
root@intel-corei7-64:~# modprobe spi_pxa2xx_pci
[  218.128831] pxa2xx_spi_pci: probe of 0000:00:1e.5 failed with error -17
(The driver should probably attempt to request the platform driver)

But if I first load the platform driver:
root@intel-corei7-64:~# modprobe spi_pxa2xx_platform
root@intel-corei7-64:~# modprobe spi_pxa2xx_pci
root@intel-corei7-64:~# lsmod | grep pxa
spi_pxa2xx_platform    15607  0
spi_pxa2xx_pci          2317  0

It loads as expected.

Unfortunately, the spi master doesn&apos;t appear under /sys/class/spi_master/.

While these work on first boot, unloading and reloading doesn&apos;t work. I suspect this is a bug. Next step would be to determine if this also fails on mainline, and then either do a backport or provide a fix there and then backport.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83436</commentid>
    <comment_count>4</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2019-04-04 14:33:01 +0000</bug_when>
    <thetext>No longer driving fixes for Minnowboard Max.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>