changeset 533:09afc37e8069

armio.c: added support for C155 target
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 05 Nov 2018 09:54:16 +0000
parents 5c780d080afc
children 6c96725718c3
files src/cs/drivers/drv_core/armio/armio.c
diffstat 1 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c	Mon Nov 05 06:59:57 2018 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Mon Nov 05 09:54:16 2018 +0000
@@ -215,12 +215,27 @@
 
     /* setting of GPIOs as outputs also mimics what the original fw sets */
     *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09;
-  #elif defined(CONFIG_TARGET_PIRELLI)
+
+  #elif defined(CONFIG_TARGET_C155)
+    /* C155 GPIO config based on the available schematics */
+
+    /* GPIO out all zeros - the LCD backlight is OFF */
     *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
 
-    AI_ConfigBitAsOutput(1);	
+    AI_ConfigBitAsOutput(1);	/* LCD backlight control */
+    AI_ConfigBitAsOutput(2);	/* headset jack switch */
+    AI_ConfigBitAsOutput(3);	/* LCDA0 (?) */
+    AI_ConfigBitAsOutput(8);	/* MUSIC_A0 */
+    AI_ConfigBitAsOutput(12);	/* MUSIC_ON */
+
+  #elif defined(CONFIG_TARGET_PIRELLI)
+
+    *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
+
+    AI_ConfigBitAsOutput(1);
     AI_ConfigBitAsOutput(4);
     AI_ConfigBitAsOutput(7);
+
   #else	/* classic TI/Openmoko/FreeCalypso targets */
     // set IOs 1 and 8 to 13 as high
     // set IOs 0 and 2 to 7 as low
@@ -241,7 +256,7 @@
     #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
       AI_ConfigBitAsOutput(0);
     #endif
-    AI_ConfigBitAsOutput(1);	
+    AI_ConfigBitAsOutput(1);
     AI_ConfigBitAsOutput(2);
     #ifdef CONFIG_TARGET_GTAMODEM
       AI_ConfigBitAsOutput(3);