--- a/arch/arm/mach-at91/Kconfig 2011-07-22 14:16:44.000000000 -0400 +++ b/arch/arm/mach-at91/Kconfig 2011-09-09 10:21:01.333414780 -0400 @@ -489,6 +489,16 @@ system clock (of at least several MHz), rounding is less of a problem so it can be safer to use a decimal values like 100. +if ARCH_AT91SAM9G20 + +config SAM9G20_SPI1 + bool "SPI on PB0 to PB2" + help + Select this to have silicon based SPI master on PB0, PB1, PB2 + and chip select on PB3 or PC5. + +endif + choice prompt "Select a UART for early kernel messages" --- a/arch/arm/mach-at91/board-foxg20.c 2011-07-22 14:16:44.000000000 -0400 +++ b/arch/arm/mach-at91/board-foxg20.c 2011-09-05 10:19:02.123110451 -0400 @@ -135,6 +135,23 @@ .bus_num = 0, }, #endif + +#ifdef CONFIG_SAM9G20_SPI1 + { + .modalias = "mmc_spi", + .chip_select = 0, /* PB3 */ + // .max_speed_hz = 15 * 1000 * 1000, + .max_speed_hz = 10 * 1000 * 1000, + .bus_num = 1, + }, + { + .modalias = "spidev", + .chip_select = 1, /* PC5 */ + // .max_speed_hz = 15 * 1000 * 1000, + .max_speed_hz = 10 * 1000 * 1000, + .bus_num = 1, + }, +#endif };