Author: wmb Date: Mon Dec 20 22:00:05 2010 New Revision: 2091 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2091
Log: OLPC 1.75 - Pin assignment changes for A2, guarded by [ifdef] cl2-a1
Modified: cpu/arm/olpc/1.75/fw.bth cpu/arm/olpc/1.75/rtc.fth dev/olpc/dcon/mmp2dcon.fth dev/olpc/mmp2camera/platform.fth
Modified: cpu/arm/olpc/1.75/fw.bth ============================================================================== --- cpu/arm/olpc/1.75/fw.bth Mon Dec 20 21:58:26 2010 (r2090) +++ cpu/arm/olpc/1.75/fw.bth Mon Dec 20 22:00:05 2010 (r2091) @@ -163,13 +163,44 @@ fload ${BP}/cpu/x86/pc/olpc/gridmap.fth \ Gridded display tools fload ${BP}/cpu/x86/pc/olpc/via/copynand.fth
+fload ${BP}/cpu/arm/mmp2/keypad.fth +[ifndef] cl2-a1 +stand-init: keypad + keypad-on + 8 keypad-direct-mode +; +: keypad-bit ( n keypad out-mask key-mask -- n' keypad ) + third invert and if ( n keypad out-mask ) + rot or swap ( n' keypad ) + else ( n keypad out-mask ) + drop ( n keypad ) + then ( n' keypad ) +; +[then] + +fload ${BP}/cpu/x86/pc/olpc/gamekeynames.fth + : game-key@ ( -- n ) - 0 + 0 ( n ) +[ifdef] cl2-a1 d# 16 gpio-pin@ 0= if h# 80 or then \ O d# 17 gpio-pin@ 0= if h# 02 or then \ Check d# 18 gpio-pin@ 0= if h# 100 or then \ X d# 19 gpio-pin@ 0= if h# 01 or then \ Square d# 20 gpio-pin@ 0= if h# 40 or then \ Rotate +[else] + d# 15 gpio-pin@ 0= if button-rotate or then ( n ) + keypad-scan ( n keypad ) + button-o h# 01 keypad-bit ( n' keypad ) + button-check h# 02 keypad-bit ( n' keypad ) + button-x h# 04 keypad-bit ( n' keypad ) + button-square h# 08 keypad-bit ( n' keypad ) + rocker-up h# 10 keypad-bit ( n' keypad ) + rocker-right h# 20 keypad-bit ( n' keypad ) + rocker-down h# 40 keypad-bit ( n' keypad ) + rocker-left h# 80 keypad-bit ( n' keypad ) + drop ( n ) +[then] ;
fload ${BP}/cpu/x86/pc/olpc/gamekeys.fth
Modified: cpu/arm/olpc/1.75/rtc.fth ============================================================================== --- cpu/arm/olpc/1.75/rtc.fth Mon Dec 20 21:58:26 2010 (r2090) +++ cpu/arm/olpc/1.75/rtc.fth Mon Dec 20 22:00:05 2010 (r2091) @@ -2,8 +2,13 @@ " rtc" name
: set-address ( -- ) +[ifdef] cl2-a1 d# 97 to smb-clock-gpio# d# 98 to smb-data-gpio# +[else] + d# 53 to smb-clock-gpio# + d# 54 to smb-data-gpio# +[then] h# d0 to smb-slave ; : rtc@ ( reg# -- byte ) set-address smb-byte@ ;
Modified: dev/olpc/dcon/mmp2dcon.fth ============================================================================== --- dev/olpc/dcon/mmp2dcon.fth Mon Dec 20 21:58:26 2010 (r2090) +++ dev/olpc/dcon/mmp2dcon.fth Mon Dec 20 22:00:05 2010 (r2091) @@ -29,8 +29,13 @@ \ h# 8000 constant DM_SELFTEST
: set-dcon-slave ( -- ) +[ifdef] cl2-a1 d# 162 to smb-clock-gpio# d# 163 to smb-data-gpio# +[else] + d# 161 to smb-clock-gpio# + d# 110 to smb-data-gpio# +[then] h# 1a to smb-slave ;
@@ -39,8 +44,13 @@ : dcon@ ( reg# -- word ) set-dcon-slave smb-word@ ; : dcon! ( word reg# -- ) set-dcon-slave smb-word! ;
+[ifdef] cl2-a1 : dcon-load ( -- ) d# 151 gpio-set ; : dcon-unload ( -- ) d# 151 gpio-clr ; +[else] +: dcon-load ( -- ) d# 142 gpio-set ; +: dcon-unload ( -- ) d# 142 gpio-clr ; +[then] \ : dcon-blnk? ( -- flag ) ; \ Not hooked up : dcon-stat@ ( -- n ) h# d4019100 l@ 4 rshift 3 and ; : dcon-irq? ( -- flag ) d# 124 gpio-pin@ 0= ;
Modified: dev/olpc/mmp2camera/platform.fth ============================================================================== --- dev/olpc/mmp2camera/platform.fth Mon Dec 20 21:58:26 2010 (r2090) +++ dev/olpc/mmp2camera/platform.fth Mon Dec 20 22:00:05 2010 (r2091) @@ -15,8 +15,13 @@
: reset-sensor ( -- ) d# 73 gpio-clr 1 ms d# 73 gpio-set ;
+[ifdef] cl2-a1 : sensor-power-on ( -- ) d# 145 gpio-set ; : sensor-power-off ( -- ) d# 145 gpio-clr ; +[else] +: sensor-power-on ( -- ) d# 150 gpio-set ; +: sensor-power-off ( -- ) d# 150 gpio-clr ; +[then]
\ CAM_HSYNC is on GPIO67, CAM_VSYNC is on GPIO68 \ PIXMCLK on GPIO69, PIXCLK on GPIO70, PIXDATA[7:0] on GPIO[59:66]
openfirmware@openfirmware.info