FW: need help getting SPI controller working on 405EX [PPM2009081200000033]

Tirumala Reddy Marri tmarri at amcc.com
Tue Aug 18 04:07:24 EST 2009


 

1) It looks like the correct entry in kilauea.dts file should be: 
208             IIC1: i2c at ef600500 { 
209                 compatible = "ibm,iic-405ex", "ibm,iic"; 
210                 reg = <ef600500 14>; 
211                 interrupt-parent = <&UIC0>; 
212                 interrupts = <7 4>; 
213                 #address-cells = <1>; 
214                 #size-cells = <0>; 
215             }; 
216 
217             SPI0: spi at ef600600 { 
218                 /* compatible = "ibm,iic-405ex", "ibm,iic"; */ 
219                 compatible = "amcc,scp-405ex"; 
220                 reg = <ef600600 6>; 
221                 interrupts = <8 4>; 
222                 interrupt-parent = <&UIC0>; 
223             }; 
224 
225             RGMII0: emac-rgmii at ef600b00 { 
226                 compatible = "ibm,rgmii-405ex", "ibm,rgmii"; 
227                 reg = <ef600b00 104>; 
228                 has-mdio; 
229             }; 
230 
231             EMAC0: ethernet at ef600900 { 

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.

Additional comments: 
- Ideally the file should be moved to drivers/spi, like all other spi
drivers. 
- Even in the internal release, the files do NOT compile properly,
because of missing file, need CONFIG_PINE, etc 
[support at localhost linux]$ make uImage 
scripts/kconfig/conf -s arch/powerpc/Kconfig 
  CHK     include/linux/version.h 
  CHK     include/linux/utsrelease.h 
  CALL    scripts/checksyscalls.sh 
  CHK     include/linux/compile.h 
  CALL    arch/powerpc/kernel/systbl_chk.sh 
  CC      drivers/scp/scp-dev.o 
drivers/scp/scp-dev.c:84:24: error: asm/ibm4xx.h: No such file or
directory 
drivers/scp/scp-dev.c:705: error: 'scpdev_init' undeclared here (not in
a function) 
make[2]: *** [drivers/scp/scp-dev.o] Error 1 
make[1]: *** [drivers/scp] Error 2 
make: *** [drivers] Error 2 
[support at localhost linux] 

Q: Marri, what do we need to provide to Nathan French ? 
Q: Fan, per Jinag-An's request, what is the procedure for cleaning this
up before releasing to Linux community ? 

Regards, Samuel 

-----Original Message----- 
From: support_reply at amcc.com [mailto:support_reply at amcc.com] 
Sent: Fri 8/7/2009 9:24 AM 
To: Samuel Wang 
Subject: FW: need help getting SPI controller working on 405EX
[PPM2009081200000033311192] 
  
Sender          : tmarri at amcc.com 
Tracking Number : PPM2009081200000033311192 
Pool            : PPC_MID 
Sent to         : "AMCC Product Support" <supportimc at amcc.com> 
Date            : 8/7/09 9:24 AM 
--- 

Forwarded by: Alan Millard 

(no comments entered) 
--- 

 

-----Original Message----- 
From: linuxppc-dev-bounces+tmarri=amcc.com at lists.ozlabs.org 
[mailto:linuxppc-dev-bounces+tmarri=amcc.com at lists.ozlabs.org] On Behalf

Of Nathan French 
Sent: Thursday, August 06, 2009 9:08 AM 
To: linuxppc-dev at lists.ozlabs.org 
Subject: need help getting SPI controller working on 405EX 

Hi, I am trying to add support for the 405EX's SPI controller on a 
Kilauea board.  I've added the below to the device tree (under 
plb/opb/): 

[nfrench at nfrench-laptop linux-2.6-denx]$ diff -C2 
arch/powerpc/boot/dts/kilauea.dts spi.dts 
*** arch/powerpc/boot/dts/kilauea.dts   2009-05-05 15:56:16.000000000 
-0700 
--- spi.dts     2009-08-06 08:42:19.000000000 -0700 
*************** 
*** 207,210 **** 
--- 207,221 ---- 
                                #size-cells = <0>; 
                        }; 
+             
+             SPI0: spi at ef600600 { 
+                 cell-index = <0>; 
+                 compatible = "ibm,spi-405ex", "ibm,spi"; 
+                 reg = <ef600600 6>; 
+                 interrupts = <8 4>; 
+                 interrupt-parent = <&UIC0>; 
+                 mode = "cpu"; 
+             }; 
  
                        RGMII0: emac-rgmii at ef600b00 { 

I've also compiled my kernel with the following enabled: 

        CONFIG_SPI=y 
        CONFIG_SPI_MASTER=y 
        CONFIG_SPI_SPIDEV=y 

I see this make it into the device tree after boot: 

        [root at 10.2.3.28 /]$ find /proc/device-tree/ | grep spi 
        /proc/device-tree/plb/opb/spi at ef600600 
        /proc/device-tree/plb/opb/spi at ef600600/name 
        /proc/device-tree/plb/opb/spi at ef600600/mode 
        /proc/device-tree/plb/opb/spi at ef600600/interrupt-parent 
        /proc/device-tree/plb/opb/spi at ef600600/interrupts 
        /proc/device-tree/plb/opb/spi at ef600600/reg 
        /proc/device-tree/plb/opb/spi at ef600600/compatible 
        /proc/device-tree/plb/opb/spi at ef600600/cell-index 

But I don't see any /dev/spidev* devices created or any mention of SPI 
at boot time.  I'm starting to suspect that I don't have the kernel 
configured right, otherwise I would see at least the SPI driver 
complaining about something, right? 

Thanks, 

Nathan French 

_______________________________________________ 
Linuxppc-dev mailing list 
Linuxppc-dev at lists.ozlabs.org 
https://lists.ozlabs.org/listinfo/linuxppc-dev 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090817/392ba01e/attachment-0001.htm>


More information about the Linuxppc-dev mailing list