summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-2.6.28/mtcdp/linux-2.6.28-mach-at91.patch
blob: 7e42eda19896b598450a8ab6bf151ce5a10291fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
diff -uprN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28-vanilla/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6.28/arch/arm/mach-at91/at91sam9260_devices.c
--- linux-2.6.28-vanilla/arch/arm/mach-at91/at91sam9260_devices.c	2008-12-24 17:26:37.000000000 -0600
+++ linux-2.6.28/arch/arm/mach-at91/at91sam9260_devices.c	2010-10-18 09:38:23.000000000 -0500
@@ -183,9 +183,9 @@ void __init at91_add_device_eth(struct a
 		at91_set_B_periph(AT91_PIN_PA25, 0);	/* ERX2 */
 		at91_set_B_periph(AT91_PIN_PA26, 0);	/* ERX3 */
 		at91_set_B_periph(AT91_PIN_PA27, 0);	/* ERXCK */
-		at91_set_B_periph(AT91_PIN_PA23, 0);	/* ETX2 */
-		at91_set_B_periph(AT91_PIN_PA24, 0);	/* ETX3 */
-		at91_set_B_periph(AT91_PIN_PA22, 0);	/* ETXER */
+		at91_set_B_periph(AT91_PIN_PA10, 0);	/* ETX2 -- DJS was PA23 */
+		at91_set_B_periph(AT91_PIN_PA11, 0);	/* ETX3 -- DJS was PA24 */
+		/*at91_set_B_periph(AT91_PIN_PA22, 0);*/	/* ETXER -- DJS commented this out */
 	}
 
 	eth_data = *data;
diff -uprN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28-vanilla/arch/arm/mach-at91/board-sam9g20ek.c linux-2.6.28/arch/arm/mach-at91/board-sam9g20ek.c
--- linux-2.6.28-vanilla/arch/arm/mach-at91/board-sam9g20ek.c	2008-12-24 17:26:37.000000000 -0600
+++ linux-2.6.28/arch/arm/mach-at91/board-sam9g20ek.c	2010-10-18 09:30:44.000000000 -0500
@@ -25,6 +25,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/at73c213.h>
 #include <linux/clk.h>
+#include <mach/at91_rtt.h>
 
 #include <mach/hardware.h>
 #include <asm/setup.h>
@@ -57,12 +58,23 @@ static void __init ek_map_io(void)
 	/* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
 	at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
 
+	/* USART2 on ttyS3. (Rx,Tx) 20090608 TAB added for GPS */
+	at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
+
 	/* set serial console to ttyS0 (ie, DBGU) */
 	at91_set_serial_console(0);
 }
 
 static void __init ek_init_irq(void)
 {
+	/*
+	 * Ensure RTT interrupts are disabled
+	 */ 
+	u32 mr;
+	mr = __raw_readl(AT91_VA_BASE_SYS + AT91_RTT + AT91_RTT_MR);
+	__raw_writel(mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN),
+			AT91_VA_BASE_SYS + AT91_RTT + AT91_RTT_MR);
+
 	at91sam9260_init_interrupts(NULL);
 }
 
@@ -78,8 +90,8 @@ static struct at91_usbh_data __initdata 
  * USB Device port
  */
 static struct at91_udc_data __initdata ek_udc_data = {
-	.vbus_pin	= AT91_PIN_PC5,
-	.pullup_pin	= 0,		/* pull-up driven by UDC */
+	.vbus_pin	= AT91_PIN_PC12,	/* DJS -- was AT91_PIN_PC5, */
+	.pullup_pin	= 0,			/* pull-up driven by UDC */
 };
 
 
@@ -103,6 +115,16 @@ static struct spi_board_info ek_spi_devi
 	},
 #endif
 #endif
+	{
+		.modalias	= "mts-io-sregout",
+		.chip_select	= 0,
+		.bus_num	= 1,
+	},
+	{
+		.modalias	= "mts-io-board-temp",
+		.chip_select	= 2,
+		.bus_num	= 1,
+	},
 };
 
 
@@ -111,7 +133,7 @@ static struct spi_board_info ek_spi_devi
  */
 static struct at91_eth_data __initdata ek_macb_data = {
 	.phy_irq_pin	= AT91_PIN_PA7,
-	.is_rmii	= 1,
+	.is_rmii	= 0,		/* DJS -- changed from 1 to 0 since using MII */
 };
 
 
@@ -120,22 +142,53 @@ static struct at91_eth_data __initdata e
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name   = "Bootstrap",
-		.offset = 0,
-		.size   = 4 * SZ_1M,
+		.name	= "MTNCG-NANDFlash",
+		.offset	= 0,
+		.size	= 256*1024*1024,
+	},
+	{
+		.name	= "AT91Bootstrap",
+		.offset	= 0,
+		.size	= 128*1024,
+	},
+	{
+		.name	= "UBoot",
+		.offset	= 128*1024,
+		.size	= 256*1024,
 	},
 	{
-		.name	= "Partition 1",
-		.offset	= MTDPART_OFS_NXTBLK,
-		.size	= 60 * SZ_1M,
+		.name	= "UBoot Config",
+		.offset	= 384*1024,
+		.size	= 128*1024,
 	},
 	{
-		.name	= "Partition 2",
-		.offset	= MTDPART_OFS_NXTBLK,
+		.name	= "UBoot Redundant Config",
+		.offset	= 512*1024,
+		.size	= 128*1024,
+	},
+	{
+		.name	= "uImage",
+		.offset	= 640*1024,
+		.size	= 59*128*1024,
+	},
+	{
+		.name	= "Config",
+		.offset	= 64*128*1024,
+		.size	= 64*128*1024,
+	},
+	{
+		.name	= "Oem Config",
+		.offset	= 128*128*1024,
+		.size	= 64*128*1024,
+	},
+	{
+		.name	= "Rootfs",
+		.offset	= 192*128*1024,
 		.size	= MTDPART_SIZ_FULL,
 	},
 };
 
+
 static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
 {
 	*num_partitions = ARRAY_SIZE(ek_nand_partition);
@@ -159,11 +212,13 @@ static struct atmel_nand_data __initdata
 
 /*
  * MCI (SD/MMC)
- * det_pin, wp_pin and vcc_pin are not connected
+ * vcc_pin is not connected
  */
 static struct at91_mmc_data __initdata ek_mmc_data = {
 	.slot_b		= 1,
 	.wire4		= 1,
+	.det_pin	= AT91_PIN_PA6,		/* DJS -- was ... not connected */
+	.wp_pin		= AT91_PIN_PA9,		/* DJS -- was ... not connected */
 };
 
 
@@ -171,17 +226,12 @@ static struct at91_mmc_data __initdata e
  * LEDs
  */
 static struct gpio_led ek_leds[] = {
-	{	/* "bottom" led, green, userled1 to be defined */
-		.name			= "ds5",
-		.gpio			= AT91_PIN_PA6,
+	{	/* "status" led, green */
+		.name			= "status",
+		.gpio			= AT91_PIN_PA30,	/* DJS -- was AT91_PIN_PA9, */
 		.active_low		= 1,
-		.default_trigger	= "none",
-	},
-	{	/* "power" led, yellow */
-		.name			= "ds1",
-		.gpio			= AT91_PIN_PA9,
 		.default_trigger	= "heartbeat",
-	}
+	},
 };
 
 static void __init ek_board_init(void)