diff options
author | hcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-03-13 16:00:39 +0000 |
---|---|---|
committer | hcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-03-13 16:00:39 +0000 |
commit | 02edb9eda7b8010adaaf0f6b910a1b008c870ba6 (patch) | |
tree | fe26fcd840ee8e1340736b499c599ec4b55997c6 /target/linux/at91/patches-2.6.21/015-simenable.patch | |
parent | aa3defff60b9e1766574b78c0a8f8c09878fbdbd (diff) |
at91: added new sim enable code as well as detection code to
differentiate between v1.0 and v1.5 hardware revisions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10600 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/at91/patches-2.6.21/015-simenable.patch')
-rw-r--r-- | target/linux/at91/patches-2.6.21/015-simenable.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/at91/patches-2.6.21/015-simenable.patch b/target/linux/at91/patches-2.6.21/015-simenable.patch new file mode 100644 index 0000000000..64ee4663fb --- /dev/null +++ b/target/linux/at91/patches-2.6.21/015-simenable.patch @@ -0,0 +1,58 @@ +diff -urN linux-2.6.21.5.old/arch/arm/mach-at91/board-vlink.c linux-2.6.21.5/arch/arm/mach-at91/board-vlink.c
+--- linux-2.6.21.5.old/arch/arm/mach-at91/board-vlink.c 2007-07-26 12:43:11.000000000 +0200
++++ linux-2.6.21.5/arch/arm/mach-at91/board-vlink.c 2007-08-20 16:56:56.000000000 +0200
+@@ -151,31 +151,37 @@
+ // at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
+
+ /* Other LED's */
+- at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
+- at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
+- at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
+- at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
+- at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
+- at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
++ at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
++ at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
++ at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
++ at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
++ at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
++ at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
++
++/* Test jig presence detection */
++ at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
+
+ /* SIM Cards */
+- at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
+- at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
+- at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
++ if (at91_get_gpio_value(AT91_PIN_PB8)) {
++ at91_set_gpio_output(AT91_PIN_PB11, 0);
++ at91_set_gpio_output(AT91_PIN_PB9, 1);
++ } else {
++ at91_set_gpio_output(AT91_PIN_PB11, 1);
++ at91_set_gpio_output(AT91_PIN_PB9, 0);
++ }
++
++ at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
+
+ /* GSM Module Control */
+- at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
+-
+-/* Test jig presence detection */
+- at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
++ at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
+
+ /* Power indicator */
+- at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
++ at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
+
+ /* USB Device control */
+- at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
+- at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
+- at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
++ at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
++ at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
++ at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
+
+ }
+
|