<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<title>RE: need help getting SPI controller working on 405EX
[PPM2009081200000033311192]</title>
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p><span style='font-size:10.0pt'>1) It looks like the correct entry in
kilauea.dts file should be:</span> <br>
<span style='font-size:10.0pt'>208
IIC1: i2c@ef600500 {</span> <br>
<span style='font-size:10.0pt'>209
compatible = "ibm,iic-405ex", "ibm,iic";</span> <br>
<span style='font-size:10.0pt'>210
reg = <ef600500 14>;</span> <br>
<span style='font-size:10.0pt'>211
interrupt-parent = <&UIC0>;</span> <br>
<span style='font-size:10.0pt'>212
interrupts = <7 4>;</span> <br>
<span style='font-size:10.0pt'>213
#address-cells = <1>;</span> <br>
<span style='font-size:10.0pt'>214
#size-cells = <0>;</span> <br>
<span style='font-size:10.0pt'>215
};</span> <br>
<span style='font-size:10.0pt'>216 </span><br>
<span style='font-size:10.0pt'>217
SPI0: spi@ef600600 {</span> <br>
<span style='font-size:10.0pt'>218
/* compatible = "ibm,iic-405ex", "ibm,iic"; */</span> <br>
<span style='font-size:10.0pt'>219
compatible = "amcc,scp-405ex";</span> <br>
<span style='font-size:10.0pt'>220
reg = <ef600600 6>;</span> <br>
<span style='font-size:10.0pt'>221
interrupts = <8 4>;</span> <br>
<span style='font-size:10.0pt'>222
interrupt-parent = <&UIC0>;</span> <br>
<span style='font-size:10.0pt'>223
};</span> <br>
<span style='font-size:10.0pt'>224 </span><br>
<span style='font-size:10.0pt'>225
RGMII0: emac-rgmii@ef600b00 {</span> <br>
<span style='font-size:10.0pt'>226
compatible = "ibm,rgmii-405ex", "ibm,rgmii";</span> <br>
<span style='font-size:10.0pt'>227
reg = <ef600b00 104>;</span> <br>
<span style='font-size:10.0pt'>228
has-mdio;</span> <br>
<span style='font-size:10.0pt'>229
};</span> <br>
<span style='font-size:10.0pt'>230 </span><br>
<span style='font-size:10.0pt'>231
EMAC0: ethernet@ef600900 {</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>2) Right now the e.g. scp-dev.c is in
drivers/scp directory in one of the internal release I have found, NOT in the
e.g. 2.6.29.</span><o:p></o:p></p>
<p><span style='font-size:10.0pt'>Additional comments:</span> <br>
<span style='font-size:10.0pt'>- Ideally the file should be moved to
drivers/spi, like all other spi drivers.</span> <br>
<span style='font-size:10.0pt'>- Even in the internal release, the files do NOT
compile properly, because of missing file, need CONFIG_PINE, etc</span> <br>
<span style='font-size:10.0pt'>[support@localhost linux]$ make uImage</span> <br>
<span style='font-size:10.0pt'>scripts/kconfig/conf -s arch/powerpc/Kconfig</span>
<br>
<span style='font-size:10.0pt'> CHK
include/linux/version.h</span> <br>
<span style='font-size:10.0pt'> CHK
include/linux/utsrelease.h</span> <br>
<span style='font-size:10.0pt'> CALL
scripts/checksyscalls.sh</span> <br>
<span style='font-size:10.0pt'> CHK
include/linux/compile.h</span> <br>
<span style='font-size:10.0pt'> CALL
arch/powerpc/kernel/systbl_chk.sh</span> <br>
<span style='font-size:10.0pt'> CC
drivers/scp/scp-dev.o</span> <br>
<span style='font-size:10.0pt'>drivers/scp/scp-dev.c:84:24: error:
asm/ibm4xx.h: No such file or directory</span> <br>
<span style='font-size:10.0pt'>drivers/scp/scp-dev.c:705: error: 'scpdev_init'
undeclared here (not in a function)</span> <br>
<span style='font-size:10.0pt'>make[2]: *** [drivers/scp/scp-dev.o] Error 1</span>
<br>
<span style='font-size:10.0pt'>make[1]: *** [drivers/scp] Error 2</span> <br>
<span style='font-size:10.0pt'>make: *** [drivers] Error 2</span> <br>
<span style='font-size:10.0pt'>[support@localhost linux]</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Q: Marri, what do we need to provide to
Nathan French ?</span> <br>
<span style='font-size:10.0pt'>Q: Fan, per Jinag-An's request, what is the
procedure for cleaning this up before releasing to Linux community ?</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Regards, Samuel</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>-----Original Message-----</span> <br>
<span style='font-size:10.0pt'>From: support_reply@amcc.com [<a
href="mailto:support_reply@amcc.com">mailto:support_reply@amcc.com</a>]</span> <br>
<span style='font-size:10.0pt'>Sent: Fri 8/7/2009 9:24 AM</span> <br>
<span style='font-size:10.0pt'>To: Samuel Wang</span> <br>
<span style='font-size:10.0pt'>Subject: FW: need help getting SPI controller
working on 405EX [PPM2009081200000033311192]</span> <br>
<span style='font-size:10.0pt'> </span> <br>
<span style='font-size:10.0pt'>Sender
: tmarri@amcc.com</span> <br>
<span style='font-size:10.0pt'>Tracking Number : PPM2009081200000033311192</span>
<br>
<span style='font-size:10.0pt'>Pool
: PPC_MID</span> <br>
<span style='font-size:10.0pt'>Sent
to : "AMCC Product
Support" <supportimc@amcc.com></span> <br>
<span style='font-size:10.0pt'>Date
: 8/7/09 9:24 AM</span> <br>
<span style='font-size:10.0pt'>---</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Forwarded by: Alan Millard</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>(no comments entered)</span> <br>
<span style='font-size:10.0pt'>---</span> <o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<p><span style='font-size:10.0pt'>-----Original Message-----</span> <br>
<span style='font-size:10.0pt'>From:
linuxppc-dev-bounces+tmarri=amcc.com@lists.ozlabs.org</span> <br>
<span style='font-size:10.0pt'>[<a
href="mailto:linuxppc-dev-bounces+tmarri=amcc.com@lists.ozlabs.org">mailto:linuxppc-dev-bounces+tmarri=amcc.com@lists.ozlabs.org</a>]
On Behalf</span> <br>
<span style='font-size:10.0pt'>Of Nathan French</span> <br>
<span style='font-size:10.0pt'>Sent: Thursday, August 06, 2009 9:08 AM</span> <br>
<span style='font-size:10.0pt'>To: linuxppc-dev@lists.ozlabs.org</span> <br>
<span style='font-size:10.0pt'>Subject: need help getting SPI controller
working on 405EX</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Hi, I am trying to add support for the
405EX's SPI controller on a</span> <br>
<span style='font-size:10.0pt'>Kilauea board. I've added the below to the
device tree (under</span> <br>
<span style='font-size:10.0pt'>plb/opb/):</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>[nfrench@nfrench-laptop linux-2.6-denx]$ diff
-C2</span> <br>
<span style='font-size:10.0pt'>arch/powerpc/boot/dts/kilauea.dts spi.dts</span>
<br>
<span style='font-size:10.0pt'>***
arch/powerpc/boot/dts/kilauea.dts 2009-05-05 15:56:16.000000000</span>
<br>
<span style='font-size:10.0pt'>-0700</span> <br>
<span style='font-size:10.0pt'>--- spi.dts 2009-08-06
08:42:19.000000000 -0700</span> <br>
<span style='font-size:10.0pt'>***************</span> <br>
<span style='font-size:10.0pt'>*** 207,210 ****</span> <br>
<span style='font-size:10.0pt'>--- 207,221 ----</span> <br>
<span style='font-size:10.0pt'>
#size-cells = <0>;</span> <br>
<span style='font-size:10.0pt'>
};</span> <br>
<span style='font-size:10.0pt'>+
</span><br>
<span style='font-size:10.0pt'>+
SPI0: spi@ef600600 {</span> <br>
<span style='font-size:10.0pt'>+
cell-index = <0>;</span> <br>
<span style='font-size:10.0pt'>+
compatible = "ibm,spi-405ex", "ibm,spi";</span> <br>
<span style='font-size:10.0pt'>+
reg = <ef600600 6>;</span> <br>
<span style='font-size:10.0pt'>+
interrupts = <8 4>;</span> <br>
<span style='font-size:10.0pt'>+
interrupt-parent = <&UIC0>;</span> <br>
<span style='font-size:10.0pt'>+
mode = "cpu";</span> <br>
<span style='font-size:10.0pt'>+
};</span> <br>
<span style='font-size:10.0pt'> </span><br>
<span style='font-size:10.0pt'>
RGMII0: emac-rgmii@ef600b00 {</span>
<o:p></o:p></p>
<p><span style='font-size:10.0pt'>I've also compiled my kernel with the
following enabled:</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>
CONFIG_SPI=y</span> <br>
<span style='font-size:10.0pt'> CONFIG_SPI_MASTER=y</span>
<br>
<span style='font-size:10.0pt'>
CONFIG_SPI_SPIDEV=y</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>I see this make it into the device tree after
boot:</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>
[root@10.2.3.28 /]$ find /proc/device-tree/ | grep spi</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600</span> <br>
<span style='font-size:10.0pt'> /proc/device-tree/plb/opb/spi@ef600600/name</span>
<br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/mode</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/interrupt-parent</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/interrupts</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/reg</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/compatible</span> <br>
<span style='font-size:10.0pt'>
/proc/device-tree/plb/opb/spi@ef600600/cell-index</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>But I don't see any /dev/spidev* devices
created or any mention of SPI</span> <br>
<span style='font-size:10.0pt'>at boot time. I'm starting to suspect that
I don't have the kernel</span> <br>
<span style='font-size:10.0pt'>configured right, otherwise I would see at least
the SPI driver</span> <br>
<span style='font-size:10.0pt'>complaining about something, right?</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Thanks,</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>Nathan French</span> <o:p></o:p></p>
<p><span style='font-size:10.0pt'>_______________________________________________</span>
<br>
<span style='font-size:10.0pt'>Linuxppc-dev mailing list</span> <br>
<span style='font-size:10.0pt'>Linuxppc-dev@lists.ozlabs.org</span> <br>
<span style='font-size:10.0pt'><a
href="https://lists.ozlabs.org/listinfo/linuxppc-dev">https://lists.ozlabs.org/listinfo/linuxppc-dev</a></span>
<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>