[ELDK] SPI Configuration and Driver for Sequoia

Steven A. Falco sfalco at harris.com
Tue Mar 16 14:33:54 CET 2010


Jason Hanna wrote:
> Hi All,
> 
> We're investigating development of a SPI driver for the Sequoia
> evaluation board we've been working with. We've been having some
> difficulty getting the correct kernel and device tree configuration so
> that the spi port is even recognized at start-up.
> 
> I see you guys have done some work with this in the past, but I'm not
> certain all the right driver patches were ever committed to the DENX
> or mainline kernels.
> 
> We've tried several variations in the kernel configuration and device
> tree, replacing IIC1 with a SPI0 entry - but still have had no luck.
> 
> Perhaps one of you can provide some more information and point me in
> the right direction?

Here is a working spi dts block for a board I am developing.

	Steve

			SPI0: spi at ef600900 {
				compatible = "ibm,ppc4xx-spi";
				reg = <0xef600900 0x00000007>;
				interrupts = <0x8 0x4>;
				interrupt-parent = <&UIC0>;
				#address-cells = <1>;
				#size-cells = <0>;

				/* WARNING: The protocol for re-flashing the
				 * front panel requires that FP_RSTN be 0
				 * during the entire programming operation.
				 *
				 * Therefore, we cannot specify FP_RSTN as the
				 * chip select here, because it will bounce
				 * around as the SPI driver does its thing, in
				 * violation of the Atmel protocol.
				 *
				 * Instead, we specify "no CS", and manage it
				 * outside of the spi subsystem.
				 *
				 * Note: even though we specify 50 MHz for the
				 * spi flash chips, the 440 will only do around
				 * 16 MHz.  This is because the CPU bus runs at
				 * 66.67 MHz, and the spi clock must divide by
				 * 4 or more.  So 16 MHz is the best we can do.
				 */
				gpios = <
					&GPIO0 0x16 0x1	/* MUK_VID_CONFN */
					&GPIO0 0x1c 0x1	/* MUK_AUD_CONFN */
					0		/* no CS */
					>;

				m25p16 at 0 {
					/* VIDEO BOOTROM (/dev/mtd9) */
					compatible = "st,m25p80";
					reg = <0>;
					spi-max-frequency = <50000000>;
				};

				m25p16 at 1 {
					/* AUDIO BOOTROM (/dev/mtd10) */
					compatible = "st,m25p80";
					reg = <1>;
					spi-max-frequency = <50000000>;
				};

				fpdlite at 2 {
					/* FPD Lite (/dev/spidev0.2) */
					compatible = "linux,spidev";
					reg = <2>;
					spi-max-frequency = <240000>;
				};
			};



> 
> Thanks!
> -jmh
> 
> Jason Hanna
> _______________________________________________
> eldk mailing list
> eldk at lists.denx.de
> http://lists.denx.de/mailman/listinfo/eldk
> 



More information about the eldk mailing list