<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 2:41 PM, John Hawley <span dir="ltr"><<a href="mailto:john.hawley@intel.com" target="_blank">john.hawley@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> I saw the thread 'Adding an SPI device to the Minnowboard' from late<br>
> 2013 and 'SPI support on minnowboard v1' from Aug 2014.<br>
><br>
> Darren Hart notes:<br>
> Ultimately we want to do things like this without board files by using<br>
> the _DSD mechanisms introduced by the ACPI 5.1 specification last week<br>
><br>
> I just wanted to confirm the ACPI mechanism is not the recommended way<br>
> yet, and that using low-speed-spidev.c as a template is still the way to go.<br>
<br>
</span>The answer to that will depend on what kernel you are intending to<br>
target.  Kernel's with ACPI 5.1 _DSD support, I think you'd want to push<br>
on that.  Older kernels without that, likely spidev or a more targeted<br>
driver.</blockquote><div><br></div><div>Currently, I am targeting 3.17.  3.17 does not have ACPI 5.1 _DSD support, correct?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
> Additional q:<br>
> How do you tell the SPI controller that you have an active-high instead<br>
> of the usual active-low device?  Is it correct to do a bitwise or with<br>
> SPI_CS_HIGH (0x4) with your SPI_MODE in your spi_board_info struct, like:<br>
> .mode = SPI_MODE_0 | SPI_CS_HIGH<br>
<br>
</span>That should work, but take my statement with a grain of salt as I<br>
haven't tried it with a device.<br></blockquote><div><br></div><div>It seems to have no effect that I can discern.  Pin 5 idles at 3.3V whether I have</div><div> .mode = SPI_MODE_3 | SPI_CS_HIGH<br></div><div>-or-</div><div>.mode = SPI_MODE_3<br></div><div><br></div><div>I threw in a</div><div>pr_info("SPI mode=%i\n", cod_spi_board_info.mode);</div><div>to sanity check that I am setting the mode to what I think I am (3 or 7).</div><div><br></div><div>Any debugging ideas?</div><div>What is the best way to learn more about the SPI master?  It's built into the CPU, correct?</div><div>This smells in the ballpark of relatedness: <a href="http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/263467.html">http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/263467.html</a></div><div>I don't grok that patch, but I confirmed my version of pxa2xx.c in my 3.17 tree appears to contain that change.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
- John 'Warthog9' Hawley<br>
_______________________________________________<br>
elinux-MinnowBoard mailing list<br>
<a href="mailto:elinux-MinnowBoard@lists.elinux.org">elinux-MinnowBoard@lists.elinux.org</a><br>
<a href="http://lists.elinux.org/mailman/listinfo/elinux-minnowboard" target="_blank">http://lists.elinux.org/mailman/listinfo/elinux-minnowboard</a><br>
</blockquote></div><br></div></div>