Changeset 2830


Ignore:
Timestamp:
08/24/07 21:38:25 (6 years ago)
Author:
laforge
Message:

make u-boot actaully work on the first GTA02v2 samples:

  • memory is x32, has 9-bit column addresses and a 64/64 bank6/7 split
  • cpu powers up with low voltage, so don't go to 304MHz PLL before reconfiguring core power
  • disable all internal pull-down resistors
  • switch vibrator and LED into output mode, since PWM is not active yet after power-up
  • switch GPJ4 (nGSM_EN) to high to activate serial console on debug board
  • don't power-cycle DOWN2 converter, there's now way more than just the glamo
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/u-boot/patches/uboot-gta02.patch

    r2825 r2830  
    9292--- /dev/null 
    9393+++ u-boot/board/neo1973/gta02/gta02.c 
    94 @@ -0,0 +1,356 @@ 
     94@@ -0,0 +1,370 @@ 
    9595+/* 
    9696+ * (C) 2006-2007 by OpenMoko, Inc. 
     
    139139+#define POWER_KEY_SECONDS      2 
    140140+ 
     141+#if defined(CONFIG_ARCH_GTA02_v1) 
    141142+//#define M_MDIV       0x7f            /* Fout = 405.00MHz */ 
    142143+#define M_MDIV 0x7d            /* Fout = 399.00MHz */ 
     
    147148+#define U_M_PDIV       0x2 
    148149+#define U_M_SDIV       0x2 
     150+#else 
     151+/* configure GTA02v2 to low speed until we've increased the voltage */ 
     152+#define M_MDIV 80 
     153+#define M_PDIV 8 
     154+#define M_SDIV 0 
     155+#define U_M_MDIV 80 
     156+#define U_M_PDIV 8 
     157+#define U_M_SDIV 1 
     158+#endif 
    149159+ 
    150160+unsigned int neo1973_wakeup_cause; 
     
    213223+       gpio->GPADAT |= (1 << 16);      /* Set GPA16 to high (nNAND_WP) */ 
    214224+ 
    215 +       gpio->GPBCON = 0x001555AA; 
    216 +       //gpio->GPBUP = 0x000007FF; 
     225+       gpio->GPBCON = 0x00155555; 
     226+       gpio->GPBUP = 0x000007FF; 
    217227+ 
    218228+       gpio->GPCCON = 0x55415155; 
    219 +       //gpio->GPCUP = 0x0000FFFF; 
     229+       gpio->GPCUP = 0x0000FFFF; 
    220230+ 
    221231+       gpio->GPDCON = 0x55555555; 
    222 +       //gpio->GPDUP = 0x0000FFFF; 
     232+       gpio->GPDUP = 0x0000FFFF; 
    223233+ 
    224234+       gpio->GPECON = 0xAAAAAAAA; 
    225 +       //gpio->GPEUP = 0x0000FFFF; 
     235+       gpio->GPEUP = 0x0000FFFF; 
    226236+ 
    227237+       gpio->GPFCON = 0x0000AAAA; 
    228 +       //gpio->GPFUP = 0x000000FF; 
     238+       gpio->GPFUP = 0x000000FF; 
    229239+ 
    230240+       gpio->GPGCON = 0x0156FE7A; 
    231 +       //gpio->GPGUP = 0x0000FFFF; 
     241+       gpio->GPGUP = 0x0000FFFF; 
    232242+ 
    233243+       gpio->GPHCON = 0x001AAAAA; 
    234 +       //gpio->GPHUP = 0x000007FF; 
     244+       gpio->GPHUP = 0x000007FF; 
    235245+ 
    236246+       gpio->GPJCON = 0x1551544; 
     247+       gpio->GPJUP = 0x1ffff; 
     248+       gpio->GPJDAT |= (1 << 4);       /* Set GPJ4 to high (nGSM_EN) */ 
    237249+#else 
    238250+#error Please define GTA02 version 
     
    263275+       pcf50633_init(); 
    264276+ 
     277+#if defined(CONFIG_ARCH_GTA02_v1) 
    265278+       /* Glamo3362 reset and power cycle */ 
    266279+       gpio->GPJDAT &= ~0x000000001; 
     
    269282+       pcf50633_reg_write(PCF50633_REG_DOWN2ENA, 0x2); 
    270283+       gpio->GPJDAT |= 0x000000001; 
     284+#endif 
    271285+ 
    272286+#if 0 
     
    13011315 #define B1_Tacp                        0x0 
    13021316 #define B1_PMC                 0x0 
    1303 @@ -112,7 +112,8 @@ 
    1304  #if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) 
     1317@@ -109,16 +109,18 @@ 
     1318  
     1319 #define B6_MT                  0x3     /* SDRAM */ 
     1320 #define B6_Trcd                        0x1     /* 3clk */ 
     1321-#if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) 
     1322+#if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \ 
     1323+    defined(CONFIG_ARCH_GTA02_v2) 
    13051324 #define B6_SCAN                        0x1     /* 9bit */ 
     1325+#define B7_SCAN                        0x1     /* 9bit */ 
    13061326 #elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ 
    13071327-      defined(CONFIG_ARCH_GTA01B_v4) 
    13081328+      defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) || \ 
    1309 +      defined(CONFIG_ARCH_GTA02_v2) 
    13101329 #define B6_SCAN                        0x2     /* 10bit */ 
     1330+#define B7_SCAN                        0x2     /* 10bit */ 
    13111331 #endif 
    13121332  
    1313 @@ -165,6 +166,27 @@ 
     1333 #define B7_MT                  0x3     /* SDRAM */ 
     1334 #define B7_Trcd                        0x1     /* 3clk */ 
     1335-#define B7_SCAN                        0x2     /* 10bit */ 
     1336  
     1337 /* REFRESH parameter */ 
     1338 #define REFEN                  0x1     /* Refresh enable */ 
     1339@@ -165,6 +167,27 @@ 
    13141340        str     r1, [r0] 
    13151341 #endif 
     
    13391365        mov     pc, lr 
    13401366  
     1367@@ -182,6 +205,10 @@ 
     1368     .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) 
     1369     .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) 
     1370     .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) 
     1371+#if defined(CONFIG_ARCH_GTA02_v2) 
     1372+    .word 0xb1 
     1373+#else 
     1374     .word 0xb2 
     1375+#endif 
     1376     .word 0x30 
     1377     .word 0x30 
    13411378Index: u-boot/board/neo1973/gta02/pcf50633.c 
    13421379=================================================================== 
Note: See TracChangeset for help on using the changeset viewer.