From 6325b7780dad8be26ba6fc25ef88ba338c50205b Mon Sep 17 00:00:00 2001 From: Grzegorz Bernacki Date: Fri, 12 Jun 2009 11:33:52 +0200 Subject: mpc52xx: Add SPI driver. Signed-off-by: Grzegorz Bernacki --- include/mpc5xxx.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include') diff --git a/include/mpc5xxx.h b/include/mpc5xxx.h index 463d5ae4b19..476d1498ccf 100644 --- a/include/mpc5xxx.h +++ b/include/mpc5xxx.h @@ -392,6 +392,24 @@ #define I2C_IF 0x02 #define I2C_RXAK 0x01 +/* SPI control register 1 bits */ +#define SPI_CR_LSBFE 0x01 +#define SPI_CR_SSOE 0x02 +#define SPI_CR_CPHA 0x04 +#define SPI_CR_CPOL 0x08 +#define SPI_CR_MSTR 0x10 +#define SPI_CR_SWOM 0x20 +#define SPI_CR_SPE 0x40 +#define SPI_CR_SPIE 0x80 + +/* SPI status register bits */ +#define SPI_SR_MODF 0x10 +#define SPI_SR_WCOL 0x40 +#define SPI_SR_SPIF 0x80 + +/* SPI port data register bits */ +#define SPI_PDR_SS 0x08 + /* Programmable Serial Controller (PSC) status register bits */ #define PSC_SR_CDE 0x0080 #define PSC_SR_RXRDY 0x0100 -- cgit v1.2.3 From f1f66edfc76f4a9f5b9f63972d90309784a8cae5 Mon Sep 17 00:00:00 2001 From: Grzegorz Bernacki Date: Fri, 12 Jun 2009 11:33:53 +0200 Subject: digsy MTC: Add SPI support. Signed-off-by: Grzegorz Bernacki --- include/configs/digsy_mtc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h index 66badd70243..0cc2a8d992f 100644 --- a/include/configs/digsy_mtc.h +++ b/include/configs/digsy_mtc.h @@ -100,6 +100,7 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO #define CONFIG_CMD_SAVES +#define CONFIG_CMD_SPI #define CONFIG_CMD_USB #if (TEXT_BASE == 0xFF000000) @@ -136,6 +137,12 @@ "protect on FFF00000 +${filesize}\0" \ "" +/* + * SPI configuration + */ +#define CONFIG_HARD_SPI 1 +#define CONFIG_MPC52XX_SPI 1 + /* * I2C configuration */ -- cgit v1.2.3 From 1260233982f7dfbdfd1adee12daa95a0c0e84a43 Mon Sep 17 00:00:00 2001 From: Grzegorz Bernacki Date: Fri, 12 Jun 2009 11:33:55 +0200 Subject: digsy mtc: Add description to GPIO initial configuration. Signed-off-by: Grzegorz Bernacki --- include/configs/digsy_mtc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h index 0cc2a8d992f..558010fa75e 100644 --- a/include/configs/digsy_mtc.h +++ b/include/configs/digsy_mtc.h @@ -248,6 +248,22 @@ /* * GPIO configuration + * use pin gpio_wkup_6 as second SDRAM chip select (mem_cs1) + * Bit 0 (mask 0x80000000) : 0x1 + * SPI on Tmr2/3/4/5 pins + * Bit 2:3 (mask 0x30000000) : 0x2 + * ATA cs0/1 on csb_4/5 + * Bit 6:7 (mask 0x03000000) : 0x2 + * Ethernet 100Mbit with MD + * Bits 12:15 (mask 0x000f0000): 0x5 + * USB - Two UARTs + * Bits 18:19 (mask 0x00003000) : 0x2 + * PSC3 - USB2 on PSC3 + * Bits 20:23 (mask 0x00000f00) : 0x1 + * PSC2 - CAN1&2 on PSC2 pins + * Bits 25:27 (mask 0x00000070) : 0x1 + * PSC1 - AC97 functionality + * Bits 29:31 (mask 0x00000007) : 0x2 */ #define CONFIG_SYS_GPS_PORT_CONFIG 0xA2552112 -- cgit v1.2.3