[ELDK] Adding an SPI slave to the MPC5200

Stefano Babic sbabic at denx.de
Fri Jun 11 11:35:53 CEST 2010


Chris Alfred wrote:
> We have a Micrel KS8995M connected via SPI to the MPC5200 dedicated 
> SPI bus. I found the spi_ks8995m.c driver by Gabor Juhos and have 
> successfully added the Kconfig and build stuff.

This is not an ELDK related question, you will find more support on the
powerpc mailing list. And I cannot find this driver in the actual Linux
mainline. I can suppose this driver is an implementation for OpenWrt,
does anyone tested it for PowerPC ?

> 
> In our board .dts I added:
> 
>   spi at f00 {
>    #address-cells = <1>;
>    #size-cells = <0>;
>    compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
>    reg = <0xf00 0x20>;
>    interrupts = <2 13 0 2 14 0>;
>    interrupt-parent = <&mpc5200_pic>;
> 
>    ethernet-switch at 0 {
>     compatible = "micrel,ks8995m";

You already made the binding. Is this the correct name ? Does it match
the driver name in spi_ks8995m.c ?

> The spi_ks8995m.c driver init seems to be successfully called during 
> boot:
> 
> [    0.958464] spi_master spi32766: registered MPC5200 SPI bus
> [    0.965725] Micrel/Kendin KS8995 Ethernet switch SPI driver version 
> 0.1.1
> [    0.973191] Micrel/Kendin KS8995 Ethernet switch SPI driver init 
> returning:0
> 
> How do I bind the ks8995m driver to the SPI bus on the MPC5200?

It seems init is called but probe not. Without knowing your code looks
like you have not correctly set the compatible field in the dts file.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the eldk mailing list