[openfirmware] [commit] r3769 - dev/olpc

repository service svn at openfirmware.info
Mon Mar 9 08:45:24 CET 2015


Author: quozl
Date: Mon Mar  9 08:45:23 2015
New Revision: 3769
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3769

Log:
OLPC XO - siv121d camera sensor support, #12861

Modified:
   dev/olpc/seti.fth

Modified: dev/olpc/seti.fth
==============================================================================
--- dev/olpc/seti.fth	Fri Jan 30 03:34:25 2015	(r3768)
+++ dev/olpc/seti.fth	Mon Mar  9 08:45:23 2015	(r3769)
@@ -288,7 +288,7 @@
    then
 ;
 
-\ SIV121C, not supported on XO-1.5,
+\ SIV121C, SIV121D, not supported on XO-1.5,
 \ because sensor maximum clock 27 MHz, and host provides 48 MHz.
 
 [ifndef] olpc-xo-1.5
@@ -651,6 +651,37 @@
       cb 12 ov!  \ OUTFMT, RGB565 setting
    then
 ;
+
+: siv121d-config  ( ycrcb? -- )
+   >r        ( r: ucrcb? )
+
+   01 00 ov! \ BLK_SEL - block address bank selector - Timing Control Block
+   02 03 ov! \ CNTR_A - Control global reset and device enable -
+             \ global reset, idle mode with clock disabled.
+
+   00 00 ov! \ BLK_SEL - block address bank selector - PMU block
+   04 03 ov! \ CHIP_CNTR - Chip control -
+             \ enable output pads, disable software stand-by power-down mode.
+
+   \ AE
+   02 00 ov! \ BLK_SEL - block address bank selector - AE (automatic exposure)
+   04 11 ov! \ MAX_SHUTSTEP
+   \ minimum exposure time when automatic exposure in use, reduce to increase frame rate at low light levels at the expense of image brightness
+
+   \ IDP
+   04 00 ov! \ BLK_SEL - block address bank selector - IDP
+   1d 11 ov! \ SIGCNT - invert PCLK polarity
+   ( r: ycrcb? )  r>  if    ( )
+      25 12 ov! \ OUTFMT, YUV
+   else
+      83 12 ov! \ OUTFMT, RGB565 setting
+   then
+
+   \ Sensor On
+   01 00 ov! \ BLK_SEL - block address bank selector - Control Block
+   01 03 ov! \ CNTR_A - Control global reset and device enable -
+             \ no reset, dynamic mode with clock enabled
+;
 [then]
 
 : (set-mirrored)  ( mirrored? -- )
@@ -681,6 +712,16 @@
    then                       ( regval )
 
 [ifndef] olpc-xo-1.5
+   dup h# de = if
+      " SETi,SIV121D" " sensor" string-property
+[ifdef] set-sensor-properties
+      " seti,siv121d" camera-smb-slave set-sensor-properties
+[then]
+      ['] siv121c-set-mirrored to set-mirrored
+      ['] siv121d-config to camera-config
+      drop true exit
+   then
+
    dup h# 95 = if
       " SETi,SIV121C" " sensor" string-property
 [ifdef] set-sensor-properties



More information about the openfirmware mailing list